aboutsummaryrefslogtreecommitdiffstats
path: root/main/glib/APKBUILD
blob: bc8ce174933fc7c730f52923d106e7d1f2321ff5 (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
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=glib
pkgver=2.48.1
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 pcre-dev"
source="http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
	0001-gquark-make-sure-quark-is-initialized-before-create-.patch
	"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-lang $pkgname-bash-completion:bashcomp"

_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 \
		--with-pcre=system \
		--with-pic \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -rf "$pkgdir"/usr/lib/charset.alias
}

dev() {
	default_dev
	mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/share
		find "$pkgdir"/usr/bin ! -name "glib-compile-schemas" -a \( \
		-name "gdbus-codegen" -o \
		-name "gobject-query" -o \
		-name "gresource" -o \
		-name "gtester*" -o \
		-name "glib-*" \) \
		-exec mv {} "$subpkgdir"/usr/bin \;
	mv "$pkgdir"/usr/share/gdb "$pkgdir"/usr/share/glib-2.0 \
		"$subpkgdir"/usr/share
}

bashcomp() {
	pkgdesc="Bash completion for $pkgname"
	arch="noarch"
	depends=
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
	mkdir -p "$subpkgdir"/usr/share
	mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share
	[ "$(ls -A "$pkgdir"/usr/share)" ] || rmdir "$pkgdir"/usr/share
}

md5sums="67bd3b75c9f6d5587b457dc01cdcd5bb  glib-2.48.1.tar.xz
6eb959b045db81dc552edd2695911671  0001-gquark-make-sure-quark-is-initialized-before-create-.patch"
sha256sums="74411bff489cb2a3527bac743a51018841a56a4d896cc1e0d0d54f8166a14612  glib-2.48.1.tar.xz
bdddb06d2a3aaccb5846e4a3f9ae1b052d6606384d6159c2d6bf3796e28759dc  0001-gquark-make-sure-quark-is-initialized-before-create-.patch"
sha512sums="5bbea7d07ba6d75c35c6be8f1ebc685aa2549bd20030741b2d6e2c30e9b2d476c2afa50a974bbdad98c305666c8b04357b51619c97fe50d3e9965700088aad9b  glib-2.48.1.tar.xz
8a9cd51ee9f557772e35614d42071e1197c0164d40503871e3e79e116bed6f6a5c8f82fd3f377b5e334f342d2d1df60d404ea0ed885989d7e3412b6795fb5469  0001-gquark-make-sure-quark-is-initialized-before-create-.patch"