From 5c24610dd70bd6440287f968d8420f5635691270 Mon Sep 17 00:00:00 2001 From: maxice8 Date: Sun, 3 Feb 2019 15:33:22 -0200 Subject: [PATCH] libgusb: enable gir --- srcpkgs/libgusb/patches/fix-cross-gir.patch | 13 +++++++++ srcpkgs/libgusb/template | 31 +++++++++++++-------- 2 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 srcpkgs/libgusb/patches/fix-cross-gir.patch diff --git a/srcpkgs/libgusb/patches/fix-cross-gir.patch b/srcpkgs/libgusb/patches/fix-cross-gir.patch new file mode 100644 index 0000000000..41405efdbf --- /dev/null +++ b/srcpkgs/libgusb/patches/fix-cross-gir.patch @@ -0,0 +1,13 @@ +diff --git a/gusb/meson.build b/gusb/meson.build +index 5276259..b6a04d5 100644 +--- gusb/meson.build ++++ gusb/meson.build +@@ -113,6 +113,7 @@ libgusb_girtarget = gnome.generate_gir(gusb, + export_packages : 'gusb', + extra_args : [ + '--c-include=gusb.h', ++ '-DGUSB_COMPILATION', + ], + link_with : gusb, + dependencies : [ + diff --git a/srcpkgs/libgusb/template b/srcpkgs/libgusb/template index c2358c1125..cc0a7376a9 100644 --- a/srcpkgs/libgusb/template +++ b/srcpkgs/libgusb/template @@ -1,34 +1,41 @@ # Template file for 'libgusb' pkgname=libgusb version=0.3.0 -revision=3 +revision=4 build_style=meson +build_helper="gir" configure_args="-Ddocs=false -Dgir=$(vopt_if gir true false) -Dvapi=$(vopt_if vala true false)" -hostmakedepends="pkg-config $(vopt_if gir gobject-introspection) - $(vopt_if vala vala)" -makedepends="libglib-devel libusb-devel libgudev-devel $(vopt_if vala vala-devel) usbutils" +hostmakedepends="pkg-config $(vopt_if vala vala)" +makedepends="libglib-devel libusb-devel libgudev-devel $(vopt_if vala vala-devel) + usbutils" short_desc="GLib wrapper around libusb1" -maintainer="Juan RP " +maintainer="maxice8 " license="LGPL-2.1-or-later" homepage="https://github.com/hughsie/libgusb" distfiles="http://people.freedesktop.org/~hughsient/releases/${pkgname}-${version}.tar.xz" checksum=d8e7950f99b6ae4c3e9b8c65f3692b9635289e6cff8de40c4af41b2e9b348edc build_options="gir vala" -if [ -z "$CROSS_BUILD" ]; then - build_options_default="gir vala" -fi + +case "$XBPS_TARGET_MACHINE" in + x86_64-musl) build_options_default+=" gir vala" ;; + *-musl) ;; + *) build_options_default+=" gir vala" ;; +esac libgusb-devel_package() { depends="${makedepends} ${sourcepkg}-${version}_${revision}" short_desc+=" - development files" pkg_install() { vmove usr/include - if [ "$build_option_gir" ]; then - vmove usr/share - fi - vmove usr/lib/pkgconfig vmove "usr/lib/*.so" + vmove usr/lib/pkgconfig + if [ "$build_option_gir" ]; then + vmove usr/share/gir-1.0 + fi + if [ "$build_option_vala" ]; then + vmove usr/share/vala + fi } }