# Contributor: Valery Kartel # Maintainer: Natanael Copa pkgname=glib pkgver=2.48.0 pkgrel=1 pkgdesc="Common C routines used by Gtk+ and other libs" url="http://www.gtk.org" arch="all" license='GPL' depends= triggers="$pkgname.trigger=/usr/share/glib-2.0/schemas:/usr/lib/gio/modules" depends_dev="perl python gettext-dev zlib-dev bzip2-dev libffi-dev" makedepends="$depends_dev pcre-dev" source="http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz 0001-gquark-make-sure-quark-is-initialized-before-create-.patch " subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-lang $pkgname-bash-completion:bashcomp" _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done # workaround packaing issue. gtk-doc.make timestamp was newer than # Makefile.am, which triggers automake re-run touch -r docs/reference/glib/Makefile.am gtk-doc.make } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --mandir=/usr/share/man \ --disable-gtk-doc \ --disable-compile-warnings \ --with-pcre=system \ --with-pic \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 rm -rf "$pkgdir"/usr/lib/charset.alias } dev() { default_dev mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/share find "$pkgdir"/usr/bin ! -name "glib-compile-schemas" -a \( \ -name "gdbus-codegen" -o \ -name "gobject-query" -o \ -name "gresource" -o \ -name "gtester*" -o \ -name "glib-*" \) \ -exec mv {} "$subpkgdir"/usr/bin \; mv "$pkgdir"/usr/share/gdb "$pkgdir"/usr/share/glib-2.0 \ "$subpkgdir"/usr/share } bashcomp() { pkgdesc="Bash completion for $pkgname" arch="noarch" depends= install_if="$pkgname=$pkgver-r$pkgrel bash-completion" mkdir -p "$subpkgdir"/usr/share mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share [ "$(ls -A "$pkgdir"/usr/share)" ] || rmdir "$pkgdir"/usr/share } md5sums="093a586f37d2853bdb129231e1b350e0 glib-2.48.0.tar.xz 6eb959b045db81dc552edd2695911671 0001-gquark-make-sure-quark-is-initialized-before-create-.patch" sha256sums="744be6931ca914c68af98dc38ff6b0cf8381d65e335060faddfbf04c17147c34 glib-2.48.0.tar.xz bdddb06d2a3aaccb5846e4a3f9ae1b052d6606384d6159c2d6bf3796e28759dc 0001-gquark-make-sure-quark-is-initialized-before-create-.patch" sha512sums="684544bc594d9f6c905495d895daed40b074bcf5fa835aefb9a1034afc9564b2bd464e68d4c378c210e96918ef5d5202350da53a7104794420e990049ddbebf5 glib-2.48.0.tar.xz 8a9cd51ee9f557772e35614d42071e1197c0164d40503871e3e79e116bed6f6a5c8f82fd3f377b5e334f342d2d1df60d404ea0ed885989d7e3412b6795fb5469 0001-gquark-make-sure-quark-is-initialized-before-create-.patch"