blob: 363005ca746bd2dd5fb3495fa19b8c0f6eb5022f (
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.50.2
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 python2 gettext-dev zlib-dev bzip2-dev libffi-dev
util-linux-dev"
makedepends="$depends_dev pcre-dev"
source="http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
0001-gquark-fix-initialization-with-c-constructors.patch
"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-lang $pkgname-bash-completion:bashcomp:noarch"
_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"
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="5eeb2bfaf78a07be59585e8b6e80b1d6 glib-2.50.2.tar.xz
6dc9823b4b7b7e6ae1de6fac1db5fb09 0001-gquark-fix-initialization-with-c-constructors.patch"
sha256sums="be68737c1f268c05493e503b3b654d2b7f43d7d0b8c5556f7e4651b870acfbf5 glib-2.50.2.tar.xz
2024aa0723f657be4ade791acc4e8ca427f9a2caa1d82e0dd955494ee922ccba 0001-gquark-fix-initialization-with-c-constructors.patch"
sha512sums="63d7b5ece8d7d15b10e06ef10a8e0a4446f30a8d9c97daa3352ec00dfef622728bd42ed24cbf67e553166a0f9e29a3e3d024d1d085b9804fd67608db438b6771 glib-2.50.2.tar.xz
32e5aca9a315fb985fafa0b4355e4498c1f877fc1f0b58ad4ac261fb9fbced9f026c7756a5f2af7d61ce756b55c8cd02811bb08df397040e93510056f073756b 0001-gquark-fix-initialization-with-c-constructors.patch"
|