summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-26 04:33:49 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-26 04:33:49 +0000
commitc5ca18eee76dfed87e06ea7b99017878b77d4d24 (patch)
treedf2095871315f80372e3ed1f2c19d8549e0b1570 /eclass
parent4dc9bfa1f12673bbf1343e64af7e0cd715534a9f (diff)
gentoo auto-resync : 26:11:2023 - 04:33:49
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin38937 -> 38933 bytes
-rw-r--r--eclass/ecm.eclass100
-rw-r--r--eclass/frameworks.kde.org.eclass58
3 files changed, 105 insertions, 53 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index f817e454f4dd..0fb75f8e58dc 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 0331273faae1..3c102d669caf 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -87,26 +87,27 @@ fi
# Will accept "true", "false", "optional", "forceoptional". If set to "false",
# do nothing.
# Otherwise, add "+handbook" to IUSE, add the appropriate dependency, and let
-# KF5DocTools generate and install the handbook from docbook file(s) found in
-# ECM_HANDBOOK_DIR. However if !handbook, disable build of ECM_HANDBOOK_DIR
-# in CMakeLists.txt.
-# If set to "optional", build with -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON
-# when !handbook. In case package requires KF5KDELibs4Support, see next:
-# If set to "forceoptional", remove a KF5DocTools dependency from the root
-# CMakeLists.txt in addition to the above.
+# KF${_KFSLOT}DocTools generate and install the handbook from docbook file(s)
+# found in ECM_HANDBOOK_DIR. However if !handbook, disable build of
+# ECM_HANDBOOK_DIR in CMakeLists.txt.
+# If set to "optional", build with
+# -DCMAKE_DISABLE_FIND_PACKAGE_KF${_KFSLOT}DocTools=ON when !handbook. In case
+# package requires KF5KDELibs4Support, see next:
+# If set to "forceoptional", remove a KF${_KFSLOT}DocTools dependency from the
+# root CMakeLists.txt in addition to the above.
: "${ECM_HANDBOOK:=false}"
# @ECLASS_VARIABLE: ECM_HANDBOOK_DIR
# @DESCRIPTION:
# Specifies the directory containing the docbook file(s) relative to ${S} to
-# be processed by KF5DocTools (kdoctools_install).
+# be processed by KF${_KFSLOT}DocTools (kdoctools_install).
: "${ECM_HANDBOOK_DIR:=doc}"
# @ECLASS_VARIABLE: ECM_PO_DIRS
# @DESCRIPTION:
# Specifies directories of l10n files relative to ${S} to be processed by
-# KF5I18n (ki18n_install). If IUSE nls exists and is disabled then disable
-# build of these directories in CMakeLists.txt.
+# KF${_KFSLOT}I18n (ki18n_install). If IUSE nls exists and is disabled then
+# disable build of these directories in CMakeLists.txt.
: "${ECM_PO_DIRS:="po poqm"}"
# @ECLASS_VARIABLE: ECM_QTHELP
@@ -128,14 +129,14 @@ fi
# "forceoptional-recursive".
# Default value is "false", except for CATEGORY=kde-frameworks where it is
# set to "true". If set to "false", do nothing.
-# For any other value, add "test" to IUSE and DEPEND on dev-qt/qttest:5.
-# If set to "optional", build with -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON
-# when USE=!test.
-# If set to "forceoptional", punt Qt5Test dependency and ignore "autotests",
+# For any other value, add "test" to IUSE and DEPEND on dev-qt/qtbase:6[test]
+# (for KF5: dev-qt/qttest:5). If set to "optional", build with
+# -DCMAKE_DISABLE_FIND_PACKAGE_Qt${_KFSLOT}Test=ON when USE=!test. If set
+# to "forceoptional", punt Qt${_KFSLOT}Test dependency and ignore "autotests",
# "test", "tests" subdirs from top-level CMakeLists.txt when USE=!test.
-# If set to "forceoptional-recursive", punt Qt5Test dependencies and make
-# autotest(s), unittest(s) and test(s) subdirs from *any* CMakeLists.txt in
-# ${S} and below conditional on BUILD_TESTING when USE=!test. This is always
+# If set to "forceoptional-recursive", punt Qt${_KFSLOT}Test dependencies and
+# make autotest(s), unittest(s) and test(s) subdirs from *any* CMakeLists.txt
+# in ${S} and below conditional on BUILD_TESTING when USE=!test. This is always
# meant as a short-term fix and creates ${T}/${P}-tests-optional.patch to
# refine and submit upstream.
if [[ ${CATEGORY} = kde-frameworks ]]; then
@@ -148,17 +149,30 @@ fi
# @DESCRIPTION:
# Minimum version of Frameworks to require. Default value for kde-frameworks
# is ${PV} and 5.106.0 baseline for everything else.
-# Version will also be used to differentiate between KF5/Qt5 and KF6/Qt6.
+# If set to >=5.240, KF6/Qt6 is assumed thus SLOT=6 dependencies added and
+# -DQT_MAJOR_VERSION=6 added to cmake args.
if [[ ${CATEGORY} = kde-frameworks ]]; then
: "${KFMIN:=$(ver_cut 1-2)}"
fi
: "${KFMIN:=5.106.0}"
-# @ECLASS_VARIABLE: KFSLOT
+# @ECLASS_VARIABLE: _KFSLOT
# @INTERNAL
# @DESCRIPTION:
-# KDE Frameworks and Qt slot dependency, implied by KFMIN version.
-: "${KFSLOT:=5}"
+# KDE Frameworks and Qt main slot dependency, implied by KFMIN version, *not*
+# necessarily the package's SLOT. This is being used throughout the eclass to
+# depend on either :5 or :6 Qt/KF packages as well as setting correctly
+# prefixed cmake args.
+: "${_KFSLOT:=5}"
+if [[ ${CATEGORY} == kde-frameworks ]]; then
+ if [[ ${PV} != 5.9999 ]] && $(ver_test ${KFMIN} -ge 5.240); then
+ _KFSLOT=6
+ fi
+else
+ if [[ ${KFMIN/.*} == 6 ]] || $(ver_test ${KFMIN} -ge 5.240); then
+ _KFSLOT=6
+ fi
+fi
case ${ECM_NONGUI} in
true) ;;
@@ -189,7 +203,11 @@ esac
case ${ECM_DESIGNERPLUGIN} in
true)
IUSE+=" designer"
- BDEPEND+=" designer? ( dev-qt/designer:${KFSLOT} )"
+ if [[ ${_KFSLOT} == 6 ]]; then
+ BDEPEND+=" designer? ( dev-qt/qttools:${_KFSLOT}[designer] )"
+ else
+ BDEPEND+=" designer? ( dev-qt/designer:${_KFSLOT} )"
+ fi
;;
false) ;;
*)
@@ -212,7 +230,7 @@ esac
case ${ECM_HANDBOOK} in
true|optional|forceoptional)
IUSE+=" +handbook"
- BDEPEND+=" handbook? ( >=kde-frameworks/kdoctools-${KFMIN}:${KFSLOT} )"
+ BDEPEND+=" handbook? ( >=kde-frameworks/kdoctools-${KFMIN}:${_KFSLOT} )"
;;
false) ;;
*)
@@ -224,11 +242,13 @@ esac
case ${ECM_QTHELP} in
true)
IUSE+=" doc"
- COMMONDEPEND+=" doc? ( dev-qt/qt-docs:${KFSLOT} )"
- BDEPEND+=" doc? (
- >=app-doc/doxygen-1.8.13-r1
- dev-qt/qthelp:${KFSLOT}
- )"
+ COMMONDEPEND+=" doc? ( dev-qt/qt-docs:${_KFSLOT} )"
+ BDEPEND+=" doc? ( >=app-doc/doxygen-1.8.13-r1 )"
+ if [[ ${_KFSLOT} == 6 ]]; then
+ BDEPEND+=" dev-qt/qttools:${_KFSLOT}[assistant]"
+ else
+ BDEPEND+=" doc? ( dev-qt/qthelp:${_KFSLOT} )"
+ fi
;;
false) ;;
*)
@@ -240,7 +260,11 @@ esac
case ${ECM_TEST} in
true|optional|forceoptional|forceoptional-recursive)
IUSE+=" test"
- DEPEND+=" test? ( dev-qt/qttest:${KFSLOT} )"
+ if [[ ${_KFSLOT} == 6 ]]; then
+ DEPEND+=" test? ( dev-qt/qtbase:${_KFSLOT}[test] )"
+ else
+ DEPEND+=" test? ( dev-qt/qttest:${_KFSLOT} )"
+ fi
RESTRICT+=" !test? ( test )"
;;
false) ;;
@@ -252,10 +276,14 @@ esac
BDEPEND+="
dev-libs/libpcre2:*
- >=kde-frameworks/extra-cmake-modules-${KFMIN}:${KFSLOT}
+ >=kde-frameworks/extra-cmake-modules-${KFMIN}:*
"
RDEPEND+=" >=kde-frameworks/kf-env-4"
-COMMONDEPEND+=" dev-qt/qtcore:${KFSLOT}"
+if [[ ${_KFSLOT} == 6 ]]; then
+ COMMONDEPEND+=" dev-qt/qtbase:${_KFSLOT}"
+else
+ COMMONDEPEND+=" dev-qt/qtcore:${_KFSLOT}"
+fi
DEPEND+=" ${COMMONDEPEND}"
RDEPEND+=" ${COMMONDEPEND}"
@@ -465,7 +493,7 @@ ecm_src_prepare() {
# always install unconditionally for kconfigwidgets - if you use
# language X as system language, and there is a combobox with language
# names, the translated language name for language Y is taken from
- # /usr/share/locale/Y/kf5_entry.desktop
+ # /usr/share/locale/Y/kf${_KFSLOT}_entry.desktop
[[ ${PN} != kconfigwidgets ]] && _ecm_strip_handbook_translations
fi
@@ -519,16 +547,20 @@ ecm_src_configure() {
local cmakeargs
+ if [[ ${_KFSLOT} == 6 ]]; then
+ cmakeargs+=( -DQT_MAJOR_VERSION=6 )
+ fi
+
if in_iuse test && ! use test ; then
cmakeargs+=( -DBUILD_TESTING=OFF )
if [[ ${ECM_TEST} = optional ]] ; then
- cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON )
+ cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Qt${_KFSLOT}Test=ON )
fi
fi
if [[ ${ECM_HANDBOOK} = optional ]] ; then
- cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=$(usex !handbook) )
+ cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KF${_KFSLOT}DocTools=$(usex !handbook) )
fi
if in_iuse designer && [[ ${ECM_DESIGNERPLUGIN} = true ]]; then
diff --git a/eclass/frameworks.kde.org.eclass b/eclass/frameworks.kde.org.eclass
index 5201464a76c8..5d54b736c91b 100644
--- a/eclass/frameworks.kde.org.eclass
+++ b/eclass/frameworks.kde.org.eclass
@@ -35,8 +35,19 @@ inherit kde.org
HOMEPAGE="https://develop.kde.org/products/frameworks/"
-SLOT=5/${PV}
-[[ ${KDE_BUILD_TYPE} == release ]] && SLOT=$(ver_cut 1)/$(ver_cut 1-2)
+SLOT=6
+if [[ ${PV} == 5.9999 ]] || ver_test ${PV} -lt 5.240; then
+ SLOT=5
+fi
+if [[ ${PN} == extra-cmake-modules ]]; then
+ SLOT=0
+else
+ if [[ ${KDE_BUILD_TYPE} == release ]]; then
+ SLOT=${SLOT}/$(ver_cut 1-2)
+ else
+ SLOT=${SLOT}/9999
+ fi
+fi
# @ECLASS_VARIABLE: KDE_ORG_SCHEDULE_URI
# @INTERNAL
@@ -50,23 +61,32 @@ KDE_ORG_SCHEDULE_URI+="/Frameworks"
# Helper variable to construct release group specific SRC_URI.
_KDE_SRC_URI="mirror://kde/"
-if [[ ${KDE_BUILD_TYPE} != live && -z ${KDE_ORG_COMMIT} ]]; then
- _KDE_SRC_URI+="stable/frameworks/$(ver_cut 1-2)/"
- case ${KDE_ORG_NAME} in
- kdelibs4support | \
- kdesignerplugin | \
- kdewebkit | \
- khtml | \
- kjs | \
- kjsembed | \
- kmediaplayer | \
- kross | \
- kxmlrpcclient)
- _KDE_SRC_URI+="portingAids/"
- ;;
- esac
+case ${KDE_BUILD_TYPE} in
+ live)
+ if [[ ${PV} == 5.9999 ]]; then
+ EGIT_BRANCH="kf5"
+ fi
+ ;;
+ *)
+ if [[ -z ${KDE_ORG_COMMIT} ]]; then
+ _KDE_SRC_URI+="stable/frameworks/$(ver_cut 1-2)/"
+ case ${KDE_ORG_NAME} in
+ kdelibs4support | \
+ kdesignerplugin | \
+ kdewebkit | \
+ khtml | \
+ kjs | \
+ kjsembed | \
+ kmediaplayer | \
+ kross | \
+ kxmlrpcclient)
+ _KDE_SRC_URI+="portingAids/"
+ ;;
+ esac
- SRC_URI="${_KDE_SRC_URI}${KDE_ORG_NAME}-${PV}.tar.xz"
-fi
+ SRC_URI="${_KDE_SRC_URI}${KDE_ORG_NAME}-${PV}.tar.xz"
+ fi
+ ;;
+esac
fi