aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2021-06-01 07:21:25 +0000
committerMathieu Arnold <mat@FreeBSD.org>2021-06-01 07:29:26 +0000
commitb0ea84fccb6dcaa61190fc9052aaad6e5e4f7806 (patch)
tree2aad5b5a4a657090286ca51b8406194bf2d46350 /Mk
parent422dabd2a3854dbbcfd7360c32a4a4f049b5cffc (diff)
downloadports-b0ea84fccb6dcaa61190fc9052aaad6e5e4f7806.tar.gz
ports-b0ea84fccb6dcaa61190fc9052aaad6e5e4f7806.zip
Mk/bsd.sites.mk: Fixup USE_GITHUB code.
This mainly synchronize the subgroups GH_TAGNAME_${_group}_* variables with their default GH_TAGNAME_* equivalent. In order to try and avoid this in the future, add a couple of comments where those two sets of variables are defined. PR: 256314 Reported by: yuri
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.sites.mk8
1 files changed, 6 insertions, 2 deletions
diff --git a/Mk/bsd.sites.mk b/Mk/bsd.sites.mk
index ba3124b51421..c15447a0afe1 100644
--- a/Mk/bsd.sites.mk
+++ b/Mk/bsd.sites.mk
@@ -431,6 +431,8 @@ GH_PROJECT:= ${GH_PROJECT_DEFAULT}
GH_TAGNAME:= ${GH_TAGNAME_DEFAULT}
GH_SUBDIR:= ${GH_SUBDIR_DEFAULT}
. if defined(GH_TAGNAME)
+# If you change either of the _SANITIZED or _EXTRACT variables, please keep the
+# changes in sync with the GH_TAGNAME_${_group}_* variables 50 lines below.
GH_TAGNAME_SANITIZED= ${GH_TAGNAME:S,/,-,g}
# GitHub silently converts tags starting with v to not have v in the filename
# and extraction directory. It also replaces + with -.
@@ -476,8 +478,10 @@ post-extract-gh-DEFAULT:
GH_ACCOUNT_${_group}?= ${GH_ACCOUNT_DEFAULT}
GH_PROJECT_${_group}?= ${GH_PROJECT_DEFAULT}
GH_TAGNAME_${_group}?= ${GH_TAGNAME_DEFAULT}
-GH_TAGNAME_${_group}_SANITIZED= ${GH_TAGNAME_${_group}:S,/,-,}
-GH_TAGNAME_${_group}_EXTRACT= ${GH_TAGNAME_${_group}_SANITIZED:C/^[vV]([0-9])/\1/}
+# If you change either of the _SANITIZED or _EXTRACT variables, please keep the
+# changes in sync with the GH_TAGNAME_* variables 50 lines above.
+GH_TAGNAME_${_group}_SANITIZED= ${GH_TAGNAME_${_group}:S,/,-,g}
+GH_TAGNAME_${_group}_EXTRACT= ${GH_TAGNAME_${_group}_SANITIZED:C/^[vV]([0-9])/\1/:S/+/-/g:C/--*/-/g}
_GH_TUPLE_OUT:= ${_GH_TUPLE_OUT} ${GH_ACCOUNT_${_group}}:${GH_PROJECT_${_group}}:${GH_TAGNAME_${_group}}:${_group}/${GH_SUBDIR_${_group}}
DISTNAME_${_group}:= ${GH_ACCOUNT_${_group}}-${GH_PROJECT_${_group}}-${GH_TAGNAME_${_group}_SANITIZED}
DISTFILE_${_group}:= ${DISTNAME_${_group}}_GH${_GITHUB_REV}${_GITHUB_EXTRACT_SUFX}