# Maintainer: Natanael Copa pkgname=glib pkgver=2.46.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" source="http://ftp.gnome.org/pub/gnome/sources/glib/${pkgver%.*}/glib-$pkgver.tar.xz 0001-Revert-Move-quark-initialization-to-a-constructor.patch " subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-lang" _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 \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir/" install rm -rf "$pkgdir"/usr/lib/charset.alias } # move the stuff in /usr/bin to the glib-dev package dev() { default_dev replaces="glib" mkdir -p "$subpkgdir"/usr/bin/ \ "$subpkgdir"/usr/share/bash-completion/completions \ || return 1 cd "$pkgdir"/usr/bin mv \ gdbus-codegen \ glib-compile-resources \ glib-genmarshal \ glib-gettextize \ glib-mkenums \ gobject-query \ gresource \ gtester \ gtester-report \ "$subpkgdir"/usr/bin/ mv "$pkgdir"/usr/share/gdb \ "$pkgdir"/usr/share/glib-2.0 \ "$subpkgdir"/usr/share/ || return 1 mv "$pkgdir"/usr/share/bash-completion/completions/gresource \ "$subpkgdir"/usr/share/bash-completion/completions \ || return 1 } md5sums="7f815d6e46df68e070cb421ed7f1139e glib-2.46.2.tar.xz 1d9c4fbfadc2e358e3bb9fbec1646711 0001-Revert-Move-quark-initialization-to-a-constructor.patch" sha256sums="5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db glib-2.46.2.tar.xz c3dfaf69a627033d28552342e79ccbcfb7cae8dfbe8e3a2272ce2c25f76b9844 0001-Revert-Move-quark-initialization-to-a-constructor.patch" sha512sums="8b5298712710d77b4a47367071f782d2bb3042b149ec8fde8c065f80bf3c5375c94318d19665c0092572e4895e590231a47324d25f371310f02b43feb3009588 glib-2.46.2.tar.xz c034c60e87b6fea82d1eddd6ccd849425dd9be10af552491d82398f04ec1691d6d386dc99333a917b1b5fa905526a4553cef37ab0967ff857864f95fe7a52edf 0001-Revert-Move-quark-initialization-to-a-constructor.patch"