From 57f2e650fb99bf0d69a1bd059dd6ffdae32ddf2d Mon Sep 17 00:00:00 2001 From: Nowa Ammerlaan Date: Wed, 19 Feb 2025 10:10:41 +0100 Subject: [PATCH] dev-python/shiboken6: backport fix for finding clang headers Signed-off-by: Nowa Ammerlaan --- dev-python/shiboken6/shiboken6-6.8.1.1.ebuild | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/dev-python/shiboken6/shiboken6-6.8.1.1.ebuild b/dev-python/shiboken6/shiboken6-6.8.1.1.ebuild index 02260da8bf08c..dae8016db72fb 100644 --- a/dev-python/shiboken6/shiboken6-6.8.1.1.ebuild +++ b/dev-python/shiboken6/shiboken6-6.8.1.1.ebuild @@ -16,7 +16,7 @@ PYTHON_COMPAT=( python3_{10..13} ) LLVM_COMPAT=( {15..18} ) -inherit cmake llvm-r1 python-r1 toolchain-funcs +inherit cmake llvm-r1 python-r1 MY_PN=pyside-pyside-setup MY_P=${MY_PN}-${PV} @@ -82,13 +82,6 @@ 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 - # Shiboken6 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 @@ -104,8 +97,9 @@ src_prepare() { # PySide6 does *NOT* care whether the end user has done so or not, as # PySide6 unconditionally requires Clang in either case. See also: # https://bugs.gentoo.org/619490 - sed -i -e 's~(findClangBuiltInIncludesDir())~(QStringLiteral("'"${EPREFIX}"'/usr/lib/clang/'"${clangver}"'/include"))~' \ - ApiExtractor/clangparser/compilersupport.cpp || die + sed -e \ + 's~(findClangBuiltInIncludesDir())~(QStringLiteral("'"${EPREFIX}"'/usr/lib/clang/'"${LLVM_SLOT}"'/include"))~' \ + -i sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp || die cmake_src_prepare }