From 7ea64c8f2459b9eff7e9850686351d4bc2064185 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 16 Feb 2014 09:00:48 +0100 Subject: [PATCH] json-glib: added gir build option; cross build support. --- srcpkgs/json-glib/template | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/srcpkgs/json-glib/template b/srcpkgs/json-glib/template index f00e85f7d4..92e6f58551 100644 --- a/srcpkgs/json-glib/template +++ b/srcpkgs/json-glib/template @@ -1,9 +1,9 @@ # Template build file for 'json-glib'. pkgname=json-glib version=0.16.2 -revision=1 +revision=2 build_style=gnu-configure -hostmakedepends="pkg-config gobject-introspection" +hostmakedepends="pkg-config glib-devel" makedepends="libglib-devel" short_desc="A JSON parser for GLib-based libraries and applications" maintainer="Juan RP " @@ -11,16 +11,25 @@ homepage="http://live.gnome.org/JsonGlib" license="LGPL-2" distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz" checksum=a95475364ec27ab1d2a69303cf579018558bfb6981e3498b3aaf1e6401f7422c -long_desc=" - JSON-GLib implements a full JSON parser using GLib and GObject. - Use JSON-GLib it is possible to parse and generate valid JSON data - structures, using a DOM-like API. JSON-GLib also offers GObject - integration, providing the ability to serialize and deserialize - GObject instances to and from JSON data types." +# 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 json-glib-devel_package() { - depends="libglib-devel json-glib>=${version}" + depends="libglib-devel ${sourcepkg}>=${version}_${revision}" short_desc+=" - development files" pkg_install() { vmove usr/include