[BACK]Return to bsd.fetch-vars.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / mk / fetch

File: [cvs.NetBSD.org] / pkgsrc / mk / fetch / bsd.fetch-vars.mk (download)

Revision 1.22, Sun Sep 13 15:03:57 2015 UTC (4 years, 4 months ago) by joerg
Branch: MAIN
CVS Tags: pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3
Changes since 1.21: +7 -1 lines

Introduce IGNORE_INTERACTIVE_FETCH to allow trying to fetch files from
the override site, even for INTERACTIVE_STATE=stage or FETCH_MESSAGE.
Ignore all backup sites as they won't have the distfile anyway, the
fetch wouldn't be interactive in first place otherwise.

# $NetBSD: bsd.fetch-vars.mk,v 1.22 2015/09/13 15:03:57 joerg Exp $
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
# bsd.fetch.mk is included.
# The following variables may be set by the user:
#    DISTDIR is the top-level directory into which all original
#	distribution files are fetched.
#    DIST_PATH is a list of directories, separated by colons, in which
#	the distribution files are looked up, additionally to DISTDIR.
#	No files will ever be created in these directories.
#    POST_FETCH_HOOK is a program to execute after fetch successfully
#	obtained a file.  It is called with the relative path of the distfile
#	in ${DISTDIR} and the full URL it was obtained from.
#    IGNORE_INTERACTIVE_FETCH can be set to yes to skip the normal
#	interactive check logic and tries any provided MASTER_SITE
#	The normal backup sites are explicitly disabled in this case.
# The following variables may be set in a package Makefile:
#    DIST_SUBDIR is the subdirectory of ${DISTDIR} in which the original
#	distribution files for the package are fetched.
#    DISTFILES is the list of distribution files that are fetched.
# System-provided variables:
#	The default value for DISTFILES. This can be used when you need
#	more than the usual distfiles.

_VARGROUPS+=		fetch

# The default DISTDIR is currently set in bsd.prefs.mk.
#DISTDIR?=               ${PKGSRCDIR}/distfiles

.if defined(DISTNAME) && !empty(DISTNAME)
.  if defined(GITHUB_TAG) && !empty(GITHUB_TAG:M[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]*)
# If the github tag is a git hash (7 or more hex digits), encode it in the
# distfile name. It would be better to use ${_GITHUB_DEFAULT_DISTFILES} here,
# but that gets assigned much later.
.  else
.  endif

# File lists, defined early to allow tool dependencies.
ALLFILES:=	${ALLFILES:O:u}		# remove duplicates
.for __tmp__ in ${IGNOREFILES}

# List of all files, with ${DIST_SUBDIR} in front.  Used for fetch and checksum.
.if defined(DIST_SUBDIR) && !empty(DIST_SUBDIR)
_ALLFILES:=	${_ALLFILES:O:u}	# remove duplicates


# When mirroring distfiles which others may fetch, only fetch the
# distfiles if it is allowed to be re-distributed freely.  Also,
# suppress some bootstrap-depends output.
.if make(mirror-distfiles)
NO_SKIP=		# defined

.if !empty(_CKSUMFILES) && defined(FAILOVER_FETCH)
USE_TOOLS+=	digest:bootstrap

_FETCH_TOOLS.ftp=		ftp
_FETCH_TOOLS.fetch=		fetch
_FETCH_TOOLS.wget=		wget
_FETCH_TOOLS.curl=		curl
_FETCH_TOOLS.manual=		false

.if !empty(_ALLFILES)
USE_TOOLS+=	${_FETCH_TOOLS.${FETCH_USING}:C/$/:bootstrap/}