From e99dba3c00c40174f30b165f876aa10e5b631999 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 27 Apr 2013 06:17:34 +0200 Subject: [PATCH] gtk+3: add pkg options for broadway, gir, x11 and wayland (all enabled by default). --- srcpkgs/gtk+3/template | 71 +++++++++++++++++++++++++++++++++--------- 1 file changed, 56 insertions(+), 15 deletions(-) diff --git a/srcpkgs/gtk+3/template b/srcpkgs/gtk+3/template index c444dfce65a..69a44053e7b 100644 --- a/srcpkgs/gtk+3/template +++ b/srcpkgs/gtk+3/template @@ -1,12 +1,11 @@ # Template build file for 'gtk+3'. pkgname=gtk+3 version=3.8.1 -revision=1 +revision=2 wrksrc="gtk+-${version}" build_style=gnu-configure configure_args="--enable-cups --disable-schemas-compile - --enable-gtk2-dependency --enable-colord --enable-x11-backend - --enable-broadway-backend" + --enable-gtk2-dependency --enable-colord" short_desc="The GTK+ toolkit (v3)" maintainer="Juan RP " homepage="http://www.gtk.org/" @@ -16,11 +15,47 @@ checksum=f43e7c7d7a0e2417225509e88f67799534c69abfbb6f615fc7a895bf15e31255 hostmakedepends="pkg-config" -makedepends="libXcursor-devel libXdamage-devel libXext-devel libXinerama-devel - libXi-devel libXrandr-devel libXcomposite-devel libglib-devel>=2.36.0 - atk-devel>=2.8.0 at-spi2-atk-devel>=2.6.0_2 libpng-devel fontconfig-devel - cairo-devel pango-devel>=1.29.3 gdk-pixbuf-devel>=2.28 gtk+-devel - colord-devel>=0.1.23_3 gobject-introspection cups-devel" +makedepends="libglib-devel>=2.36.0 atk-devel>=2.8.0 at-spi2-atk-devel>=2.6.0_2 + libpng-devel fontconfig-devel cairo-devel pango-devel>=1.29.3 gdk-pixbuf-devel>=2.28 + gtk+-devel colord-devel>=0.1.23_3 cups-devel" + +# Package build options +build_options="broadway gir wayland x11" +desc_option_broadway="Enable support for the HTML5 Broadway backend" +desc_option_gir="Enable support for gobject introspection data" +desc_option_wayland="Enable support for the Wayland backend" +desc_option_x11="Enable support for the X11 backend" + +# Enable all options by default. +build_options_default="broadway gir wayland x11" + +if [ "$build_option_broadway" ]; then + configure_args+=" --enable-broadway-backend" +else + configure_args+=" --disable-broadway-backend" +fi + +if [ "$build_option_gir" ]; then + makedepends+=" gobject-introspection" + configure_args+=" --enable-introspection" +else + configure_args+=" --disable-introspection" +fi + +if [ "$build_option_wayland" ]; then + makedepends+=" wayland-devel" + configure_args+=" --enable-wayland-backend" +else + configure_args+=" --disable-wayland-backend" +fi + +if [ "$build_option_x11" ]; then + makedepends+=" libXcursor-devel libXdamage-devel libXext-devel + libXinerama-devel libXi-devel libXrandr-devel libXcomposite-devel" + configure_args+=" --enable-x11-backend" +else + configure_args+=" --disable-x11-backend" +fi post_install() { rm -f ${DESTDIR}/usr/share/man/man1/gtk-update-icon-cache.1 @@ -28,20 +63,27 @@ post_install() { gtk+3-devel_package() { depends="libglib-devel>=2.36.0 atk-devel>=2.6.0 cairo-devel gdk-pixbuf-devel - pango-devel at-spi2-atk-devel>=2.6.0 libXcomposite-devel libXcursor-devel - libXrandr-devel libXi-devel libXinerama-devel gtk+3-${version}_${revision}" - short_desc="${short_desc} - development files" + pango-devel at-spi2-atk-devel>=2.6.0 gtk+3-${version}_${revision}" + if [ "$build_option_x11" ]; then + depends+=" libXcomposite-devel libXcursor-devel libXrandr-devel libXi-devel libXinerama-devel" + fi + if [ "$build_option_wayland" ]; then + depends+=" wayland-devel" + fi + short_desc+=" - development files" pkg_install() { vmove usr/include vmove usr/lib/pkgconfig - vmove usr/share/gir-1.0 + 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="${short_desc} - demonstration application" + short_desc+=" - demonstration application" pkg_install() { vmove usr/bin/gtk3-demo vmove usr/bin/gtk3-widget-factory @@ -55,7 +97,6 @@ gtk+3_package() { conf_files="/etc/gtk-3.0/im-multipress.conf" depends="gtk-update-icon-cache shared-mime-info glib>=2.36 atk>=2.8.0 dbus-x11" pkg_install() { - vmove etc - vmove usr + vmove all } }