aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2015-05-29 13:07:33 +0000
committerMathieu Arnold <mat@FreeBSD.org>2015-05-29 13:07:33 +0000
commit70444a23e61ceee0e0b4a7c23a7895451a2b93e7 (patch)
tree97b28993c4116f294681fcd4e64c4ff60c8a87f1
parent65089af011a5f0df2d729dfaebf7d6a93091f96a (diff)
downloadports-70444a23e61ceee0e0b4a7c23a7895451a2b93e7.tar.gz
ports-70444a23e61ceee0e0b4a7c23a7895451a2b93e7.zip
Introduce USE_GITHUB=nodefault to allow fetching additional distfiles
from github, but not the default one. With hat: portmgr Sponsored by: Absolight
Notes
Notes: svn path=/head/; revision=387852
-rw-r--r--CHANGES7
-rw-r--r--Mk/bsd.port.mk4
-rw-r--r--Mk/bsd.sites.mk8
3 files changed, 14 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index f440d7183b32..1ded043feb2c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,13 @@ in the release notes and/or placed into UPDATING.
All ports committers are allowed to commit to this file.
+20150529:
+AUTHOR: mat@FreeBSD.org
+
+ Extend the multiple distfiles USE_GITHUB framework by allowing it to fetch
+ only additional distfiles, but not the main one. Set USE_GITHUB=nodefault
+ and use the GH_* variables with groups as usual.
+
20150528:
AUTHOR: mat@FreeBSD.org
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 53d098535af2..c14c8cc8bb54 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1316,7 +1316,7 @@ _SUF2= ,${PORTEPOCH}
PKGVERSION= ${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2}
PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION}
DISTVERSIONFULL= ${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX}
-.if defined(USE_GITHUB) && empty(MASTER_SITES:MGHC) && empty(DISTNAME)
+.if defined(USE_GITHUB) && empty(MASTER_SITES:MGHC) && empty(DISTNAME) && empty(USE_GITHUB:Mnodefault)
_GITHUB_MUST_SET_DISTNAME= yes
.else
DISTNAME?= ${PORTNAME}-${DISTVERSIONFULL}
@@ -5376,7 +5376,7 @@ _CHECK_CONFIG_ERROR= true
.if !target(check-config)
check-config: _check-config
-.if !empty(_CHECK_CONFIG_ERROR)
+.if !empty(_CHECK_CONFIG_ERROR) && !defined(IGNORE_INVALID_CONFIG)
@${FALSE}
.endif
.endif # check-config
diff --git a/Mk/bsd.sites.mk b/Mk/bsd.sites.mk
index f6a1ab7969d3..88e551ba0e4e 100644
--- a/Mk/bsd.sites.mk
+++ b/Mk/bsd.sites.mk
@@ -520,7 +520,7 @@ IGNORE?= Using master as GH_TAGNAME is invalid. \
MASTER_SITE_GITHUB+= https://codeload.github.com/%SUBDIR%
MASTER_SITE_GITHUB_CLOUD+= http://cloud.github.com/downloads/%SUBDIR%
-. if !defined(MASTER_SITES) || !${MASTER_SITES:MGH} && !${MASTER_SITES:MGHC}
+. if !defined(MASTER_SITES) || !${MASTER_SITES:MGH} && !${MASTER_SITES:MGHC} && !${USE_GITHUB:Mnodefault}
MASTER_SITES+= GH
. endif
_GH_ACCOUNT_DEFAULT= ${PORTNAME}
@@ -603,6 +603,7 @@ GH_TAGNAME_SANITIZED= ${GH_TAGNAME:S,/,-,}
# and extraction directory.
GH_TAGNAME_EXTRACT= ${GH_TAGNAME_SANITIZED:C/^[vV]([0-9])/\1/}
. endif
+_GITHUB_REV= 0
. if defined(_GITHUB_MUST_SET_DISTNAME)
# GH_TAGNAME defaults to DISTVERSIONFULL; Avoid adding DISTVERSIONFULL in twice
. if ${GH_TAGNAME} != ${DISTVERSIONFULL}
@@ -610,20 +611,21 @@ DISTNAME= ${GH_ACCOUNT}-${GH_PROJECT}-${DISTVERSIONFULL}-${GH_TAGNAME_SANITIZED}
. else
DISTNAME= ${GH_ACCOUNT}-${GH_PROJECT}-${GH_TAGNAME_SANITIZED}
. endif
-. endif
# This new scheme rerolls distfiles. Also ensure they are renamed to avoid
# conflicts. Use _GITHUB_REV in case github changes their zipping or structure
# which has happened before.
-_GITHUB_REV= 0
. if ${MASTER_SITES:MGH}
DISTNAME:= ${DISTNAME}_GH${_GITHUB_REV}
. endif
+. endif
.endif
_GITHUB_EXTRACT_SUFX= .tar.gz
# If there are non default groups
.if !empty(_GITHUB_GROUPS:NDEFAULT)
# Put the DEFAULT distfile first
+.if !${USE_GITHUB:Mnodefault}
DISTFILES+= ${DISTNAME}${_GITHUB_EXTRACT_SUFX}
+.endif
# Then for each of the remaining groups, add DISTFILES and MASTER_SITES
# entries with the correct group and create {WRKSRC,DISTNAME,DISTFILES}_group
# helper variables.