pmaports/temp/gtk4.0/APKBUILD
Stefan Hansson e17b71ffd1
temp/gtk4.0: upgrade to 4.12.0 (MR 4338)
[ci:skip-build]: already built successfully in CI
2023-08-19 21:49:35 +02:00

141 lines
3.8 KiB
Text

# Maintainer: Teemu Ikonen <tpikonen@mailbox.org>
# Forked from Alpine to apply patches for adaptive transient window handling
pkgname=gtk4.0
pkgver=9999.4.12.0
_pkgver=4.12.0
pkgrel=0
pkgdesc="The GTK Toolkit (v4)"
url="https://www.gtk.org/"
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.post-deinstall"
arch="all"
options="!check" # Test suite is known to fail upstream
license="LGPL-2.1-or-later"
subpackages="$pkgname-dbg $pkgname-demo $pkgname-dev $pkgname-doc $pkgname-lang"
depends="shared-mime-info gtk-update-icon-cache tzdata iso-codes"
depends_dev="
at-spi2-core-dev
gdk-pixbuf-dev
glib-dev
libepoxy-dev
libxext-dev
libxi-dev
libxinerama-dev
libxkbcommon-dev
vulkan-headers
wayland-dev
wayland-protocols
"
makedepends="
$depends_dev
cairo-dev
colord-dev
cups-dev
expat-dev
fontconfig-dev
gettext-dev
gi-docgen
gnutls-dev
gobject-introspection-dev
graphene-dev
gst-plugins-bad-dev
gstreamer-dev
gtk-doc>=1.33
iso-codes-dev
libice-dev
libx11-dev
libxcomposite-dev
libxcursor-dev
libxdamage-dev
libxfixes-dev
libxrandr-dev
meson
pango-dev
perl
py3-docutils
sassc
tiff-dev
vulkan-loader-dev
zlib-dev
zstd-dev
"
source="
https://download.gnome.org/sources/gtk/${_pkgver%.*}/gtk-${_pkgver}.tar.xz
0001-window-Maximize-resizable-transient-windows-on-small.patch
0002-windowcontrols-Force-close-buttons-for-transient-win.patch
6250.patch
"
builddir="$srcdir/gtk-${_pkgver}"
prepare() {
default_prepare
sed -i "s/ version: '.*',/ version: '4.90.99',/g" meson.build
sed -i "s/^gtk_interface_age = .*/gtk_interface_age = 90/g" meson.build
}
build() {
CFLAGS="$CFLAGS -O2" \
abuild-meson \
-Ddocumentation=true \
-Dintrospection=enabled \
-Dbroadway-backend=true \
-Dman-pages=true \
-Dbuild-tests=false \
-Dbuild-testsuite=false \
. output
meson compile ${JOBS:+-j ${JOBS}} -C output
}
package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C output
# use gtk-update-icon-cache from gtk+2.0 for now. The icon cache is forward
# compatible so this is fine.
# do the same for gtk4-update-icon-cache
rm -f "$pkgdir"/usr/bin/gtk-update-icon-cache
rm -f "$pkgdir"/usr/bin/gtk4-update-icon-cache
rm -f "$pkgdir"/usr/share/man/man1/gtk-update-icon-cache.1
}
demo() {
pkgdesc="$pkgdesc (demonstration application)"
amove \
usr/bin/gtk4-demo \
usr/bin/gtk4-demo-application \
usr/bin/gtk4-icon-browser \
usr/bin/gtk4-node-editor \
usr/bin/gtk4-print-editor \
usr/bin/gtk4-widget-factory \
usr/share/applications/org.gtk.Demo4.desktop \
usr/share/applications/org.gtk.IconBrowser4.desktop \
usr/share/applications/org.gtk.PrintEditor4.desktop \
usr/share/applications/org.gtk.WidgetFactory4.desktop \
usr/share/applications/org.gtk.gtk4.NodeEditor.desktop \
usr/share/glib-2.0/schemas/org.gtk.Demo4.gschema.xml \
usr/share/gtk-4.0/gtk4builder.rng \
usr/share/icons \
usr/share/metainfo
}
dev() {
default_dev
amove \
usr/bin/gtk4-builder-tool \
usr/bin/gtk4-encode-symbolic-svg \
usr/bin/gtk4-query-settings \
usr/share/gtk-4.0/valgrind
}
lang() {
default_lang
# These are some localized emoji labels.
amove usr/share/gtk-4.0/emoji
}
sha512sums="
a69f82e1f021b1eb68e8723bc9003bfca0b5939fd3cc7cda87d7dde0b3e37bb39d9594cb93a73f54bd1cff1b63a1c459d1217e8df794c67fda50bf0b9b732826 gtk-4.12.0.tar.xz
85ced777c23111f502f8a7d49902c65b113f51c1156490c08de2d8f9cb4a5e85c4a3eec0f043c0fa9d9ff44d6b9ab44c4c2865ecd06c3979a3f2558b287c35fd 0001-window-Maximize-resizable-transient-windows-on-small.patch
559f362a918f0f60dfd621daa489f16a61ea9ddd9ad0ef7ad043ceebe1013b8f2fce2f5c3c27597bfc801f2703867095909f16e2b9088e0bf374f36667e25abe 0002-windowcontrols-Force-close-buttons-for-transient-win.patch
7e76f23b4ae63a470651934db3935395b70f69ba0d73f3698549bf3abaa4df867336b2a24a52e337bffc608b433ee193c6ffc6df9d8b4205aadaa888c5d059f5 6250.patch
"