aboutsummaryrefslogtreecommitdiffstats
path: root/main/gtk+2.0/APKBUILD
blob: 6b26e2e1052ae27ac816406d3a471adbe3f7e92b (plain)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gtk+2.0
pkgver=2.24.15
pkgrel=0
pkgdesc="The GTK+ Toolkit (v2)"
url="http://www.gtk.org/"
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.post-deinstall"
triggers="$pkgname.trigger=/usr/share/icons/*"
arch="all"
license="LGPL"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
depends="shared-mime-info"

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
	"
makedepends="pkgconfig
	autoconf automake libtool
	$depends_dev
	cups-dev
	expat-dev
	gettext-dev
	gnutls-dev
	gobject-introspection-dev
	gtk-doc
	libice-dev
	libiconv-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 --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
}

md5sums="68f034fb4f68086790d7488cf00e71c8  gtk+-2.24.15.tar.xz
22355df723f6ca358e30e6b8f0baace5  xid-collision-debug.patch
b1f61a42b2fa3c54eb2e0d6c130a0f0a  gtk2-fixdso.patch"