1 |
commit: 61fb31c86760964f605b8e78cf9c6450a8a0fbbd |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 24 16:41:30 2020 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 24 16:41:59 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61fb31c8 |
7 |
|
8 |
dev-util/meson: bump to 0.45.2 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/721786 |
11 |
Closes: https://bugs.gentoo.org/723224 |
12 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
13 |
|
14 |
dev-util/meson/Manifest | 1 + |
15 |
dev-util/meson/files/0.54.2-multilib-clang.patch | 181 +++++++++++++++++++++ |
16 |
.../{meson-9999.ebuild => meson-0.54.2.ebuild} | 19 +++ |
17 |
dev-util/meson/meson-9999.ebuild | 15 ++ |
18 |
4 files changed, 216 insertions(+) |
19 |
|
20 |
diff --git a/dev-util/meson/Manifest b/dev-util/meson/Manifest |
21 |
index fab95ba0c3e..3ac6a08caa1 100644 |
22 |
--- a/dev-util/meson/Manifest |
23 |
+++ b/dev-util/meson/Manifest |
24 |
@@ -2,3 +2,4 @@ DIST meson-0.52.1.tar.gz 1507764 BLAKE2B 8daf43d84186905d5c32629ab6a250955bdffda |
25 |
DIST meson-0.53.1.tar.gz 1552121 BLAKE2B 3f0bbbeba6307397dfe5e49c1f978d6246d8e18317d0361b6f013f5c2ba55ad7cba53c985418686c20db159b7790b45a0c2e05d86f861cd0280fb07afdbeb847 SHA512 0c96c354bcd7e6945473c7df0ddff929ef2bae9c2dfc7b48c6c6174c7f2be4f798398929f9c4d5986aa5fc882305ff76371ad0d65a499f058b33b05ff7025859 |
26 |
DIST meson-0.54.0.tar.gz 1683491 BLAKE2B 3016beb44c4401672947afa898253b69769f998e18e00baedc3bcb525a9923b9154d7db79cfa4c38fcf66eeaee8137f47917689fdde33674b1f0483b21923393 SHA512 e3c97ffd9409a543e45c8be7b12d4e8437de8dbd0cd236fbe092952d7d0833728d46ff6b679c8a73dae4c4016fdf38b43b56f3959a95968a29db109ebfe254e7 |
27 |
DIST meson-0.54.1.tar.gz 1687532 BLAKE2B 5bd355b35a4aa037e490615629480a194c04821fb18b137f090af89f6c33c700d0756bb2d7e9e608ecf4873886be10493bfeddce55fef3d905793ad3ccccfa68 SHA512 dbc3fed326ba208f5a6eee7e3106d07450e7a3569d425013fba8c51e7cfd6485f9b083836dc74be49bc9839bd640ce54741d9335097cbd28f6a320d5fec7ecfe |
28 |
+DIST meson-0.54.2.tar.gz 1691270 BLAKE2B c1ba552b5d56e0b6b73de46ec6bc90fb520665688d2f5c809baf84749d3bb1dec1fe0131136e1539369fa666ae2427c8fccd5928cbda0b8e3e1edb4a5dc8abbc SHA512 ad5ec826879d3d85088ca40d768599a4c8e66983f2a6a7ebe8ab12051cad18b4ade9a2afd30fe543b0a75900822992c8ef7161d369489e2211dd7a1a8ccc32ed |
29 |
|
30 |
diff --git a/dev-util/meson/files/0.54.2-multilib-clang.patch b/dev-util/meson/files/0.54.2-multilib-clang.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..b3aa3693e69 |
33 |
--- /dev/null |
34 |
+++ b/dev-util/meson/files/0.54.2-multilib-clang.patch |
35 |
@@ -0,0 +1,181 @@ |
36 |
+From 9dc3ca2c1c9fbb47e731551c6432df144f725261 Mon Sep 17 00:00:00 2001 |
37 |
+From: Yevhenii Kolesnikov <yevhenii.kolesnikov@×××××××××××.com> |
38 |
+Date: Thu, 21 May 2020 18:58:47 +0300 |
39 |
+Subject: [PATCH] compilers: add fetching of define list for clang |
40 |
+ |
41 |
+Simmilar to gcc, the list of pre-processor defines can be fetched with |
42 |
+`-dM -E` option. The way cpu_family is determined on linux relies on |
43 |
+this list. |
44 |
+ |
45 |
+Fixes incorrect value of cpu_family on linux, when crosscompiling: |
46 |
+ |
47 |
+``` |
48 |
+CC="clang -m32" meson ./build |
49 |
+``` |
50 |
+ |
51 |
+Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@×××××××××××.com> |
52 |
+Co-authored-by: Dylan Baker <dylan@×××××××××.com> |
53 |
+--- |
54 |
+ mesonbuild/compilers/c.py | 5 +++-- |
55 |
+ mesonbuild/compilers/cpp.py | 5 +++-- |
56 |
+ mesonbuild/compilers/fortran.py | 2 +- |
57 |
+ mesonbuild/compilers/mixins/clang.py | 9 ++++++++- |
58 |
+ mesonbuild/compilers/objc.py | 2 +- |
59 |
+ mesonbuild/compilers/objcpp.py | 2 +- |
60 |
+ mesonbuild/environment.py | 26 +++++++++++++++++++++++++- |
61 |
+ 7 files changed, 42 insertions(+), 9 deletions(-) |
62 |
+ |
63 |
+diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py |
64 |
+index 1bc9e84998..aac99b4269 100644 |
65 |
+--- a/mesonbuild/compilers/c.py |
66 |
++++ b/mesonbuild/compilers/c.py |
67 |
+@@ -86,9 +86,10 @@ class ClangCCompiler(ClangCompiler, CCompiler): |
68 |
+ _C18_VERSION = '>=8.0.0' |
69 |
+ |
70 |
+ def __init__(self, exelist, version, for_machine: MachineChoice, |
71 |
+- is_cross, info: 'MachineInfo', exe_wrapper=None, **kwargs): |
72 |
++ is_cross, info: 'MachineInfo', exe_wrapper=None, |
73 |
++ defines: T.Optional[T.List[str]] = None, **kwargs): |
74 |
+ CCompiler.__init__(self, exelist, version, for_machine, is_cross, info, exe_wrapper, **kwargs) |
75 |
+- ClangCompiler.__init__(self) |
76 |
++ ClangCompiler.__init__(self, defines) |
77 |
+ default_warn_args = ['-Wall', '-Winvalid-pch'] |
78 |
+ self.warn_args = {'0': [], |
79 |
+ '1': default_warn_args, |
80 |
+diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py |
81 |
+index f4bcfa9f89..478a68c13c 100644 |
82 |
+--- a/mesonbuild/compilers/cpp.py |
83 |
++++ b/mesonbuild/compilers/cpp.py |
84 |
+@@ -155,10 +155,11 @@ def _find_best_cpp_std(self, cpp_std): |
85 |
+ |
86 |
+ class ClangCPPCompiler(ClangCompiler, CPPCompiler): |
87 |
+ def __init__(self, exelist, version, for_machine: MachineChoice, |
88 |
+- is_cross, info: 'MachineInfo', exe_wrapper=None, **kwargs): |
89 |
++ is_cross, info: 'MachineInfo', exe_wrapper=None, |
90 |
++ defines : T.Optional[T.List[str]] = None, **kwargs): |
91 |
+ CPPCompiler.__init__(self, exelist, version, for_machine, is_cross, |
92 |
+ info, exe_wrapper, **kwargs) |
93 |
+- ClangCompiler.__init__(self) |
94 |
++ ClangCompiler.__init__(self, defines) |
95 |
+ default_warn_args = ['-Wall', '-Winvalid-pch', '-Wnon-virtual-dtor'] |
96 |
+ self.warn_args = {'0': [], |
97 |
+ '1': default_warn_args, |
98 |
+diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py |
99 |
+index c155b5b4f3..af83c0e564 100644 |
100 |
+--- a/mesonbuild/compilers/fortran.py |
101 |
++++ b/mesonbuild/compilers/fortran.py |
102 |
+@@ -424,7 +424,7 @@ def __init__(self, exelist, version, for_machine: MachineChoice, |
103 |
+ **kwargs): |
104 |
+ FortranCompiler.__init__(self, exelist, version, for_machine, |
105 |
+ is_cross, info, exe_wrapper, **kwargs) |
106 |
+- ClangCompiler.__init__(self) |
107 |
++ ClangCompiler.__init__(self, []) |
108 |
+ self.id = 'flang' |
109 |
+ default_warn_args = ['-Minform=inform'] |
110 |
+ self.warn_args = {'0': [], |
111 |
+diff --git a/mesonbuild/compilers/mixins/clang.py b/mesonbuild/compilers/mixins/clang.py |
112 |
+index 1c0ee452f4..0ee10ad5d5 100644 |
113 |
+--- a/mesonbuild/compilers/mixins/clang.py |
114 |
++++ b/mesonbuild/compilers/mixins/clang.py |
115 |
+@@ -42,9 +42,10 @@ |
116 |
+ } # type: T.Dict[str, T.List[str]] |
117 |
+ |
118 |
+ class ClangCompiler(GnuLikeCompiler): |
119 |
+- def __init__(self): |
120 |
++ def __init__(self, defines: T.Optional[T.Dict[str, str]]): |
121 |
+ super().__init__() |
122 |
+ self.id = 'clang' |
123 |
++ self.defines = defines or {} |
124 |
+ self.base_options.append('b_colorout') |
125 |
+ # TODO: this really should be part of the linker base_options, but |
126 |
+ # linkers don't have base_options. |
127 |
+@@ -56,6 +57,12 @@ def __init__(self): |
128 |
+ def get_colorout_args(self, colortype: str) -> T.List[str]: |
129 |
+ return clang_color_args[colortype][:] |
130 |
+ |
131 |
++ def has_builtin_define(self, define: str) -> bool: |
132 |
++ return define in self.defines |
133 |
++ |
134 |
++ def get_builtin_define(self, define: str) -> T.Optional[str]: |
135 |
++ return self.defines.get(define) |
136 |
++ |
137 |
+ def get_optimization_args(self, optimization_level: str) -> T.List[str]: |
138 |
+ return clang_optimization_args[optimization_level] |
139 |
+ |
140 |
+diff --git a/mesonbuild/compilers/objc.py b/mesonbuild/compilers/objc.py |
141 |
+index 52d258dcdb..d351c8826a 100644 |
142 |
+--- a/mesonbuild/compilers/objc.py |
143 |
++++ b/mesonbuild/compilers/objc.py |
144 |
+@@ -86,7 +86,7 @@ def __init__(self, exelist, version, for_machine: MachineChoice, |
145 |
+ **kwargs): |
146 |
+ ObjCCompiler.__init__(self, exelist, version, for_machine, is_cross, |
147 |
+ info, exe_wrapper, **kwargs) |
148 |
+- ClangCompiler.__init__(self) |
149 |
++ ClangCompiler.__init__(self, []) |
150 |
+ default_warn_args = ['-Wall', '-Winvalid-pch'] |
151 |
+ self.warn_args = {'0': [], |
152 |
+ '1': default_warn_args, |
153 |
+diff --git a/mesonbuild/compilers/objcpp.py b/mesonbuild/compilers/objcpp.py |
154 |
+index c8b422b35d..10555b4551 100644 |
155 |
+--- a/mesonbuild/compilers/objcpp.py |
156 |
++++ b/mesonbuild/compilers/objcpp.py |
157 |
+@@ -84,7 +84,7 @@ def __init__(self, exelist, version, for_machine: MachineChoice, |
158 |
+ is_cross, info: 'MachineInfo', exe_wrapper=None, |
159 |
+ **kwargs): |
160 |
+ ObjCPPCompiler.__init__(self, exelist, version, for_machine, is_cross, info, exe_wrapper, **kwargs) |
161 |
+- ClangCompiler.__init__(self) |
162 |
++ ClangCompiler.__init__(self, []) |
163 |
+ default_warn_args = ['-Wall', '-Winvalid-pch', '-Wnon-virtual-dtor'] |
164 |
+ self.warn_args = {'0': [], |
165 |
+ '1': default_warn_args, |
166 |
+diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py |
167 |
+index 8fad6288b1..cb6ae7d514 100644 |
168 |
+--- a/mesonbuild/environment.py |
169 |
++++ b/mesonbuild/environment.py |
170 |
+@@ -726,6 +726,28 @@ def get_lcc_version_from_defines(defines): |
171 |
+ minor = defines.get('__LCC_MINOR__', '0') |
172 |
+ return dot.join((generation, major, minor)) |
173 |
+ |
174 |
++ @staticmethod |
175 |
++ def get_clang_compiler_defines(compiler): |
176 |
++ """ |
177 |
++ Get the list of Clang pre-processor defines |
178 |
++ """ |
179 |
++ args = compiler + ['-E', '-dM', '-'] |
180 |
++ p, output, error = Popen_safe(args, write='', stdin=subprocess.PIPE) |
181 |
++ if p.returncode != 0: |
182 |
++ raise EnvironmentException('Unable to get clang pre-processor defines:\n' + output + error) |
183 |
++ defines = {} |
184 |
++ for line in output.split('\n'): |
185 |
++ if not line: |
186 |
++ continue |
187 |
++ d, *rest = line.split(' ', 2) |
188 |
++ if d != '#define': |
189 |
++ continue |
190 |
++ if len(rest) == 1: |
191 |
++ defines[rest] = True |
192 |
++ if len(rest) == 2: |
193 |
++ defines[rest[0]] = rest[1] |
194 |
++ return defines |
195 |
++ |
196 |
+ def _get_compilers(self, lang, for_machine): |
197 |
+ ''' |
198 |
+ The list of compilers is detected in the exact same way for |
199 |
+@@ -1043,6 +1065,8 @@ def sanitize(p): |
200 |
+ if 'clang' in out: |
201 |
+ linker = None |
202 |
+ |
203 |
++ defines = self.get_clang_compiler_defines(compiler) |
204 |
++ |
205 |
+ # Even if the for_machine is darwin, we could be using vanilla |
206 |
+ # clang. |
207 |
+ if 'Apple' in out: |
208 |
+@@ -1063,7 +1087,7 @@ def sanitize(p): |
209 |
+ |
210 |
+ return cls( |
211 |
+ ccache + compiler, version, for_machine, is_cross, info, |
212 |
+- exe_wrap, full_version=full_version, linker=linker) |
213 |
++ exe_wrap, defines, full_version=full_version, linker=linker) |
214 |
+ |
215 |
+ if 'Intel(R) C++ Intel(R)' in err: |
216 |
+ version = search_version(err) |
217 |
|
218 |
diff --git a/dev-util/meson/meson-9999.ebuild b/dev-util/meson/meson-0.54.2.ebuild |
219 |
similarity index 73% |
220 |
copy from dev-util/meson/meson-9999.ebuild |
221 |
copy to dev-util/meson/meson-0.54.2.ebuild |
222 |
index 77f6244e6e2..2ef1f787f28 100644 |
223 |
--- a/dev-util/meson/meson-9999.ebuild |
224 |
+++ b/dev-util/meson/meson-0.54.2.ebuild |
225 |
@@ -34,6 +34,25 @@ DEPEND=" |
226 |
) |
227 |
" |
228 |
|
229 |
+PATCHES=( |
230 |
+ "${FILESDIR}"/0.54.2-multilib-clang.patch |
231 |
+) |
232 |
+ |
233 |
+python_prepare_all() { |
234 |
+ # ASAN and sandbox both want control over LD_PRELOAD |
235 |
+ # https://bugs.gentoo.org/673016 |
236 |
+ sed -i -e 's/test_generate_gir_with_address_sanitizer/_&/' run_unittests.py || die |
237 |
+ |
238 |
+ # ASAN is unsupported on some targets |
239 |
+ # https://bugs.gentoo.org/692822 |
240 |
+ sed -i -e 's/test_pch_with_address_sanitizer/_&/' run_unittests.py || die |
241 |
+ |
242 |
+ # Broken due to python2 script created by python_wrapper_setup |
243 |
+ rm -r "test cases/frameworks/1 boost" || die |
244 |
+ |
245 |
+ distutils-r1_python_prepare_all |
246 |
+} |
247 |
+ |
248 |
src_test() { |
249 |
tc-export PKG_CONFIG |
250 |
if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then |
251 |
|
252 |
diff --git a/dev-util/meson/meson-9999.ebuild b/dev-util/meson/meson-9999.ebuild |
253 |
index 77f6244e6e2..053a12bbeb2 100644 |
254 |
--- a/dev-util/meson/meson-9999.ebuild |
255 |
+++ b/dev-util/meson/meson-9999.ebuild |
256 |
@@ -34,6 +34,21 @@ DEPEND=" |
257 |
) |
258 |
" |
259 |
|
260 |
+python_prepare_all() { |
261 |
+ # ASAN and sandbox both want control over LD_PRELOAD |
262 |
+ # https://bugs.gentoo.org/673016 |
263 |
+ sed -i -e 's/test_generate_gir_with_address_sanitizer/_&/' run_unittests.py || die |
264 |
+ |
265 |
+ # ASAN is unsupported on some targets |
266 |
+ # https://bugs.gentoo.org/692822 |
267 |
+ sed -i -e 's/test_pch_with_address_sanitizer/_&/' run_unittests.py || die |
268 |
+ |
269 |
+ # Broken due to python2 script created by python_wrapper_setup |
270 |
+ rm -r "test cases/frameworks/1 boost" || die |
271 |
+ |
272 |
+ distutils-r1_python_prepare_all |
273 |
+} |
274 |
+ |
275 |
src_test() { |
276 |
tc-export PKG_CONFIG |
277 |
if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then |