# Contributor: Valery Kartel # Maintainer: Natanael Copa pkgname=glib pkgver=2.48.2 pkgrel=0 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-fix-initialization-with-c-constructors.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="f4ac1aa2efd4f5798c37625ea697ac57 glib-2.48.2.tar.xz 6dc9823b4b7b7e6ae1de6fac1db5fb09 0001-gquark-fix-initialization-with-c-constructors.patch" sha256sums="f25e751589cb1a58826eac24fbd4186cda4518af772806b666a3f91f66e6d3f4 glib-2.48.2.tar.xz 2024aa0723f657be4ade791acc4e8ca427f9a2caa1d82e0dd955494ee922ccba 0001-gquark-fix-initialization-with-c-constructors.patch" sha512sums="2eac104eb2207d0a6488992e48069a34b417f51e141364f281ab7b0953a6de88be177b1c694dd9464a856c9a5d8021e3cf0193a8d9c5aaf6ea11f1f9ff743c43 glib-2.48.2.tar.xz 32e5aca9a315fb985fafa0b4355e4498c1f877fc1f0b58ad4ac261fb9fbced9f026c7756a5f2af7d61ce756b55c8cd02811bb08df397040e93510056f073756b 0001-gquark-fix-initialization-with-c-constructors.patch"