diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-12-13 02:01:50 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-12-13 02:01:50 +0000 |
commit | 2a3e0d61b3d88306b6fae46756f9ba7d230222ae (patch) | |
tree | a0d3259dd259861a49a2d3e6e9220beaa8ec39c2 /eclass/ecm.eclass | |
parent | 39c32f4d5dca9f6293fccb69e9d50baf494c8de4 (diff) |
gentoo auto-resync : 13:12:2024 - 02:01:50
Diffstat (limited to 'eclass/ecm.eclass')
-rw-r--r-- | eclass/ecm.eclass | 57 |
1 files changed, 40 insertions, 17 deletions
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass index fbe1a23cf205..21e2330ac34d 100644 --- a/eclass/ecm.eclass +++ b/eclass/ecm.eclass @@ -104,11 +104,25 @@ fi : "${ECM_HANDBOOK_DIR:=doc}" # @ECLASS_VARIABLE: ECM_PO_DIRS +# @PRE_INHERIT # @DESCRIPTION: # Specifies directories of l10n files relative to ${S} to be processed by # 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"}" +if [[ ${ECM_PO_DIRS} ]]; then + [[ ${ECM_PO_DIRS@a} == *a* ]] || + die "ECM_PO_DIRS must be an array" +else + ECM_PO_DIRS=( po poqm ) +fi + +# @ECLASS_VARIABLE: ECM_PYTHON_BINDINGS +# @DESCRIPTION: +# Default value is "false", which means do nothing. +# If set to "off", pass -DBUILD_PYTHON_BINDINGS=OFF to mycmakeargs, and also +# disable cmake finding Python3, PySide6 and Shiboken6 to make it quiet. +# No other value is implemented as python bindings are not supported in Gentoo. +: "${ECM_PYTHON_BINDINGS:=false}" # @ECLASS_VARIABLE: ECM_QTHELP # @DEFAULT_UNSET @@ -155,16 +169,17 @@ fi : "${ECM_TEST:=false}" # @ECLASS_VARIABLE: KFMIN +# @PRE_INHERIT # @DEFAULT_UNSET # @DESCRIPTION: # Minimum version of Frameworks to require. Default value for kde-frameworks -# is ${PV} and 5.106.0 baseline for everything else. +# is ${PV} and 5.116.0 baseline for everything else. # 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}" +: "${KFMIN:=5.116.0}" # @ECLASS_VARIABLE: _KFSLOT # @INTERNAL @@ -175,9 +190,7 @@ fi # prefixed cmake args. : "${_KFSLOT:=5}" if [[ ${CATEGORY} == kde-frameworks ]]; then - if [[ ${PV} != 5.9999 ]] && $(ver_test ${KFMIN} -ge 5.240); then - _KFSLOT=6 - fi + ver_test ${KFMIN} -ge 5.240 && _KFSLOT=6 else if [[ ${KFMIN/.*} == 6 ]] || $(ver_test ${KFMIN} -ge 5.240); then _KFSLOT=6 @@ -249,6 +262,15 @@ case ${ECM_HANDBOOK} in ;; esac +case ${ECM_PYTHON_BINDINGS} in + off|false) ;; + true) ;& # TODO if you really really want + *) + eerror "Unknown value for \${ECM_PYTHON_BINDINGS}" + die "Value ${ECM_PYTHON_BINDINGS} is not supported" + ;; +esac + case ${ECM_QTHELP} in true) IUSE+=" doc" @@ -339,7 +361,7 @@ _ecm_strip_handbook_translations() { fi local lang po - for po in ${ECM_PO_DIRS}; do + for po in ${ECM_PO_DIRS[*]}; do if [[ -d ${po} ]] ; then pushd ${po} > /dev/null || die for lang in *; do @@ -540,7 +562,7 @@ ecm_src_prepare() { if [[ ${ECM_TEST} = forceoptional ]] ; then [[ ${_KFSLOT} = 5 ]] && ecm_punt_qt_module Test # if forceoptional, also cover non-kde categories - cmake_comment_add_subdirectory autotests test tests + cmake_comment_add_subdirectory appiumtests autotests test tests elif [[ ${ECM_TEST} = forceoptional-recursive ]] ; then [[ ${_KFSLOT} = 5 ]] && ecm_punt_qt_module Test local f pf="${T}/${P}"-tests-optional.patch @@ -561,13 +583,13 @@ ecm_src_prepare() { eqawarn "Unified diff file ready for pickup in:" eqawarn " ${pf}" eqawarn "Push it upstream to make this message go away." - elif [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then - cmake_comment_add_subdirectory autotests test tests + elif [[ -n ${_KDE_ORG_ECLASS} ]] ; then + cmake_comment_add_subdirectory appiumtests autotests test tests fi fi # in frameworks, tests = manual tests so never build them - if [[ ${CATEGORY} = kde-frameworks ]] && [[ ${PN} != extra-cmake-modules ]]; then + if [[ -n ${_FRAMEWORKS_KDE_ORG_ECLASS} ]] && [[ ${PN} != extra-cmake-modules ]]; then cmake_comment_add_subdirectory tests fi } @@ -605,6 +627,13 @@ ecm_src_configure() { cmakeargs+=( -DBUILD_DESIGNERPLUGIN=$(usex designer) ) fi + if [[ ${ECM_PYTHON_BINDINGS} == off ]]; then + cmakeargs+=( + -DBUILD_PYTHON_BINDINGS=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_{Python3,PySide6,Shiboken6}=ON + ) + fi + if [[ ${ECM_QTHELP} = true ]]; then cmakeargs+=( -DBUILD_QCH=$(usex doc) ) fi @@ -753,12 +782,6 @@ ecm_pkg_postinst() { false) xdg_pkg_postinst ;; *) ;; esac - - if [[ -n ${_KDE_ORG_ECLASS} ]] && [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && [[ ${KDE_BUILD_TYPE} = live ]]; then - einfo "WARNING! This is an experimental live ebuild of ${CATEGORY}/${PN}" - einfo "Use it at your own risk." - einfo "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!" - fi } # @FUNCTION: ecm_pkg_postrm |