commit: 60ac6dd3ca12ca42e14b17864f33cb412343aeea Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Sat Jul 23 10:27:45 2022 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Sat Jul 23 10:36:29 2022 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=60ac6dd3
kde-apps/kate: Workaround upstream's reshuffling of build system Fixing kate vs. kwrite conflicting in shared kateprivate library. Patch pending upstream: https://invent.kde.org/utilities/kate/-/merge_requests/815 Upstream commits: 5ef89b41cfc1c78fe9dc91e93f9bc8c63984a1cb 8ebf728518162248bd7178c1f55678f2d4c6b77c Closes: https://bugs.gentoo.org/859358 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> .../kate-22.07.80-split-build-from-source.patch | 75 ++++++++++++++++++++++ kde-apps/kate/kate-22.07.80.ebuild | 5 +- kde-apps/kate/kate-22.08.49.9999.ebuild | 5 +- kde-apps/kate/kate-9999.ebuild | 5 +- 4 files changed, 87 insertions(+), 3 deletions(-) diff --git a/kde-apps/kate/files/kate-22.07.80-split-build-from-source.patch b/kde-apps/kate/files/kate-22.07.80-split-build-from-source.patch new file mode 100644 index 0000000000..a574058b9a --- /dev/null +++ b/kde-apps/kate/files/kate-22.07.80-split-build-from-source.patch @@ -0,0 +1,75 @@ +From 9062475ec3ef15ff9355cbbdc581a59653589534 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <ast...@gentoo.org> +Date: Sat, 23 Jul 2022 12:09:28 +0200 +Subject: [PATCH 1/2] lib is not optional, so don't pretend it is + +Signed-off-by: Andreas Sturmlechner <ast...@gentoo.org> +--- + apps/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt +index 04b048482..669f10a35 100644 +--- a/apps/CMakeLists.txt ++++ b/apps/CMakeLists.txt +@@ -1,5 +1,5 @@ + # kateprivate shared library used by Kate & KWrite (and addons) +-ecm_optional_add_subdirectory(lib) ++add_subdirectory(lib) + + # the Kate application + ecm_optional_add_subdirectory(kate) +-- +2.35.1 + + +From def5d43a015779e26b6e438e1b2f38afb7bd8b27 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <ast...@gentoo.org> +Date: Sat, 23 Jul 2022 12:16:26 +0200 +Subject: [PATCH 2/2] Add option to -DBUILD_SPLIT_FROM_SOURCE + +This will enable source-based distributions like Gentoo to keep split +kate/kwrite packaging not conflicting with one another by not +requiring to install a duplicate kateprivate lib. + +Signed-off-by: Andreas Sturmlechner <ast...@gentoo.org> +--- + CMakeLists.txt | 5 +++++ + apps/lib/CMakeLists.txt | 6 ++++-- + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e7fff38db..1ec401c55 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,6 +35,11 @@ include(ECMDeprecationSettings) + + include(FeatureSummary) + ++option(BUILD_SPLIT_FROM_SOURCE "This will build kateprivate as a static library" OFF) ++set(KATEPRIVATE_LIB_MODE "SHARED") ++if(BUILD_SPLIT_FROM_SOURCE) ++ set(KATEPRIVATE_LIB_MODE "STATIC") ++endif() + + ecm_set_disabled_deprecation_versions( + QT 5.15 +diff --git a/apps/lib/CMakeLists.txt b/apps/lib/CMakeLists.txt +index a883cf5c5..04dcb340c 100644 +--- a/apps/lib/CMakeLists.txt ++++ b/apps/lib/CMakeLists.txt +@@ -1,7 +1,9 @@ + # Kate shared library, used by Kate/KWrite and the addons +-add_library(kateprivate SHARED "") ++add_library(kateprivate ${KATEPRIVATE_LIB_MODE} "") + set_target_properties(kateprivate PROPERTIES VERSION ${RELEASE_SERVICE_VERSION}) +-install(TARGETS kateprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) ++if(NOT BUILD_SPLIT_FROM_SOURCE) ++ install(TARGETS kateprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) ++endif() + + # ensure right translations domain, we use one kate.po(t) for lib + apps + target_compile_definitions(kateprivate PRIVATE TRANSLATION_DOMAIN="kate") +-- +2.35.1 + diff --git a/kde-apps/kate/kate-22.07.80.ebuild b/kde-apps/kate/kate-22.07.80.ebuild index 09d0429d2a..61bf6cc268 100644 --- a/kde-apps/kate/kate-22.07.80.ebuild +++ b/kde-apps/kate/kate-22.07.80.ebuild @@ -61,6 +61,8 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( "${FILESDIR}/${PN}-22.07.80-split-build-from-source.patch" ) + src_prepare() { ecm_src_prepare @@ -73,6 +75,8 @@ src_prepare() { src_configure() { local mycmakeargs=( + -DBUILD_SPLIT_FROM_SOURCE=ON + -DBUILD_kwrite=FALSE $(cmake_use_find_package activities KF5Activities) -DBUILD_filebrowser=$(usex filebrowser) -DBUILD_lspclient=$(usex lspclient) @@ -80,7 +84,6 @@ src_configure() { -DBUILD_project=$(usex projects) -DBUILD_snippets=$(usex snippets) -DBUILD_katesql=$(usex sql) - -DBUILD_kwrite=FALSE $(cmake_use_find_package telemetry KUserFeedback) ) diff --git a/kde-apps/kate/kate-22.08.49.9999.ebuild b/kde-apps/kate/kate-22.08.49.9999.ebuild index 1e728c4adb..f53f645395 100644 --- a/kde-apps/kate/kate-22.08.49.9999.ebuild +++ b/kde-apps/kate/kate-22.08.49.9999.ebuild @@ -61,6 +61,8 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( "${FILESDIR}/${PN}-22.07.80-split-build-from-source.patch" ) + src_prepare() { ecm_src_prepare @@ -73,6 +75,8 @@ src_prepare() { src_configure() { local mycmakeargs=( + -DBUILD_SPLIT_FROM_SOURCE=ON + -DBUILD_kwrite=FALSE $(cmake_use_find_package activities KF5Activities) -DBUILD_filebrowser=$(usex filebrowser) -DBUILD_lspclient=$(usex lspclient) @@ -80,7 +84,6 @@ src_configure() { -DBUILD_project=$(usex projects) -DBUILD_snippets=$(usex snippets) -DBUILD_katesql=$(usex sql) - -DBUILD_kwrite=FALSE $(cmake_use_find_package telemetry KUserFeedback) ) diff --git a/kde-apps/kate/kate-9999.ebuild b/kde-apps/kate/kate-9999.ebuild index 1e728c4adb..f53f645395 100644 --- a/kde-apps/kate/kate-9999.ebuild +++ b/kde-apps/kate/kate-9999.ebuild @@ -61,6 +61,8 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( "${FILESDIR}/${PN}-22.07.80-split-build-from-source.patch" ) + src_prepare() { ecm_src_prepare @@ -73,6 +75,8 @@ src_prepare() { src_configure() { local mycmakeargs=( + -DBUILD_SPLIT_FROM_SOURCE=ON + -DBUILD_kwrite=FALSE $(cmake_use_find_package activities KF5Activities) -DBUILD_filebrowser=$(usex filebrowser) -DBUILD_lspclient=$(usex lspclient) @@ -80,7 +84,6 @@ src_configure() { -DBUILD_project=$(usex projects) -DBUILD_snippets=$(usex snippets) -DBUILD_katesql=$(usex sql) - -DBUILD_kwrite=FALSE $(cmake_use_find_package telemetry KUserFeedback) )