commit:     04afc30cc7a44f7ae02f78b6f628e911e2feeca9
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 17 19:19:25 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Apr 25 20:36:23 2021 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=04afc30c

qt5-build.eclass: Add eclassdoc for QT5_BUILD_TYPE

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

 eclass/qt5-build.eclass | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index 55be9e57..1f2a20cb 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -21,6 +21,16 @@ case ${EAPI} in
        *)      die "qt5-build.eclass: unsupported EAPI=${EAPI:-0}" ;;
 esac
 
+# @ECLASS-VARIABLE: QT5_BUILD_TYPE
+# @DESCRIPTION:
+# Default value is "release".
+# If PV matches "*9999*", this is automatically set to "live".
+QT5_BUILD_TYPE=release
+if [[ ${PV} = *9999* ]]; then
+       QT5_BUILD_TYPE=live
+fi
+readonly QT5_BUILD_TYPE
+
 # @ECLASS-VARIABLE: QT5_MODULE
 # @PRE_INHERIT
 # @DESCRIPTION:
@@ -67,18 +77,15 @@ case ${PV} in
        5.15.9999)
                # KDE upstream for 5.15 patches
                HOMEPAGE+=" https://invent.kde.org/qt/qt/";
-               QT5_BUILD_TYPE="live"
                EGIT_BRANCH="kde/5.15"
                ;;
        *)
                # official stable release
-               QT5_BUILD_TYPE="release"
                MY_P=${QT5_MODULE}-everywhere-src-${PV}
                
SRC_URI="https://download.qt.io/official_releases/qt/${PV%.*}/${PV}/submodules/${MY_P}.tar.xz";
                S=${WORKDIR}/${MY_P}
                ;;
 esac
-readonly QT5_BUILD_TYPE
 
 EGIT_REPO_URI=( "https://invent.kde.org/qt/qt/${QT5_MODULE}.git"; )
 

Reply via email to