summaryrefslogtreecommitdiff
path: root/user/gtk+2.0/APKBUILD
blob: 9fee775c26a5775e9b4995dcadc5b03ca6a16c65 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=gtk+2.0
pkgver=2.24.32
pkgrel=2
pkgdesc="The GTK+ Toolkit (v2)"
url="https://www.gtk.org/"
arch="all"
options="!check"  # Requires xvfb, resulting in eventual circular dependency
license="LGPL-2.0+"
depends="shared-mime-info gtk-update-icon-cache"
depends_dev="libxdamage-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
	atk-dev cairo-dev cups-dev expat-dev gdk-pixbuf-dev glib-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 pango-dev zlib-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang
	gtk-update-icon-cache:icon_cache"
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.post-deinstall"
triggers="gtk-update-icon-cache.trigger=/usr/share/icons/*"
source="https://download.gnome.org/sources/gtk+/${pkgver%.*}/gtk+-$pkgver.tar.xz
	xid-collision-debug.patch
	gtk2-fixdso.patch
	"
builddir="$srcdir"/gtk+-$pkgver

prepare() {
	default_prepare
	libtoolize --force \
		&& aclocal -I m4 \
		&& autoconf \
		&& automake --add-missing
}

build() {
	LIBS="-lintl" ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--with-xinput=yes \
		--without-libjasper \
		--with-included-loaders=png \
		--with-gdktarget=x11 \
		--enable-cups \
		--enable-man
	# https://bugzilla.gnome.org/show_bug.cgi?id=655517
	sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

dev() {
	mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/share/
	mv "$pkgdir"/usr/share/gtk-2.0 "$subpkgdir"/usr/share/
	default_dev
	replaces="gtk+2.0"
	mv "$pkgdir"/usr/bin/gtk-builder-convert \
		"$pkgdir"/usr/bin/gtk-demo \
		"$subpkgdir"/usr/bin
}

icon_cache() {
	depends="hicolor-icon-theme"

	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/gtk-update-icon-cache "$subpkgdir"/usr/bin
}

sha512sums="8e8fd9ae32f1d6fb544da260f00599f0f05090d910d767b06ef086ab4f1f8373a29bb0da9767761c9b5f4cfd51b5c45d0fa5d39b0428c839ddf0a579df806696  gtk+-2.24.32.tar.xz
89e3223c86731a76b12d39245f1ec4cf8b4860ab1d11d74a10e5deb0db302f20b4bb5d9034da1d8aeb96369dbdeddcdd2f28943270dc501476c694562b960159  xid-collision-debug.patch
95f28633a5164a2a9fec45ee1aa80bd1c07e0c5a7ac8d770b9c74af0909b7286b823eb634aa384cad609dc8799d2e6c9e8392c2732b9093076fdf94b4f6878b7  gtk2-fixdso.patch"