Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 5751f5fb6b862ccd129af523d783968fcc77ed26 Mon Sep 17 00:00:00 2001
- From: Adam Duskett <Aduskett@gmail.com>
- Date: Mon, 24 Feb 2020 07:22:33 -0800
- Subject: [PATCH] GOI: Fix meson building
- Signed-off-by: Adam Duskett <Aduskett@gmail.com>
- ---
- package/gobject-introspection/g-ir-scanner.in | 2 +
- .../gobject-introspection.mk | 6 ++-
- ...4-determine-goi-tools-from-pkgconfig.patch | 38 +++++++++++++++++++
- 3 files changed, 44 insertions(+), 2 deletions(-)
- create mode 100644 package/meson/0004-determine-goi-tools-from-pkgconfig.patch
- diff --git a/package/gobject-introspection/g-ir-scanner.in b/package/gobject-introspection/g-ir-scanner.in
- index 9f97497b7e..d5847ad063 100644
- --- a/package/gobject-introspection/g-ir-scanner.in
- +++ b/package/gobject-introspection/g-ir-scanner.in
- @@ -1,6 +1,8 @@
- #!/usr/bin/env bash
- export GI_SCANNER_DISABLE_CACHE=1
- +export CC="$(dirname "${0}")/../../../../bin/@BASENAME_TARGET_CC@"
- +
- ${HOST_DIR}/bin/g-ir-scanner \
- --lib-dirs-envvar=GIR_EXTRA_LIBS_PATH \
- --use-binary-wrapper=$(dirname $0)/g-ir-scanner-qemuwrapper \
- diff --git a/package/gobject-introspection/gobject-introspection.mk b/package/gobject-introspection/gobject-introspection.mk
- index 67e5e37dee..5997262f91 100644
- --- a/package/gobject-introspection/gobject-introspection.mk
- +++ b/package/gobject-introspection/gobject-introspection.mk
- @@ -36,8 +36,8 @@ GOBJECT_INTROSPECTION_NINJA_ENV += \
- # Disable introspection data on the host, as it is not needed and
- # the package will attempt to use the systems libglib2 which will fail
- # if the systems libglib2 version is older than 2.60.
- -HOST_GOBJECT_INTROSPECTION_CONF_OPTS = \
- - -Denable-introspection-data=false
- +HOST_GOBJECT_INTROSPECTION_NINJA_ENV += \
- + LD_RUN_PATH="$(HOST_DIR)/lib"
- # Use the host gi-scanner to prevent the scanner from generating incorrect
- # elf classes.
- @@ -101,6 +101,8 @@ define GOBJECT_INTROSPECTION_INSTALL_WRAPPERS
- $(INSTALL) -D -m 755 \
- $(GOBJECT_INTROSPECTION_PKGDIR)/$(w).in $(STAGING_DIR)/usr/bin/$(w)
- )
- + $(SED) "s%@BASENAME_TARGET_CC@%$(notdir $(TARGET_CC))%g" $(STAGING_DIR)/usr/bin/g-ir-scanner
- +
- # Gobject-introspection installs Makefile.introspection in
- # $(STAGING_DIR)/usr/share which is needed for autotools-based programs to
- # build .gir and .typelib files. Unfortuantly, gobject-introspection-1.0.pc
- diff --git a/package/meson/0004-determine-goi-tools-from-pkgconfig.patch b/package/meson/0004-determine-goi-tools-from-pkgconfig.patch
- new file mode 100644
- index 0000000000..9b4e85e581
- --- /dev/null
- +++ b/package/meson/0004-determine-goi-tools-from-pkgconfig.patch
- @@ -0,0 +1,38 @@
- +From 831fd737c3f2e54f6f77ce4da0c3abd02349e086 Mon Sep 17 00:00:00 2001
- +From: Adam Duskett <Aduskett@gmail.com>
- +Date: Mon, 24 Feb 2020 06:29:26 -0800
- +Subject: [PATCH] gobject-introspection: determine g-ir-scanner and
- + g-ir-compiler paths from pkgconfig
- +
- +Currently, meson hard codes the paths of these binaries which results in
- +cross-compiled environments to run the host versions of these tools.
- +
- +GObject-introspection provides the appropriate paths to these utilities via
- +pkg-config.
- +---
- + mesonbuild/modules/gnome.py | 6 +++---
- + 1 file changed, 3 insertions(+), 3 deletions(-)
- +
- +diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
- +index 3d5d718136..3cdacfe0b1 100644
- +--- a/mesonbuild/modules/gnome.py
- ++++ b/mesonbuild/modules/gnome.py
- +@@ -736,15 +736,15 @@ def generate_gir(self, state, args, kwargs):
- + if kwargs.get('install_dir'):
- + raise MesonException('install_dir is not supported with generate_gir(), see "install_dir_gir" and "install_dir_typelib"')
- +
- +- giscanner = self.interpreter.find_program_impl('g-ir-scanner')
- +- gicompiler = self.interpreter.find_program_impl('g-ir-compiler')
- +-
- + girtargets = [self._unwrap_gir_target(arg, state) for arg in args]
- +
- + if len(girtargets) > 1 and any([isinstance(el, build.Executable) for el in girtargets]):
- + raise MesonException('generate_gir only accepts a single argument when one of the arguments is an executable')
- +
- + self.gir_dep, pkgargs = self._get_gir_dep(state)
- ++ giscanner = self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {})
- ++ gicompiler = self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {})
- ++
- +
- + ns = kwargs.pop('namespace')
- + nsversion = kwargs.pop('nsversion')
- --
- 2.21.1 (Apple Git-122.3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement