diff --git a/srcpkgs/libgweather/patches/fix-gir-cross.patch b/srcpkgs/libgweather/patches/fix-gir-cross.patch new file mode 100644 index 00000000000..22610d6c853 --- /dev/null +++ b/srcpkgs/libgweather/patches/fix-gir-cross.patch @@ -0,0 +1,17 @@ +diff --git a/libgweather/meson.build b/libgweather/meson.build +index c32261e..f7dff20 100644 +--- libgweather/meson.build ++++ libgweather/meson.build +@@ -76,7 +76,10 @@ if get_option('enable_gir') + identifier_prefix: 'GWeather', + export_packages: 'gweather-3.0', + header: 'libgweather/gweather.h', +- extra_args: ['--warn-all'], ++ extra_args: [ ++ '--warn-all', ++ '-DGWEATHER_COMPILATION', ++ ], + install: true, + ) + + diff --git a/srcpkgs/libgweather/template b/srcpkgs/libgweather/template index 5435d6b7269..3c5fc0b1198 100644 --- a/srcpkgs/libgweather/template +++ b/srcpkgs/libgweather/template @@ -1,13 +1,13 @@ # Template file for 'libgweather' pkgname=libgweather version=3.28.2 -revision=2 +revision=3 build_style=meson +build_helper="gir" configure_args="-Denable_vala=$(vopt_if vala true false) -Denable_gir=$(vopt_if gir true false) -Dtest=false -Dzoneinfo_dir=/usr/share/zoneinfo" -hostmakedepends="glib-devel $(vopt_if gir gobject-introspection) - intltool pkg-config $(vopt_if vala vala-devel)" +hostmakedepends="glib-devel intltool pkg-config $(vopt_if vala vala)" makedepends="geocode-glib-devel gtk+3-devel libsoup-gnome-devel" checkdepends="tzdata" short_desc="GNOME Weather information access library" @@ -18,9 +18,12 @@ distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz" checksum=081ce81653afc614e12641c97a8dd9577c524528c63772407ae2dbcde12bde75 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 libgweather-devel_package() { depends="${makedepends} ${sourcepkg}>=${version}_${revision} gtk+3-devel" @@ -31,6 +34,8 @@ libgweather-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 }