summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-04-17 16:33:37 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2021-04-24 15:40:37 +0200
commita8ec7e8578461f9ea3eb02174cd48761af10b0fd (patch)
tree47daea32ea6a5532fe1b9024cbf7c54e5e948e94 /eclass
parentkde.org.eclass: EAPI whitelist and EXPORT_FUNCTIONS ahead of inherit guard (diff)
downloadgentoo-a8ec7e8578461f9ea3eb02174cd48761af10b0fd.tar.gz
gentoo-a8ec7e8578461f9ea3eb02174cd48761af10b0fd.tar.bz2
gentoo-a8ec7e8578461f9ea3eb02174cd48761af10b0fd.zip
kde.org.eclass: Add KDE_ORG_COMMIT to provide invent.kde.org snapshots
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/kde.org.eclass25
1 files changed, 19 insertions, 6 deletions
diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass
index aad7b7a62f06..7a307fef331d 100644
--- a/eclass/kde.org.eclass
+++ b/eclass/kde.org.eclass
@@ -86,6 +86,13 @@ readonly KDE_ORG_CATEGORIES
# category on invent.kde.org, with "kde" as fallback value.
: ${KDE_ORG_CATEGORY:=${KDE_ORG_CATEGORIES[${CATEGORY}]:-kde}}
+# @ECLASS-VARIABLE: KDE_ORG_COMMIT
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# If set, instead of a regular release tarball, pull tar.gz snapshot from an
+# invent.kde.org repository identified by KDE_ORG_CATEGORY and KDE_ORG_NAME
+# at the desired COMMIT ID.
+
# @ECLASS-VARIABLE: KDE_ORG_NAME
# @DESCRIPTION:
# If unset, default value is set to ${PN}.
@@ -216,7 +223,13 @@ _kde.org_calculate_src_uri() {
esac
fi
- SRC_URI="${_src_uri}${KDE_ORG_NAME}-${PV}.tar.xz"
+ if [[ -n ${KDE_ORG_COMMIT} ]]; then
+ SRC_URI="https://invent.kde.org/${KDE_ORG_CATEGORY}/${KDE_ORG_NAME}/-/"
+ SRC_URI+="archive/${KDE_ORG_COMMIT}/${KDE_ORG_NAME}-${KDE_ORG_COMMIT}.tar.gz"
+ SRC_URI+=" -> ${KDE_ORG_NAME}-${PV}-${KDE_ORG_COMMIT:0:8}.tar.gz"
+ else
+ SRC_URI="${_src_uri}${KDE_ORG_NAME}-${PV}.tar.xz"
+ fi
if _kde.org_is_unreleased ; then
RESTRICT+=" fetch"
@@ -262,14 +275,14 @@ case ${KDE_BUILD_TYPE} in
*)
_kde.org_calculate_src_uri
debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
+ if [[ -n ${KDE_ORG_COMMIT} ]]; then
+ S=${WORKDIR}/${KDE_ORG_NAME}-${KDE_ORG_COMMIT}
+ else
+ S=${WORKDIR}/${KDE_ORG_NAME}-${PV}
+ fi
;;
esac
-
-if [[ ${KDE_BUILD_TYPE} = release ]]; then
- S=${WORKDIR}/${KDE_ORG_NAME}-${PV}
-fi
-
# @FUNCTION: kde.org_pkg_nofetch
# @DESCRIPTION:
# Intended for use in the KDE overlay. If this package matches something in