PKGBUILD 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Maintainer (Arch:glib2) Jan de Groot <jgc@archlinux.org>
  2. # Maintainer: Luke Shumaker <lukeshu@parabola.nu>
  3. # Contributor: Márcio Silva <coadde@hyperbola.info>
  4. pkgname=glib2-static
  5. pkgver=2.58.3
  6. pkgrel=1
  7. pkgrel+=.static2
  8. pkgdesc="Low level core library"
  9. pkgdesc+=" (static libraries)"
  10. url="https://wiki.gnome.org/Projects/GLib"
  11. license=(LGPL2.1)
  12. arch=(x86_64)
  13. arch+=(i686 armv7h)
  14. depends=(pcre libffi)
  15. makedepends=(libffi zlib shared-mime-info python libelf git util-linux meson dbus libxslt docbook-xsl)
  16. checkdepends=(desktop-file-utils dbus)
  17. optdepends=('python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report'
  18. 'libelf: gresource inspection tool')
  19. options=('!docs' '!libtool' '!emptydirs' '!strip' 'staticlibs')
  20. _commit=f2d1128ffae0de87680e411fb62ccfccafed6b1c # tags/2.58.3^0
  21. source=("git+https://gitlab.gnome.org/GNOME/glib.git#commit=$_commit"
  22. noisy-glib-compile-schemas.diff
  23. fix-static-build-589.diff)
  24. sha256sums=('SKIP'
  25. '81a4df0b638730cffb7fa263c04841f7ca6b9c9578ee5045db6f30ff0c3fc531'
  26. 'f4790fc845f2b4811ce5df5ef3a7dfcc23a1593ec4e19ae9173bb799a045d00f')
  27. pkgver() {
  28. cd glib
  29. git describe --tags | sed 's/-/+/g'
  30. }
  31. prepare() {
  32. cd glib
  33. # Suppress noise from glib-compile-schemas.hook
  34. patch -Np1 -i ../noisy-glib-compile-schemas.diff
  35. patch -Np1 -i ../fix-static-build-589.diff
  36. }
  37. build() {
  38. if [[ $CARCH = i686 ]]; then
  39. # GTimer has trouble with x87 math, force SSE2 (which is implied
  40. # on x86_64).
  41. CFLAGS+=' -msse2 -mfpmath=sse'
  42. fi
  43. arch-meson glib build \
  44. --default-library static \
  45. -D selinux=false \
  46. -D man=true \
  47. -D gtk_doc=false \
  48. -D internal_pcre=false \
  49. -D fam=false
  50. ninja -C build
  51. }
  52. check() {
  53. meson test -C build
  54. }
  55. package() {
  56. DESTDIR="$pkgdir" meson install -C build
  57. # remove conflicting files
  58. rm -rf "$pkgdir/usr/"{bin,include,share,lib/glib-2.0,lib/pkgconfig} $pkgdir/usr/lib/*.so*
  59. }