# Maintainer: Natanael Copa pkgname=gtk+2.0 pkgver=2.24.28 pkgrel=1 subpkg=gtk-update-icon-cache pkgdesc="The GTK+ Toolkit (v2)" url="http://www.gtk.org/" install="$pkgname.post-install $pkgname.post-upgrade $pkgname.post-deinstall" triggers="$subpkg.trigger=/usr/share/icons/*" arch="all" license="LGPL" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $subpkg:icon_cache" depends="shared-mime-info gtk-update-icon-cache" replaces="gtk+" replaces_dev="gtk+-dev" replaces_doc="gtk+-doc" depends_dev=" atk-dev cairo-dev gdk-pixbuf-dev glib-dev intltool libxdamage-dev pango-dev " # we add hicolor-icon-theme because the subpackage gtk-update-icon-cache # needs it. We need to force hicolor-icon-cache to be built before gtk+.2.0 makedepends=" autoconf automake libtool $depends_dev cups-dev expat-dev gettext-dev gnutls-dev gobject-introspection-dev gtk-doc hicolor-icon-theme libice-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxfixes-dev libxrandr-dev libxi-dev zlib-dev" source="http://ftp.gnome.org/pub/gnome/sources/gtk+/${pkgver%.*}/gtk+-$pkgver.tar.xz xid-collision-debug.patch gtk2-fixdso.patch " _builddir="$srcdir"/gtk+-$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done libtoolize --force \ && aclocal -I m4 \ && autoconf \ && automake --add-missing } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --with-xinput=yes \ --without-libjasper \ --with-included-loaders=png \ || return 1 # https://bugzilla.gnome.org/show_bug.cgi?id=655517 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 find "$pkgdir" -name '*.la' -delete } dev() { mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/ mv "$pkgdir"/usr/share/gtk-2.0 "$subpkgdir"/usr/share/ || return 1 default_dev replaces="gtk+2.0" mv "$pkgdir"/usr/bin/gtk-builder-convert \ "$pkgdir"/usr/bin/gtk-demo \ "$subpkgdir"/usr/bin || return 1 } icon_cache() { depends="hicolor-icon-theme" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/"$subpkg" "$subpkgdir"/usr/bin || return 1 } md5sums="bfacf87b2ea67e4e5c7866a9003e6526 gtk+-2.24.28.tar.xz 22355df723f6ca358e30e6b8f0baace5 xid-collision-debug.patch b1f61a42b2fa3c54eb2e0d6c130a0f0a gtk2-fixdso.patch" sha256sums="b2c6441e98bc5232e5f9bba6965075dcf580a8726398f7374d39f90b88ed4656 gtk+-2.24.28.tar.xz d758bb93e59df15a4ea7732cf984d1c3c19dff67c94b957575efea132b8fe558 xid-collision-debug.patch 609c20a1a3ca09ad3a3aa5186743d858e930edd9d775a3bf59c9716b54771b5d gtk2-fixdso.patch" sha512sums="86d563645ca70c1e14afd4b38d925f496e596cbf6181f2e95310f58c2f4152aaecc559e3c513e6d405fcf48d8d413d59a9d72782216529c1280bd8e1947d7760 gtk+-2.24.28.tar.xz 89e3223c86731a76b12d39245f1ec4cf8b4860ab1d11d74a10e5deb0db302f20b4bb5d9034da1d8aeb96369dbdeddcdd2f28943270dc501476c694562b960159 xid-collision-debug.patch 95f28633a5164a2a9fec45ee1aa80bd1c07e0c5a7ac8d770b9c74af0909b7286b823eb634aa384cad609dc8799d2e6c9e8392c2732b9093076fdf94b4f6878b7 gtk2-fixdso.patch"