void-packages/srcpkgs/gtk+3/template
Rasmus Thomsen 3484913106 gtk+3: update to 3.24.2.
* add build option for cloudproviders
2018-12-16 22:52:04 -02:00

84 lines
3 KiB
Bash

# Template file for 'gtk+3'
pkgname=gtk+3
version=3.24.2
revision=1
wrksrc="gtk+-${version}"
build_style=gnu-configure
#XXX broken configure script: Can't use vopt_enable cloudproviders, configure
#checks for libcloudproviders when we pass '--disable-cloudproviders' to it!
configure_args="--disable-schemas-compile
$(vopt_enable broadway broadway-backend) $(vopt_enable colord)
$(vopt_enable cups) $(vopt_enable gir introspection)
$(vopt_enable wayland wayland-backend) $(vopt_enable x11 x11-backend)
$(vopt_if cloudproviders '--enable-cloudproviders')"
conf_files="/etc/gtk-3.0/im-multipress.conf"
hostmakedepends="gettext-devel glib-devel gobject-introspection gtk-doc
gtk-update-icon-cache pkg-config perl
$(vopt_if wayland 'wayland-devel wayland-protocols')"
makedepends="at-spi2-atk-devel gdk-pixbuf-devel libepoxy-devel pango-devel
iso-codes $(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')"
depends="gtk-update-icon-cache shared-mime-info $(vopt_if x11 'dbus-x11')"
short_desc="The GTK+ toolkit (v3)"
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=5b3b05e427cc928d103561ed2e91b2b2881fe88b1f167b0b1c9990da6aac8892
patch_args="-Np1"
# 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"
# Enable all options (other than cloudproviders) by default.
build_options_default="colord cups broadway wayland x11"
# Enable gir only for native builds.
if [ -z "$CROSS_BUILD" ]; then
build_options_default+=" gir"
fi
do_check() {
# Requires xserver running
:
}
post_install() {
rm -f ${DESTDIR}/usr/bin/gtk-update-icon-cache
rm -f ${DESTDIR}/usr/share/man/man1/gtk-update-icon-cache.1
}
gtk+3-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
vmove usr/share/gtk-doc
vmove usr/share/aclocal
}
}
gtk+3-demo_package() {
short_desc+=" - demonstration application"
pkg_install() {
vmove usr/bin/gtk3-demo
vmove usr/bin/gtk3-widget-factory
vmove usr/bin/gtk3-demo-application
vmove usr/share/man/man1/gtk3-widget-factory.1
vmove usr/share/gtk-3.0/gtkbuilder.rng
vmove usr/share/glib-2.0/schemas/org.gtk.Demo.gschema.xml
vmove usr/share/glib-2.0/schemas/org.gtk.exampleapp.gschema.xml
vmove usr/share/applications/gtk3-widget-factory.desktop
vmove usr/share/applications/gtk3-demo.desktop
vmove usr/share/icons
}
}