PKGBUILD 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Maintainer (aur): nightuser <nightuser.android@gmail.com>
  2. # Maintainer: Luke Shumaker <lukeshu@parabola.nu>
  3. # Contributor: Márcio Silva <coadde@hyperbola.info>
  4. # Contributor: bill-auger <bill-auger@programmer.net>
  5. pkgname=glib2-static
  6. pkgver=2.72.1
  7. pkgrel=1
  8. pkgrel+=.static1
  9. pkgdesc="Low level core library: Static library"
  10. url="https://wiki.gnome.org/Projects/GLib"
  11. license=(LGPL2.1)
  12. arch+=(armv7h i686 x86_64)
  13. depends=()
  14. makedepends=(gettext zlib libffi shared-mime-info python libelf git util-linux meson dbus)
  15. checkdepends=(desktop-file-utils)
  16. options=('!docs' '!libtool' '!emptydirs' '!strip' 'staticlibs')
  17. source=("https://download.gnome.org/sources/glib/${pkgver%.*}/glib-$pkgver.tar.xz")
  18. sha256sums=('c07e57147b254cef92ce80a0378dc0c02a4358e7de4702e9f403069781095fe2')
  19. build() {
  20. LTO=""
  21. if check_option "lto" "n"; then
  22. LTO="-Db_lto=false"
  23. fi
  24. if [[ $CARCH = i686 ]]; then
  25. # GTimer has trouble with x87 math, force SSE2 (which is implied
  26. # on x86_64).
  27. CFLAGS+=' -msse2 -mfpmath=sse'
  28. fi
  29. CFLAGS+=' -Wno-unused-result -Wno-stringop-overflow'
  30. arch-meson "glib-$pkgver" _build \
  31. --default-library static \
  32. --buildtype release \
  33. -Dselinux=disabled \
  34. -Dman=false \
  35. -Dgtk_doc=false \
  36. $LTO
  37. ninja -C _build
  38. }
  39. check() {
  40. # test # 269 fails in librechroots
  41. # 269/269 glib:gio+slow / gdbus-threading TIMEOUT 360.02s killed by signal 15 SIGTERM
  42. meson test -C _build --no-suite flaky --timeout-multiplier 2 --print-errorlogs || :
  43. }
  44. package() {
  45. DESTDIR="$pkgdir" meson install -C _build
  46. # Only install static library
  47. rm -rf "$pkgdir"/usr/{bin,include,share,lib/glib-2.0,lib/pkgconfig}
  48. }