void-packages/srcpkgs/gtk4/template
2019-05-26 14:16:43 +02:00

78 lines
2.8 KiB
Bash

# Template file for 'gtk4'
pkgname=gtk4
version=3.94.0
revision=1
wrksrc="gtk+-${version}"
build_style=meson
build_helper="gir"
configure_args="-Dman-pages=true -Dbuild-tests=false -Dmedia=all
-Dbroadway-backend=$(vopt_if broadway true false)
-Dx11-backend=$(vopt_if x11 true false)
-Dwayland-backend=$(vopt_if wayland true false)
-Dintrospection=$(vopt_if gir true false)
-Dprint-backends=$(vopt_if cups 'cups,file' file)
-Dcolord=$(vopt_if colord yes no)
-Dcloudproviders=$(vopt_if cloudproviders true false)
-Dvulkan=$(vopt_if vulkan yes no)"
hostmakedepends="gettext-devel glib-devel gtk-doc gtk-update-icon-cache perl
pkg-config $(vopt_if wayland 'wayland-devel wayland-protocols')"
makedepends="at-spi2-atk-devel gdk-pixbuf-devel libepoxy-devel pango-devel
iso-codes graphene-devel gst-plugins-bad1-devel ffmpeg-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 Vulkan-Headers')"
depends="gtk-update-icon-cache shared-mime-info $(vopt_if x11 'dbus-x11')"
short_desc="GIMP ToolKit (v4)"
maintainer="Rasmus Thomsen <rasmus.thomsen@protonmail.com>"
license="LGPL-2.1-or-later"
homepage="https://www.gtk.org/"
distfiles="${GNOME_SITE}/gtk+/${version%.*}/gtk+-${version}.tar.xz"
checksum=a947caa5296610b0f1d7a03b58df34765c227c577c78e683e75eea3251a67035
# Package build options
build_options="broadway colord cups gir cloudproviders wayland x11"
desc_option_broadway="Enable support for the HTML5 Broadway backend"
desc_option_cloudproviders="Enable integration with cloudproviders, such as Nextcloud"
build_options_default="colord cups broadway wayland x11 cloudproviders vulkan"
case "$XBPS_TARGET_MACHINE" in
x86_64-musl) build_options_default+=" gir" ;;
*-musl) ;;
*) build_options_default+=" gir" ;;
esac
gtk4-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
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/bin/gtk4-widget-factory
vmove usr/bin/gtk4-demo-application
vmove usr/share/gtk-4.0/gtkbuilder.rng
vmove usr/share/glib-2.0/schemas/org.gtk.Demo.gschema.xml
vmove usr/share/applications/gtk4-widget-factory.desktop
vmove usr/share/applications/gtk4-demo.desktop
vmove usr/share/icons
}
}
gtk4-update-icon-cache_package() {
short_desc+=" - GTK4 update icon cache tool"
pkg_install() {
vmove usr/bin/gtk4-update-icon-cache
}
}