summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-03-26 23:55:54 +0100
committerSam James <sam@gentoo.org>2023-03-26 23:56:52 +0100
commit51211f99f14f80bc92049cbbf1717a39c50887b2 (patch)
treeddbf9482ce55294c38b5a28f13f0c858bb679c29 /dev-util/kdevelop
parentsys-devel/gcc: add 13.0.1_pre20230326 (diff)
downloadgentoo-51211f99f14f80bc92049cbbf1717a39c50887b2.tar.gz
gentoo-51211f99f14f80bc92049cbbf1717a39c50887b2.tar.bz2
gentoo-51211f99f14f80bc92049cbbf1717a39c50887b2.zip
dev-util/kdevelop: fix build with Clang 16, use llvm.eclass
Closes: https://bugs.gentoo.org/902101 Thanks-to: Michael Uleysky <uleysky@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/kdevelop')
-rw-r--r--dev-util/kdevelop/files/kdevelop-22.12.3-clang16.patch24
-rw-r--r--dev-util/kdevelop/kdevelop-22.12.3-r1.ebuild (renamed from dev-util/kdevelop/kdevelop-22.12.3.ebuild)18
2 files changed, 36 insertions, 6 deletions
diff --git a/dev-util/kdevelop/files/kdevelop-22.12.3-clang16.patch b/dev-util/kdevelop/files/kdevelop-22.12.3-clang16.patch
new file mode 100644
index 000000000000..38676cc16473
--- /dev/null
+++ b/dev-util/kdevelop/files/kdevelop-22.12.3-clang16.patch
@@ -0,0 +1,24 @@
+https://bugs.gentoo.org/902101
+--- a/cmake/modules/FindClang.cmake
++++ b/cmake/modules/FindClang.cmake
+@@ -97,6 +97,8 @@
+ # dito for git
+ string(REPLACE "git" "" CLANG_VERSION_CLEAN "${CLANG_VERSION}")
+
++ string(REGEX REPLACE "([.]0)+$" "" CLANG_VERSION_STRIPPED "${CLANG_VERSION}")
++ string(REGEX REPLACE "([.]0)+$" "" CLANG_VERSION_CLEAN_STRIPPED "${CLANG_VERSION_CLEAN}")
+ find_path(CLANG_BUILTIN_DIR
+ # cpuid.h because it is defined in ClangSupport constructor as valid clang builtin dir indicator
+ NAMES "cpuid.h"
+@@ -106,6 +108,10 @@
+ "../../../clang/${CLANG_VERSION}/include"
+ "clang/${CLANG_VERSION_CLEAN}/include"
+ "../../../clang/${CLANG_VERSION_CLEAN}/include"
++ "clang/${CLANG_VERSION_STRIPPED}/include"
++ "../../../clang/${CLANG_VERSION_STRIPPED}/include"
++ "clang/${CLANG_VERSION_CLEAN_STRIPPED}/include"
++ "../../../clang/${CLANG_VERSION_CLEAN_STRIPPED}/include"
+ NO_DEFAULT_PATH
+ )
+
+
diff --git a/dev-util/kdevelop/kdevelop-22.12.3.ebuild b/dev-util/kdevelop/kdevelop-22.12.3-r1.ebuild
index cb912cc23d10..6788033f46fe 100644
--- a/dev-util/kdevelop/kdevelop-22.12.3.ebuild
+++ b/dev-util/kdevelop/kdevelop-22.12.3-r1.ebuild
@@ -7,10 +7,11 @@ ECM_HANDBOOK="forceoptional"
ECM_TEST="true"
KDE_ORG_CATEGORY="kdevelop"
KFMIN=5.101.0
+LLVM_MAX_SLOT=16
QTMIN=5.15.5
VIRTUALDBUS_TEST="true"
VIRTUALX_REQUIRED="test"
-inherit ecm gear.kde.org optfeature
+inherit ecm gear.kde.org llvm optfeature
DESCRIPTION="Integrated Development Environment, supporting KF5/Qt, C/C++ and much more"
HOMEPAGE="https://www.kdevelop.org/"
@@ -65,7 +66,7 @@ COMMON_DEPEND="
>=kde-frameworks/kxmlgui-${KFMIN}:5
>=kde-frameworks/sonnet-${KFMIN}:5
>=kde-frameworks/threadweaver-${KFMIN}:5
- >=sys-devel/clang-6.0:=
+ <sys-devel/clang-$((${LLVM_MAX_SLOT} + 1)):=
gdbui? ( kde-plasma/libksysguard:5= )
hex? ( app-editors/okteta:5 )
plasma? (
@@ -95,12 +96,17 @@ RDEPEND="${COMMON_DEPEND}
reviewboard? ( kde-apps/ktp-accounts-kcm:5 )
"
-src_configure() {
- local clang_version=$(best_version sys-devel/clang)
- local llvm_root="/usr/lib/llvm/$(ver_cut 1 ${clang_version##sys-devel/clang-})"
+PATCHES=(
+ "${FILESDIR}"/${PN}-22.12.3-clang16.patch
+)
+
+llvm_check_deps() {
+ has_version -d "sys-devel/clang:${LLVM_SLOT}"
+}
+src_configure() {
local mycmakeargs=(
- -DLLVM_ROOT=${llvm_root}
+ -DLLVM_ROOT="$(get_llvm_prefix ${LLVM_SLOT})"
$(cmake_use_find_package gdbui KSysGuard)
-DBUILD_executeplasmoid=$(usex plasma)
$(cmake_use_find_package plasma KF5Plasma)