From 729620aa9fe2c8281866d77a75de9bbb2d1d6c4d Mon Sep 17 00:00:00 2001 From: maxice8 Date: Thu, 7 Feb 2019 10:50:58 -0200 Subject: [PATCH] jsonrpc-glib: enable gir and vala --- .../jsonrpc-glib/patches/fix-gir-cross.patch | 16 ++++++++++++++++ srcpkgs/jsonrpc-glib/template | 18 ++++++++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/jsonrpc-glib/patches/fix-gir-cross.patch diff --git a/srcpkgs/jsonrpc-glib/patches/fix-gir-cross.patch b/srcpkgs/jsonrpc-glib/patches/fix-gir-cross.patch new file mode 100644 index 00000000000..3b13717c450 --- /dev/null +++ b/srcpkgs/jsonrpc-glib/patches/fix-gir-cross.patch @@ -0,0 +1,16 @@ +diff --git a/src/meson.build b/src/meson.build +index 12f8e32..3366e96 100644 +--- src/meson.build ++++ src/meson.build +@@ -79,7 +79,10 @@ if get_option('with_introspection') + install: true, + install_dir_gir: girdir, + install_dir_typelib: typelibdir, +- extra_args: [ '--c-include=jsonrpc-glib.h' ], ++ extra_args: [ ++ '--c-include=jsonrpc-glib.h', ++ '-DJSONRPC_GLIB_COMPILATION', ++ ], + ) + + if get_option('with_vapi') diff --git a/srcpkgs/jsonrpc-glib/template b/srcpkgs/jsonrpc-glib/template index 6404b9830fd..91ccb67cb44 100644 --- a/srcpkgs/jsonrpc-glib/template +++ b/srcpkgs/jsonrpc-glib/template @@ -2,10 +2,11 @@ pkgname=jsonrpc-glib version=3.30.1 revision=1 +build_style=meson +build_helper="gir" configure_args="-Denable_gtk_doc=false -Dwith_vapi=$(vopt_if gir true false) -Dwith_introspection=$(vopt_if gir true false)" -build_style=meson -hostmakedepends="pkg-config $(vopt_if gir 'gobject-introspection vala') glib-devel" +hostmakedepends="pkg-config $(vopt_if vala 'vala') glib-devel" makedepends="libglib-devel json-glib-devel" short_desc="Library to communicate using the JSON-RPC 2.0 specification" maintainer="Enno Boland " @@ -15,10 +16,13 @@ changelog="https://raw.githubusercontent.com/GNOME/jsonrpc-glib/jsonrpc-glib-3-3 distfiles="${GNOME_SITE}/jsonrpc-glib/${version%.*}/jsonrpc-glib-${version}.tar.xz" checksum=b675ce6f414fb8fc9eeed1ad340dc6d08fc329ed67af927bb0fa6a5d7d731dc7 -build_options="gir" -if [ -z "$CROSS_BUILD" ]; then - build_options_default+=" gir" -fi +build_options="gir vala" + +case "$XBPS_TARGET_MACHINE" in + x86_64-musl) build_options_default+=" gir vala" ;; + *-musl) ;; + *) build_options_default+=" gir vala" ;; +esac jsonrpc-glib-devel_package() { depends="${sourcepkg}-${version}_${revision} gtk+3-devel" @@ -29,6 +33,8 @@ jsonrpc-glib-devel_package() { vmove "usr/lib/*.so" if [ "$build_option_gir" ]; then vmove usr/share/gir-1.0 + fi + if [ "$build_option_vala" ]; then vmove usr/share/vala fi }