[utilities/skanpage] /: Be a tiny bit more lenient with KSaneCore versions
Heiko Becker <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 1b5c6ab1b70d61b27ea5c273aef9812383f4210f by Heiko Becker.
Committed on 13/08/2026 at 18:42.
Pushed by heikobecker into branch 'master'.
Be a tiny bit more lenient with KSaneCore versions
The code comment also contains the motivation, but I add here that
it's an issue with CI I ran into when updating Gear versions after [1].
There was no longer a build of ksanecore with the new version and thus
skanpage failed to build.
[1] https://invent.kde.org/sysadmin/release-tools/-/merge_requests/73
M +8 -1 CMakeLists.txt
https://invent.kde.org/utilities/skanpage/-/commit/1b5c6ab1b70d61b27ea5c273aef9812383f4210f
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 60caecd..42055e7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,7 +58,14 @@ ecm_set_disabled_deprecation_versions(QT 6.9.0
KF 6.18.0
)
-find_package(KSaneCore6 "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}" REQUIRED)
+# The intention here is to depend on a release from at least the same release
+# branch and to accomodate the jump from a RC version to .0 (eg. 26.07.90 to
+# 26.08.0), where we shouldn't really add breaking changes anyway.
+math(EXPR KSANECORE_RELEASE_BRANCH_VERSION "${RELEASE_SERVICE_VERSION_MINOR} - (${RELEASE_SERVICE_VERSION_MINOR} -3) % 4")
+if(KSANECORE_RELEASE_BRANCH_VERSION LESS "10")
+ string(PREPEND KSANECORE_RELEASE_BRANCH_VERSION "0") # pad with 0
+endif()
+find_package(KSaneCore6 "${RELEASE_SERVICE_VERSION_MAJOR}.${KSANECORE_RELEASE_BRANCH_VERSION}" REQUIRED)
find_package(KQuickImageEditor REQUIRED)