PKGBUILD 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Maintainer (Arch): Jan de Groot <jgc@archlinux.org>
  2. # Maintainer: André Silva <emulatorman@hyperbola.info>
  3. # Contributor: Márcio Silva <coadde@hyperbola.info>
  4. pkgname=glib2
  5. pkgver=2.66.2
  6. _debver=2.66.2
  7. _debrel=1
  8. pkgrel=4
  9. pkgdesc="Low level core library"
  10. url="https://www.gtk.org/"
  11. license=(LGPL-2.1)
  12. arch=(i686 x86_64)
  13. depends=(pcre libffi libutil-linux)
  14. makedepends=(shared-mime-info python libelf util-linux
  15. meson docbook-xml docbook-xsl quilt) # quilt already have gettext-tiny as dependency
  16. optdepends=('python: glib-genmarshal, glib-mkenums, gtester-report'
  17. 'libelf: gresource inspection tool')
  18. options=(!emptydirs)
  19. source=("https://download.gnome.org/sources/glib/${pkgver:0:4}/glib-$pkgver.tar.xz"
  20. "https://deb.debian.org/debian/pool/main/g/glib2.0/glib2.0_$_debver-$_debrel.debian.tar.xz"
  21. noisy-glib-compile-schemas.diff
  22. glib-compile-schemas.hook gio-querymodules.hook)
  23. sha512sums=('30278c066c6b209f45fcfdb9ffc4732236451464506b93c0fff0964ff8aac58c15be85c3793c686d4740d9d97857984bc0ab71e38d5da11c5fd860e569fb6cb9'
  24. '9fee3d62bb3bfc4769bc934c95fe13f14bd9806abacd4708e3f0c96fdfef7768b8e3a42b610bdfc3d002fbb28c8194834c3a0e8edfde6162b37bcb9733670c03'
  25. '7f423a81500b357a6aecd88fed7bc954158d7cb5cf9f4976f35a2a63c7451947c8948f868e9c292fa04fc6bf10c05a2d8c9976078f1dc3050b2a75ee88ec7a81'
  26. 'c04fe25afc217c295b5ce4034733cec046126482d00fb8d0299e4815ac57129dd3f1c9ac824b9386d208a4f113e9dae682ea5b72f75387ed6b6b96a9cbbee8ca'
  27. '5afd6f275c8fff16df3e685818f2e7989b39ffb3b8f5fc261a5a6d54a9b28ef53af62f3bf5067cf87cb74691572f85730cbc508691956ae048a0f3ecc1a0a39c')
  28. prepare() {
  29. cd glib-$pkgver
  30. if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
  31. # Debian patches
  32. export QUILT_PATCHES=debian/patches
  33. export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
  34. export QUILT_DIFF_ARGS='--no-timestamps'
  35. mv "$srcdir"/debian .
  36. quilt push -av
  37. else
  38. # Suppress noise from glib-compile-schemas.hook
  39. patch -p1 -i ../noisy-glib-compile-schemas.diff
  40. fi
  41. }
  42. build() {
  43. CFLAGS+=" -DG_DISABLE_CAST_CHECKS"
  44. hyperbola-meson glib-$pkgver build \
  45. -D selinux=disabled \
  46. -D man=true
  47. ninja -C build
  48. }
  49. package() {
  50. DESTDIR="$pkgdir" meson install -C build
  51. install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 *.hook
  52. python -m compileall -d /usr/share/glib-2.0/codegen \
  53. "$pkgdir/usr/share/glib-2.0/codegen"
  54. python -O -m compileall -d /usr/share/glib-2.0/codegen \
  55. "$pkgdir/usr/share/glib-2.0/codegen"
  56. install -d -m755 "$pkgdir/lib"
  57. mv $pkgdir/usr/lib/libglib-2.0.so.0* "$pkgdir/lib"
  58. ln -sf ../../lib/libglib-2.0.so.0 "$pkgdir/usr/lib/libglib-2.0.so"
  59. install -Dm644 glib-$pkgver/COPYING "$pkgdir/usr/share/licenses/glib2/COPYING"
  60. }