diff options
author | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2023-10-06 09:34:05 +0200 |
---|---|---|
committer | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2023-10-06 09:43:16 +0200 |
commit | 2a8261f17c36e7abbe38717a8f4b8a9b2c5e8868 (patch) | |
tree | 350edfe4622bb874db990c0cb88ae0e941e06a37 /dev-python/shiboken2 | |
parent | dev-python/pyside2: depend on qtwebengine with either alsa or pulseaudio (diff) | |
download | gentoo-2a8261f17c36e7abbe38717a8f4b8a9b2c5e8868.tar.gz gentoo-2a8261f17c36e7abbe38717a8f4b8a9b2c5e8868.tar.bz2 gentoo-2a8261f17c36e7abbe38717a8f4b8a9b2c5e8868.zip |
dev-python/shiboken2: adjust clang header finding logic for clang>=16
Pyside2 currently fails with clang-16, so we have to keep the current
LLVM_MAX_SLOT. However we can adjust the logic here to keep it in sync with
shiboken6 and prepare it for a possible next release that may be compatible
with clang-16.
Co-authored-by: Alfred Wingate <parona@protonmail.com>
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'dev-python/shiboken2')
-rw-r--r-- | dev-python/shiboken2/shiboken2-5.15.10-r2.ebuild (renamed from dev-python/shiboken2/shiboken2-5.15.10-r1.ebuild) | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/dev-python/shiboken2/shiboken2-5.15.10-r1.ebuild b/dev-python/shiboken2/shiboken2-5.15.10-r2.ebuild index b47b73c5ae04..f83d6000ad45 100644 --- a/dev-python/shiboken2/shiboken2-5.15.10-r1.ebuild +++ b/dev-python/shiboken2/shiboken2-5.15.10-r2.ebuild @@ -86,6 +86,13 @@ src_prepare() { ApiExtractor/clangparser/compilersupport.cpp || die fi + local clangver="$(CPP=clang clang-major-version)" + + # Clang 15 and older used the full version as a directory name. + if [[ ${clangver} -lt 16 ]]; then + clangver="$(CPP=clang clang-fullversion)" + fi + # Shiboken2 assumes the "/usr/lib/clang/${CLANG_NEWEST_VERSION}/include/" # subdirectory provides Clang builtin includes (e.g., "stddef.h") for the # currently installed version of Clang, where ${CLANG_NEWEST_VERSION} is @@ -101,7 +108,7 @@ src_prepare() { # PySide2 does *NOT* care whether the end user has done so or not, as # PySide2 unconditionally requires Clang in either case. See also: # https://bugs.gentoo.org/619490 - sed -i -e 's~(findClangBuiltInIncludesDir())~(QStringLiteral("'"${EPREFIX}"'/usr/lib/clang/'$(CPP=clang clang-fullversion)'/include"))~' \ + sed -i -e 's~(findClangBuiltInIncludesDir())~(QStringLiteral("'"${EPREFIX}"'/usr/lib/clang/'"${clangver}"'/include"))~' \ ApiExtractor/clangparser/compilersupport.cpp || die cmake_src_prepare |