diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2024-10-15 22:00:00 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2024-10-15 22:06:28 +0200 |
commit | 7912e1f9972e947d1180ae3f0e3b84dd166bcefb (patch) | |
tree | 7a51de07a395e086cf9181e4f21395167a873995 /kde-frameworks | |
parent | sci-mathematics/cgal: add 6.0, drop 6.0_beta1 (diff) | |
download | gentoo-7912e1f9972e947d1180ae3f0e3b84dd166bcefb.tar.gz gentoo-7912e1f9972e947d1180ae3f0e3b84dd166bcefb.tar.bz2 gentoo-7912e1f9972e947d1180ae3f0e3b84dd166bcefb.zip |
kde-frameworks/sonnet: Backport SONNET_NO_BACKENDS patch
Closes: https://bugs.gentoo.org/941425
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks')
-rw-r--r-- | kde-frameworks/sonnet/files/sonnet-6.7.0-no-backend.patch | 44 | ||||
-rw-r--r-- | kde-frameworks/sonnet/sonnet-6.7.0.ebuild | 5 |
2 files changed, 49 insertions, 0 deletions
diff --git a/kde-frameworks/sonnet/files/sonnet-6.7.0-no-backend.patch b/kde-frameworks/sonnet/files/sonnet-6.7.0-no-backend.patch new file mode 100644 index 000000000000..7c8ffd35a67d --- /dev/null +++ b/kde-frameworks/sonnet/files/sonnet-6.7.0-no-backend.patch @@ -0,0 +1,44 @@ +From 1764decd7b7426320f24f3dbde44fc13993d1ed2 Mon Sep 17 00:00:00 2001 +From: Andreas Cord-Landwehr <cordlandwehr@kde.org> +Date: Sun, 13 Oct 2024 08:19:16 +0200 +Subject: [PATCH] Provide SONNET_NO_BACKENDS option to deactivate build + failures with no backends + +For cross-compilation tooling, both a native host and a target device +build is needed in which the first provides the parsediagrams6 +executable. We do not want to build any plugins when just the +cross-build tooling is being built. +--- + CMakeLists.txt | 1 + + src/plugins/CMakeLists.txt | 4 ++-- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b8e03cf0..b9425a19 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,6 +32,7 @@ set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprec + set(REQUIRED_QT_VERSION 6.5.0) + option(SONNET_USE_WIDGETS "Build components using Qt6Widgets" ON) + option(SONNET_USE_QML "Build components using Qt6Quick" ON) ++option(SONNET_NO_BACKENDS "Do not fail when no backends are built (to be used for cross-build host tooling)" OFF) + + if(SONNET_USE_WIDGETS) + find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets) +diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt +index 85441211..b53c9de7 100644 +--- a/src/plugins/CMakeLists.txt ++++ b/src/plugins/CMakeLists.txt +@@ -53,7 +53,7 @@ if (WIN32) + endif () + + # if we did not find any backend, that is bad +-# do that on Andriod, too, if we have some backend for it +-if (NOT ANDROID AND NOT SONNET_BACKEND_FOUND) ++# do that on Android, too, if we have some backend for it ++if (NOT ANDROID AND NOT SONNET_BACKEND_FOUND AND NOT SONNET_NO_BACKENDS) + message(FATAL_ERROR "Can not build any backend plugin for Sonnet.") + endif () +-- +GitLab + diff --git a/kde-frameworks/sonnet/sonnet-6.7.0.ebuild b/kde-frameworks/sonnet/sonnet-6.7.0.ebuild index 518249d7ab30..f49e856bd186 100644 --- a/kde-frameworks/sonnet/sonnet-6.7.0.ebuild +++ b/kde-frameworks/sonnet/sonnet-6.7.0.ebuild @@ -22,6 +22,8 @@ DEPEND=" RDEPEND="${DEPEND}" BDEPEND=">=dev-qt/qttools-${QTMIN}:6[linguist]" +PATCHES=( "${FILESDIR}/${P}-no-backend.patch" ) # bug 941425 + CMAKE_SKIP_TESTS=( # bug 779994 sonnet-test_autodetect @@ -36,6 +38,9 @@ src_configure() { $(cmake_use_find_package hunspell HUNSPELL) -DSONNET_USE_QML=$(usex qml) ) + if ! use aspell && ! use hunspell; then + mycmakeargs+=( -DSONNET_NO_BACKENDS=ON ) + fi ecm_src_configure } |