Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde:master commit in: eclass/
Date: Sun, 18 Jul 2021 16:55:45
Message-Id: 1626598432.19b4ef26c52864d1e0dce7d07e7d2d009ea73094.asturm@gentoo
1 commit: 19b4ef26c52864d1e0dce7d07e7d2d009ea73094
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 18 08:30:46 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 18 08:53:52 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=19b4ef26
7
8 kde.org.eclass: Allow KDE_BUILD_TYPE to hold "snapshot" value
9
10 This value is set in conjunction with KDE_ORG_COMMIT to distinguish
11 between proper release tarballs and snapshots.
12
13 Minor changes in adv. of follow-up commit:
14 - KDE_GEAR: move kde-apps/ fallback decl below default, improve eclassdoc
15 - PRE_INHERIT: set it where necessary
16
17 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
18
19 eclass/kde.org.eclass | 50 +++++++++++++++++++++++++++++++-------------------
20 1 file changed, 31 insertions(+), 19 deletions(-)
21
22 diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass
23 index 31359c3f63..18f198e522 100644
24 --- a/eclass/kde.org.eclass
25 +++ b/eclass/kde.org.eclass
26 @@ -25,20 +25,6 @@ EXPORT_FUNCTIONS pkg_nofetch src_unpack
27 if [[ -z ${_KDE_ORG_ECLASS} ]]; then
28 _KDE_ORG_ECLASS=1
29
30 -# @ECLASS-VARIABLE: KDE_BUILD_TYPE
31 -# @DESCRIPTION:
32 -# If PV matches "*9999*", this is automatically set to "live".
33 -# Otherwise, this is automatically set to "release".
34 -KDE_BUILD_TYPE="release"
35 -if [[ ${PV} == *9999* ]]; then
36 - KDE_BUILD_TYPE="live"
37 -fi
38 -export KDE_BUILD_TYPE
39 -
40 -if [[ ${KDE_BUILD_TYPE} == live ]]; then
41 - inherit git-r3
42 -fi
43 -
44 # @ECLASS-VARIABLE: KDE_ORG_CATEGORIES
45 # @INTERNAL
46 # @DESCRIPTION:
47 @@ -82,12 +68,14 @@ declare -A KDE_ORG_CATEGORIES=(
48 readonly KDE_ORG_CATEGORIES
49
50 # @ECLASS-VARIABLE: KDE_ORG_CATEGORY
51 +# @PRE_INHERIT
52 # @DESCRIPTION:
53 # If unset, default value is mapped from ${CATEGORY} to corresponding upstream
54 # category on invent.kde.org, with "kde" as fallback value.
55 : ${KDE_ORG_CATEGORY:=${KDE_ORG_CATEGORIES[${CATEGORY}]:-kde}}
56
57 # @ECLASS-VARIABLE: KDE_ORG_COMMIT
58 +# @PRE_INHERIT
59 # @DEFAULT_UNSET
60 # @DESCRIPTION:
61 # If set, instead of a regular release tarball, pull tar.gz snapshot from an
62 @@ -95,16 +83,42 @@ readonly KDE_ORG_CATEGORIES
63 # at the desired COMMIT ID.
64
65 # @ECLASS-VARIABLE: KDE_ORG_NAME
66 +# @PRE_INHERIT
67 # @DESCRIPTION:
68 # If unset, default value is set to ${PN}.
69 # Name of the package as hosted on kde.org mirrors.
70 : ${KDE_ORG_NAME:=$PN}
71
72 # @ECLASS-VARIABLE: KDE_GEAR
73 +# @PRE_INHERIT
74 # @DESCRIPTION:
75 -# If set to "false", do nothing.
76 +# Mark package is being part of KDE Gear release schedule.
77 +# By default, this is set to "false" and does nothing.
78 +# If CATEGORY equals kde-apps, this is automatically set to "true".
79 # If set to "true", set SRC_URI accordingly and apply KDE_UNRELEASED.
80 : ${KDE_GEAR:=false}
81 +if [[ ${CATEGORY} == kde-apps ]]; then
82 + KDE_GEAR=true
83 +fi
84 +
85 +# @ECLASS-VARIABLE: KDE_BUILD_TYPE
86 +# @DESCRIPTION:
87 +# By default, this is set to "release".
88 +# If PV matches "*9999*", this is automatically set to "live" and will cause
89 +# git-r3.eclass to be inherited.
90 +# In EAPI-8, if KDE_ORG_COMMIT is set, this is automatically set to "snapshot".
91 +KDE_BUILD_TYPE="release"
92 +if [[ ${PV} == *9999* ]]; then
93 + KDE_BUILD_TYPE="live"
94 +fi
95 +if [[ ${EAPI} == 8 ]] && [[ -n ${KDE_ORG_COMMIT} ]]; then
96 + KDE_BUILD_TYPE="snapshot"
97 +fi
98 +export KDE_BUILD_TYPE
99 +
100 +if [[ ${KDE_BUILD_TYPE} == live ]]; then
101 + inherit git-r3
102 +fi
103
104 # @ECLASS-VARIABLE: KDE_SELINUX_MODULE
105 # @PRE_INHERIT
106 @@ -138,16 +152,13 @@ case ${CATEGORY} in
107 HOMEPAGE="https://community.kde.org/Qt5PatchCollection
108 https://invent.kde.org/qt/qt/ https://www.qt.io/"
109 ;;
110 - kde-apps)
111 - KDE_GEAR=true
112 - ;;
113 kde-plasma)
114 HOMEPAGE="https://kde.org/plasma-desktop"
115 ;;
116 kde-frameworks)
117 HOMEPAGE="https://kde.org/products/frameworks/"
118 SLOT=5/${PV}
119 - [[ ${KDE_BUILD_TYPE} == release ]] && SLOT=$(ver_cut 1)/$(ver_cut 1-2)
120 + [[ ${KDE_BUILD_TYPE} != live ]] && SLOT=$(ver_cut 1)/$(ver_cut 1-2)
121 ;;
122 *) ;;
123 esac
124 @@ -284,6 +295,7 @@ case ${KDE_BUILD_TYPE} in
125 *)
126 _kde.org_calculate_src_uri
127 debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
128 + # TODO: simplify after dropping support for EAPI-7
129 if [[ -n ${KDE_ORG_COMMIT} ]]; then
130 S=${WORKDIR}/${KDE_ORG_NAME}-${KDE_ORG_COMMIT}
131 [[ ${CATEGORY} == dev-qt ]] && QT5_BUILD_DIR="${S}_build"