diff options
| author | Andreas Sturmlechner <asturm@gentoo.org> | 2020-05-11 01:13:21 +0200 |
|---|---|---|
| committer | Andreas Sturmlechner <asturm@gentoo.org> | 2020-05-23 23:24:25 +0200 |
| commit | 1dfb073303b39c71c2afdfbec0ecbd7d56ae3e27 (patch) | |
| tree | e299852282f917a2d162de59ffd7b893450e263a | |
| parent | 6e81fbb81ebaf65f86673fd9eb55d937a878923d (diff) | |
| download | kde-1dfb073303b39c71c2afdfbec0ecbd7d56ae3e27.tar.gz kde-1dfb073303b39c71c2afdfbec0ecbd7d56ae3e27.tar.bz2 kde-1dfb073303b39c71c2afdfbec0ecbd7d56ae3e27.zip | |
kde.org.eclass: Add KDE_ORG_CATEGORIES map and KDE_ORG_CATEGORY
To support invent.kde.org git repository addresses without redirect warnings.
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
| -rw-r--r-- | eclass/kde.org.eclass | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass index 2d21bacc5c5..aaee2a2cba2 100644 --- a/eclass/kde.org.eclass +++ b/eclass/kde.org.eclass @@ -34,6 +34,50 @@ fi EXPORT_FUNCTIONS pkg_nofetch src_unpack +# @ECLASS-VARIABLE: KDE_ORG_CATEGORIES +# @INTERNAL +# @DESCRIPTION +# Map of ${CATEGORY}=<upstream category> key-value pairs. +declare -A KDE_ORG_CATEGORIES=( + [app-accessibility]=accessibility + [app-admin]=system + [app-backup]=system + [app-cdr]=utilities + [app-editors]=office + [app-office]=office + [app-text]=office + [dev-libs]=libraries + [dev-util]=sdk + [games-kids]=education + [kde-frameworks]=frameworks + [kde-plasma]=plasma + [mail-client]=pim + [media-gfx]=graphics + [media-libs]=libraries + [media-sound]=multimedia + [media-video]=multimedia + [net-im]=network + [net-irc]=network + [net-libs]=libraries + [net-misc]=network + [net-p2p]=network + [sci-astronomy]=education + [sci-calculators]=utilities + [sci-mathematics]=education + [sci-visualization]=education + [sys-block]=system + [sys-libs]=system + [www-client]=network + [x11-libs]=libraries +) +readonly KDE_ORG_CATEGORIES + +# @ECLASS-VARIABLE: KDE_ORG_CATEGORY +# @DESCRIPTION: +# If unset, default value is mapped from ${CATEGORY} to corresponding upstream +# category on invent.kde.org, with "kde" as fallback value. +: ${KDE_ORG_CATEGORY:=${KDE_ORG_CATEGORIES[${CATEGORY}]:-kde}} + # @ECLASS-VARIABLE: KDE_ORG_NAME # @DESCRIPTION: # If unset, default value is set to ${PN}. @@ -171,7 +215,7 @@ _kde.org_calculate_live_repo() { # @DESCRIPTION: # This variable allows easy overriding of default kde mirror service # (anongit) with anything else you might want to use. - EGIT_MIRROR=${EGIT_MIRROR:=https://invent.kde.org/kde} + EGIT_MIRROR=${EGIT_MIRROR:=https://invent.kde.org/${KDE_ORG_CATEGORY}} if [[ ${PV} == ??.??.49.9999 && ${KDE_RELEASE_SERVICE} = true ]]; then EGIT_BRANCH="release/$(ver_cut 1-2)" |
