diff options
| author | Andreas Sturmlechner <asturm@gentoo.org> | 2024-12-06 19:46:07 +0100 |
|---|---|---|
| committer | Andreas Sturmlechner <asturm@gentoo.org> | 2024-12-06 19:46:07 +0100 |
| commit | a4b68245f41c987c45172dff098b82f2d939d0db (patch) | |
| tree | fa68094af75c1fc97ac14aaab703cce2e4e15676 /eclass/ecm.eclass | |
| parent | 316c50beb7e3c988df831533ab837337fb527954 (diff) | |
| download | kde-a4b68245f41c987c45172dff098b82f2d939d0db.tar.gz kde-a4b68245f41c987c45172dff098b82f2d939d0db.tar.bz2 kde-a4b68245f41c987c45172dff098b82f2d939d0db.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/ecm.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 cd5c9971adf..1caf7813db3 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 |
