aboutsummaryrefslogtreecommitdiffstats
path: root/main/glib/APKBUILD
blob: 739d872caed0cecc91a6482ce69993753a06ce1a (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
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=glib
pkgver=2.62.6
pkgrel=0
pkgdesc="Common C routines used by Gtk+ and other libs"
url="https://developer.gnome.org/glib/"
arch="all"
license="LGPL-2.1-or-later"
triggers="$pkgname.trigger=/usr/share/glib-2.0/schemas:/usr/lib/gio/modules"
depends_dev="python3 gettext-dev bzip2-dev libxml2-utils libxslt
	docbook-xml docbook-xsl"
makedepends="$depends_dev pcre-dev meson zlib-dev libffi-dev util-linux-dev"
options="!check" # don't like to be run without first being installed
source="https://download.gnome.org/sources/glib/${pkgver%.*}/glib-$pkgver.tar.xz
	0001-gquark-fix-initialization-with-c-constructors.patch
	deprecated-no-warn.patch
	musl-libintl.patch
	mips-disable-memory-barrier.patch
	mips-disable-objcopy-tests.patch
	"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-static $pkgname-dev $pkgname-lang"

# secfixes:
#   2.62.5-r0:
#     - CVE-2020-6750
#   2.60.4-r0:
#     - CVE-2019-12450

build() {
	meson \
		--default-library=both \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=release \
		-Dman=true \
		. output
	ninja -C output

	# FIXME: meson adds -lintl first in Libs: in the .pc file but it needs to be
	#        last for static builds (e.g. qemu)
	sed -i -e '/^Libs:/s/-lintl \(.*\)/\1 -lintl/' output/meson-private/glib-2.0.pc
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

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/
}

sha512sums="8e3972a371f3c1a50b7d245b30e4f740583ad72ba4ab325e0e15e0732be44dfb69b603fb39dcf4989255a23a181e9ea5dd25982dd94c386cd9f21952243ad6f5  glib-2.62.6.tar.xz
32e5aca9a315fb985fafa0b4355e4498c1f877fc1f0b58ad4ac261fb9fbced9f026c7756a5f2af7d61ce756b55c8cd02811bb08df397040e93510056f073756b  0001-gquark-fix-initialization-with-c-constructors.patch
744239ea2afb47e15d5d0214c37d7c798edac53797ca3ac14d515aee4cc3999ef9716ba744c64c40198fb259edc922559f77c9051104a568fc8ee4fc790810b1  deprecated-no-warn.patch
6ec43e76bb973367bd99c5e2077113e86df2b120b3788aeeb4692a572392bba7227e8217b28a918e02ad82fcb8ca6d260c3221b84688774d86779755af51a847  musl-libintl.patch
f853ddb4ff8231e1df15323773af938323517b643b241fc635d05f7d6e103ff18417d203c65661c7dd0b5e44c5d74c71a497e82281c2bb4ed4e2fe9b9ed7140f  mips-disable-memory-barrier.patch
22a738e2ad7bb419e0fd07ad1c796d5307e2952aa9801fff2adb8747ecc1c5b688f492e93ebe789fc2951408e54e52ca0df5cdadf8456630de1121baaf10a7b4  mips-disable-objcopy-tests.patch"