diff options
author | Benda Xu <heroxbd@gentoo.org> | 2023-07-17 08:05:13 +0800 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2023-07-17 09:17:36 +0800 |
commit | 14d6583917451b5dfdad632d9d8956c56c8a7a18 (patch) | |
tree | 2b1b7d8458252c89592363bb3e79a56d25636389 /dev-python/pybind11 | |
parent | virtual/imagemagick-tools: dependencies of dev-python/matploblib (diff) | |
download | gentoo-14d6583917451b5dfdad632d9d8956c56c8a7a18.tar.gz gentoo-14d6583917451b5dfdad632d9d8956c56c8a7a18.tar.bz2 gentoo-14d6583917451b5dfdad632d9d8956c56c8a7a18.zip |
dev-python/pybind11: keyword ~x64-macos and ~arm64-macos.
A patch is need to undo the assumption of LLVM toolchain on macOS. It
does not affect other architectures, incorporating without a revision
bump.
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'dev-python/pybind11')
-rw-r--r-- | dev-python/pybind11/files/pybind11-2.10.4_macOS-GCC.patch | 23 | ||||
-rw-r--r-- | dev-python/pybind11/pybind11-2.10.4.ebuild | 3 |
2 files changed, 25 insertions, 1 deletions
diff --git a/dev-python/pybind11/files/pybind11-2.10.4_macOS-GCC.patch b/dev-python/pybind11/files/pybind11-2.10.4_macOS-GCC.patch new file mode 100644 index 000000000000..5bfa88348110 --- /dev/null +++ b/dev-python/pybind11/files/pybind11-2.10.4_macOS-GCC.patch @@ -0,0 +1,23 @@ +Break the toolchain assumption of LLVM on Prefix/macOS. + +At Prefix/macOS, the system compiler is GCC with libstdc++. + +This patch is only useful to Gentoo Prefix. We don't have plans to +forward it upstream. + +Signed-off-by: Benda Xu <heroxbd@gentoo.org> + +Index: pybind11-2.10.4/pybind11/setup_helpers.py +=================================================================== +--- pybind11-2.10.4.orig/pybind11/setup_helpers.py ++++ pybind11-2.10.4/pybind11/setup_helpers.py +@@ -154,9 +154,6 @@ class Pybind11Extension(_Extension): # + c_cpp_flags = shlex.split(env_cflags) + shlex.split(env_cppflags) + if not any(opt.startswith("-g") for opt in c_cpp_flags): + cflags += ["-g0"] +- if MACOS: +- cflags += ["-stdlib=libc++"] +- ldflags += ["-stdlib=libc++"] + self._add_cflags(cflags) + self._add_ldflags(ldflags) + diff --git a/dev-python/pybind11/pybind11-2.10.4.ebuild b/dev-python/pybind11/pybind11-2.10.4.ebuild index ade4adbcd5e1..cea97d04299f 100644 --- a/dev-python/pybind11/pybind11-2.10.4.ebuild +++ b/dev-python/pybind11/pybind11-2.10.4.ebuild @@ -21,7 +21,7 @@ SRC_URI=" LICENSE="BSD" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos" RDEPEND=" dev-cpp/eigen:3 @@ -38,6 +38,7 @@ distutils_enable_tests pytest python_prepare_all() { export PYBIND11_USE_CMAKE=1 cmake_src_prepare + PATCHES=( "${FILESDIR}"/pybind11-2.10.4_macOS-GCC.patch ) distutils-r1_python_prepare_all } |