jobextra/gtk3/PKGBUILD

115 lines
3.3 KiB
Bash
Raw Normal View History

2022-03-20 13:34:07 +01:00
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=gtk3
pkgname=(gtk3 gtk3-docs gtk3-demos)
pkgver=3.24.33
2022-03-24 23:12:35 +01:00
pkgrel=03 # silly rebuild after 2 days by Arch because they forgot to create the dbug pkg
2022-03-20 13:34:07 +01:00
epoch=1
pkgdesc="GObject-based multi-platform GUI toolkit"
arch=(x86_64)
url="https://www.gtk.org/"
depends=(atk cairo libxcursor libxinerama libxrandr libxi libepoxy gdk-pixbuf2
dconf libxcomposite libxdamage pango shared-mime-info at-spi2-atk
wayland libxkbcommon adwaita-icon-theme json-glib librsvg
desktop-file-utils mesa cantarell-fonts libcolord rest libcups
2022-03-24 23:12:35 +01:00
# libcanberra fribidi iso-codes libcloudproviders tracker3
2022-03-20 13:34:07 +01:00
fribidi iso-codes libcloudproviders tracker3 gtk-update-icon-cache)
makedepends=(gobject-introspection gtk-doc git glib2-docs sassc meson
wayland-protocols)
2022-03-24 23:12:35 +01:00
#options=(debug) # uncomment to produce the gtk3-debug pkg
2022-03-20 13:34:07 +01:00
optdepends=('evince: Default print preview command')
_commit=8ff9b2f83ff491cbfcbf9b30c706bd917679e7cc # tags/3.24.33^0
source=("git+https://gitlab.gnome.org/GNOME/gtk.git#commit=$_commit"
gtk-query-immodules-3.0.hook)
pkgver() {
cd gtk
git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}
prepare() {
cd gtk
}
build() {
CFLAGS+=" -DG_DISABLE_CAST_CHECKS"
local meson_options=(
-D broadway_backend=true
-D cloudproviders=true
-D tracker3=true
-D colord=yes
-D gtk_doc=true
-D man=true
)
arch-meson gtk build "${meson_options[@]}"
meson compile -C build
}
_pick() {
local p="$1" f d; shift
for f; do
d="$srcdir/$p/${f#$pkgdir/}"
mkdir -p "$(dirname "$d")"
mv "$f" "$d"
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
done
}
package_gtk3() {
2022-03-24 23:12:35 +01:00
2022-03-20 13:34:07 +01:00
provides=(gtk3-print-backends libgtk-3.so libgdk-3.so libgailutil-3.so)
conflicts=(gtk3-print-backends)
replaces=("gtk3-print-backends<=3.22.26-1")
install=gtk3.install
meson install -C build --destdir "$pkgdir"
install -Dm644 /dev/stdin "$pkgdir/usr/share/gtk-3.0/settings.ini" <<END
[Settings]
gtk-icon-theme-name = Adwaita
gtk-theme-name = Adwaita
gtk-font-name = Cantarell 11
END
install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 gtk-query-immodules-3.0.hook
cd "$pkgdir"
rm usr/bin/gtk-update-icon-cache
rm usr/share/man/man1/gtk-update-icon-cache.1
_pick docs usr/share/gtk-doc
_pick demo usr/bin/gtk3-{demo,demo-application,icon-browser,widget-factory}
_pick demo usr/share/applications/gtk3-{demo,icon-browser,widget-factory}.desktop
_pick demo usr/share/glib-2.0/schemas/org.gtk.{Demo,exampleapp}.gschema.xml
_pick demo usr/share/icons/hicolor/*/apps/gtk3-{demo,widget-factory}[-.]*
_pick demo usr/share/man/man1/gtk3-{demo,demo-application,icon-browser,widget-factory}.1
}
package_gtk3-docs() {
pkgdesc+=" (documentation)"
depends=()
mv docs/* "$pkgdir"
}
package_gtk3-demos() {
pkgdesc+=" (demo applications)"
depends=(gtk3)
mv demo/* "$pkgdir"
}
#---- license gpg-key sha256sums ----
license=(LGPL)
sha256sums=(SKIP
a0319b6795410f06d38de1e8695a9bf9636ff2169f40701671580e60a108e229) # gtk-query-immodules-3.0.hook