From 38c2780798761ca040aeea0da22ba4b5c09804c0 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 16 Feb 2014 09:07:46 +0100 Subject: [PATCH] libgee: added gir build option; cross build support. --- srcpkgs/libgee/template | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/srcpkgs/libgee/template b/srcpkgs/libgee/template index bafabfe0599..c7f15ac8b2c 100644 --- a/srcpkgs/libgee/template +++ b/srcpkgs/libgee/template @@ -1,10 +1,10 @@ # Template file for 'libgee' pkgname=libgee version=0.6.8 -revision=2 +revision=3 build_style=gnu-configure configure_args="--disable-static" -hostmakedepends="pkg-config intltool gobject-introspection" +hostmakedepends="pkg-config intltool glib-devel" makedepends="libglib-devel vala-devel" short_desc="GObject collection library" maintainer="Juan RP " @@ -13,19 +13,31 @@ homepage="http://live.gnome.org/Libgee" distfiles="${GNOME_SITE}/$pkgname/0.6/$pkgname-$version.tar.xz" checksum=a61f8d796173d41f6144a030d4bd22461f0bb3fa18a3ebe02341b315feebf5d3 +# 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 + libgee-devel_package() { - depends="glib-devel libgee>=${version}" - short_desc="${short_desc} -- development files" + depends="glib-devel ${sourcepkg}>=${version}_${revision}" + 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/vala } } - -libgee_package() { - pkg_install() { - vmove usr - } -}