summaryrefslogtreecommitdiff
path: root/media-gfx/digikam
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-26 13:36:16 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-26 13:36:16 +0000
commitc25546f65119d2fb9a2f79588fd130d62989eddb (patch)
treeb81b1abf9674c2823ed5d307b8d05c88fe0e2797 /media-gfx/digikam
parent058e62d5e60f6fc7f010f73f4c1546e979344a0b (diff)
gentoo auto-resync : 26:12:2023 - 13:36:16
Diffstat (limited to 'media-gfx/digikam')
-rw-r--r--media-gfx/digikam/Manifest4
-rw-r--r--media-gfx/digikam/digikam-8.2.0.ebuild162
-rw-r--r--media-gfx/digikam/files/digikam-8.2.0-akonadi.patch95
-rw-r--r--media-gfx/digikam/files/digikam-8.2.0-cmake.patch181
4 files changed, 442 insertions, 0 deletions
diff --git a/media-gfx/digikam/Manifest b/media-gfx/digikam/Manifest
index 2e8456438dc1..7fcc4a242f88 100644
--- a/media-gfx/digikam/Manifest
+++ b/media-gfx/digikam/Manifest
@@ -1,5 +1,9 @@
AUX digikam-8.1.0-cmake.patch 6067 BLAKE2B fbb3c441dd0214417fda0650997300bc9a53cab10c58fa29d3f0d5bf331b877a126a9d2577a230ff397355610dfa7f7a6a689e625c371b60448674ba8ca05c35 SHA512 2b042cd0264e521d9b353a05a1aac0a78e1b9b4f4f00aa58d68f2f4fd3940cc17bfb5025ac730c71b96d59cd4abae4f816c552ac0cd58aec3a7f9dc9b1de7415
AUX digikam-8.1.0-fix-config-for-scaling-high-res-icons.patch 1613 BLAKE2B 774c24f498c37ccc9a3eca7165734b870861f38b7d196f3b7ad75eef4340854be3c20988fc043b6e7c3a6ac53bf7529834f28daf8fabed9d8692dbd60016e65f SHA512 31197b360de14d858379cfd2a937a0a2a21e16b60ad7a82aafa3fb67ddeb2a3e9ecdf190fa4bec1a97bb912c44ed594104b1a5df40f1c317ea1b0e9f8e76cae3
+AUX digikam-8.2.0-akonadi.patch 5940 BLAKE2B 80261f43d9365dcc533926ea60d432956576d84afceea5fb6b9a660efd02b414a904cac8677333ac56d6746ec1b04a71ffaebaad40005c400cd8d2b3695a6147 SHA512 99bf267d3e16bcc5c085a2b05db558a4ff59eda6f0b68b69841ca835e3ba1e620eeb2ac0f3a01d981d8a50704d33538f20344a2f74d4c10214e01da1c863a52e
+AUX digikam-8.2.0-cmake.patch 6440 BLAKE2B 8542ff5edf0d16a701b7d82452a1d2c4d86d05f7b33726898e2a910e687c7a92cc017b5e7701eac7fca94b1cb61755a467ad5ef75fb99482f9da2849d91dcf91 SHA512 0c3a3256d21bacfe0df02d001551cb9eef69c123618067171936f9a33d27a7aaabf31af17ad12087d1807e8cc1643d8146907344e13166d70337645e460f9852
DIST digiKam-8.1.0.tar.xz 35712348 BLAKE2B 0feaa66ec27b0c2a9e776f26c02987554e8653cda29ca1982182ec1a0f70783808cd2e269dcee1f2b65e6e29ba3bc483a2284a6a485c0b7cc46ae80dd2f87069 SHA512 cbf5a776b4138f4f05d074721324b046dfa07ddc01259f569ae46c46a6d5b0b00824ef0962a09041081703348e4defecf15cff800b2c6cf5e04a0e7e963a3ef4
+DIST digiKam-8.2.0.tar.xz 48172600 BLAKE2B 436f8dcd905ff993cfde3e358e27ac23cb4ad49d24a6328cda209a742874e9fcbc12da507095e2f75a167b653bb1d9e579438bf517e2911f2cb32705230023f1 SHA512 a34c5bde0e579b5f6de1fe90977e01bc385e5c28155d24db09e3cdfe7958c979d2e27cbce402d6c5b70f952fc0ead88318dfa025bb67e540c4d763cb139db7bb
EBUILD digikam-8.1.0-r1.ebuild 4714 BLAKE2B 57720a4b0dc937689c57293422433413bab5e33f020fa274f6baf7d2f8ca02cff29e0d9f7c3c63e2528f20571c2e6674fc533d53b0bea981ff74e919991de6cd SHA512 cd4c3fbf3653de68ff923d4716a253aae7be9af28ab265380f69ab930821bf5fdaaae86214dc562cb49e974af789c77784232cf6ce9c9482c121c9969f6d61fe
+EBUILD digikam-8.2.0.ebuild 4661 BLAKE2B 60ec49257520ec0b99185166e1da16c8ca0891ae46c74718ce928a53c46d6740ec7c803aa44f5ff820f8381fbabb11339ffe9af85b245d6263f756e73f488bf3 SHA512 a972eececaf7b98017e930542ad314ee269ebbbf35e8ad8f42f0fe5efb472a68545363c2ce2a64723781199dcbc13bd221980546ba8e62fda80dcb19d6ea3961
MISC metadata.xml 955 BLAKE2B 49eb64d1179383122e4fe65b2edc22929b46dba0fdb44cbd6230b33268143a9c7d4dc56a7414029864bce0a06c60c56476abc0264f151fad356020b5998b79e3 SHA512 dbe088987df5f09a8d166a293423f006eb97ab57fd0415871dc30a1a066e33a7e9e4c13a5608dd69dd96b06082bac5c216c7d9506ca60d326ab10ade96b6af39
diff --git a/media-gfx/digikam/digikam-8.2.0.ebuild b/media-gfx/digikam/digikam-8.2.0.ebuild
new file mode 100644
index 000000000000..0c699038a243
--- /dev/null
+++ b/media-gfx/digikam/digikam-8.2.0.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KFMIN=5.106.0
+QTMIN=5.15.9
+inherit ecm kde.org toolchain-funcs
+
+if [[ ${KDE_BUILD_TYPE} != live ]]; then
+ if [[ ${PV} =~ beta[0-9]$ ]]; then
+ SRC_URI="mirror://kde/unstable/${PN}/"
+ else
+ SRC_URI="mirror://kde/stable/${PN}/${PV}/"
+ fi
+ SRC_URI+="digiKam-${PV/_/-}.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+ S="${WORKDIR}/${PN}-${PV/_/-}"
+fi
+
+DESCRIPTION="Digital photo management application"
+HOMEPAGE="https://www.digikam.org/"
+
+LICENSE="GPL-2"
+SLOT="5"
+IUSE="addressbook calendar gphoto2 heif +imagemagick +lensfun marble mysql opengl openmp +panorama scanner semantic-desktop spell"
+
+# bug 366505
+RESTRICT="test"
+
+COMMON_DEPEND="
+ dev-libs/expat
+ >=dev-qt/qtconcurrent-${QTMIN}:5
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5[-gles2-only]
+ >=dev-qt/qtnetwork-${QTMIN}:5
+ >=dev-qt/qtnetworkauth-${QTMIN}:5
+ >=dev-qt/qtprintsupport-${QTMIN}:5
+ >=dev-qt/qtsql-${QTMIN}:5[mysql?]
+ >=dev-qt/qtwebengine-${QTMIN}:5[widgets]
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=dev-qt/qtx11extras-${QTMIN}:5
+ >=dev-qt/qtxml-${QTMIN}:5
+ >=dev-qt/qtxmlpatterns-${QTMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kiconthemes-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/knotifyconfig-${KFMIN}:5
+ >=kde-frameworks/kservice-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+ >=kde-frameworks/solid-${KFMIN}:5
+ >=media-gfx/exiv2-0.27.1:=[xmp]
+ media-libs/lcms:2
+ media-libs/libjpeg-turbo:=
+ media-libs/liblqr
+ media-libs/libpng:=
+ >=media-libs/opencv-3.3.0:=[contrib,contribdnn,features2d]
+ media-libs/tiff:=
+ x11-libs/libX11
+ addressbook? (
+ >=kde-apps/akonadi-contacts-19.04.3:5
+ >=kde-frameworks/kcontacts-${KFMIN}:5
+ )
+ calendar? ( >=kde-frameworks/kcalendarcore-${KFMIN}:5 )
+ gphoto2? ( media-libs/libgphoto2:= )
+ heif? (
+ media-libs/libheif:=
+ media-libs/x265:=
+ )
+ imagemagick? ( media-gfx/imagemagick:= )
+ lensfun? ( media-libs/lensfun )
+ marble? (
+ >=dev-qt/qtconcurrent-${QTMIN}:5
+ >=kde-apps/marble-19.04.3:5
+ >=kde-frameworks/kbookmarks-${KFMIN}:5
+ )
+ opengl? (
+ >=dev-qt/qtopengl-${QTMIN}:5
+ virtual/opengl
+ )
+ panorama? ( >=kde-frameworks/threadweaver-${KFMIN}:5 )
+ scanner? ( >=kde-apps/libksane-19.04.3:5 )
+ semantic-desktop? ( >=kde-frameworks/kfilemetadata-${KFMIN}:5 )
+ spell? ( >=kde-frameworks/sonnet-${KFMIN}:5 )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-cpp/eigen:3
+ dev-libs/boost
+ addressbook? ( >=kde-apps/akonadi-19.04.3:5 )
+"
+RDEPEND="${COMMON_DEPEND}
+ media-libs/exiftool
+ mysql? ( virtual/mysql[server(+)] )
+ panorama? ( media-gfx/hugin )
+"
+BDEPEND="
+ sys-devel/gettext
+ panorama? (
+ sys-devel/bison
+ sys-devel/flex
+ )
+"
+
+PATCHES=( "${FILESDIR}"/${P}-{cmake,akonadi}.patch )
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+ ecm_pkg_pretend
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+ ecm_pkg_setup
+}
+
+src_prepare() {
+ ecm_src_prepare
+ if has_version ">=kde-apps/akonadi-contacts-23.08.0"; then
+ sed -e "/KF5[:]*Akonadi/s/KF5/KPim5/" \
+ -i core/CMakeLists.txt \
+ core/utilities/extrasupport/CMakeLists.txt \
+ core/utilities/extrasupport/addressbook/CMakeLists.txt \
+ core/app/DigikamCoreTarget.cmake \
+ core/cmake/rules/RulesKDEFramework.cmake || die
+ fi
+}
+
+# FIXME: Unbundle libraw (libs/rawengine/libraw)
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_WITH_CCACHE=OFF
+ -DBUILD_WITH_QT6=OFF # KF6 not stable upstream yet
+ -DBUILD_TESTING=OFF # bug 698192
+ -DENABLE_APPSTYLES=ON
+ -DCMAKE_DISABLE_FIND_PACKAGE_Jasper=ON
+ -DENABLE_MEDIAPLAYER=OFF # bug 758641; bundled as of 8.0, KDE-bug 448681
+ -DENABLE_SHOWFOTO=ON # built unconditionally so far, new option since 8.0
+ -DENABLE_QWEBENGINE=ON
+ -DENABLE_AKONADICONTACTSUPPORT=$(usex addressbook)
+ $(cmake_use_find_package calendar KF5CalendarCore)
+ $(cmake_use_find_package gphoto2 Gphoto2)
+ $(cmake_use_find_package heif Libheif)
+ $(cmake_use_find_package imagemagick ImageMagick)
+ $(cmake_use_find_package lensfun LensFun)
+ $(cmake_use_find_package marble Marble)
+ -DENABLE_MYSQLSUPPORT=$(usex mysql)
+ -DENABLE_INTERNALMYSQL=$(usex mysql)
+ $(cmake_use_find_package opengl OpenGL)
+ $(cmake_use_find_package panorama KF5ThreadWeaver)
+ $(cmake_use_find_package scanner KF5Sane)
+ $(cmake_use_find_package spell KF5Sonnet)
+ -DENABLE_KFILEMETADATASUPPORT=$(usex semantic-desktop)
+ )
+
+ ecm_src_configure
+}
diff --git a/media-gfx/digikam/files/digikam-8.2.0-akonadi.patch b/media-gfx/digikam/files/digikam-8.2.0-akonadi.patch
new file mode 100644
index 000000000000..4e2954d0f0de
--- /dev/null
+++ b/media-gfx/digikam/files/digikam-8.2.0-akonadi.patch
@@ -0,0 +1,95 @@
+From 90e00bb17bea76030c3b532c2156d040e202c4a2 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Fri, 1 Dec 2023 23:22:53 +0100
+Subject: [PATCH] Fix build against >=akonadi-contacts-23.08
+
+---
+ core/CMakeLists.txt | 2 +-
+ core/app/DigikamCoreTarget.cmake | 6 +++---
+ core/utilities/extrasupport/CMakeLists.txt | 2 +-
+ core/utilities/extrasupport/addressbook/CMakeLists.txt | 10 +++++-----
+ 4 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
+index 8115ddc6ca..c5940b1d6e 100644
+--- a/core/CMakeLists.txt
++++ b/core/CMakeLists.txt
+@@ -270,7 +270,7 @@ PRINT_OPTIONAL_LIBRARY_STATUS("bison" "https://www.gnu.org/software/
+ PRINT_OPTIONAL_LIBRARY_STATUS("doxygen" "https://github.com/doxygen/doxygen" "(version >= 1.8.0)" "digiKam will be compiled without API documentation building support." Doxygen_FOUND)
+ PRINT_OPTIONAL_LIBRARY_STATUS("ccache" "https://ccache.dev" "(version >= 3.0.0)" "digiKam will be compiled without CCACHE build support." HAVE_CCACHE)
+ PRINT_OPTIONAL_LIBRARY_STATUS("flex" "https://github.com/westes/flex" "(version >= 2.5.0)" "digiKam will be compiled without Panorama support." FLEX_FOUND)
+-PRINT_OPTIONAL_LIBRARY_STATUS("libakonadicontact" "https://invent.kde.org/pim/akonadi-contacts" "(version >= ${AKONADI_MIN_VERSION})" "digiKam will be compiled without KDE desktop address book support." KF${QT_VERSION_MAJOR}AkonadiContact_FOUND)
++PRINT_OPTIONAL_LIBRARY_STATUS("libakonadicontact" "https://invent.kde.org/pim/akonadi-contacts" "(version >= ${AKONADI_MIN_VERSION})" "digiKam will be compiled without KDE desktop address book support." KPim${QT_VERSION_MAJOR}AkonadiContact_FOUND)
+ PRINT_OPTIONAL_LIBRARY_STATUS("libimagemagick" "https://github.com/ImageMagick/ImageMagick.git" "(version >= 6.7.0)" "digiKam will be compiled without ImageMagick codecs." HAVE_IMAGE_MAGICK)
+ PRINT_OPTIONAL_LIBRARY_STATUS("libeigen3" "https://github.com/eigenteam/eigen-git-mirror" "(version >= 3.0.0)" "digiKam will be compiled without Refocus tool support." Eigen3_FOUND)
+ PRINT_OPTIONAL_LIBRARY_STATUS("libgphoto2" "https://github.com/gphoto/libgphoto2" "(version >= 2.4.0)" "digiKam will be compiled without GPhoto2 camera drivers support." Gphoto2_FOUND)
+diff --git a/core/app/DigikamCoreTarget.cmake b/core/app/DigikamCoreTarget.cmake
+index 5ba888e259..2cc8807079 100644
+--- a/core/app/DigikamCoreTarget.cmake
++++ b/core/app/DigikamCoreTarget.cmake
+@@ -81,7 +81,7 @@ if(KF${QT_VERSION_MAJOR}FileMetaData_FOUND)
+
+ endif()
+
+-if(KF${QT_VERSION_MAJOR}AkonadiContact_FOUND)
++if(KPim${QT_VERSION_MAJOR}AkonadiContact_FOUND)
+
+ set(DIGIKAMCORE_OBJECTS
+ ${DIGIKAMCORE_OBJECTS}
+@@ -395,11 +395,11 @@ if(KF${QT_VERSION_MAJOR}FileMetaData_FOUND)
+
+ endif()
+
+-if(KF${QT_VERSION_MAJOR}AkonadiContact_FOUND)
++if(KPim${QT_VERSION_MAJOR}AkonadiContact_FOUND)
+
+ target_link_libraries(digikamcore
+ PRIVATE
+- KF${QT_VERSION_MAJOR}::AkonadiContact
++ KPim${QT_VERSION_MAJOR}::AkonadiContact
+ )
+
+ endif()
+diff --git a/core/utilities/extrasupport/CMakeLists.txt b/core/utilities/extrasupport/CMakeLists.txt
+index 910961937e..f911522b58 100644
+--- a/core/utilities/extrasupport/CMakeLists.txt
++++ b/core/utilities/extrasupport/CMakeLists.txt
+@@ -4,7 +4,7 @@
+ # SPDX-License-Identifier: BSD-3-Clause
+ #
+
+-if(KF${QT_VERSION_MAJOR}AkonadiContact_FOUND)
++if(KPim${QT_VERSION_MAJOR}AkonadiContact_FOUND)
+ add_subdirectory(addressbook)
+ endif()
+
+diff --git a/core/utilities/extrasupport/addressbook/CMakeLists.txt b/core/utilities/extrasupport/addressbook/CMakeLists.txt
+index e44a67d4dd..8ecc8fee4e 100644
+--- a/core/utilities/extrasupport/addressbook/CMakeLists.txt
++++ b/core/utilities/extrasupport/addressbook/CMakeLists.txt
+@@ -14,9 +14,9 @@ include_directories($<TARGET_PROPERTY:Qt${QT_VERSION_MAJOR}::Widgets,INTERFACE_I
+ $<TARGET_PROPERTY:KF${QT_VERSION_MAJOR}::I18n,INTERFACE_INCLUDE_DIRECTORIES>
+ )
+
+-if(KF${QT_VERSION_MAJOR}AkonadiContact_FOUND)
++if(KPim${QT_VERSION_MAJOR}AkonadiContact_FOUND)
+ include_directories(
+- $<TARGET_PROPERTY:KF${QT_VERSION_MAJOR}::AkonadiCore,INTERFACE_INCLUDE_DIRECTORIES>
++ $<TARGET_PROPERTY:KPim${QT_VERSION_MAJOR}::AkonadiCore,INTERFACE_INCLUDE_DIRECTORIES>
+ $<TARGET_PROPERTY:KF${QT_VERSION_MAJOR}::Contacts,INTERFACE_INCLUDE_DIRECTORIES>
+
+ $<TARGET_PROPERTY:KF${QT_VERSION_MAJOR}::CoreAddons,INTERFACE_INCLUDE_DIRECTORIES>
+@@ -35,7 +35,7 @@ add_library(akonadiiface STATIC $<TARGET_OBJECTS:core_akonadiiface_obj>)
+
+ target_link_libraries(akonadiiface PRIVATE Qt${QT_VERSION_MAJOR}::Core KF${QT_VERSION_MAJOR}::I18n)
+
+-if(KF${QT_VERSION_MAJOR}AkonadiContact_FOUND)
+- target_include_directories(core_akonadiiface_obj PRIVATE $<TARGET_PROPERTY:KF${QT_VERSION_MAJOR}::AkonadiContact,INTERFACE_INCLUDE_DIRECTORIES>)
+- target_link_libraries(akonadiiface PRIVATE KF${QT_VERSION_MAJOR}::AkonadiContact KF${QT_VERSION_MAJOR}::Contacts)
++if(KPim${QT_VERSION_MAJOR}AkonadiContact_FOUND)
++ target_include_directories(core_akonadiiface_obj PRIVATE $<TARGET_PROPERTY:KPim${QT_VERSION_MAJOR}::AkonadiContact,INTERFACE_INCLUDE_DIRECTORIES>)
++ target_link_libraries(akonadiiface PRIVATE KPim${QT_VERSION_MAJOR}::AkonadiContact KF${QT_VERSION_MAJOR}::Contacts)
+ endif()
+--
+2.43.0
+
diff --git a/media-gfx/digikam/files/digikam-8.2.0-cmake.patch b/media-gfx/digikam/files/digikam-8.2.0-cmake.patch
new file mode 100644
index 000000000000..8ca9e4a3b8d2
--- /dev/null
+++ b/media-gfx/digikam/files/digikam-8.2.0-cmake.patch
@@ -0,0 +1,181 @@
+From 433d0148be1cedea7e318bf3603fd17f906e721c Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 17 Feb 2019 23:51:03 +0100
+Subject: [PATCH] Un-break optional Qt/KF detection
+
+And if we enable an option, make the necessary libraries REQUIRED.
+---
+ core/cmake/rules/RulesKDEFramework.cmake | 41 +++-------------
+ core/cmake/rules/RulesQtFramework.cmake | 59 +++++-------------------
+ core/cmake/rules/RulesX11.cmake | 7 +--
+ 3 files changed, 19 insertions(+), 88 deletions(-)
+
+diff --git a/core/cmake/rules/RulesKDEFramework.cmake b/core/cmake/rules/RulesKDEFramework.cmake
+index 9c646d0112..defa399391 100644
+--- a/core/cmake/rules/RulesKDEFramework.cmake
++++ b/core/cmake/rules/RulesKDEFramework.cmake
+@@ -26,35 +26,20 @@ find_package(KF${QT_VERSION_MAJOR} ${KF${QT_VERSION_MAJOR}_MIN_VERSION} QUIET
+ )
+
+ if(ENABLE_KFILEMETADATASUPPORT)
+-
+- find_package(KF${QT_VERSION_MAJOR} ${KF${QT_VERSION_MAJOR}_MIN_VERSION} QUIET
+- OPTIONAL_COMPONENTS
+- FileMetaData # For Plasma desktop file indexer support.
+- )
+-
++ # For Plasma desktop file indexer support.
++ find_package(KF${QT_VERSION_MAJOR}FileMetaData ${KF${QT_VERSION_MAJOR}_MIN_VERSION} REQUIRED)
+ endif()
+
+
+ if(ENABLE_AKONADICONTACTSUPPORT)
+-
+- find_package(KF${QT_VERSION_MAJOR} ${AKONADI_MIN_VERSION} QUIET
+- OPTIONAL_COMPONENTS
+- Akonadi
+- AkonadiContact # For KDE Mail Contacts support.
+- Contacts # API for contacts/address book data.
+- )
+-
++ find_package(KF${QT_VERSION_MAJOR}Contacts ${KF${QT_VERSION_MAJOR}_MIN_VERSION} REQUIRED) # API for contacts/address book data.
++ find_package(KPim${QT_VERSION_MAJOR}Akonadi ${AKONADI_MIN_VERSION} REQUIRED)
++ find_package(KPim${QT_VERSION_MAJOR}AkonadiContact ${AKONADI_MIN_VERSION} REQUIRED) # For KDE Mail Contacts support.
+ endif()
+
+-find_package(KF${QT_VERSION_MAJOR} ${KSANE_MIN_VERSION} QUIET
+- OPTIONAL_COMPONENTS
+- Sane # For digital scanner support.
+-)
++find_package(KF${QT_VERSION_MAJOR}Sane ${KSANE_MIN_VERSION} QUIET) # For digital scanner support.
+
+-find_package(KF${QT_VERSION_MAJOR} ${CALENDAR_MIN_VERSION} QUIET
+- OPTIONAL_COMPONENTS
+- CalendarCore # For Calendar tool.
+-)
++find_package(KF${QT_VERSION_MAJOR}CalendarCore ${CALENDAR_MIN_VERSION} QUIET) # For Calendar tool.
+
+ if ("${KF${QT_VERSION_MAJOR}CalendarCore_VERSION}" VERSION_GREATER 5.6.40)
+
+@@ -62,18 +47,6 @@ if ("${KF${QT_VERSION_MAJOR}CalendarCore_VERSION}" VERSION_GREATER 5.6.40)
+
+ endif()
+
+-if(ENABLE_AKONADICONTACTSUPPORT AND (NOT KF${QT_VERSION_MAJOR}AkonadiContact_FOUND OR NOT KF${QT_VERSION_MAJOR}Contacts_FOUND))
+-
+- set(ENABLE_AKONADICONTACTSUPPORT OFF)
+-
+-endif()
+-
+-if(ENABLE_KFILEMETADATASUPPORT AND NOT KF${QT_VERSION_MAJOR}FileMetaData_FOUND)
+-
+- set(ENABLE_KFILEMETADATASUPPORT OFF)
+-
+-endif()
+-
+ # Check if KIO have been compiled with KIOWidgets. digiKam only needs this one.
+
+ if(KF${QT_VERSION_MAJOR}KIO_FOUND)
+diff --git a/core/cmake/rules/RulesQtFramework.cmake b/core/cmake/rules/RulesQtFramework.cmake
+index 495ce4f4ef..0c58f3552a 100644
+--- a/core/cmake/rules/RulesQtFramework.cmake
++++ b/core/cmake/rules/RulesQtFramework.cmake
+@@ -18,48 +18,19 @@ find_package(Qt${QT_VERSION_MAJOR} REQUIRED
+ )
+
+ if(ENABLE_QWEBENGINE)
+-
+- find_package(Qt${QT_VERSION_MAJOR} REQUIRED
+- NO_MODULE
+- COMPONENTS
+- WebEngineWidgets
+- )
+-
++ find_package(Qt${QT_VERSION_MAJOR}WebEngineWidgets REQUIRED NO_MODULE)
+ else()
+-
+- find_package(Qt${QT_VERSION_MAJOR} REQUIRED
+- NO_MODULE
+- COMPONENTS
+- WebKitWidgets
+- )
+-
++ find_package(Qt${QT_VERSION_MAJOR}WebKitWidgets REQUIRED NO_MODULE)
+ endif()
+
+-find_package(Qt${QT_VERSION_MAJOR}
+- OPTIONAL_COMPONENTS
+- DBus
+- OpenGL
+-)
++find_package(Qt${QT_VERSION_MAJOR}DBus)
++find_package(Qt${QT_VERSION_MAJOR}OpenGL)
+
+ if(Qt6_FOUND)
+-
+- find_package(Qt${QT_VERSION_MAJOR} REQUIRED
+- NO_MODULE COMPONENTS
+- StateMachine
+- )
+-
+- find_package(Qt${QT_VERSION_MAJOR}
+- OPTIONAL_COMPONENTS
+- OpenGLWidgets
+- )
+-
++ find_package(Qt${QT_VERSION_MAJOR}StateMachine REQUIRED NO_MODULE)
++ find_package(Qt${QT_VERSION_MAJOR}OpenGLWidgets)
+ else()
+-
+- find_package(Qt${QT_VERSION_MAJOR}
+- OPTIONAL_COMPONENTS
+- XmlPatterns # For Rajce plugin
+- )
+-
++ find_package(Qt${QT_VERSION_MAJOR}XmlPatterns) # For Rajce plugin
+ endif()
+
+ if(ENABLE_DBUS)
+@@ -75,17 +46,9 @@ endif()
+ # Qt Dependencies For unit tests and CLI test tools
+
+ if(BUILD_TESTING)
++ find_package(Qt${QT_VERSION_MAJOR}Test REQUIRED NO_MODULE)
+
+- find_package(Qt${QT_VERSION_MAJOR} REQUIRED
+- NO_MODULE
+- COMPONENTS
+- Test
+- )
+-
+- find_package(Qt${QT_VERSION_MAJOR}
+- QUIET
+- OPTIONAL_COMPONENTS
+- Qml WebView # Optional, for 'sialis' O2 library test tool.
+- )
+-
++ # Optional, for 'sialis' O2 library test tool.
++ find_package(Qt${QT_VERSION_MAJOR}Qml QUIET NO_MODULE)
++ find_package(Qt${QT_VERSION_MAJOR}WebView QUIET NO_MODULE)
+ endif()
+diff --git a/core/cmake/rules/RulesX11.cmake b/core/cmake/rules/RulesX11.cmake
+index d7659eed34..9c145970b2 100644
+--- a/core/cmake/rules/RulesX11.cmake
++++ b/core/cmake/rules/RulesX11.cmake
+@@ -11,12 +11,7 @@ find_package(X11)
+ if(X11_FOUND)
+
+ if(NOT Qt6_FOUND)
+-
+- find_package(Qt5 ${QT_MIN_VERSION} NO_MODULE
+- COMPONENTS
+- X11Extras
+- )
+-
++ find_package(Qt5X11Extras ${QT_MIN_VERSION} NO_MODULE)
+ endif()
+
+ set(HAVE_X11 TRUE)
+--
+2.43.0
+