aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.sites.mk
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2016-06-19 19:25:44 +0800
committermat <mat@FreeBSD.org>2016-06-19 19:25:44 +0800
commitf29308cd2c448c2843ab3f7fdfbd3e40566c0e25 (patch)
tree976c7ab510c8828deef279082e23b0e38a358680 /Mk/bsd.sites.mk
parent4355a44f5fcc35a912543d35ebe0da429206a74e (diff)
downloadfreebsd-ports-gnome-f29308cd2c448c2843ab3f7fdfbd3e40566c0e25.tar.gz
freebsd-ports-gnome-f29308cd2c448c2843ab3f7fdfbd3e40566c0e25.tar.zst
freebsd-ports-gnome-f29308cd2c448c2843ab3f7fdfbd3e40566c0e25.zip
Add a few checks for (MASTER|PATCH)_SITES groups.
While make(1) is ok with variable names having quite a lot of strange characters in them, the fetch code mostly uses sh(1), where variable names can't include a dash (or pluses, or many other things). PR: 210251 210198 Submitted by: mat Exp-run by: antoine Sponsored by: The FreeBSD Foundation, Absolight Differential Revision: https://reviews.freebsd.org/D6779
Diffstat (limited to 'Mk/bsd.sites.mk')
-rw-r--r--Mk/bsd.sites.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/Mk/bsd.sites.mk b/Mk/bsd.sites.mk
index f516023000a7..94fa6805aa04 100644
--- a/Mk/bsd.sites.mk
+++ b/Mk/bsd.sites.mk
@@ -522,6 +522,15 @@ IGNORE?= Using master as GH_TAGNAME is invalid. \
not "reroll" as soon as the branch is updated
. endif
. if defined(GH_TUPLE)
+.for _tuple in ${GH_TUPLE}
+_t_tmp=${_tuple}
+.if ${_t_tmp:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\4@:S/://:C/[a-zA-Z0-9_]//g}
+check-makevars::
+ @${ECHO_MSG} "The ${_tuple} GH_TUPLE line has"
+ @${ECHO_MSG} "a tag containing something else than [a-zA-Z0-9_]"
+ @${FALSE}
+.endif
+.endfor
GH_ACCOUNT+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\1\4@}
GH_PROJECT+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\2\4@}
GH_TAGNAME+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\3\4@}