gtk/gtk2/PKGBUILD
2016-09-10 05:02:38 +01:00

47 lines
1.3 KiB
Bash

pkgname=gtk2
pkgver=2.24.31
pkgrel=1
# When updating, remember to also update lib32-gtk2
pkgdesc="GObject-based multi-platform GUI toolkit (legacy)"
arch=(x86_64)
url="http://www.gtk.org/"
depends=(atk pango libxcursor libxinerama libxrandr libxi libxcomposite libxdamage
shared-mime-info cairo libcups gtk-update-icon-cache librsvg)
makedepends=(gobject-introspection python2)
license=(LGPL)
install=gtk2.install
source=(http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-$pkgver.tar.xz
xid-collision-debug.patch)
sha256sums=('68c1922732c7efc08df4656a5366dcc3afdc8791513400dac276009b40954658'
'd758bb93e59df15a4ea7732cf984d1c3c19dff67c94b957575efea132b8fe558')
prepare() {
cd gtk+-$pkgver
patch -Np1 -i ../xid-collision-debug.patch
}
build() {
cd gtk+-$pkgver
CXX=/bin/false ./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-xinput=yes
# https://bugzilla.gnome.org/show_bug.cgi?id=655517
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
package() {
cd gtk+-$pkgver
make DESTDIR="$pkgdir" install
sed -i "s#env python#env python2#" $pkgdir/usr/bin/gtk-builder-convert
echo 'gtk-fallback-icon-theme = "oxygen"' > "$pkgdir/etc/gtk-2.0/gtkrc"
rm "$pkgdir/usr/bin/gtk-update-icon-cache"
rm -r "$pkgdir/usr/share/gtk-doc"
}