Skip to contentSkip to conversation

libpeas: disable tests when introspection is not enabled/available

PATCH New Andreas Müller 1 participant 1 message Aug 10, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libpeas: disable tests when introspection is not enabled/available

This fixes introspection-less build. Sent upstream so hope they either agree or come up with something better next release.

Tested before and after adding the patch by setting GI_DATA_ENABLED = 'False'

---
 ...ts-when-introspection-is-disabled-mi.patch | 36 +++++++++++++++++++
 .../recipes-gnome/libpeas/libpeas_1.26.0.bb   |  5 +--
 2 files changed, 37 insertions(+), 4 deletions(-)
 create mode 100644 meta-oe/recipes-gnome/libpeas/libpeas/0001-Do-not-build-tests-when-introspection-is-disabled-mi.patch
meta-oe/recipes-gnome/libpeas/libpeas/0001-Do-not-build-tests-when-introspection-is-disabled-mi.patch new file +36 -0
new file mode 100644
index 000000000..86586fe71
@@ -0,0 +1,36 @@
+From 53a4f19887d9ae4e77f32dd6d71c8a7b516b4d5d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]>
+Date: Mon, 10 Aug 2020 21:53:33 +0200
+Subject: [PATCH] Do not build tests when introspection is disabled/missing
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+| ../libpeas-1.26.0/tests/libpeas/introspection/meson.build:47:0: ERROR: Unknown variable "libpeas_gir".
+
+Upstrem-Status: Submitted[https://gitlab.gnome.org/GNOME/libpeas/-/merge_requests/28]
+
+Signed-off-by: Andreas Müller <[email protected]>
+---
+ meson.build | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 8322fea..43fb062 100644
+--- a/meson.build
++++ b/meson.build
+@@ -254,7 +254,9 @@ subdir('loaders')
+ if build_demos == true
+   subdir('peas-demo')
+ endif
+-subdir('tests')
++if generate_gir == true
++  subdir('tests')
++endif
+ 
+ summary = [
+   '',
+-- 
+2.26.2
+
meta-oe/recipes-gnome/libpeas/libpeas_1.26.0.bb +1 -4
index 1b754343a..fd4ce7de5 100644
@@ -10,14 +10,11 @@ GTKDOC_MESON_OPTION = "gtk_doc"
 
 inherit gnomebase gobject-introspection gtk-doc gtk-icon-cache features_check
 
-# gobject-introspection is mandatory and cannot be configured
-REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
-UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-introspection"
-
 ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
 
 SRC_URI += " \
     file://add_missing_locale_include.patch \
+    file://0001-Do-not-build-tests-when-introspection-is-disabled-mi.patch \
 "
 
 SRC_URI[archive.md5sum] = "f7723bf8433b7984121157e1e9a629b5"
Signature · 1 line
2.26.2