From 066257842a9a4d65b98739b5f81acbcce5a8c5ce Mon Sep 17 00:00:00 2001 From: Juan RP <xtraeme@gmail.com> Date: Mon, 6 May 2013 15:40:06 +0200 Subject: [PATCH] atk: add gir pkg option and disable it in cross builds. --- srcpkgs/atk/template | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/srcpkgs/atk/template b/srcpkgs/atk/template index 995892eeaf..43079763a6 100644 --- a/srcpkgs/atk/template +++ b/srcpkgs/atk/template @@ -1,10 +1,10 @@ # Template build file for 'atk'. pkgname=atk version=2.8.0 -revision=2 +revision=3 build_style=gnu-configure hostmakedepends="pkg-config" -makedepends="libglib-devel>=2.34.0 gobject-introspection" +makedepends="glib-devel>=2.36" short_desc="Set of interfaces for accessibility" maintainer="Juan RP <xtraeme@gmail.com>" homepage="http://www.gtk.org/" @@ -23,13 +23,36 @@ long_desc=" It also provides interfaces which an application can use to provide additional accessibility information to assistive technology tools." +if [ "$CROSS_BUILD" ]; then + # needs glib-mkenums + hostmakedepends+=" glib-devel" +fi + +# Package build options +build_options="gir" +desc_option_gir="Enable support for building gobject introspection data" + +# Disable gir for cross builds. +if [ -z "$CROSS_BUILD" ]; then + build_options_default="gir" +fi + +if [ "$build_option_gir" ]; then + configure_args+=" --enable-introspection" + makedepends+=" gobject-introspection" +else + configure_args+=" --disable-introspection" +fi + atk-devel_package() { depends="libglib-devel atk>=${version}" - short_desc="${short_desc} - development files" + short_desc+=" - development files" pkg_install() { vmove usr/include vmove usr/lib/pkgconfig - vmove "usr/share/gir-*" + if [ "$build_option_gir" ]; then + vmove "usr/share/gir-*" + fi vmove usr/share/gtk-doc } }