diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2024-12-06 19:46:07 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2024-12-12 22:43:39 +0100 |
commit | 88f8639b690acafec78f665172934aca50b45c6b (patch) | |
tree | 6f5d26ab4d22a883283fe07b419b9658932dbf22 /eclass | |
parent | ecm.eclass: CATEGORY=kde-frameworks -> -n _FRAMEWORKS_KDE_ORG_ECLASS (diff) | |
download | gentoo-88f8639b690acafec78f665172934aca50b45c6b.tar.gz gentoo-88f8639b690acafec78f665172934aca50b45c6b.tar.bz2 gentoo-88f8639b690acafec78f665172934aca50b45c6b.zip |
ecm.eclass: Add ECM_PYTHON_BINDINGS to (so far only) disable those
See also:
https://invent.kde.org/teams/goals/streamlined-application-development-experience/-/issues/9
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ecm.eclass | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass index e6d1bf9c40a8..21e2330ac34d 100644 --- a/eclass/ecm.eclass +++ b/eclass/ecm.eclass @@ -116,6 +116,14 @@ 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 # @DESCRIPTION: @@ -254,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" @@ -610,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 |