dev-build/meson: Sync with Gentoo

It's from Gentoo commit 50bf246f6fa5f3219727234ebb4dcf5397c05657.
This commit is contained in:
Flatcar Buildbot 2024-07-01 07:12:56 +00:00 committed by Mathieu Tortuyaux
parent 95e0d09f75
commit d38d5660ba
No known key found for this signature in database
GPG Key ID: AC5CCFB52545D9B8
16 changed files with 118 additions and 700 deletions

View File

@ -2,12 +2,14 @@ DIST meson-1.1.1.tar.gz 2125503 BLAKE2B 295b46d19c8a1d64d326a6c826e2abe11d976890
DIST meson-1.1.1.tar.gz.asc 833 BLAKE2B 165f3a0e8093995e82efcdea78b8cf0d2479505aeec145cf0c4bf3448dd74f0b5d1631e574e7d945d5b5976e11c065043ab0a6efe5646484a5bcd6386050a073 SHA512 004ec7e530ad21b012e461c8d50322295e4ec96a1a3197dbcbeb24b8bd6465a34008541e6fc547e451a50dce53f7ce170ec1bfd8c465ded56a5924e880aa0539
DIST meson-1.2.3.tar.gz 2184484 BLAKE2B 7d76c54bddba249ab97ebd5dd0afc448177ff9fa70812a8ca0cc9fe308c9b145b3fbc3ee068acae0fdc73edff42134b7a0b618cd80a05347a424aca7bc8bbef8 SHA512 cdcadc731effc1ffb2de98b795ba37955f934ed9b54b9f7f3ac5fe96ab33268d4de4fce734a4c2ef7d2ecc5051616df127e1f8665e197ff954310bf1483b81fc
DIST meson-1.2.3.tar.gz.asc 833 BLAKE2B 1416c49302aab80b5f647cc1d6cd18c36f6199e79c7d13ea284143b2423267b5823850218578626937c14589ebcdf19069b310394c63bc762ab8f59d7ebe3780 SHA512 852c031ecfe032cb48d284bb270597d114294b7d1be5dd0df6ec2f78a62e1a5ba82711bc14ae410e47ced54f99a639055a1628b0acf7aa07a3a80034fce5ebc9
DIST meson-1.3.0.tar.gz 2222383 BLAKE2B cb9ac8e00fe924df67166938687584a9de35e784e1e52bff281649d787695d37e3044ea3d6d5869181fe1e9676b5136548293dbd5cdbd091a6de0c449b8932f5 SHA512 fbcbdd9551ad12b7be84411b96357e01c7c0c38a8e9933093d2e71ed7e12bd4278245798684d389c332eb75dd50c99310affc9acb01cf8bedd45265335083a32
DIST meson-1.3.0.tar.gz.asc 833 BLAKE2B d83b819e75e732d694ac98412717af39a8115defc7371f1983e4619cf990b5cdfd7ab7c93911f2a8b6c7055c7252ebeba04d15f508f4278b506e326fa1801a25 SHA512 8c72bfe5f3bdec9c9f787dd5a7186599bb44079a89d0a87a535a6e890adb7718cbf570b2ac74583b72b92aa05160823a8571ca530384787c428e49d6fbe095ba
DIST meson-1.3.1.tar.gz 2222386 BLAKE2B 64d53eddc8cb321a4e2dabaa4b7499798a7b68764b1a7a5182bfa21d081dc07105acab616119b88ff610e5d75504f03d1c0aefee3602ddf538fc491ff3d0204a SHA512 6e694beb70329535faca9405358c04e2fd5a490b0c0d2678d5831b7de3477e0fcf4f6a242f1bc6218da04ac4f6e096ee53cdf273c6b6a38a35d370e8c16694ba
DIST meson-1.3.1.tar.gz.asc 833 BLAKE2B 1db7aabe3b7d491dfcd288a780d10784517a73e07348f2d5b98d1fa347dd08b2afa210511c7f5ff867b10ecd3ce470ea764b5ce6907aa7dcaa4d619f705e339c SHA512 0f652d375fa7700f3048266330d783664593c08da47d4f0d87af0be5d8b5e21113521651fb923c6a1cfe88aef7067ebd85b27946f19e71133d7c9805839fc873
DIST meson-1.3.2.tar.gz 2223798 BLAKE2B 72b061598a0cb22517460de4df25394a9dfbddb536c5b8e75b7267ae21292fe2a6a3ec16d64aa81cde63d33022decebcc051cf2d87d677f9b40eb2f4106a40cd SHA512 6369c6d64f91c769f0f4d3e2445bb3615785998489d41acba2134b44ec89abd04bd97a3d3d17c64779eb40b0bf4808e3419eb47638169446a98824d680f37a7b
DIST meson-1.3.2.tar.gz.asc 833 BLAKE2B b11ae2be4e9cb0278be9cafd304146432e606a5fd23379d08116943676286f240fb8cc1d5f897cbd4c2bacfe298802afb1a847e447d71250f58cee5dec38083b SHA512 0cb9575fb599cba4ae77c1954599a24b1f079c46cf255bb8d581ef434598503db6e08af6a95b7c00bc54c165ec8fd9834310e2d4874afe01c5d44e72cef496b3
DIST meson-1.4.0.tar.gz 2224663 BLAKE2B 7f742ef870c182e552c1ff3508d65f251009d610def6a08e01fddb6c6a4ed6d608ead0d52cf8ca7d66b5bd7a4732dccd7ab5d98f141a4a61e275398885f79486 SHA512 2787941fbc77d5ad95011753df52fe39812929a06d84dbce8bdc965c9c1e62fd6bfa819712eb1f5934c2ebe6919a65f7874ecac2caf40d111ea024343108cfbd
DIST meson-1.4.0.tar.gz.asc 833 BLAKE2B 6e4002303da16bcaa3d1d3c76a3485b23174074de2d29bd34347a4671d7fb0f1c0767559ed9267e0f0b52c02638b85a11a5980f4ee188e7e4d35c733b0821c62 SHA512 ea73e72d929bf30d28c033f103fd1d26bac7cef175aabbf9b3a24c7b336682c28f5aae184e04d2189731cf80dd7571939cb02de642bb5b412cea996ca30dfdad
DIST meson-1.4.1.tar.gz 2235558 BLAKE2B 1eb83ad34d9e0a80eaf667a5edf04cf40ff043c0b9e8c78c5bd553eb2dae372b4c0dc8e30760da0321b7c33d331304c21c7f51d2133681c9fa66d551039952f3 SHA512 2616bcca70d5554407d4852aa3494e05e53aa8a33f58859ada42750221922fcb6ea7f3452844883f4800d77eed4a7289b061324871218f052219b3caa02dcc9e
DIST meson-1.4.1.tar.gz.asc 833 BLAKE2B cbdac6620111acbb8c1e07a017a9f5f1cea2cfee62dc7ebf77a9dba7a578e43f8706923e4054ae8458c27a43112c634811c1a0d698f693f2e40744288ce586ea SHA512 bfc4f52a5e21684012aeef95dafba74a6d730efe88bc81bc410c183c253605f119dacd9684c3742ce1d3abf798a4443172526e535523531443beb0ca8c1c3633
DIST meson-1.5.0rc1.tar.gz 2253455 BLAKE2B 1e0d9e350532a75c8db8295dba4e12527eca9be21cf9dfd55f86fb4f063c618e93c5f579c23ddebf322a3c2e29fbad41ce9051565bd997c3b234d7eb6c3a0f60 SHA512 d19168bf32a1c758c63d08cf8eb0b8c3b63b22e8bdef1ccccf2b7d6970cc1a4ea9400b0ee593765ad579c8184cfa6b731138a040d2aad6ebe9943c8c7778da13
DIST meson-1.5.0rc1.tar.gz.asc 833 BLAKE2B 256058d06f2e13eab8b2a82211d78f7fd2fc70ec65f7e97a1441311a6df5ca82a7950f06b4523af6494951a4a49bba5ed69c8cefc95b56fe7913e2c17a300b31 SHA512 260052a143ea050ada19673d622a459c36717d6bedf56c699c2afbf287ad78d01572c50d510d875537f4ad81442a5caed5639b9f5c25b015ca4041335f92b1d7
DIST meson-reference-1.4.0.3 339324 BLAKE2B 8ad24592c1a9100832dead97a55d4cb358892fc1cd6aee641f9610cb6a5df211831e6cfc42e047d5e835ed53de1bb9c7d711dd1a0a8cfe18a0f85e92a1a3f925 SHA512 8df06f63db6db01a6c8c0a5b4a8b26c868bb027f26580d290288b1067429a526fb654fae01a45085c1f20ee8dab1b5325e8b2fd285faf175d2fcfc2c704b4768
DIST meson-reference-1.4.1.3 339324 BLAKE2B a0ea6a1dd599c0a559dae64772f730ac7cad7df3ea63acc8355ff933152873567803efff012e6ea0a4c75ef9c8be023a8d927411a49e43de20bbfc69b1263488 SHA512 fc94aa95df3cd04af49ab2f27050c3ef206407a2ccb3b61d9c8660deba55eae3fb627d83713de62f3e1216a1a33a88e989bf5b557b7e17adbb73a57d5f2ad11a
DIST meson-reference-1.5.0rc1.3 341787 BLAKE2B aaa8b32db40cfcb91fab2a147e7d4ca77e934606f630eda3362adeaa2f25df25ee4393876a4c4e5a6320ec4c4c689dcb2f8d0560d74b694c61d9449da44fd508 SHA512 4cb6ca649f167b477fc26f45bde9eb3e7fe9b322efe55146578ddc42ad075737a3d15ca3d6724d2ffa52131d5f4bb3b480d02eda20a38bfffd326910de0d5f92

