diff --git a/meta-gnome/recipes-devtools/meson/meson/0001-use-exe-wrapper-for-custom-targets.patch b/meta-gnome/recipes-devtools/meson/meson/0001-use-exe-wrapper-for-custom-targets.patch index db0b7db..e5e1702 100644 --- a/meta-gnome/recipes-devtools/meson/meson/0001-use-exe-wrapper-for-custom-targets.patch +++ b/meta-gnome/recipes-devtools/meson/meson/0001-use-exe-wrapper-for-custom-targets.patch @@ -1,68 +1,23 @@ -From 221d6ad64908cec5f9eca85abbb6685e7117d2a4 Mon Sep 17 00:00:00 2001 -From: brl -Date: Mon, 18 Dec 2017 14:55:04 -0500 -Subject: [PATCH] use exe wrapper for custom targets +From 3ec508d72b45e65b83610680e4fe31fadb13a8d3 Mon Sep 17 00:00:00 2001 +From: Bruce Leidl +Date: Thu, 4 Apr 2019 12:39:12 -0400 +Subject: [PATCH] Use exe wrapper for custom targets --- - mesonbuild/backend/backends.py | 39 ++++++++++++++++++++++++++++++--------- - 1 file changed, 30 insertions(+), 9 deletions(-) + mesonbuild/backend/backends.py | 3 +++ + 1 file changed, 3 insertions(+) diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py -index 3f1e4ced..43091164 100644 +index 4b9bcb5..f8b8168 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py -@@ -634,21 +634,42 @@ class Backend: - deps.append(os.path.join(self.build_to_src, sp, 'meson_options.txt')) - return deps - -+ -+ def exe_object_needs_wrapper(self, exe): -+ return isinstance(exe, build.BuildTarget) and exe.is_cross and \ -+ self.environment.is_cross_build() and \ -+ self.environment.cross_info.need_exe_wrapper() -+ -+ def wrapped_exe_to_cmd_array(self, exe): -+ if 'exe_wrapper' not in self.environment.cross_info.config['binaries']: -+ s = 'Can not use target %s as a generator because it is cross-built\n' -+ s += 'and no exe wrapper is defined. You might want to set it to native instead.' -+ s = s % exe.name -+ raise MesonException(s) -+ -+ exe_wrapper = self.environment.cross_info.config['binaries'].get('exe_wrapper') -+ exe_path = os.path.join(self.environment.get_build_dir(), self.get_target_filename(exe)) -+ return [exe_wrapper, exe_path] -+ -+ -+ - def exe_object_to_cmd_array(self, exe): -- if self.environment.is_cross_build() and \ -- self.environment.cross_info.need_exe_wrapper() and \ -- isinstance(exe, build.BuildTarget) and exe.is_cross: -- if 'exe_wrapper' not in self.environment.cross_info.config['binaries']: -- s = 'Can not use target %s as a generator because it is cross-built\n' -- s += 'and no exe wrapper is defined. You might want to set it to native instead.' -- s = s % exe.name -- raise MesonException(s) -- if isinstance(exe, build.BuildTarget): -+ need_wrapper = \ -+ isinstance(exe, build.BuildTarget) and \ -+ exe.is_cross and \ -+ self.environment.is_cross_build() and \ -+ self.environment.cross_info.need_exe_wrapper() -+ -+ if need_wrapper: -+ exe_arr = self.wrapped_exe_to_cmd_array(exe) -+ elif isinstance(exe, build.BuildTarget): +@@ -745,6 +745,9 @@ class Backend: + and no exe wrapper is defined or needs_exe_wrapper is true. + You might want to set it to native instead.'''.format(exe.name)) + raise MesonException(s) ++ else: ++ exe_path = os.path.join(self.environment.get_build_dir(), self.get_target_filename(exe)) ++ return [self.environment.exe_wrapper.get_path(), exe_path] + if isinstance(exe, build.BuildTarget): exe_arr = [os.path.join(self.environment.get_build_dir(), self.get_target_filename(exe))] else: - exe_arr = exe.get_command() -+ - return exe_arr - -+ - def replace_extra_args(self, args, genlist): - final_args = [] - for a in args: --- -2.14.3 - diff --git a/meta-gnome/recipes-devtools/meson/meson/disable-rpath-handling.patch b/meta-gnome/recipes-devtools/meson/meson/disable-rpath-handling.patch deleted file mode 100644 index 4b1fb57..0000000 --- a/meta-gnome/recipes-devtools/meson/meson/disable-rpath-handling.patch +++ /dev/null @@ -1,26 +0,0 @@ -We need to allow our rpaths generated through the compiler flags to make it into -our binaries. Therefore disable the meson manipulations of these unless there -is a specific directive to do something differently in the project. - -RP 2018/11/23 - -Upstream-Status: Submitted [https://github.com/mesonbuild/meson/issues/2567] - -Index: meson-0.47.2/mesonbuild/minstall.py -=================================================================== ---- meson-0.47.2.orig/mesonbuild/minstall.py -+++ meson-0.47.2/mesonbuild/minstall.py -@@ -486,8 +486,11 @@ class Installer: - printed_symlink_error = True - if os.path.isfile(outname): - try: -- depfixer.fix_rpath(outname, install_rpath, final_path, -- install_name_mappings, verbose=False) -+ if install_rpath: -+ depfixer.fix_rpath(outname, install_rpath, final_path, -+ install_name_mappings, verbose=False) -+ else: -+ print("RPATH changes at install time disabled") - except SystemExit as e: - if isinstance(e.code, int) and e.code == 0: - pass diff --git a/meta-gnome/recipes-devtools/meson/meson_%.bbappend b/meta-gnome/recipes-devtools/meson/meson_%.bbappend index 640cc35..8248ccb 100644 --- a/meta-gnome/recipes-devtools/meson/meson_%.bbappend +++ b/meta-gnome/recipes-devtools/meson/meson_%.bbappend @@ -1,10 +1,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/meson:" -# disable-rpath-handling: -# https://github.com/mesonbuild/meson/issues/2567 -# https://github.com/openembedded/openembedded-core/commit/29b5ef236914b152fd255e134569d4a177656bb0 SRC_URI += "\ file://0001-use-exe-wrapper-for-custom-targets.patch \ - file://disable-rpath-handling.patch \ "