void-packages/srcpkgs/gtk4/template

133 lines
5.1 KiB
Bash

# Template file for 'gtk4'
pkgname=gtk4
version=4.14.4
revision=2
build_style=meson
build_helper="gir"
configure_args="-Dman-pages=true -Ddocumentation=true -Dbuild-tests=false
-Dbuild-testsuite=false -Dbuild-examples=false
$(vopt_bool broadway broadway-backend)
$(vopt_bool x11 x11-backend)
$(vopt_bool wayland wayland-backend)
$(vopt_feature gir introspection)
$(vopt_feature colord colord)
$(vopt_feature cloudproviders cloudproviders)
$(vopt_feature vulkan vulkan)
$(vopt_feature tracker tracker)"
hostmakedepends="gettext-devel glib-devel gi-docgen perl
pkg-config sassc gettext libxslt docbook-xsl python3-docutils
$(vopt_if wayland 'wayland-devel wayland-protocols') shaderc"
makedepends="at-spi2-atk-devel gdk-pixbuf-devel libepoxy-devel pango-devel
iso-codes graphene-devel gst-plugins-bad1-devel
$(vopt_if colord 'colord-devel') $(vopt_if cups 'cups-devel')
$(vopt_if wayland 'libxkbcommon-devel wayland-devel wayland-protocols MesaLib-devel')
$(vopt_if x11 'libXcursor-devel libXdamage-devel libXext-devel libXinerama-devel libXi-devel libXrandr-devel libXcomposite-devel')
$(vopt_if cloudproviders 'libcloudproviders-devel')
$(vopt_if vulkan 'vulkan-loader-devel')
$(vopt_if tracker 'tracker-devel')"
depends="gtk-update-icon-cache shared-mime-info $(vopt_if x11 'dbus-x11')"
short_desc="GIMP ToolKit (v4)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://www.gtk.org/"
#changelog="https://gitlab.gnome.org/GNOME/gtk/-/raw/main/NEWS"
changelog="https://gitlab.gnome.org/GNOME/gtk/-/raw/gtk-4-14/NEWS"
distfiles="${GNOME_SITE}/gtk/${version%.*}/gtk-${version}.tar.xz"
checksum=443518b97e8348f9f6430ac435b1010f9a6c5207f4dc6a7cd5d24e3820cee633
# Package build options
build_options="broadway cloudproviders colord cups gir vulkan wayland x11 tracker"
desc_option_broadway="Enable support for the HTML5 Broadway backend"
desc_option_cloudproviders="Enable integration with cloudproviders, such as Nextcloud"
build_options_default="broadway cloudproviders colord cups gir vulkan wayland x11 tracker"
pre_build() {
# help gi-docgen find gi files on cross
if [ -n "$CROSS_BUILD" ]; then
export XDG_DATA_DIRS=/usr/$XBPS_CROSS_TRIPLET/usr/share/
fi
}
gtk4-doc_package() {
short_desc+=" - documentation"
pkg_install() {
vmove usr/share/doc
}
}
gtk4-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/bin/gtk4-builder-tool
vmove usr/share/man/man1/gtk4-builder-tool.1
vmove usr/bin/gtk4-encode-symbolic-svg
vmove usr/share/man/man1/gtk4-encode-symbolic-svg.1
vmove usr/bin/gtk4-query-settings
vmove usr/share/man/man1/gtk4-query-settings.1
vmove usr/share/gtk-4.0/valgrind
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
fi
}
}
gtk4-demo_package() {
short_desc+=" - demonstration application"
pkg_install() {
vmove usr/bin/gtk4-demo
vmove usr/share/applications/org.gtk.Demo4.desktop
vmove usr/share/glib-2.0/schemas/org.gtk.Demo4.gschema.xml
vmove usr/share/icons/hicolor/scalable/apps/org.gtk.Demo4.svg
vmove usr/share/icons/hicolor/symbolic/apps/org.gtk.Demo4-symbolic.svg
vmove usr/share/man/man1/gtk4-demo.1
vmove usr/share/metainfo/org.gtk.Demo4.appdata.xml
vmove usr/share/gtk-4.0/gtk4builder.rng
vmove usr/bin/gtk4-demo-application
vmove usr/share/man/man1/gtk4-demo-application.1
vmove usr/bin/gtk4-widget-factory
vmove usr/share/man/man1/gtk4-widget-factory.1
vmove usr/share/applications/org.gtk.WidgetFactory4.desktop
vmove usr/share/icons/hicolor/scalable/apps/org.gtk.WidgetFactory4.svg
vmove usr/share/icons/hicolor/symbolic/apps/org.gtk.WidgetFactory4-symbolic.svg
vmove usr/share/metainfo/org.gtk.WidgetFactory4.appdata.xml
vmove usr/bin/gtk4-print-editor
vmove usr/share/applications/org.gtk.PrintEditor4.desktop
vmove usr/share/icons/hicolor/scalable/apps/org.gtk.PrintEditor4.svg
vmove usr/share/icons/hicolor/symbolic/apps/org.gtk.PrintEditor4-symbolic.svg
vmove usr/share/icons/hicolor/scalable/apps/org.gtk.PrintEditor4.Devel.svg
vmove usr/share/metainfo/org.gtk.PrintEditor4.appdata.xml
vmove usr/bin/gtk4-node-editor
vmove usr/share/applications/org.gtk.gtk4.NodeEditor.desktop
vmove usr/share/icons/hicolor/scalable/apps/org.gtk.gtk4.NodeEditor.Devel.svg
vmove usr/share/icons/hicolor/scalable/apps/org.gtk.gtk4.NodeEditor.svg
vmove usr/share/icons/hicolor/symbolic/apps/org.gtk.gtk4.NodeEditor-symbolic.svg
vmove usr/share/man/man1/gtk4-node-editor.1
vmove usr/share/metainfo/org.gtk.gtk4.NodeEditor.appdata.xml
vmove usr/bin/gtk4-icon-browser
vmove usr/share/applications/org.gtk.IconBrowser4.desktop
vmove usr/share/icons/hicolor/scalable/apps/org.gtk.IconBrowser4.svg
vmove usr/share/icons/hicolor/symbolic/apps/org.gtk.IconBrowser4-symbolic.svg
vmove usr/share/man/man1/gtk4-icon-browser.1
vmove usr/share/metainfo/org.gtk.IconBrowser4.appdata.xml
}
}
gtk4-update-icon-cache_package() {
short_desc+=" - GTK4 update icon cache tool"
pkg_install() {
vmove usr/bin/gtk4-update-icon-cache
vmove usr/share/man/man1/gtk4-update-icon-cache.1
}
}