commit:     a2efb902352fffc48ff27bef73b8ff24b7b05b39
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  2 18:14:27 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Sep  2 18:14:27 2021 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=a2efb902

ecm.eclass: Sync with Gentoo ebuild repository

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 eclass/ecm.eclass | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 1f62d7f7af..a2c8ed1c95 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -5,6 +5,7 @@
 # @MAINTAINER:
 # k...@gentoo.org
 # @SUPPORTED_EAPIS: 7 8
+# @PROVIDES: cmake
 # @BLURB: Support eclass for packages that use KDE Frameworks with ECM.
 # @DESCRIPTION:
 # This eclass is intended to streamline the creation of ebuilds for packages
@@ -22,16 +23,9 @@
 
 case ${EAPI} in
        7|8) ;;
-       *) die "EAPI=${EAPI:-0} is not supported" ;;
+       *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
 esac
 
-if [[ -v KDE_GCC_MINIMAL ]]; then
-       EXPORT_FUNCTIONS pkg_pretend
-fi
-
-EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_test pkg_preinst 
pkg_postinst pkg_postrm
-[[ ${EAPI} != 7 ]] && EXPORT_FUNCTIONS src_install
-
 if [[ -z ${_ECM_ECLASS} ]]; then
 _ECM_ECLASS=1
 
@@ -42,6 +36,8 @@ _ECM_ECLASS=1
 # for tests you should proceed with setting VIRTUALX_REQUIRED=test.
 : ${VIRTUALX_REQUIRED:=manual}
 
+inherit cmake flag-o-matic toolchain-funcs virtualx
+
 # @ECLASS-VARIABLE: ECM_NONGUI
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -54,8 +50,6 @@ if [[ ${CATEGORY} = kde-frameworks ]] ; then
 fi
 : ${ECM_NONGUI:=false}
 
-inherit cmake flag-o-matic toolchain-funcs virtualx
-
 if [[ ${ECM_NONGUI} = false ]] ; then
        inherit xdg
 fi
@@ -272,7 +266,7 @@ unset COMMONDEPEND
 # @DESCRIPTION:
 # Determine if the current GCC version is acceptable, otherwise die.
 _ecm_check_gcc_version() {
-       if [[ ${MERGE_TYPE} != binary && -v KDE_GCC_MINIMAL ]] && tc-is-gcc; 
then
+       if [[ ${MERGE_TYPE} != binary && -v ${KDE_GCC_MINIMAL} ]] && tc-is-gcc; 
then
 
                local version=$(gcc-version)
 
@@ -601,3 +595,13 @@ ecm_pkg_postrm() {
 }
 
 fi
+
+if [[ -v ${KDE_GCC_MINIMAL} ]]; then
+       EXPORT_FUNCTIONS pkg_pretend
+fi
+
+EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_test pkg_preinst 
pkg_postinst pkg_postrm
+
+if [[ ${EAPI} != 7 ]]; then
+       EXPORT_FUNCTIONS src_install
+fi

Reply via email to