blob: 97a3806d1ff728dd6388bd540ea4f1f1fed477b4 (
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
|
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=glib
pkgver=2.52.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 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-static $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 \
--disable-selinux \
--with-pcre=system \
--with-pic \
--enable-static \
|| 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
}
static() {
pkgdesc="glib static libraries"
depends="gettext-static"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
}
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
}
sha512sums="6f0475b4ee1078867671a79b1751674926ba1caa872cec3896e2830c61c3cde67972afa9f2d606a2b6705e9846222462b003c6e966a9b63982f3fc3fb58c4d37 glib-2.52.1.tar.xz
32e5aca9a315fb985fafa0b4355e4498c1f877fc1f0b58ad4ac261fb9fbced9f026c7756a5f2af7d61ce756b55c8cd02811bb08df397040e93510056f073756b 0001-gquark-fix-initialization-with-c-constructors.patch"
|