void-packages/srcpkgs/gtk4/template
2021-04-09 18:52:15 +02:00

89 lines
3.6 KiB
Bash

# Template file for 'gtk4'
pkgname=gtk4
version=4.2.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 enabled disabled)
-Dprint-backends=$(vopt_if cups 'cups,file' file)
-Dcolord=$(vopt_if colord enabled disabled)
-Dcloudproviders=$(vopt_if cloudproviders enabled disabled)
-Dvulkan=$(vopt_if vulkan enabled disabled)"
hostmakedepends="gettext-devel glib-devel gtk-doc gtk-update-icon-cache perl
pkg-config sassc gettext
$(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="Enno Boland <gottox@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://www.gtk.org/"
distfiles="${GNOME_SITE}/gtk/${version%.*}/gtk-${version}.tar.xz"
checksum=e975f286e911666a79b6bcf486e6f99b0bd9d2b4cc348d19bce487a0b1c97072
# Package build options
build_options="broadway cloudproviders colord cups gir vulkan 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 gir"
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/gtk4builder.rng
vmove usr/share/glib-2.0/schemas/org.gtk.Demo4.gschema.xml
# gtk3-icon-browser is in main package,
# keep gtk4-icon-browser in main package too
vmove usr/share/man/man1/gtk4-demo-application.1
vmove usr/share/applications/org.gtk.Demo4.desktop
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/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/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/man/man1/gtk4-widget-factory.1
}
}
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
}
}