summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2018-09-27 11:06:57 -0400
committerMike Gilbert <floppym@gentoo.org>2018-09-27 11:06:57 -0400
commit9b68392fb39e8639b4858eed9e13af13b8e29988 (patch)
treea044b26171f11d8c106b100db2c24c64d1e1f6ae /dev-util
parentwww-client/firefox: clang doesn't support thumb-interwork (diff)
downloadgentoo-9b68392fb39e8639b4858eed9e13af13b8e29988.tar.gz
gentoo-9b68392fb39e8639b4858eed9e13af13b8e29988.tar.bz2
gentoo-9b68392fb39e8639b4858eed9e13af13b8e29988.zip
dev-util/meson: fix multilib builds
Closes: https://bugs.gentoo.org/666968 Signed-off-by: Mike Gilbert <floppym@gentoo.org> Package-Manager: Portage-2.3.50_p2, Repoman-2.3.11_p9
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/meson/files/0.48.0-multilib.patch48
-rw-r--r--dev-util/meson/meson-0.48.0-r1.ebuild (renamed from dev-util/meson/meson-0.48.0.ebuild)6
2 files changed, 53 insertions, 1 deletions
diff --git a/dev-util/meson/files/0.48.0-multilib.patch b/dev-util/meson/files/0.48.0-multilib.patch
new file mode 100644
index 000000000000..0b488f50cd5b
--- /dev/null
+++ b/dev-util/meson/files/0.48.0-multilib.patch
@@ -0,0 +1,48 @@
+From 3bb300a76ed4d7a614c4a83ddefe86425040ec13 Mon Sep 17 00:00:00 2001
+From: Dylan Baker <dylan@pnwbakers.com>
+Date: Mon, 24 Sep 2018 11:08:19 -0700
+Subject: [PATCH] backends: allow running host arch binaries on compatible
+ build machines
+
+Meson 0.48.0 some validation for using compiled binaries in custom
+targets and generators, which is nice. It didn't take into account
+though that as long as the OS is the same, some architectures support
+running a related architecture natively (x86_64 can run x86 natively,
+for example).
+
+Fortunately we already have a method for covering this case available
+through the Environment class.
+
+Fixes #4254
+---
+ mesonbuild/backend/backends.py | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
+index 0e7e8e0fe3..ccbbe173fd 100644
+--- a/mesonbuild/backend/backends.py
++++ b/mesonbuild/backend/backends.py
+@@ -13,6 +13,7 @@
+ # limitations under the License.
+
+ import os, pickle, re
++import textwrap
+ from .. import build
+ from .. import dependencies
+ from .. import mesonlib
+@@ -731,10 +732,11 @@ def get_regen_filelist(self):
+ def exe_object_to_cmd_array(self, exe):
+ if self.environment.is_cross_build() and \
+ isinstance(exe, build.BuildTarget) and exe.is_cross:
+- if self.environment.exe_wrapper is None:
+- 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
++ if self.environment.exe_wrapper is None and self.environment.cross_info.need_exe_wrapper():
++ s = textwrap.dedent('''
++ Can not use target {} as a generator because it is cross-built
++ 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)
+ if isinstance(exe, build.BuildTarget):
+ exe_arr = [os.path.join(self.environment.get_build_dir(), self.get_target_filename(exe))]
diff --git a/dev-util/meson/meson-0.48.0.ebuild b/dev-util/meson/meson-0.48.0-r1.ebuild
index a02f93d684e4..fec1d8e3fd85 100644
--- a/dev-util/meson/meson-0.48.0.ebuild
+++ b/dev-util/meson/meson-0.48.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -25,6 +25,10 @@ RESTRICT="test"
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND=""
+PATCHES=(
+ "${FILESDIR}"/0.48.0-multilib.patch
+)
+
python_test() {
${EPYTHON} run_tests.py || die
}