View File

@ -1,31 +0,0 @@
From 9016e6958bb83feb9a724f20d8badb116bf7c5f2 Mon Sep 17 00:00:00 2001
From: Jan200101 <sentrycraft123@gmail.com>
Date: Tue, 21 Nov 2023 08:42:56 +0100
Subject: [PATCH] Only convert boolean values for cmake formats
This caused a regression with mesondefine where
`conf_data.set("FOO", true)`
turned into
`#define FOO 1`
instead of
`#define FOO`
---
mesonbuild/utils/universal.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mesonbuild/utils/universal.py b/mesonbuild/utils/universal.py
index 26194628c..93e64c0a2 100644
--- a/mesonbuild/utils/universal.py
+++ b/mesonbuild/utils/universal.py
@@ -1210,7 +1210,7 @@ def do_replacement(regex: T.Pattern[str], line: str,
var, _ = confdata.get(varname)
if isinstance(var, str):
var_str = var
- elif isinstance(var, bool):
+ elif variable_format.startswith("cmake") and isinstance(var, bool):
var_str = str(int(var))
elif isinstance(var, int):
var_str = str(var)
--
2.41.0

View File

@ -1,55 +0,0 @@
From 2fbc7b5ce3aced483b196dd10ca9eee1713b7494 Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz93@gmail.com>
Date: Tue, 26 Dec 2023 15:06:12 -0500
Subject: [PATCH] Revert "clike: Deduplicate rpath linker flags"
This reverts commit 53ea59ad8455277797117d225f326851fe7d369c.
This breaks at least:
- frameworks/17 mpi
- frameworks/30 scalapack
The problem is that openmpi's pkg-config emitted link arguments
includes:
```
-Wl,-rpath -Wl,/path/to/libdir
```
The deduplication logic in meson doesn't contain sufficient information
to tell when the compiler is passing an argument that requires values,
and definitely cannot tell when that argument is split across argv. But
for arguments that *can* do this, it is not possible to deduplicate a
single argument as standalone, because it is not standalone.
The argument for deduplicating rpath here was that if you have multiple
dependencies that all add the same rpath, the Apple ld64 emits a
non-fatal warning "duplicate -rpath ignored". Since this is non-fatal,
it's not a major issue. A major issue is when builds fatally error out
with:
```
FAILED: scalapack_c
cc -o scalapack_c scalapack_c.p/main.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group /usr/lib64/libscalapack.so /usr/lib64/liblapack.so /usr/lib64/libblas.so -Wl,-rpath -Wl,/usr/lib64 -Wl,/usr/lib64 -Wl,--enable-new-dtags /usr/lib64/libmpi.so -Wl,--end-group
/usr/libexec/gcc/x86_64-pc-linux-gnu/ld: error: /usr/lib64: read: Is a directory
```
---
mesonbuild/compilers/mixins/clike.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
index b3fc96cec..76c8e0413 100644
--- a/mesonbuild/compilers/mixins/clike.py
+++ b/mesonbuild/compilers/mixins/clike.py
@@ -54,7 +54,7 @@ class CLikeCompilerArgs(arglist.CompilerArgs):
# NOTE: not thorough. A list of potential corner cases can be found in
# https://github.com/mesonbuild/meson/pull/4593#pullrequestreview-182016038
- dedup1_prefixes = ('-l', '-Wl,-l', '-Wl,--export-dynamic', '-Wl,-rpath')
+ dedup1_prefixes = ('-l', '-Wl,-l', '-Wl,--export-dynamic')
dedup1_suffixes = ('.lib', '.dll', '.so', '.dylib', '.a')
dedup1_args = ('-c', '-S', '-E', '-pipe', '-pthread')
--
2.41.0

View File

@ -1,39 +0,0 @@
From 5f96e35b873d6230970fd63ba2e706bbd3f4e26f Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz93@gmail.com>
Date: Fri, 8 Sep 2023 16:54:48 -0400
Subject: [PATCH 1/7] python dependency: ensure that setuptools doesn't inject
itself into distutils
We do not use setuptools for anything, and only lightly use distutils.
Unpredictable issues can occur due to setuptools monkey-patching, which
interferes with our intended use. Tell setuptools to simply never get
involved.
Note: while it's otherwise possible to check if the probe is run using
sys.executable and avoid forking, setuptools unconditionally injects
itself at startup in a way that requires subprocess isolation to
disable.
(cherry picked from commit 9f610ad5b72ea91de2d7aeb6f3266d0a7477062e)
---
mesonbuild/dependencies/python.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py
index 160772888..f04494674 100644
--- a/mesonbuild/dependencies/python.py
+++ b/mesonbuild/dependencies/python.py
@@ -113,7 +113,9 @@ class BasicPythonExternalProgram(ExternalProgram):
with importlib.resources.path('mesonbuild.scripts', 'python_info.py') as f:
cmd = self.get_command() + [str(f)]
- p, stdout, stderr = mesonlib.Popen_safe(cmd)
+ env = os.environ.copy()
+ env['SETUPTOOLS_USE_DISTUTILS'] = 'stdlib'
+ p, stdout, stderr = mesonlib.Popen_safe(cmd, env=env)
try:
info = json.loads(stdout)
--
2.42.0

View File

@ -1,72 +0,0 @@
From cb4e62a8c55118988babac8b8254e0af1dc9698b Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz@archlinux.org>
Date: Mon, 21 Nov 2022 20:47:14 -0500
Subject: [PATCH 2/7] python module: stop using distutils schemes on
sufficiently new Debian
Since 3.10.3, Debian finally started patching sysconfig with custom
paths, instead of just distutils. This means we can now go use that
instead. It reduces our reliance on the deprecated distutils module.
Partial fix for #7702
(cherry picked from commit 40f897fa92f7d3cc43788d3000733310ce77cf0c)
---
mesonbuild/scripts/python_info.py | 32 +++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)
diff --git a/mesonbuild/scripts/python_info.py b/mesonbuild/scripts/python_info.py
index 9c3a0791a..65597b121 100755
--- a/mesonbuild/scripts/python_info.py
+++ b/mesonbuild/scripts/python_info.py
@@ -13,7 +13,6 @@ if sys.path[0].endswith('scripts'):
del sys.path[0]
import json, os, sysconfig
-import distutils.command.install
def get_distutils_paths(scheme=None, prefix=None):
import distutils.dist
@@ -37,15 +36,32 @@ def get_distutils_paths(scheme=None, prefix=None):
# default scheme to a custom one pointing to /usr/local and replacing
# site-packages with dist-packages.
# See https://github.com/mesonbuild/meson/issues/8739.
-# XXX: We should be using sysconfig, but Debian only patches distutils.
+#
+# We should be using sysconfig, but before 3.10.3, Debian only patches distutils.
+# So we may end up falling back.
-if 'deb_system' in distutils.command.install.INSTALL_SCHEMES:
- paths = get_distutils_paths(scheme='deb_system')
- install_paths = get_distutils_paths(scheme='deb_system', prefix='')
-else:
- paths = sysconfig.get_paths()
+def get_install_paths():
+ if sys.version_info >= (3, 10):
+ scheme = sysconfig.get_default_scheme()
+ else:
+ scheme = sysconfig._get_default_scheme()
+
+ if sys.version_info >= (3, 10, 3):
+ if 'deb_system' in sysconfig.get_scheme_names():
+ scheme = 'deb_system'
+ else:
+ import distutils.command.install
+ if 'deb_system' in distutils.command.install.INSTALL_SCHEMES:
+ paths = get_distutils_paths(scheme='deb_system')
+ install_paths = get_distutils_paths(scheme='deb_system', prefix='')
+ return paths, install_paths
+
+ paths = sysconfig.get_paths(scheme=scheme)
empty_vars = {'base': '', 'platbase': '', 'installed_base': ''}
- install_paths = sysconfig.get_paths(vars=empty_vars)
+ install_paths = sysconfig.get_paths(scheme=scheme, vars=empty_vars)
+ return paths, install_paths
+
+paths, install_paths = get_install_paths()
def links_against_libpython():
from distutils.core import Distribution, Extension
--
2.42.0

