[gimp] meson: make gir buildable



commit c9fabacca294a93d1976e9a63360f784dc0f643b
Author: Markus Volk <f_l_k t-online de>
Date:   Wed Sep 1 16:44:13 2021 +0200

    meson: make gir buildable
    
    yocto/oe is capable of building gobject introspection despite cross-compiling.
    add an option to enable gir build even if cross-compiling
    
    Signed-off-by: Markus Volk <f_l_k t-online de>
    
    Reviewer note (Jehan): this whole stuff is a mess. Actually I'd like to
    simply get rid of the whole no-gir-when-cross-compiling logics but I
    still can't figure out how to cross-build generically with GIR.
    Yet since some manage it with yocto, let's unblock them.
    See #7208.

 libgimp/meson.build | 2 +-
 meson_options.txt   | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/libgimp/meson.build b/libgimp/meson.build
index 687eeb6867..8fa0a98b1c 100644
--- a/libgimp/meson.build
+++ b/libgimp/meson.build
@@ -384,7 +384,7 @@ libgimpui_introspectable_files = [
   libgimpwidgets_introspectable,
 ]
 
-if meson.is_cross_build()
+if meson.is_cross_build() and not get_option('can-crosscompile-gir')
   have_gobject_introspection = false
   gobject_introspection_warning = '\n      '.join(['',
     'GObject Introspection is disabled while cross-compiling because',
diff --git a/meson_options.txt b/meson_options.txt
index aaf0982ca4..162e059cc6 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -51,6 +51,8 @@ option('xcursor',           type: 'feature', value: 'auto', description: 'Xcurso
 option('xpm',               type: 'feature', value: 'auto', description: 'XPM support')
 option('headless-tests',    type: 'feature', value: 'auto', description: 'Use xvfb-run/dbus-run-session for 
UI-dependent automatic tests')
 
+option('can-crosscompile-gir', type: 'boolean', value: false, description: 'GIR is buildable even if 
crosscompiling')
+
 option('gi-docgen',         type: 'feature', value: 'auto', description: 'Build developer documentation 
(uses gi-docgen)')
 option('g-ir-doc',          type: 'boolean', value: false,  description: 'Build developer documentation for 
introspected API')
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]