mirror of
https://github.com/flatcar/scripts.git
synced 2025-12-24 02:31:54 +01:00
dev-build/meson: Sync with Gentoo
It's from Gentoo commit f059fcd83555b2642dc28669060427df911de4b5. Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
parent
6bcf6e08b7
commit
dfd19cc274
@ -0,0 +1,39 @@
|
||||
From fbe4477ac8937253fe027486a28700f4f035b42b Mon Sep 17 00:00:00 2001
|
||||
From: James Le Cuirot <chewi@gentoo.org>
|
||||
Date: Sat, 12 Aug 2023 09:56:44 +0100
|
||||
Subject: [PATCH 2/2] python module: Respect PATH when python is not given in
|
||||
machine file
|
||||
|
||||
We should only fall back to the Python interpreter running Meson itself
|
||||
if `python3` is not found in the PATH.
|
||||
|
||||
A couple of tests relied on the old behaviour. Under Arch/PyPy, the
|
||||
PATH's `python3` does not point to PyPy. Unfortunately, other
|
||||
Python-based tools like g-ir-scanner are installed with a shebang of
|
||||
`/usr/bin/env python3` on Arch, so adjusting the PATH to point to a
|
||||
different Python breaks such tools. We must therefore specify `python`
|
||||
in a machine file instead.
|
||||
|
||||
We also have to now exclude "test cases/frameworks/1 boost" on Arch/PyPy
|
||||
because it cannot work against PyPy. It was previously using CPython,
|
||||
despite Meson itself running under PyPy, but the machine file has
|
||||
changed that.
|
||||
---
|
||||
mesonbuild/modules/python.py | 4 +++-
|
||||
6 files changed, 18 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
|
||||
index 9c1ad86cb170..ad1260ca5015 100644
|
||||
--- a/mesonbuild/modules/python.py
|
||||
+++ b/mesonbuild/modules/python.py
|
||||
@@ -460,7 +460,9 @@ def _find_installation_impl(self, state: 'ModuleState', display_name: str, name_
|
||||
build_config = self.interpreter.environment.coredata.optstore.get_value_for(OptionKey('python.build_config'))
|
||||
|
||||
if not name_or_path:
|
||||
- python = PythonExternalProgram('python3', mesonlib.python_command, build_config_path=build_config)
|
||||
+ python = PythonExternalProgram('python3', build_config_path=build_config)
|
||||
+ if not python.found():
|
||||
+ python = PythonExternalProgram('python3', mesonlib.python_command, build_config_path=build_config)
|
||||
else:
|
||||
tmp_python = ExternalProgram.from_entry(display_name, name_or_path)
|
||||
python = PythonExternalProgram(display_name, ext_prog=tmp_python, build_config_path=build_config)
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} pypy3 )
|
||||
PYTHON_COMPAT=( python3_{11..12} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
@ -44,7 +44,7 @@ DEPEND="
|
||||
>=dev-libs/gobject-introspection-1.82.0-r2
|
||||
app-alternatives/ninja
|
||||
dev-vcs/git
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
virtual/zlib:=[static-libs(+)]
|
||||
virtual/pkgconfig
|
||||
)
|
||||
"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} pypy3 )
|
||||
PYTHON_COMPAT=( python3_{11..12} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
@ -44,7 +44,7 @@ DEPEND="
|
||||
>=dev-libs/gobject-introspection-1.82.0-r2
|
||||
app-alternatives/ninja
|
||||
dev-vcs/git
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
virtual/zlib:=[static-libs(+)]
|
||||
virtual/pkgconfig
|
||||
)
|
||||
"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} pypy3 )
|
||||
PYTHON_COMPAT=( python3_{11..12} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
@ -44,7 +44,7 @@ DEPEND="
|
||||
>=dev-libs/gobject-introspection-1.82.0-r2
|
||||
app-alternatives/ninja
|
||||
dev-vcs/git
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
virtual/zlib:=[static-libs(+)]
|
||||
virtual/pkgconfig
|
||||
)
|
||||
"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} pypy3 )
|
||||
PYTHON_COMPAT=( python3_{11..12} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
|
||||
inherit shell-completion edo distutils-r1 flag-o-matic toolchain-funcs
|
||||
@ -51,7 +51,7 @@ DEPEND="
|
||||
>=dev-libs/gobject-introspection-1.82.0-r2
|
||||
app-alternatives/ninja
|
||||
dev-vcs/git
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
virtual/zlib:=[static-libs(+)]
|
||||
virtual/pkgconfig
|
||||
)
|
||||
"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..13} pypy3 )
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
|
||||
inherit shell-completion edo distutils-r1 flag-o-matic toolchain-funcs
|
||||
@ -51,7 +51,7 @@ DEPEND="
|
||||
>=dev-libs/gobject-introspection-1.82.0-r2
|
||||
app-alternatives/ninja
|
||||
dev-vcs/git
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
virtual/zlib:=[static-libs(+)]
|
||||
virtual/pkgconfig
|
||||
)
|
||||
"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..13} pypy3 )
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
|
||||
inherit shell-completion edo distutils-r1 flag-o-matic toolchain-funcs
|
||||
@ -52,7 +52,7 @@ DEPEND="
|
||||
>=dev-libs/gobject-introspection-1.82.0-r2
|
||||
app-alternatives/ninja
|
||||
dev-vcs/git
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
virtual/zlib:=[static-libs(+)]
|
||||
virtual/pkgconfig
|
||||
dev-build/cmake
|
||||
)
|
||||
|
||||
@ -55,7 +55,7 @@ DEPEND="
|
||||
>=dev-libs/gobject-introspection-1.82.0-r2
|
||||
app-alternatives/ninja
|
||||
dev-vcs/git
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
virtual/zlib:=[static-libs(+)]
|
||||
virtual/pkgconfig
|
||||
dev-build/cmake
|
||||
)
|
||||
|
||||
@ -56,7 +56,7 @@ DEPEND="
|
||||
>=dev-libs/gobject-introspection-1.82.0-r2
|
||||
app-alternatives/ninja
|
||||
dev-vcs/git
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
virtual/zlib:=[static-libs(+)]
|
||||
virtual/pkgconfig
|
||||
dev-build/cmake
|
||||
)
|
||||
|
||||
@ -37,7 +37,7 @@ else
|
||||
#VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/jpakkane.gpg
|
||||
|
||||
if [[ ${PV} != *_rc* ]] ; then
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~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 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -56,7 +56,7 @@ DEPEND="
|
||||
>=dev-libs/gobject-introspection-1.82.0-r2
|
||||
app-alternatives/ninja
|
||||
dev-vcs/git
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
virtual/zlib:=[static-libs(+)]
|
||||
virtual/pkgconfig
|
||||
dev-build/cmake
|
||||
)
|
||||
@ -79,7 +79,7 @@ DEPEND="
|
||||
media-libs/libsdl2
|
||||
media-libs/libwmf
|
||||
net-libs/libpcap
|
||||
sci-libs/hdf5[fortran]
|
||||
sci-libs/hdf5[cxx,fortran]
|
||||
sci-libs/netcdf
|
||||
sys-cluster/openmpi[fortran]
|
||||
sys-devel/bison
|
||||
|
||||
@ -55,7 +55,7 @@ DEPEND="
|
||||
>=dev-libs/gobject-introspection-1.82.0-r2
|
||||
app-alternatives/ninja
|
||||
dev-vcs/git
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
virtual/zlib:=[static-libs(+)]
|
||||
virtual/pkgconfig
|
||||
dev-build/cmake
|
||||
)
|
||||
@ -78,7 +78,7 @@ DEPEND="
|
||||
media-libs/libsdl2
|
||||
media-libs/libwmf
|
||||
net-libs/libpcap
|
||||
sci-libs/hdf5[fortran]
|
||||
sci-libs/hdf5[cxx,fortran]
|
||||
sci-libs/netcdf
|
||||
sys-cluster/openmpi[fortran]
|
||||
sys-devel/bison
|
||||
@ -102,7 +102,7 @@ RDEPEND="
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.2.1-python-path.patch
|
||||
"${FILESDIR}"/${PN}-1.10.0-python-path.patch
|
||||
)
|
||||
|
||||
src_unpack() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user