blob: c894b28c1e78c6d7084ae64188fad457f8f5c102 (
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
|
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=glib
pkgver=2.54.1
pkgrel=0
pkgdesc="Common C routines used by Gtk+ and other libs"
url="https://developer.gnome.org/glib/"
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="https://download.gnome.org/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"
default_prepare
# workaround packaging 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
make
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
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="2971feede03540f5cd2b4bd60b0c3fcbd5ad95ba96d07f6e6d3f4a6b90c31555e52f3480b51976574642fd5ab99dd557061ee5db1a1855fc601297cd74a8f1a8 glib-2.54.1.tar.xz
32e5aca9a315fb985fafa0b4355e4498c1f877fc1f0b58ad4ac261fb9fbced9f026c7756a5f2af7d61ce756b55c8cd02811bb08df397040e93510056f073756b 0001-gquark-fix-initialization-with-c-constructors.patch"
|