Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/meson/files/, dev-util/meson/
Date: Sun, 11 Oct 2020 18:16:07
Message-Id: 1602440132.faf2d76c7df7528bf6ee206b57a739004657eb48.williamh@gentoo
1 commit: faf2d76c7df7528bf6ee206b57a739004657eb48
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 11 18:10:32 2020 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 11 18:15:32 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=faf2d76c
7
8 dev-util/meson: remove old
9
10 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
11
12 dev-util/meson/Manifest | 1 -
13 dev-util/meson/files/0.54.2-multilib-clang.patch | 181 ---------------------
14 .../files/0.54.2-prefix-dont-strip-rpath.patch | 25 ---
15 dev-util/meson/meson-0.54.3.ebuild | 98 -----------
16 4 files changed, 305 deletions(-)
17
18 diff --git a/dev-util/meson/Manifest b/dev-util/meson/Manifest
19 index 3d7d3160aa7..56d8beb192c 100644
20 --- a/dev-util/meson/Manifest
21 +++ b/dev-util/meson/Manifest
22 @@ -1,2 +1 @@
23 -DIST meson-0.54.3.tar.gz 1690919 BLAKE2B 5d71731fb33397f470e2440d4d45f828d28d56351843a35b575f8b386f0b1c90faf654289e22ba7c2c4bf6c3be72d3dc8a2257d4a688bcbf9a1f2522394e7728 SHA512 2e62bf992bf337ae5a01f7a0fb842ea0cefcdbc81f5675235e41d8182f37df2e003b0a8a90d650c6cca4ff79898f7888474f75e5103a48d7ca14f51a024e4f2b
24 DIST meson-0.55.3.tar.gz 1740465 BLAKE2B 7d121f5d2bf487ae3c38be5ddccde6900134b9d0ea47868aac5625449e18a1a97ae0012849b795187221632cd3ac343097ef29b282753a1e8bd871c393d5c0e8 SHA512 afb0bb25b367e681131d920995124df4b06f6d144ae1a95ebec27be13e06fefbd95840e0287cd1d84bdbb8d9c115b589a833d847c60926f55e0f15749cf66bae
25
26 diff --git a/dev-util/meson/files/0.54.2-multilib-clang.patch b/dev-util/meson/files/0.54.2-multilib-clang.patch
27 deleted file mode 100644
28 index b3aa3693e69..00000000000
29 --- a/dev-util/meson/files/0.54.2-multilib-clang.patch
30 +++ /dev/null
31 @@ -1,181 +0,0 @@
32 -From 9dc3ca2c1c9fbb47e731551c6432df144f725261 Mon Sep 17 00:00:00 2001
33 -From: Yevhenii Kolesnikov <yevhenii.kolesnikov@×××××××××××.com>
34 -Date: Thu, 21 May 2020 18:58:47 +0300
35 -Subject: [PATCH] compilers: add fetching of define list for clang
36 -
37 -Simmilar to gcc, the list of pre-processor defines can be fetched with
38 -`-dM -E` option. The way cpu_family is determined on linux relies on
39 -this list.
40 -
41 -Fixes incorrect value of cpu_family on linux, when crosscompiling:
42 -
43 -```
44 -CC="clang -m32" meson ./build
45 -```
46 -
47 -Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@×××××××××××.com>
48 -Co-authored-by: Dylan Baker <dylan@×××××××××.com>
49 ----
50 - mesonbuild/compilers/c.py | 5 +++--
51 - mesonbuild/compilers/cpp.py | 5 +++--
52 - mesonbuild/compilers/fortran.py | 2 +-
53 - mesonbuild/compilers/mixins/clang.py | 9 ++++++++-
54 - mesonbuild/compilers/objc.py | 2 +-
55 - mesonbuild/compilers/objcpp.py | 2 +-
56 - mesonbuild/environment.py | 26 +++++++++++++++++++++++++-
57 - 7 files changed, 42 insertions(+), 9 deletions(-)
58 -
59 -diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
60 -index 1bc9e84998..aac99b4269 100644
61 ---- a/mesonbuild/compilers/c.py
62 -+++ b/mesonbuild/compilers/c.py
63 -@@ -86,9 +86,10 @@ class ClangCCompiler(ClangCompiler, CCompiler):
64 - _C18_VERSION = '>=8.0.0'
65 -
66 - def __init__(self, exelist, version, for_machine: MachineChoice,
67 -- is_cross, info: 'MachineInfo', exe_wrapper=None, **kwargs):
68 -+ is_cross, info: 'MachineInfo', exe_wrapper=None,
69 -+ defines: T.Optional[T.List[str]] = None, **kwargs):
70 - CCompiler.__init__(self, exelist, version, for_machine, is_cross, info, exe_wrapper, **kwargs)
71 -- ClangCompiler.__init__(self)
72 -+ ClangCompiler.__init__(self, defines)
73 - default_warn_args = ['-Wall', '-Winvalid-pch']
74 - self.warn_args = {'0': [],
75 - '1': default_warn_args,
76 -diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
77 -index f4bcfa9f89..478a68c13c 100644
78 ---- a/mesonbuild/compilers/cpp.py
79 -+++ b/mesonbuild/compilers/cpp.py
80 -@@ -155,10 +155,11 @@ def _find_best_cpp_std(self, cpp_std):
81 -
82 - class ClangCPPCompiler(ClangCompiler, CPPCompiler):
83 - def __init__(self, exelist, version, for_machine: MachineChoice,
84 -- is_cross, info: 'MachineInfo', exe_wrapper=None, **kwargs):
85 -+ is_cross, info: 'MachineInfo', exe_wrapper=None,
86 -+ defines : T.Optional[T.List[str]] = None, **kwargs):
87 - CPPCompiler.__init__(self, exelist, version, for_machine, is_cross,
88 - info, exe_wrapper, **kwargs)
89 -- ClangCompiler.__init__(self)
90 -+ ClangCompiler.__init__(self, defines)
91 - default_warn_args = ['-Wall', '-Winvalid-pch', '-Wnon-virtual-dtor']
92 - self.warn_args = {'0': [],
93 - '1': default_warn_args,
94 -diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py
95 -index c155b5b4f3..af83c0e564 100644
96 ---- a/mesonbuild/compilers/fortran.py
97 -+++ b/mesonbuild/compilers/fortran.py
98 -@@ -424,7 +424,7 @@ def __init__(self, exelist, version, for_machine: MachineChoice,
99 - **kwargs):
100 - FortranCompiler.__init__(self, exelist, version, for_machine,
101 - is_cross, info, exe_wrapper, **kwargs)
102 -- ClangCompiler.__init__(self)
103 -+ ClangCompiler.__init__(self, [])
104 - self.id = 'flang'
105 - default_warn_args = ['-Minform=inform']
106 - self.warn_args = {'0': [],
107 -diff --git a/mesonbuild/compilers/mixins/clang.py b/mesonbuild/compilers/mixins/clang.py
108 -index 1c0ee452f4..0ee10ad5d5 100644
109 ---- a/mesonbuild/compilers/mixins/clang.py
110 -+++ b/mesonbuild/compilers/mixins/clang.py
111 -@@ -42,9 +42,10 @@
112 - } # type: T.Dict[str, T.List[str]]
113 -
114 - class ClangCompiler(GnuLikeCompiler):
115 -- def __init__(self):
116 -+ def __init__(self, defines: T.Optional[T.Dict[str, str]]):
117 - super().__init__()
118 - self.id = 'clang'
119 -+ self.defines = defines or {}
120 - self.base_options.append('b_colorout')
121 - # TODO: this really should be part of the linker base_options, but
122 - # linkers don't have base_options.
123 -@@ -56,6 +57,12 @@ def __init__(self):
124 - def get_colorout_args(self, colortype: str) -> T.List[str]:
125 - return clang_color_args[colortype][:]
126 -
127 -+ def has_builtin_define(self, define: str) -> bool:
128 -+ return define in self.defines
129 -+
130 -+ def get_builtin_define(self, define: str) -> T.Optional[str]:
131 -+ return self.defines.get(define)
132 -+
133 - def get_optimization_args(self, optimization_level: str) -> T.List[str]:
134 - return clang_optimization_args[optimization_level]
135 -
136 -diff --git a/mesonbuild/compilers/objc.py b/mesonbuild/compilers/objc.py
137 -index 52d258dcdb..d351c8826a 100644
138 ---- a/mesonbuild/compilers/objc.py
139 -+++ b/mesonbuild/compilers/objc.py
140 -@@ -86,7 +86,7 @@ def __init__(self, exelist, version, for_machine: MachineChoice,
141 - **kwargs):
142 - ObjCCompiler.__init__(self, exelist, version, for_machine, is_cross,
143 - info, exe_wrapper, **kwargs)
144 -- ClangCompiler.__init__(self)
145 -+ ClangCompiler.__init__(self, [])
146 - default_warn_args = ['-Wall', '-Winvalid-pch']
147 - self.warn_args = {'0': [],
148 - '1': default_warn_args,
149 -diff --git a/mesonbuild/compilers/objcpp.py b/mesonbuild/compilers/objcpp.py
150 -index c8b422b35d..10555b4551 100644
151 ---- a/mesonbuild/compilers/objcpp.py
152 -+++ b/mesonbuild/compilers/objcpp.py
153 -@@ -84,7 +84,7 @@ def __init__(self, exelist, version, for_machine: MachineChoice,
154 - is_cross, info: 'MachineInfo', exe_wrapper=None,
155 - **kwargs):
156 - ObjCPPCompiler.__init__(self, exelist, version, for_machine, is_cross, info, exe_wrapper, **kwargs)
157 -- ClangCompiler.__init__(self)
158 -+ ClangCompiler.__init__(self, [])
159 - default_warn_args = ['-Wall', '-Winvalid-pch', '-Wnon-virtual-dtor']
160 - self.warn_args = {'0': [],
161 - '1': default_warn_args,
162 -diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
163 -index 8fad6288b1..cb6ae7d514 100644
164 ---- a/mesonbuild/environment.py
165 -+++ b/mesonbuild/environment.py
166 -@@ -726,6 +726,28 @@ def get_lcc_version_from_defines(defines):
167 - minor = defines.get('__LCC_MINOR__', '0')
168 - return dot.join((generation, major, minor))
169 -
170 -+ @staticmethod
171 -+ def get_clang_compiler_defines(compiler):
172 -+ """
173 -+ Get the list of Clang pre-processor defines
174 -+ """
175 -+ args = compiler + ['-E', '-dM', '-']
176 -+ p, output, error = Popen_safe(args, write='', stdin=subprocess.PIPE)
177 -+ if p.returncode != 0:
178 -+ raise EnvironmentException('Unable to get clang pre-processor defines:\n' + output + error)
179 -+ defines = {}
180 -+ for line in output.split('\n'):
181 -+ if not line:
182 -+ continue
183 -+ d, *rest = line.split(' ', 2)
184 -+ if d != '#define':
185 -+ continue
186 -+ if len(rest) == 1:
187 -+ defines[rest] = True
188 -+ if len(rest) == 2:
189 -+ defines[rest[0]] = rest[1]
190 -+ return defines
191 -+
192 - def _get_compilers(self, lang, for_machine):
193 - '''
194 - The list of compilers is detected in the exact same way for
195 -@@ -1043,6 +1065,8 @@ def sanitize(p):
196 - if 'clang' in out:
197 - linker = None
198 -
199 -+ defines = self.get_clang_compiler_defines(compiler)
200 -+
201 - # Even if the for_machine is darwin, we could be using vanilla
202 - # clang.
203 - if 'Apple' in out:
204 -@@ -1063,7 +1087,7 @@ def sanitize(p):
205 -
206 - return cls(
207 - ccache + compiler, version, for_machine, is_cross, info,
208 -- exe_wrap, full_version=full_version, linker=linker)
209 -+ exe_wrap, defines, full_version=full_version, linker=linker)
210 -
211 - if 'Intel(R) C++ Intel(R)' in err:
212 - version = search_version(err)
213
214 diff --git a/dev-util/meson/files/0.54.2-prefix-dont-strip-rpath.patch b/dev-util/meson/files/0.54.2-prefix-dont-strip-rpath.patch
215 deleted file mode 100644
216 index 1fe2e1ac4cc..00000000000
217 --- a/dev-util/meson/files/0.54.2-prefix-dont-strip-rpath.patch
218 +++ /dev/null
219 @@ -1,25 +0,0 @@
220 -https://bz-attachments.freebsd.org/attachment.cgi?id=204611
221 -https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238128
222 -
223 -Stripping RPATH on Prefix is really bad, because it means the default
224 -RPATH entries disappear, and any installed binaries don't work (get
225 -kernel traps).
226 -
227 -Extracted the minstall patch from the FreeBSD full patch.
228 -
229 ---- a/mesonbuild/minstall.py
230 -+++ b/mesonbuild/minstall.py
231 -@@ -488,8 +488,11 @@
232 - printed_symlink_error = True
233 - if os.path.isfile(outname):
234 - try:
235 -- depfixer.fix_rpath(outname, install_rpath, final_path,
236 -- install_name_mappings, verbose=False)
237 -+ if install_rpath:
238 -+ depfixer.fix_rpath(outname, install_rpath, final_path,
239 -+ install_name_mappings, verbose=False)
240 -+ else:
241 -+ print("RPATH changes at install time disabled")
242 - except SystemExit as e:
243 - if isinstance(e.code, int) and e.code == 0:
244 - pass
245
246 diff --git a/dev-util/meson/meson-0.54.3.ebuild b/dev-util/meson/meson-0.54.3.ebuild
247 deleted file mode 100644
248 index e91ba990d3a..00000000000
249 --- a/dev-util/meson/meson-0.54.3.ebuild
250 +++ /dev/null
251 @@ -1,98 +0,0 @@
252 -# Copyright 2016-2020 Gentoo Authors
253 -# Distributed under the terms of the GNU General Public License v2
254 -
255 -EAPI=7
256 -PYTHON_COMPAT=( python3_{6,7,8} )
257 -DISTUTILS_USE_SETUPTOOLS="rdepend"
258 -
259 -if [[ ${PV} = *9999* ]]; then
260 - EGIT_REPO_URI="https://github.com/mesonbuild/meson"
261 - inherit git-r3
262 -else
263 - SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
264 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
265 -fi
266 -
267 -inherit distutils-r1 toolchain-funcs
268 -
269 -DESCRIPTION="Open source build system"
270 -HOMEPAGE="https://mesonbuild.com/"
271 -
272 -LICENSE="Apache-2.0"
273 -SLOT="0"
274 -IUSE="test"
275 -RESTRICT="!test? ( test )"
276 -
277 -DEPEND="
278 - test? (
279 - dev-libs/glib:2
280 - dev-libs/gobject-introspection
281 - dev-util/ninja
282 - dev-vcs/git
283 - sys-libs/zlib[static-libs(+)]
284 - virtual/pkgconfig
285 - )
286 -"
287 -
288 -PATCHES=(
289 - "${FILESDIR}"/0.54.2-multilib-clang.patch
290 -)
291 -
292 -python_prepare_all() {
293 - local disable_unittests=(
294 - # ASAN and sandbox both want control over LD_PRELOAD
295 - # https://bugs.gentoo.org/673016
296 - -e 's/test_generate_gir_with_address_sanitizer/_&/'
297 -
298 - # ASAN is unsupported on some targets
299 - # https://bugs.gentoo.org/692822
300 - -e 's/test_pch_with_address_sanitizer/_&/'
301 -
302 - # https://github.com/mesonbuild/meson/issues/7203
303 - -e 's/test_templates/_&/'
304 -
305 - # Broken due to python2 wrapper
306 - -e 's/test_python_module/_&/'
307 - )
308 -
309 - sed -i "${disable_unittests[@]}" run_unittests.py || die
310 -
311 - # Broken due to python2 script created by python_wrapper_setup
312 - rm -r "test cases/frameworks/1 boost" || die
313 -
314 - use prefix && eapply "${FILESDIR}"/0.54.2-prefix-dont-strip-rpath.patch
315 -
316 - distutils-r1_python_prepare_all
317 -}
318 -
319 -src_test() {
320 - tc-export PKG_CONFIG
321 - if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
322 - ewarn "Found Qt5Core but not Qt5Gui; skipping tests"
323 - else
324 - # https://bugs.gentoo.org/687792
325 - unset PKG_CONFIG
326 - distutils-r1_src_test
327 - fi
328 -}
329 -
330 -python_test() {
331 - (
332 - # test_meson_installed
333 - unset PYTHONDONTWRITEBYTECODE
334 -
335 - # test_cross_file_system_paths
336 - unset XDG_DATA_HOME
337 -
338 - ${EPYTHON} -u run_tests.py
339 - ) || die "Testing failed with ${EPYTHON}"
340 -}
341 -
342 -python_install_all() {
343 - distutils-r1_python_install_all
344 -
345 - insinto /usr/share/vim/vimfiles
346 - doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
347 - insinto /usr/share/zsh/site-functions
348 - doins data/shell-completions/zsh/_meson
349 -}