summaryrefslogtreecommitdiff
path: root/user/gtk4/APKBUILD
blob: 18631054980c5389fa040a0c1858e486dc43c576 (plain) (blame)
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
# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: Sile Ekaterin Liszka <sheila@vulpine.house>
pkgname=gtk4
pkgver=4.12.3
pkgrel=0
pkgdesc="Version 4 of the GNOME graphics toolkit"
url="https://www.gtk.org"
arch="all"
options="!check"  # Requires X11
license="LGPL-2.0+ AND LGPL-2.1+ AND LGPL-2.0-only AND Expat"
depends=""
makedepends="cairo-dev cmake cups-dev ffmpeg-dev ffmpeg-libs gdk-pixbuf-dev
	gi-docgen glib-dev gobject-introspection-dev graphene-dev gstreamer-dev
	gst-plugins-bad-dev iso-codes-dev libepoxy-dev libexecinfo-dev
	libxcursor-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev
	meson>=0.63.0 ninja pango-dev>=1.50.0 py3-docutils py3-jinja2 py3-markdown
	py3-pygments py3-pygobject py3-toml py3-typogrify tiff-dev
	wayland-dev wayland-protocols"
install="$pkgname.post-install $pkgname.post-deinstall $pkgname.post-upgrade"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="https://download.gnome.org/sources/gtk/${pkgver%.*}/gtk-$pkgver.tar.xz"
builddir="$srcdir/gtk-$pkgver"

build() {
	meson setup \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=release \
		--wrap-mode=nofallback \
		-Dc_link_args='-lexecinfo' \
		-Ddocumentation=true \
		-Dman-pages=true \
		-Dbuild-demos=false \
		-Dbuild-examples=false \
		build
	# for whatever reason, the build system fails to build these on its own
	ninja -C build gdk/version/gdkversionmacros.h gdk/version/gdk-visibility.h
	meson compile -C build
}

check() {
	meson test -C build
}

package() {
	DESTDIR="$pkgdir" meson install -C build
}
lang() {
	mkdir -p "$subpkgdir"/usr/share/gtk-4.0/emoji
	mv "$pkgdir"/usr/share/gtk-4.0/emoji "$subpkgdir"/usr/share/gtk-4.0
	default_lang
}

sha512sums="f3efa9ad340362cecd81389219092b46e3b3f7b049dd6e02aecf4ac74f64f413f0b99c23cfac854e6b0a84d9715fb832beb7e0e698fcdb90ee49a78b27d0e366  gtk-4.12.3.tar.xz"