Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 May 2015 13:07:33 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r387852 - in head: . Mk
Message-ID:  <201505291307.t4TD7XTu048599@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Fri May 29 13:07:33 2015
New Revision: 387852
URL: https://svnweb.freebsd.org/changeset/ports/387852

Log:
  Introduce USE_GITHUB=nodefault to allow fetching additional distfiles
  from github, but not the default one.
  
  With hat:	portmgr
  Sponsored by:	Absolight

Modified:
  head/CHANGES
  head/Mk/bsd.port.mk
  head/Mk/bsd.sites.mk

Modified: head/CHANGES
==============================================================================
--- head/CHANGES	Fri May 29 12:17:00 2015	(r387851)
+++ head/CHANGES	Fri May 29 13:07:33 2015	(r387852)
@@ -10,6 +10,13 @@ in the release notes and/or placed into 
 
 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
   

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Fri May 29 12:17:00 2015	(r387851)
+++ head/Mk/bsd.port.mk	Fri May 29 13:07:33 2015	(r387852)
@@ -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

Modified: head/Mk/bsd.sites.mk
==============================================================================
--- head/Mk/bsd.sites.mk	Fri May 29 12:17:00 2015	(r387851)
+++ head/Mk/bsd.sites.mk	Fri May 29 13:07:33 2015	(r387852)
@@ -520,7 +520,7 @@ IGNORE?=	Using master as GH_TAGNAME is i
 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}-${
 .    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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505291307.t4TD7XTu048599>