View File

@ -1,36 +0,0 @@
From c179c18765514d5c37737dec996b4c91cb31477f Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz93@gmail.com>
Date: Mon, 2 Oct 2023 16:40:15 -0400
Subject: [PATCH 3/7] python module: refactor pypy detection into a consistent
variable
(cherry picked from commit 3d3a10ef022284c8377bd9f8e1b1adec73c50d95)
---
mesonbuild/scripts/python_info.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mesonbuild/scripts/python_info.py b/mesonbuild/scripts/python_info.py
index 65597b121..d17b3a376 100755
--- a/mesonbuild/scripts/python_info.py
+++ b/mesonbuild/scripts/python_info.py
@@ -72,6 +72,8 @@ def links_against_libpython():
variables = sysconfig.get_config_vars()
variables.update({'base_prefix': getattr(sys, 'base_prefix', sys.prefix)})
+is_pypy = '__pypy__' in sys.builtin_module_names
+
if sys.version_info < (3, 0):
suffix = variables.get('SO')
elif sys.version_info < (3, 8, 7):
@@ -88,7 +90,7 @@ print(json.dumps({
'install_paths': install_paths,
'version': sysconfig.get_python_version(),
'platform': sysconfig.get_platform(),
- 'is_pypy': '__pypy__' in sys.builtin_module_names,
+ 'is_pypy': is_pypy,
'is_venv': sys.prefix != variables['base_prefix'],
'link_libpython': links_against_libpython(),
'suffix': suffix,
--
2.42.0

View File

@ -1,72 +0,0 @@
From 3c493dae4bd8410bfb09e8f654605f65e15d8e66 Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz@archlinux.org>
Date: Tue, 22 Nov 2022 22:56:10 -0500
Subject: [PATCH 4/7] python module: stop using distutils "link to libpython"
probe on recent python
On python >=3.8, this information is expected to be encoded in the
sysconfig vars.
In distutils, it is always necessary to link to libpython on Windows;
for posix platforms, it depends on the value of LIBPYTHON (which is the
library to link to, possibly the empty string) as generated by
configure.ac and embedded into python.pc and python-config.sh, and then
coded a second time in the distutils python sources.
There are a couple of caveats which have ramifications for Cygwin and
Android:
- python.pc and python-config.sh disagree with distutils when python is
not built shared. In that case, the former act the same as a shared
build, while the latter *never* links to libpython
- python.pc disagrees with python-config.sh and distutils when python is
built shared. The former never links to libpython, while the latter do
The disagreement is resolved in favor of distutils' behavior in all
cases, and python.pc is correct for our purposes on python 3.12; see:
https://github.com/python/cpython/pull/100356
https://github.com/python/cpython/pull/100967
Although it was not backported to older releases, Cygwin at least has
always patched in a fix for python.pc, which behavior is now declared
canonical. We can reliably assume it is always correct.
This is the other half of the fix for #7702
(cherry picked from commit 2d6c10908b3771216e7ce086af1ee4dc77e698c2)
---
mesonbuild/scripts/python_info.py | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/mesonbuild/scripts/python_info.py b/mesonbuild/scripts/python_info.py
index d17b3a376..a3f3d3535 100755
--- a/mesonbuild/scripts/python_info.py
+++ b/mesonbuild/scripts/python_info.py
@@ -64,10 +64,19 @@ def get_install_paths():
paths, install_paths = get_install_paths()
def links_against_libpython():
- from distutils.core import Distribution, Extension
- cmd = Distribution().get_command_obj('build_ext')
- cmd.ensure_finalized()
- return bool(cmd.get_libraries(Extension('dummy', [])))
+ # on versions supporting python-embed.pc, this is the non-embed lib
+ #
+ # PyPy is not yet up to 3.12 and work is still pending to export the
+ # relevant information (it doesn't automatically provide arbitrary
+ # Makefile vars)
+ if sys.version_info >= (3, 8) and not is_pypy:
+ variables = sysconfig.get_config_vars()
+ return bool(variables.get('LIBPYTHON', 'yes'))
+ else:
+ from distutils.core import Distribution, Extension
+ cmd = Distribution().get_command_obj('build_ext')
+ cmd.ensure_finalized()
+ return bool(cmd.get_libraries(Extension('dummy', [])))
variables = sysconfig.get_config_vars()
variables.update({'base_prefix': getattr(sys, 'base_prefix', sys.prefix)})
--
2.42.0

View File

@ -1,31 +0,0 @@
From ae44d9a379faca6274db819be44ffca3e0159f56 Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz93@gmail.com>
Date: Mon, 2 Oct 2023 23:51:57 -0400
Subject: [PATCH 5/7] tests: fix test case to not import distutils on python
3.12
Testing the correctness of the `modules: ` kwarg can be done with other
guaranteed stdlib modules that are even more guaranteed since they
didn't get deprecated for removal.
(cherry picked from commit ecf261330c498783760cbde00b613b7469f8d3c0)
---
test cases/python/5 modules kwarg/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test cases/python/5 modules kwarg/meson.build b/test cases/python/5 modules kwarg/meson.build
index 9751adaab..41a9a4fae 100644
--- a/test cases/python/5 modules kwarg/meson.build
+++ b/test cases/python/5 modules kwarg/meson.build
@@ -1,7 +1,7 @@
project('python kwarg')
py = import('python')
-prog_python = py.find_installation('python3', modules : ['distutils'])
+prog_python = py.find_installation('python3', modules : ['os', 'sys', 're'])
assert(prog_python.found() == true, 'python not found when should be')
prog_python = py.find_installation('python3', modules : ['thisbetternotexistmod'], required : false)
assert(prog_python.found() == false, 'python not found but reported as found')
--
2.42.0

View File

@ -1,25 +0,0 @@
From d9abf4a97dc182b3c57204a792000d620f9f941e Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz93@gmail.com>
Date: Tue, 3 Oct 2023 00:22:25 -0400
Subject: [PATCH 6/7] mark the PyPI metadata as supporting python 3.12
meson itself runs okay on 3.12, and the last issue for *probing* against
3.12 is solved. Tests pass here locally.
(cherry picked from commit 880f21281ee359e01de659fe7d45549d19e6b84d)
---
setup.cfg | 1 +
1 file changed, 1 insertion(+)
diff --git a/setup.cfg b/setup.cfg
index dfaba76dd..2f2962eed 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -30,6 +30,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
+ Programming Language :: Python :: 3.12
Topic :: Software Development :: Build Tools
long_description = Meson is a cross-platform build system designed to be both as fast and as user friendly as possible. It supports many languages and compilers, including GCC, Clang, PGI, Intel, and Visual Studio. Its build definitions are written in a simple non-Turing complete DSL.

View File

@ -1,141 +0,0 @@
From 9d1d4ae746ce39d1916dfe71fd6dcc5fce27e828 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Tue, 3 Oct 2023 16:52:56 +0100
Subject: [PATCH 7/7] Revert "rust: apply global, project, and environment C
args to bindgen"
This reverts commit 36210f64f22dc10d324db76bb1a7988c9cd5b14e.
This ended up not doing what was intended - see https://github.com/mesonbuild/meson/issues/12065#issuecomment-1742263677.
Bug: https://bugs.gentoo.org/914989
Bug: https://bugs.gentoo.org/915014
Signed-off-by: Sam James <sam@gentoo.org>
---
mesonbuild/modules/rust.py | 6 ------
test cases/rust/12 bindgen/meson.build | 18 ------------------
.../rust/12 bindgen/src/global-project.h | 10 ----------
test cases/rust/12 bindgen/src/global.c | 5 -----
test cases/rust/12 bindgen/src/global.rs | 14 --------------
test cases/rust/12 bindgen/test.json | 5 +----
6 files changed, 1 insertion(+), 57 deletions(-)
delete mode 100644 test cases/rust/12 bindgen/src/global-project.h
delete mode 100644 test cases/rust/12 bindgen/src/global.c
delete mode 100644 test cases/rust/12 bindgen/src/global.rs
diff --git a/mesonbuild/modules/rust.py b/mesonbuild/modules/rust.py
index e6e5c633f..3514412e6 100644
--- a/mesonbuild/modules/rust.py
+++ b/mesonbuild/modules/rust.py
@@ -232,12 +232,6 @@ class RustModule(ExtensionModule):
elif isinstance(s, CustomTarget):
depends.append(s)
- clang_args.extend(state.global_args.get('c', []))
- clang_args.extend(state.project_args.get('c', []))
- cargs = state.get_option('args', state.subproject, lang='c')
- assert isinstance(cargs, list), 'for mypy'
- clang_args.extend(cargs)
-
if self._bindgen_bin is None:
self._bindgen_bin = state.find_program('bindgen')
diff --git a/test cases/rust/12 bindgen/meson.build b/test cases/rust/12 bindgen/meson.build
index e7cb5f3db..c05cc0631 100644
--- a/test cases/rust/12 bindgen/meson.build
+++ b/test cases/rust/12 bindgen/meson.build
@@ -8,9 +8,6 @@ if not prog_bindgen.found()
error('MESON_SKIP_TEST bindgen not found')
endif
-add_project_arguments('-DPROJECT_ARG', language : 'c')
-add_global_arguments('-DGLOBAL_ARG', language : 'c')
-
# This seems to happen on windows when libclang.dll is not in path or is not
# valid. We must try to process a header file for this to work.
#
@@ -84,18 +81,3 @@ test('generated header', rust_bin2)
subdir('sub')
subdir('dependencies')
-
-gp = rust.bindgen(
- input : 'src/global-project.h',
- output : 'global-project.rs',
-)
-
-gp_lib = static_library('gp_lib', 'src/global.c')
-
-gp_exe = executable(
- 'gp_exe',
- structured_sources(['src/global.rs', gp]),
- link_with : gp_lib,
-)
-
-test('global and project arguments', gp_exe)
diff --git a/test cases/rust/12 bindgen/src/global-project.h b/test cases/rust/12 bindgen/src/global-project.h
deleted file mode 100644
index 6084e8ed6..000000000
--- a/test cases/rust/12 bindgen/src/global-project.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef GLOBAL_ARG
-char * success(void);
-#endif
-#ifndef PROJECT_ARG
-char * success(void);
-#endif
-#ifndef CMD_ARG
-char * success(void);
-#endif
-int success(void);
diff --git a/test cases/rust/12 bindgen/src/global.c b/test cases/rust/12 bindgen/src/global.c
deleted file mode 100644
index 10f6676f7..000000000
--- a/test cases/rust/12 bindgen/src/global.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "src/global-project.h"
-
-int success(void) {
- return 0;
-}
diff --git a/test cases/rust/12 bindgen/src/global.rs b/test cases/rust/12 bindgen/src/global.rs
deleted file mode 100644
index 4b70b1ecc..000000000
--- a/test cases/rust/12 bindgen/src/global.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// SPDX-license-identifer: Apache-2.0
-// Copyright © 2023 Intel Corporation
-
-#![allow(non_upper_case_globals)]
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-
-include!("global-project.rs");
-
-fn main() {
- unsafe {
- std::process::exit(success());
- };
-}
diff --git a/test cases/rust/12 bindgen/test.json b/test cases/rust/12 bindgen/test.json
index b3a758562..f94ee85f9 100644
--- a/test cases/rust/12 bindgen/test.json
+++ b/test cases/rust/12 bindgen/test.json
@@ -1,10 +1,7 @@
{
- "env": {
- "CFLAGS": "-DCMD_ARG"
- },
"stdout": [
{
- "line": "test cases/rust/12 bindgen/meson.build:30: WARNING: Project targets '>= 0.63' but uses feature introduced in '1.0.0': \"rust.bindgen\" keyword argument \"include_directories\" of type array[str]."
+ "line": "test cases/rust/12 bindgen/meson.build:27: WARNING: Project targets '>= 0.63' but uses feature introduced in '1.0.0': \"rust.bindgen\" keyword argument \"include_directories\" of type array[str]."
}
]
}
--
2.42.0

View File

@ -1,39 +0,0 @@
From 33527630f1bd0e51093044016557cb44e7bb6547 Mon Sep 17 00:00:00 2001
From: Fabian Groffen <grobian@gentoo.org>
Date: Wed, 17 Jan 2024 17:04:45 +0100
Subject: [PATCH] linkers_detect: detect xtools (Apple ld64 derivative)
xtools is in use on Gentoo Prefix x86_64 and ppc based Darwin installs.
Pick it up as a valid linker.
Since xtools is answering with a version to --version, as opposed to
ld64, detection of xtools in the ld64 handling block is not possible,
since --version already succeeded.
Bug: https://bugs.gentoo.org/868516
Bug: https://github.com/mesonbuild/meson/issues/10805
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
---
mesonbuild/linkers/detect.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/mesonbuild/linkers/detect.py b/mesonbuild/linkers/detect.py
index 918f2e634..1bce413f4 100644
--- a/mesonbuild/linkers/detect.py
+++ b/mesonbuild/linkers/detect.py
@@ -174,6 +174,11 @@ def guess_nix_linker(env: 'Environment', compiler: T.List[str], comp_class: T.Ty
v = search_version(o)
linker = linkers.LLVMDynamicLinker(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v)
+ # detect xtools first, bug #10805
+ elif 'xtools-' in o.split('\n', maxsplit=1)[0]:
+ xtools = o.split(' ', maxsplit=1)[0]
+ v = xtools.split('-', maxsplit=2)[1]
+ linker = linkers.AppleDynamicLinker(compiler, for_machine, comp_class.LINKER_PREFIX, override, version=v)
# First might be apple clang, second is for real gcc, the third is icc.
# Note that "ld: unknown option: " sometimes instead is "ld: unknown options:".
elif e.endswith('(use -v to see invocation)\n') or 'macosx_version' in e or 'ld: unknown option' in e:
--
2.43.0

View File

@ -1,135 +0,0 @@
# Copyright 2016-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..12} pypy3 )
DISTUTILS_USE_PEP517=setuptools
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
inherit git-r3
else
inherit verify-sig
MY_PV=${PV/_/}
MY_P=${P/_/}
S=${WORKDIR}/${MY_P}
SRC_URI="
https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz
verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc )
"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg
if [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
fi
inherit bash-completion-r1 distutils-r1 toolchain-funcs
DESCRIPTION="Open source build system"
HOMEPAGE="https://mesonbuild.com/"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
DEPEND="
test? (
dev-libs/glib:2
dev-libs/gobject-introspection
app-alternatives/ninja
dev-vcs/git
sys-libs/zlib[static-libs(+)]
virtual/pkgconfig
)
"
RDEPEND="
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${PN}-1.2.1-python-path.patch
# backport fix for broken configure_file()
"${FILESDIR}"/0001-Only-convert-boolean-values-for-cmake-formats.patch
# backport fix for hiding compiler warnings (such as Modern C) in vala and cython
"${FILESDIR}"/0001-ninja-backend-don-t-hide-all-compiler-warnings-for-t.patch
)
python_prepare_all() {
local disable_unittests=(
# ASAN and sandbox both want control over LD_PRELOAD
# https://bugs.gentoo.org/673016
-e 's/test_generate_gir_with_address_sanitizer/_&/'
# ASAN is unsupported on some targets
# https://bugs.gentoo.org/692822
-e 's/test_pch_with_address_sanitizer/_&/'
# https://github.com/mesonbuild/meson/issues/7203
-e 's/test_templates/_&/'
# Broken due to python2 wrapper
-e 's/test_python_module/_&/'
)
sed -i "${disable_unittests[@]}" unittests/*.py || die
# Broken due to python2 script created by python_wrapper_setup
rm -r "test cases/frameworks/1 boost" || die
distutils-r1_python_prepare_all
}
src_test() {
tc-export PKG_CONFIG
if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
ewarn "Found Qt5Core but not Qt5Gui; skipping tests"
else
distutils-r1_src_test
fi
}
python_test() {
(
# test_meson_installed
unset PYTHONDONTWRITEBYTECODE
# https://bugs.gentoo.org/687792
unset PKG_CONFIG
# test_cross_file_system_paths
unset XDG_DATA_HOME
# 'test cases/unit/73 summary' expects 80 columns
export COLUMNS=80
# If JAVA_HOME is not set, meson looks for javac in PATH.
# If javac is in /usr/bin, meson assumes /usr/include is a valid
# JDK include path. Setting JAVA_HOME works around this broken
# autodetection. If no JDK is installed, we should end up with an empty
# value in JAVA_HOME, and the tests should get skipped.
export JAVA_HOME=$(java-config -O 2>/dev/null)
# Call python3 instead of EPYTHON to satisfy test_meson_uninstalled.
python3 run_tests.py
) || die "Testing failed with ${EPYTHON}"
}
python_install_all() {
distutils-r1_python_install_all
insinto /usr/share/vim/vimfiles
doins -r data/syntax-highlighting/vim/{ftdetect,indent,syntax}
insinto /usr/share/zsh/site-functions
doins data/shell-completions/zsh/_meson
dobashcomp data/shell-completions/bash/meson
}

View File

@ -33,7 +33,7 @@ else
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg
if [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
fi

View File

@ -6,9 +6,17 @@ EAPI=8
PYTHON_COMPAT=( python3_{10..12} pypy3 )
DISTUTILS_USE_PEP517=setuptools
inherit bash-completion-r1 edo distutils-r1 flag-o-matic toolchain-funcs
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
inherit git-r3
inherit ninja-utils git-r3
BDEPEND="
${NINJA_DEPEND}
$(python_gen_any_dep 'dev-python/pyyaml[${PYTHON_USEDEP}]')
"
else
inherit verify-sig
@ -19,17 +27,16 @@ else
SRC_URI="
https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz
verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc )
https://github.com/mesonbuild/meson/releases/download/${MY_PV}/meson-reference.3 -> meson-reference-${MY_PV}.3
"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg
if [[ ${PV} != *_rc* ]] ; then
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
fi
inherit bash-completion-r1 distutils-r1 toolchain-funcs
DESCRIPTION="Open source build system"
HOMEPAGE="https://mesonbuild.com/"
@ -49,22 +56,23 @@ DEPEND="
)
"
RDEPEND="
!<dev-build/muon-0.2.0-r2[man(-)]
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${PN}-1.2.1-python-path.patch
# backport fix for hiding compiler warnings (such as Modern C) in vala and cython
"${FILESDIR}"/0001-ninja-backend-don-t-hide-all-compiler-warnings-for-t.patch
# backport revert for broken rpath changes: https://github.com/mesonbuild/meson/pull/12672
"${FILESDIR}"/0001-Revert-clike-Deduplicate-rpath-linker-flags.patch
# backport macos Prefix fix: https://github.com/mesonbuild/meson/pull/12747
"${FILESDIR}"/meson-1.3.1-xtools-support.patch
)
src_unpack() {
if [[ ${PV} = *9999* ]]; then
git-r3_src_unpack
else
default
use verify-sig && verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.asc}
fi
}
python_prepare_all() {
local disable_unittests=(
# ASAN and sandbox both want control over LD_PRELOAD
@ -84,6 +92,31 @@ python_prepare_all() {
distutils-r1_python_prepare_all
}
python_check_deps() {
if [[ ${PV} = *9999* ]]; then
python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]"
fi
}
python_configure_all() {
if [[ ${PV} = *9999* ]]; then
# We use the unsafe_yaml loader because strictyaml is not packaged. In
# theory they produce the same results, but pyyaml is faster and
# without safety checks.
edo ./meson.py setup \
--prefix "${EPREFIX}/usr" \
-Dhtml=false \
-Dunsafe_yaml=true \
docs/ docs/builddir
fi
}
python_compile_all() {
if [[ ${PV} = *9999* ]]; then
eninja -C docs/builddir
fi
}
src_test() {
tc-export PKG_CONFIG
if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
@ -95,6 +128,11 @@ src_test() {
python_test() {
(
# meson has its own tests for LTO support. We don't need to verify that
# all tests work when they happen to use it. And in particular, this
# breaks rust.
filter-lto
# remove unwanted python_wrapper_setup contents
# We actually do want to non-error if python2 is installed and tested.
remove="${T}/${EPYTHON}/bin:"
@ -133,4 +171,10 @@ python_install_all() {
doins data/shell-completions/zsh/_meson
dobashcomp data/shell-completions/bash/meson
if [[ ${PV} = *9999* ]]; then
DESTDIR="${ED}" eninja -C docs/builddir install
else
newman "${DISTDIR}"/meson-reference-${PV}.3 meson-reference.3
fi
}

View File

@ -3,12 +3,20 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} pypy3 )
PYTHON_COMPAT=( python3_{10..13} pypy3 )
DISTUTILS_USE_PEP517=setuptools
inherit bash-completion-r1 edo distutils-r1 flag-o-matic toolchain-funcs
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="https://github.com/mesonbuild/meson"
inherit git-r3
inherit ninja-utils git-r3
BDEPEND="
${NINJA_DEPEND}
$(python_gen_any_dep 'dev-python/pyyaml[${PYTHON_USEDEP}]')
"
else
inherit verify-sig
@ -19,6 +27,7 @@ else
SRC_URI="
https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz
verify-sig? ( https://github.com/mesonbuild/meson/releases/download/${MY_PV}/${MY_P}.tar.gz.asc )
https://github.com/mesonbuild/meson/releases/download/${MY_PV}/meson-reference.3 -> meson-reference-${MY_PV}.3
"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-jpakkane )"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg
@ -28,8 +37,6 @@ else
fi
fi
inherit bash-completion-r1 flag-o-matic distutils-r1 toolchain-funcs
DESCRIPTION="Open source build system"
HOMEPAGE="https://mesonbuild.com/"
@ -49,6 +56,7 @@ DEPEND="
)
"
RDEPEND="
!<dev-build/muon-0.2.0-r2[man(-)]
virtual/pkgconfig
"
@ -56,6 +64,15 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.2.1-python-path.patch
)
src_unpack() {
if [[ ${PV} = *9999* ]]; then
git-r3_src_unpack
else
default
use verify-sig && verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.asc}
fi
}
python_prepare_all() {
local disable_unittests=(
# ASAN and sandbox both want control over LD_PRELOAD
@ -75,6 +92,31 @@ python_prepare_all() {
distutils-r1_python_prepare_all
}
python_check_deps() {
if [[ ${PV} = *9999* ]]; then
python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]"
fi
}
python_configure_all() {
if [[ ${PV} = *9999* ]]; then
# We use the unsafe_yaml loader because strictyaml is not packaged. In
# theory they produce the same results, but pyyaml is faster and
# without safety checks.
edo ./meson.py setup \
--prefix "${EPREFIX}/usr" \
-Dhtml=false \
-Dunsafe_yaml=true \
docs/ docs/builddir
fi
}
python_compile_all() {
if [[ ${PV} = *9999* ]]; then
eninja -C docs/builddir
fi
}
src_test() {
tc-export PKG_CONFIG
if ${PKG_CONFIG} --exists Qt5Core && ! ${PKG_CONFIG} --exists Qt5Gui; then
@ -129,4 +171,10 @@ python_install_all() {
doins data/shell-completions/zsh/_meson
dobashcomp data/shell-completions/bash/meson
if [[ ${PV} = *9999* ]]; then
DESTDIR="${ED}" eninja -C docs/builddir install
else
newman "${DISTDIR}"/meson-reference-${MY_PV}.3 meson-reference.3
fi
}

View File

@ -3,7 +3,7 @@
EAPI=8
PYTHON_COMPAT=( python3_{10..12} pypy3 )
PYTHON_COMPAT=( python3_{10..13} pypy3 )
DISTUTILS_USE_PEP517=setuptools
inherit bash-completion-r1 edo distutils-r1 flag-o-matic toolchain-funcs
@ -175,6 +175,6 @@ python_install_all() {
if [[ ${PV} = *9999* ]]; then
DESTDIR="${ED}" eninja -C docs/builddir install
else
newman "${DISTDIR}"/meson-reference-${PV}.3 meson-reference.3
newman "${DISTDIR}"/meson-reference-${MY_PV}.3 meson-reference.3
fi
}