1 |
commit: 104515216fbb9ac5bc27ebc7c8395019a7bc82e0 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 17 14:33:37 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 23 20:26:48 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=10451521 |
7 |
|
8 |
kde.org.eclass: Add KDE_ORG_COMMIT to provide invent.kde.org snapshots |
9 |
|
10 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
11 |
|
12 |
eclass/kde.org.eclass | 25 +++++++++++++++++++------ |
13 |
1 file changed, 19 insertions(+), 6 deletions(-) |
14 |
|
15 |
diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass |
16 |
index fee743ed13..596322f4b1 100644 |
17 |
--- a/eclass/kde.org.eclass |
18 |
+++ b/eclass/kde.org.eclass |
19 |
@@ -86,6 +86,13 @@ readonly KDE_ORG_CATEGORIES |
20 |
# category on invent.kde.org, with "kde" as fallback value. |
21 |
: ${KDE_ORG_CATEGORY:=${KDE_ORG_CATEGORIES[${CATEGORY}]:-kde}} |
22 |
|
23 |
+# @ECLASS-VARIABLE: KDE_ORG_COMMIT |
24 |
+# @DEFAULT_UNSET |
25 |
+# @DESCRIPTION: |
26 |
+# If set, instead of a regular release tarball, pull tar.gz snapshot from an |
27 |
+# invent.kde.org repository identified by KDE_ORG_CATEGORY and KDE_ORG_NAME |
28 |
+# at the desired COMMIT ID. |
29 |
+ |
30 |
# @ECLASS-VARIABLE: KDE_ORG_NAME |
31 |
# @DESCRIPTION: |
32 |
# If unset, default value is set to ${PN}. |
33 |
@@ -214,7 +221,13 @@ _kde.org_calculate_src_uri() { |
34 |
esac |
35 |
fi |
36 |
|
37 |
- SRC_URI="${_src_uri}${KDE_ORG_NAME}-${PV}.tar.xz" |
38 |
+ if [[ -n ${KDE_ORG_COMMIT} ]]; then |
39 |
+ SRC_URI="https://invent.kde.org/${KDE_ORG_CATEGORY}/${KDE_ORG_NAME}/-/" |
40 |
+ SRC_URI+="archive/${KDE_ORG_COMMIT}/${KDE_ORG_NAME}-${KDE_ORG_COMMIT}.tar.gz" |
41 |
+ SRC_URI+=" -> ${KDE_ORG_NAME}-${PV}-${KDE_ORG_COMMIT:0:8}.tar.gz" |
42 |
+ else |
43 |
+ SRC_URI="${_src_uri}${KDE_ORG_NAME}-${PV}.tar.xz" |
44 |
+ fi |
45 |
|
46 |
if _kde.org_is_unreleased ; then |
47 |
RESTRICT+=" fetch" |
48 |
@@ -260,14 +273,14 @@ case ${KDE_BUILD_TYPE} in |
49 |
*) |
50 |
_kde.org_calculate_src_uri |
51 |
debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}" |
52 |
+ if [[ -n ${KDE_ORG_COMMIT} ]]; then |
53 |
+ S=${WORKDIR}/${KDE_ORG_NAME}-${KDE_ORG_COMMIT} |
54 |
+ else |
55 |
+ S=${WORKDIR}/${KDE_ORG_NAME}-${PV} |
56 |
+ fi |
57 |
;; |
58 |
esac |
59 |
|
60 |
- |
61 |
-if [[ ${KDE_BUILD_TYPE} = release ]]; then |
62 |
- S=${WORKDIR}/${KDE_ORG_NAME}-${PV} |
63 |
-fi |
64 |
- |
65 |
# @FUNCTION: kde.org_pkg_nofetch |
66 |
# @DESCRIPTION: |
67 |
# Intended for use in the KDE overlay. If this package matches something in |