PKGBUILDs/extra/gtk4/PKGBUILD

99 lines
3.1 KiB
Bash
Raw Normal View History

2021-01-11 17:18:54 +00:00
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2021-01-11 17:27:56 +00:00
# - use github mirror, more reliable
2021-01-11 17:18:54 +00:00
pkgbase=gtk4
2021-03-30 21:56:48 +00:00
pkgname=(gtk4 gtk-update-icon-cache gtk4-docs)
pkgver=4.2.0
2021-03-27 00:00:16 +00:00
pkgrel=1
2021-01-11 17:18:54 +00:00
epoch=1
pkgdesc="GObject-based multi-platform GUI toolkit"
arch=(x86_64)
url="https://www.gtk.org/"
depends=(glib2 cairo pango fribidi gdk-pixbuf2 libepoxy libgl libegl harfbuzz
2021-03-25 22:54:32 +00:00
libxkbcommon graphene iso-codes tracker3 colord wayland
wayland-protocols libxrandr libx11 libxrender libxi libxext libxcursor
libxdamage libxfixes libxcomposite fontconfig libxinerama
vulkan-icd-loader vulkan-headers libcloudproviders libcups rest
json-glib ffmpeg gst-plugins-bad-libs librsvg dconf shared-mime-info
desktop-file-utils adwaita-icon-theme cantarell-fonts)
2021-03-30 21:56:48 +00:00
makedepends=(git meson gi-docgen shaderc sassc gobject-introspection
docbook-xsl)
2021-01-11 17:18:54 +00:00
license=(LGPL)
2021-03-30 21:56:48 +00:00
_commit=ccbbc2f2babcfaee88d8d8040938ca6bf39d05b6 # tags/4.2.0^0
2021-01-11 17:27:56 +00:00
source=("git+https://github.com/GNOME/gtk.git#commit=$_commit"
2021-01-15 13:44:26 +00:00
gtk-update-icon-cache.{hook,script} gtk4-querymodules.hook)
2021-01-11 17:18:54 +00:00
sha256sums=('SKIP'
'2d435e3bec8b79b533f00f6d04decb1d7c299c6e89b5b175f20be0459f003fe8'
2021-01-15 13:44:26 +00:00
'f1d3a0dbfd82f7339301abecdbe5f024337919b48bd0e09296bb0e79863b2541'
'cd8e607eddd9941f279084e1d15309941423d26cca1897f43524a02e58e48816')
2021-01-11 17:18:54 +00:00
pkgver() {
cd gtk
git describe --tags | sed 's/-/+/g'
}
prepare() {
cd gtk
}
build() {
2021-03-30 21:56:48 +00:00
# https://gitlab.gnome.org/GNOME/gtk/-/commit/df4b564d69cc7d2e751537eff61259b36f37e9e5
CFLAGS+=" -DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT"
2021-01-11 17:18:54 +00:00
arch-meson gtk build \
-D broadway_backend=true \
-D cloudproviders=enabled \
-D tracker=enabled \
-D colord=enabled \
2021-03-30 21:56:48 +00:00
-D gtk_doc=true \
2021-01-11 17:18:54 +00:00
-D man-pages=true
meson compile -C build
}
package_gtk4() {
depends+=(gtk-update-icon-cache)
provides+=(libgtk-4.so)
DESTDIR="$pkgdir" meson install -C build
install -Dm644 /dev/stdin "$pkgdir/usr/share/gtk-4.0/settings.ini" <<END
[Settings]
gtk-icon-theme-name = Adwaita
gtk-theme-name = Adwaita
gtk-font-name = Cantarell 11
END
2021-01-15 13:44:26 +00:00
install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 gtk4-querymodules.hook
2021-01-11 17:18:54 +00:00
# gtk-update-icon-cache is also used by other toolkits
mkdir -p guic/usr/{bin,share/man/man1}
mv {"$pkgdir",guic}/usr/bin/gtk4-update-icon-cache
mv {"$pkgdir",guic}/usr/share/man/man1/gtk4-update-icon-cache.1
2021-03-30 21:56:48 +00:00
# split docs
mkdir -p doc/usr/share
mv {"$pkgdir",doc}/usr/share/doc
2021-01-11 17:18:54 +00:00
}
package_gtk-update-icon-cache() {
pkgdesc="GTK icon cache updater"
depends=(gdk-pixbuf2 librsvg hicolor-icon-theme)
mv -t "$pkgdir" guic/*
ln -s gtk4-update-icon-cache "$pkgdir/usr/bin/gtk-update-icon-cache"
ln -s gtk4-update-icon-cache.1 "$pkgdir/usr/share/man/man1/gtk-update-icon-cache.1"
install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 gtk-update-icon-cache.hook
install -D gtk-update-icon-cache.script "$pkgdir/usr/share/libalpm/scripts/gtk-update-icon-cache"
}
2021-03-30 21:56:48 +00:00
package_gtk4-docs() {
pkgdesc+=" (documentation)"
depends=()
mv -t "$pkgdir" doc/*
}
2021-01-11 17:18:54 +00:00
# vim:set ts=2 sw=2 et: