commit:     b1344b7bfd4f1f362c20a98d8c3193eb451aeef3
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  3 08:55:21 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Apr  3 09:09:43 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1344b7b

dev-qt/qttools: fix clang detection with libcxx

Happened to notice this while testing 6.9.0 with llvm-musl, and
this been broken since 6.8.3 (with USE=clang) that had the same
change picked to.

CMake Error at cmake/FindWrapLibClang.cmake:72 (find_package):
  find_package called with invalid argument "20.1.1+libcxx"

At first I thought this was caused by our sed, but that specific
line is unmodified and is using ${LLVM_VERSION} which has the
+libcxx bit appended (or at least, it does with llvm:20). This
is Qt's attempt at getting a "matching" version for Clang.

Given we are trying to remove version specifications to let the
eclass pick them instead (will always match), may as well just
remove it as well.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-qt/qttools/qttools-6.8.3.ebuild    | 3 ++-
 dev-qt/qttools/qttools-6.9.0.ebuild    | 3 ++-
 dev-qt/qttools/qttools-6.9.9999.ebuild | 3 ++-
 dev-qt/qttools/qttools-6.9999.ebuild   | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dev-qt/qttools/qttools-6.8.3.ebuild 
b/dev-qt/qttools/qttools-6.8.3.ebuild
index 52750e2eb0d8..b8a40f8285e6 100644
--- a/dev-qt/qttools/qttools-6.8.3.ebuild
+++ b/dev-qt/qttools/qttools-6.8.3.ebuild
@@ -66,7 +66,8 @@ src_prepare() {
        qt6-build_src_prepare
 
        # qttools is picky about clang versions and ignores LLVM_SLOT
-       sed -i '/find_package/s/${VERSION}//' cmake/FindWrapLibClang.cmake || 
die
+       sed -e '/find_package/s/${\(LLVM_\)*VERSION}//' \
+               -i cmake/FindWrapLibClang.cmake || die
 }
 
 src_configure() {

diff --git a/dev-qt/qttools/qttools-6.9.0.ebuild 
b/dev-qt/qttools/qttools-6.9.0.ebuild
index 52750e2eb0d8..b8a40f8285e6 100644
--- a/dev-qt/qttools/qttools-6.9.0.ebuild
+++ b/dev-qt/qttools/qttools-6.9.0.ebuild
@@ -66,7 +66,8 @@ src_prepare() {
        qt6-build_src_prepare
 
        # qttools is picky about clang versions and ignores LLVM_SLOT
-       sed -i '/find_package/s/${VERSION}//' cmake/FindWrapLibClang.cmake || 
die
+       sed -e '/find_package/s/${\(LLVM_\)*VERSION}//' \
+               -i cmake/FindWrapLibClang.cmake || die
 }
 
 src_configure() {

diff --git a/dev-qt/qttools/qttools-6.9.9999.ebuild 
b/dev-qt/qttools/qttools-6.9.9999.ebuild
index 52750e2eb0d8..b8a40f8285e6 100644
--- a/dev-qt/qttools/qttools-6.9.9999.ebuild
+++ b/dev-qt/qttools/qttools-6.9.9999.ebuild
@@ -66,7 +66,8 @@ src_prepare() {
        qt6-build_src_prepare
 
        # qttools is picky about clang versions and ignores LLVM_SLOT
-       sed -i '/find_package/s/${VERSION}//' cmake/FindWrapLibClang.cmake || 
die
+       sed -e '/find_package/s/${\(LLVM_\)*VERSION}//' \
+               -i cmake/FindWrapLibClang.cmake || die
 }
 
 src_configure() {

diff --git a/dev-qt/qttools/qttools-6.9999.ebuild 
b/dev-qt/qttools/qttools-6.9999.ebuild
index 52750e2eb0d8..b8a40f8285e6 100644
--- a/dev-qt/qttools/qttools-6.9999.ebuild
+++ b/dev-qt/qttools/qttools-6.9999.ebuild
@@ -66,7 +66,8 @@ src_prepare() {
        qt6-build_src_prepare
 
        # qttools is picky about clang versions and ignores LLVM_SLOT
-       sed -i '/find_package/s/${VERSION}//' cmake/FindWrapLibClang.cmake || 
die
+       sed -e '/find_package/s/${\(LLVM_\)*VERSION}//' \
+               -i cmake/FindWrapLibClang.cmake || die
 }
 
 src_configure() {

Reply via email to