From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3BBD31382C5 for ; Sat, 23 May 2020 21:24:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 57C74E0844; Sat, 23 May 2020 21:24:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3A7F4E0844 for ; Sat, 23 May 2020 21:24:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9412034ECC4 for ; Sat, 23 May 2020 21:24:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A37C79C for ; Sat, 23 May 2020 21:24:43 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1590269065.1dfb073303b39c71c2afdfbec0ecbd7d56ae3e27.asturm@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: eclass/ X-VCS-Repository: proj/kde X-VCS-Files: eclass/kde.org.eclass X-VCS-Directories: eclass/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 1dfb073303b39c71c2afdfbec0ecbd7d56ae3e27 X-VCS-Branch: master Date: Sat, 23 May 2020 21:24:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 473a98bc-77ea-4c25-a9cc-40284795982c X-Archives-Hash: c7ff245b0b6ebac8e90eb26ef8add96e commit: 1dfb073303b39c71c2afdfbec0ecbd7d56ae3e27 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun May 10 23:13:21 2020 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat May 23 21:24:25 2020 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=1dfb0733 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 gentoo.org> eclass/kde.org.eclass | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass index 2d21bacc5c..aaee2a2cba 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}= 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)"