Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
Date: Thu, 27 Sep 2018 15:09:10
Message-Id: 1538060817.9b68392fb39e8639b4858eed9e13af13b8e29988.floppym@gentoo
1 commit: 9b68392fb39e8639b4858eed9e13af13b8e29988
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 27 15:06:57 2018 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 27 15:06:57 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b68392f
7
8 dev-util/meson: fix multilib builds
9
10 Closes: https://bugs.gentoo.org/666968
11 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
12 Package-Manager: Portage-2.3.50_p2, Repoman-2.3.11_p9
13
14 dev-util/meson/files/0.48.0-multilib.patch | 48 ++++++++++++++++++++++
15 ...{meson-0.48.0.ebuild => meson-0.48.0-r1.ebuild} | 6 ++-
16 2 files changed, 53 insertions(+), 1 deletion(-)
17
18 diff --git a/dev-util/meson/files/0.48.0-multilib.patch b/dev-util/meson/files/0.48.0-multilib.patch
19 new file mode 100644
20 index 00000000000..0b488f50cd5
21 --- /dev/null
22 +++ b/dev-util/meson/files/0.48.0-multilib.patch
23 @@ -0,0 +1,48 @@
24 +From 3bb300a76ed4d7a614c4a83ddefe86425040ec13 Mon Sep 17 00:00:00 2001
25 +From: Dylan Baker <dylan@×××××××××.com>
26 +Date: Mon, 24 Sep 2018 11:08:19 -0700
27 +Subject: [PATCH] backends: allow running host arch binaries on compatible
28 + build machines
29 +
30 +Meson 0.48.0 some validation for using compiled binaries in custom
31 +targets and generators, which is nice. It didn't take into account
32 +though that as long as the OS is the same, some architectures support
33 +running a related architecture natively (x86_64 can run x86 natively,
34 +for example).
35 +
36 +Fortunately we already have a method for covering this case available
37 +through the Environment class.
38 +
39 +Fixes #4254
40 +---
41 + mesonbuild/backend/backends.py | 10 ++++++----
42 + 1 file changed, 6 insertions(+), 4 deletions(-)
43 +
44 +diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
45 +index 0e7e8e0fe3..ccbbe173fd 100644
46 +--- a/mesonbuild/backend/backends.py
47 ++++ b/mesonbuild/backend/backends.py
48 +@@ -13,6 +13,7 @@
49 + # limitations under the License.
50 +
51 + import os, pickle, re
52 ++import textwrap
53 + from .. import build
54 + from .. import dependencies
55 + from .. import mesonlib
56 +@@ -731,10 +732,11 @@ def get_regen_filelist(self):
57 + def exe_object_to_cmd_array(self, exe):
58 + if self.environment.is_cross_build() and \
59 + isinstance(exe, build.BuildTarget) and exe.is_cross:
60 +- if self.environment.exe_wrapper is None:
61 +- s = 'Can not use target %s as a generator because it is cross-built\n'
62 +- s += 'and no exe wrapper is defined. You might want to set it to native instead.'
63 +- s = s % exe.name
64 ++ if self.environment.exe_wrapper is None and self.environment.cross_info.need_exe_wrapper():
65 ++ s = textwrap.dedent('''
66 ++ Can not use target {} as a generator because it is cross-built
67 ++ and no exe wrapper is defined or needs_exe_wrapper is true.
68 ++ You might want to set it to native instead.'''.format(exe.name))
69 + raise MesonException(s)
70 + if isinstance(exe, build.BuildTarget):
71 + exe_arr = [os.path.join(self.environment.get_build_dir(), self.get_target_filename(exe))]
72
73 diff --git a/dev-util/meson/meson-0.48.0.ebuild b/dev-util/meson/meson-0.48.0-r1.ebuild
74 similarity index 91%
75 rename from dev-util/meson/meson-0.48.0.ebuild
76 rename to dev-util/meson/meson-0.48.0-r1.ebuild
77 index a02f93d684e..fec1d8e3fd8 100644
78 --- a/dev-util/meson/meson-0.48.0.ebuild
79 +++ b/dev-util/meson/meson-0.48.0-r1.ebuild
80 @@ -1,4 +1,4 @@
81 -# Copyright 1999-2018 Gentoo Foundation
82 +# Copyright 1999-2018 Gentoo Authors
83 # Distributed under the terms of the GNU General Public License v2
84
85 EAPI=6
86 @@ -25,6 +25,10 @@ RESTRICT="test"
87 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
88 RDEPEND=""
89
90 +PATCHES=(
91 + "${FILESDIR}"/0.48.0-multilib.patch
92 +)
93 +
94 python_test() {
95 ${EPYTHON} run_tests.py || die
96 }