aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.sites.mk
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2015-03-19 16:44:57 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2015-03-19 16:44:57 +0000
commit5b5a90256d9755a00d1a5d92efd4d47f9d247b15 (patch)
tree333dad5fd09a8658c4b53e58bbde008b7586e472 /Mk/bsd.sites.mk
parent82e24a82be1bc65636fc7844107ef13afcddd862 (diff)
downloadports-5b5a90256d9755a00d1a5d92efd4d47f9d247b15.tar.gz
ports-5b5a90256d9755a00d1a5d92efd4d47f9d247b15.zip
Update USE_GITHUB so it does not require GH_COMMIT.
Using this new scheme allows only setting the _tag_ or _commit hash_ in GH_TAGNAME and not having to know the hash for a tag. This scheme will download a tarball that has a different checksum than before due to a changed directory name for extraction. The following MASTER_SITES are provided to retain the old checksum and directory structure (that require GH_COMMIT): GH -> GHL GITHUB -> GITHUB_LEGACY Differential Revision: https://reviews.freebsd.org/D748 Submitted by: amdmi3 Reviewed by: mat, swills, antoine, bdrewery With hat: portmgr
Notes
Notes: svn path=/head/; revision=381618
Diffstat (limited to 'Mk/bsd.sites.mk')
-rw-r--r--Mk/bsd.sites.mk27
1 files changed, 18 insertions, 9 deletions
diff --git a/Mk/bsd.sites.mk b/Mk/bsd.sites.mk
index b74c1d17c3d4..22044a90618c 100644
--- a/Mk/bsd.sites.mk
+++ b/Mk/bsd.sites.mk
@@ -524,22 +524,29 @@ MASTER_SITE_GENTOO+= \
#
# GH_COMMIT - first 7 digits of the commit that generated GH_TAGNAME
# (man git-describe(1))
-# default: not set, mandatory
+# if this is not set, archive corresponding to tag is fetched
+# default: not set
#
.if defined(USE_GITHUB)
-.if defined(GH_TAGNAME) && ${GH_TAGNAME} == master
+. if defined(GH_TAGNAME) && ${GH_TAGNAME} == master
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
-MASTER_SITE_GITHUB+= https://codeload.github.com/%SUBDIR% \
- http://codeload.github.com/%SUBDIR%
+. endif
+MASTER_SITE_GITHUB+= https://codeload.github.com/%SUBDIR%
MASTER_SITE_GITHUB_CLOUD+= http://cloud.github.com/downloads/%SUBDIR%
+MASTER_SITE_GITHUB_LEGACY+= https://codeload.github.com/%SUBDIR%
MASTER_SITE_GITHUB_RELEASE+= https://github.com/%SUBDIR%
-.if !defined(MASTER_SITES) || !${MASTER_SITES:MGH} && !${MASTER_SITES:MGHC} && !${MASTER_SITES:MGHR}
-MASTER_SITES+= GH GHC GHR
-.endif
+. if defined(GH_COMMIT)
+. if !defined(MASTER_SITES) || !${MASTER_SITES:MGHL}
+MASTER_SITES+= GHL
+. endif
+. else
+. if !defined(MASTER_SITES) || !${MASTER_SITES:MGH} && !${MASTER_SITES:MGHC} && !${MASTER_SITES:MGHR}
+MASTER_SITES+= GH
+. endif
+. endif
GH_ACCOUNT?= ${PORTNAME}
GH_PROJECT?= ${PORTNAME}
GH_TAGNAME?= ${DISTVERSION}
@@ -1486,6 +1493,7 @@ MASTER_SITE_KERNEL_ORG+= \
MASTER_SITES_ABBREVS= CPAN:PERL_CPAN \
GH:GITHUB \
GHC:GITHUB_CLOUD \
+ GHL:GITHUB_LEGACY \
GHR:GITHUB_RELEASE \
LODEV:LIBREOFFICE_DEV \
NL:NETLIB \
@@ -1499,8 +1507,9 @@ MASTER_SITES_SUBDIRS= APACHE_JAKARTA:${PORTNAME:S,-,/,}/source \
CSME:myports \
DEBIAN:pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME} \
GCC:releases/${DISTNAME} \
- GITHUB:${GH_ACCOUNT}/${GH_PROJECT}/legacy.tar.gz/${GH_TAGNAME}?dummy=/ \
+ GITHUB:${GH_ACCOUNT}/${GH_PROJECT}/tar.gz/${GH_TAGNAME}?dummy=/ \
GITHUB_CLOUD:${GH_ACCOUNT}/${GH_PROJECT}/ \
+ GITHUB_LEGACY:${GH_ACCOUNT}/${GH_PROJECT}/legacy.tar.gz/${GH_TAGNAME}?dummy=/ \
GITHUB_RELEASE:${GH_ACCOUNT}/${GH_PROJECT}/archive/${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX}${EXTRACT_SUFX}?dummy=/ \
GNOME:sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} \
GIMP:${PORTNAME}/${PORTVERSION:R}/ \