aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2016-03-02 04:22:45 +0800
committermat <mat@FreeBSD.org>2016-03-02 04:22:45 +0800
commit3fd79b390c93ee941f615aaa0ad773d70c45b1a8 (patch)
tree7dc4db59dcb50b123e7680257e21d8e2f044cfe3 /Mk
parent3d23f96b1f24b9e259098cc5ca1d084ca804d646 (diff)
downloadfreebsd-ports-gnome-3fd79b390c93ee941f615aaa0ad773d70c45b1a8.tar.gz
freebsd-ports-gnome-3fd79b390c93ee941f615aaa0ad773d70c45b1a8.tar.zst
freebsd-ports-gnome-3fd79b390c93ee941f615aaa0ad773d70c45b1a8.zip
Introduce GH_TUPLE.
GH_TUPLE allows one to put all the GH_{ACCOUNT,PROJECT,TAGNAME} into one variable, in the form of account:project:tagname[:group]. It is helpful when there are many submodules. PR: 204772 With hat: portmgr Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D4514
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.sites.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/Mk/bsd.sites.mk b/Mk/bsd.sites.mk
index e819516f9c72..9648dbdb17cf 100644
--- a/Mk/bsd.sites.mk
+++ b/Mk/bsd.sites.mk
@@ -517,6 +517,7 @@ MASTER_SITE_GENTOO+= \
# Using the name of a branch here is incorrect. It is
# possible to do GH_TAGNAME= GIT_HASH to do a snapshot.
# default: ${DISTVERSION}
+# GH_TUPLE - above shortened to account:project:tagname[:group]
#
.if defined(USE_GITHUB)
. if defined(GH_TAGNAME) && ${GH_TAGNAME} == master
@@ -524,6 +525,11 @@ IGNORE?= Using master as GH_TAGNAME is invalid. \
Must use a tag or commit hash so the upstream does \
not "reroll" as soon as the branch is updated
. endif
+. if defined(GH_TUPLE)
+GH_ACCOUNT+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\1\4@}
+GH_PROJECT+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\2\4@}
+GH_TAGNAME+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\3\4@}
+. endif
# We are cheating and using backend URLS for Github here. See ports/194898
# comment #15 for explanation as to why and how to deal with it if it breaks.
MASTER_SITE_GITHUB+= https://codeload.github.com/%SUBDIR%