Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

View File

@@ -0,0 +1,89 @@
# $NetBSD: bsd.fetch-vars.mk,v 1.14 2012/07/27 10:48:36 jperkin 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.
#
# 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:
#
# DEFAULT_DISTFILES
# The default value for DISTFILES. This can be used when you need
# more than the usual distfiles.
#
_VARGROUPS+= fetch
_USER_VARS.fetch= DISTDIR DIST_PATH
_PKG_VARS.fetch= MASTER_SITES DIST_SUBDIR DISTFILES
_SYS_VARS.fetch= DEFAULT_DISTFILES
# The default DISTDIR is currently set in bsd.prefs.mk.
#DISTDIR?= ${PKGSRCDIR}/distfiles
_DISTDIR= ${DISTDIR}/${DIST_SUBDIR}
DEFAULT_DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
DISTFILES?= ${DEFAULT_DISTFILES}
# File lists, defined early to allow tool dependencies.
ALLFILES?= ${DISTFILES} ${PATCHFILES}
ALLFILES:= ${ALLFILES:O:u} # remove duplicates
CKSUMFILES?= ${ALLFILES}
.for __tmp__ in ${IGNOREFILES}
CKSUMFILES:= ${CKSUMFILES:N${__tmp__}}
.endfor
# List of all files, with ${DIST_SUBDIR} in front. Used for fetch and checksum.
.if defined(DIST_SUBDIR) && !empty(DIST_SUBDIR)
_CKSUMFILES?= ${CKSUMFILES:@.f.@${DIST_SUBDIR}/${.f.}@}
_DISTFILES?= ${DISTFILES:@.f.@${DIST_SUBDIR}/${.f.}@}
_IGNOREFILES?= ${IGNOREFILES:@.f.@${DIST_SUBDIR}/${.f.}@}
_PATCHFILES?= ${PATCHFILES:@.f.@${DIST_SUBDIR}/${.f.}@}
.else
_CKSUMFILES?= ${CKSUMFILES}
_DISTFILES?= ${DISTFILES}
_IGNOREFILES?= ${IGNOREFILES}
_PATCHFILES?= ${PATCHFILES}
.endif
_ALLFILES?= ${_DISTFILES} ${_PATCHFILES}
_ALLFILES:= ${_ALLFILES:O:u} # remove duplicates
_BUILD_DEFS+= _DISTFILES _PATCHFILES
# 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
_BOOTSTRAP_VERBOSE= # defined
.endif
.if !empty(_CKSUMFILES) && defined(FAILOVER_FETCH)
USE_TOOLS+= digest:bootstrap
.endif
_FETCH_TOOLS.ftp= ftp
_FETCH_TOOLS.fetch= fetch
_FETCH_DEPENDS.wget= wget-[0-9]*:../../net/wget
_FETCH_TOOLS.curl= curl
_FETCH_TOOLS.manual= false
.if !empty(_ALLFILES)
USE_TOOLS+= ${_FETCH_TOOLS.${FETCH_USING}:C/$/:bootstrap/}
BOOTSTRAP_DEPENDS+= ${_FETCH_DEPENDS.${FETCH_USING}}
.endif

40
mk/fetch/bsd.fetch.mk Normal file
View File

@@ -0,0 +1,40 @@
# $NetBSD: bsd.fetch.mk,v 1.7 2009/07/15 09:40:30 joerg Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and defines the
# relevant variables and targets for the "fetch" step.
#
# The following are the "public" targets provided by this module:
#
# fetch:
# Downloads all required distfiles for the current package.
#
# fetch-list:
# Prints a shell script to the standard output that will download
# the distfiles.
#
# depends-fetch:
# Run fetch for the current package and all dependencies.
#
# The following targets may be overridden in a package Makefile:
#
# pre-fetch:
# Can be used to prepare downloading the distfiles.
#
# Default action: Nothing.
#
# do-fetch:
# Downloads the distfiles and patches.
#
# Default action (roughly): Downloads all DISTFILES from
# MASTER_SITES and puts them into DISTDIR.
#
# post-fetch:
# Can be used to do something with the downloaded files.
#
# Default action: Nothing.
#
.include "sites.mk"
.include "fetch.mk"
.include "fetch-list.mk"
.include "distclean.mk"

26
mk/fetch/distclean.mk Normal file
View File

@@ -0,0 +1,26 @@
# $NetBSD: distclean.mk,v 1.5 2007/12/16 02:51:24 obache Exp $
#
# === make targets for pkgsrc users ===
#
# distclean:
# Removes the distfiles of the current package.
#
.PHONY: pre-distclean
.if !target(pre-distclean)
pre-distclean:
@${DO_NADA}
.endif
.PHONY: distclean
.if !target(distclean)
distclean: pre-distclean clean
@${PHASE_MSG} "Dist cleaning for ${PKGNAME}"
${RUN} [ -d ${_DISTDIR} ] || exit 0; \
cd ${_DISTDIR}; \
${RM} -f ${ALLFILES} ${ALLFILES:S/$/.pkgsrc.resume/}
. if defined(DIST_SUBDIR)
${RUN} ${RMDIR} ${_DISTDIR} 2>/dev/null || ${TRUE}
. endif
${RUN} ${RM} -f README.html
.endif

308
mk/fetch/fetch Executable file
View File

@@ -0,0 +1,308 @@
#!/bin/sh
#
# $NetBSD: fetch,v 1.15 2013/02/16 07:32:28 obache Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
#
# This code is derived from software contributed to The NetBSD Foundation
# by Johnny C. Lam.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the NetBSD
# Foundation, Inc. and its contributors.
# 4. Neither the name of The NetBSD Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
######################################################################
#
# NAME
# fetch -- fetch files via URLs
#
# SYNOPSIS
# fetch [-c] [-d dir] [-f distinfo] [-r] [-v] file site ...
#
# DESCRIPTION
# fetch will attempt to fetch the file from the list of specified
# sites in the order given. The complete URL to the file on each
# site should be the concatenation of the specified site and file.
# If the file cannot be fetched successfully, then we try the next
# listed site.
#
# If the file already exists on the disk and is verified, then
# no fetch action is taken.
#
# OPTIONS
# -c Verify the checksum for the file. If the checksum
# does not match, then the fetch is determined to be
# not successful.
#
# -d dir Fetch the files into the specified directory.
#
# -f distinfo
# The path to the distinfo file containing the checksums
# for the file. The file format should match what is
# needed by the pkgsrc/mk/checksum/checksum script.
#
# -r Resume a previous fetch for the file. In this case,
# the file is first saved to a ".pkgsrc.resume" file,
# and is later renamed to the final file name if the
# complete file has been sucessfully fetched.
#
# -v Show the actual command line used to fetch the file
# from each site.
#
# ENVIRONMENT
# PKGSRCDIR This is a hint to help locate the default
# checksum script.
#
# CHECKSUM This is the path to the checksum script used
# when "-c" is specified.
#
# FETCH_CMD This is the actual command used for transferring
# files from the various sites.
#
# The following are lists of options to pass to ${FETCH_CMD}:
#
# FETCH_BEFORE_ARGS
# These options appear before all other options.
#
# FETCH_AFTER_ARGS
# These options appear after all other options.
#
# FETCH_RESUME_ARGS
# These options appear just after FETCH_BEFORE_ARGS
# options and cause ${FETCH_CMD} to resume a
# previous file transfer.
#
# FETCH_OUTPUT_ARGS
# These options specify the name of the local file
# that will hold the contents of the fetched file.
#
######################################################################
: ${PKGSRCDIR:=/usr/pkgsrc}
: ${CHECKSUM:=${PKGSRCDIR}/mk/checksum/checksum}
: ${CP:=cp}
: ${ECHO:=echo}
: ${FETCH_CMD:=ftp}
: ${MKDIR:=mkdir}
: ${MV:=mv}
: ${TEST:=test}
: ${TOUCH:=touch}
: ${WC:=wc}
self="${0##*/}"
usage() {
${ECHO} 1>&2 "usage: $self [-c] [-d dir] [-f distinfo] [-r] [-v] file site ..."
}
# Process optional arguments
checksum=
distinfo=
fetchdir=. # A relative directory or "."
resume=
verbose=
while ${TEST} $# -gt 0; do
case "$1" in
-c) checksum=yes; shift ;;
-d) fetchdir="$2"; shift 2 ;;
-f) distinfo="$2"; shift 2 ;;
-r) resume=yes; shift ;;
-v) verbose=yes; shift ;;
--) shift; break ;;
-*) ${ECHO} 1>&2 "$self: unknown option -- ${1#-}"
usage
exit 1
;;
*) break ;;
esac
done
if ${TEST} -n "$checksum" -a -z "$distinfo"; then
${ECHO} 1>&2 "$self: \`\`-c'' requires \`\`-f distinfo''."
exit 1
fi
if ${TEST} -n "$resume"; then
if ${TEST} -z "$distinfo"; then
${ECHO} 1>&2 "$self: \`\`-r'' requires \`\`-f distinfo''."
resume=
elif ${TEST} "x${FETCH_RESUME_ARGS}" = "x"; then
${ECHO} 1>&2 "$self: \`\`-r'' requires FETCH_RESUME_ARGS to be non-empty."
resume=
fi
${TEST} -n "$resume" ||
${ECHO} 1>&2 "$self: Falling back to non-resume fetch."
fi
# Process required arguments
if ${TEST} $# -lt 2; then
usage
exit 1
fi
file="$1"; shift
path="$fetchdir/$file"
if ${TEST} -n "$distinfo" && ${TEST} ! -f "$distinfo"; then
${ECHO} 1>&2 "$self: distinfo file missing: $distinfo"
exit 1
fi
# Compute the expected size of the fetched file.
distsize=
distunits=
if ${TEST} -n "$distinfo"; then
while read d_type d_file d_equals d_size d_units; do
case "$d_type" in
Size) ;; # only handle "Size" lines
*) continue ;;
esac
case "$fetchdir" in
".") ${TEST} "$d_file" = "($file)" || continue ;;
*) ${TEST} "$d_file" = "($path)" || continue ;;
esac
distsize="$d_size"; distunits="$d_units"
break
done < $distinfo
fi
# verify_file [-v] $file
# If we can checksum the file, then see if it matches the listed
# checksums in the distinfo file. If we can check the size, then
# check that instead. We strip off ".pkgsrc.resume" from the
# filename so that we can verify the checksum for the temporary
# fetch file as well.
#
verify_file() {
_if_verbose=:; if [ "x$1" = "x-v" ]; then shift; _if_verbose=; fi
_file="${1#./}"
${TEST} -f $_file || {
$_if_verbose ${ECHO} 1>&2 "$self: File $_file does not exist."
return 1
}
if ${TEST} -n "$checksum"; then
${CHECKSUM} -s ".pkgsrc.resume" $distinfo ${_file} || {
$_if_verbose ${ECHO} 1>&2 "$self: Checksum of the file $_file doesn't match."
return 1
}
return 0
elif ${TEST} -n "$distsize"; then
_size=`${WC} -c < $_file`
${TEST} "$_size" -eq "$distsize" || {
$_if_verbose ${ECHO} 1>&2 "$self: Size of the file $_file doesn't match."
return 1
}
return 0
fi
return 0;
}
# If the file already exists and it verifies, then we don't need to fetch
# it again.
#
if verify_file $path; then
exit 0
fi
${TEST} -d $fetchdir || ${MKDIR} -p $fetchdir 2>/dev/null
if ${TEST} ! -w $fetchdir; then
${ECHO} 1>&2 "$self: Cannot write to `cd $fetchdir && pwd`"
exit 1
fi
# Set the name of the output file. In the "resume" case, we initialize
# the fetch loop by ensuring that the temporary output file already
# exists.
#
outputfile="$file"
outputpath="$fetchdir/$outputfile"
if ${TEST} -n "$resume"; then
outputfile="${file}.pkgsrc.resume"
outputpath="$fetchdir/$outputfile"
if ${TEST} ! -f $outputpath; then
if ${TEST} -f $path; then
${CP} -f $path $outputpath
else
${RM} -f $outputpath
${TOUCH} $outputpath
fi
fi
#
# If the temporary file verifies, then we don't need to resume
# fetching it.
#
if verify_file $outputpath; then
${MV} -f $outputpath $path
exit 0
fi
size=`${WC} -c < $outputpath`
${ECHO} "=> Downloaded size: $size bytes"
fi
${TEST} -z "$distsize" || ${ECHO} "=> Total size: $distsize $distunits"
# Iterate over each site and try to fetch the file. We verify the fetched
# file to see if we need to try fetching from the next site.
#
while ${TEST} $# -gt 0; do
site="$1"; shift
case "$site" in
-*)
url=${site#-}
;;
*)
url=$site$file
;;
esac
( cd $fetchdir
if ${TEST} -n "$resume"; then
fetch_cmd="${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${FETCH_RESUME_ARGS} ${FETCH_OUTPUT_ARGS} $outputfile $url"
else
fetch_cmd="${FETCH_CMD} ${FETCH_BEFORE_ARGS} ${FETCH_OUTPUT_ARGS} $outputfile $url ${FETCH_AFTER_ARGS}"
fi
${TEST} -z "$verbose" || ${ECHO} "$fetch_cmd"
$fetch_cmd )
if ${TEST} $? -ne 0; then
${ECHO} 1>&2 "$self: Unable to fetch expected file $file"
continue
fi
if verify_file -v $outputpath; then
${TEST} -z "$resume" || ${MV} -f $outputpath $path
break
fi
if ${TEST} -n "$resume"; then
if ${TEST} -f $path; then
${CP} -f $path $outputpath
else
${TOUCH} $outputpath
fi
fi
done
if ${TEST} -f $path; then
exit 0
else
exit 1
fi

109
mk/fetch/fetch-list.mk Normal file
View File

@@ -0,0 +1,109 @@
# $NetBSD: fetch-list.mk,v 1.14 2011/06/19 10:23:56 plunky Exp $
######################################################################
### fetch-list (PUBLIC)
######################################################################
### fetch-list is a public target to print out a standalone shell
### script to fetch all distfiles needed to build the package,
### including distfiles needed by dependencies. This script does not
### perform any checksumming of the distfiles and does not resume
### interrupted file transfers.
###
.PHONY: fetch-list
fetch-list: fetch-list-header fetch-list-recursive
######################################################################
### fetch-list-header (PRIVATE)
######################################################################
### fetch-list-header prints out the preamble comments for the
### fetch-list shell script.
###
.PHONY: fetch-list-header
fetch-list-header:
@${ECHO} '#!/bin/sh'
@${ECHO} '#'
@${ECHO} '# This is an auto-generated script, the result of running'
@${ECHO} '# `${MAKE} fetch-list'"'"' in directory "'"`${PWD_CMD}`"'"'
@${ECHO} '# on host "'"`${UNAME} -n`"'" on "'"`date`"'".'
@${ECHO} '#'
######################################################################
### fetch-list-recursive (PRIVATE)
######################################################################
### fetch-list-recursive outputs the heart of the shell script by
### looping over all package directories for dependencies and
### outputting the shell script to fetch the distfiles for that
### dependency.
###
.PHONY: fetch-list-recursive
fetch-list-recursive:
@${_DEPENDS_WALK_CMD} -r ${PKGPATH} | \
while read dir; do \
( cd ../../$$dir && \
${RECURSIVE_MAKE} ${MAKEFLAGS} fetch-list-one-pkg | \
${AWK} '/^[^#]/ { FoundSomething = 1 } \
/^unsorted/ { gsub(/[[:space:]]+/, " \\\n\t") } \
/^echo/ { gsub(/;[[:space:]]+/, "\n") } \
{ block[line_c++] = $$0 } \
END { if (FoundSomething) \
for (line = 0; line < line_c; line++) \
print block[line] }' \
); \
done
######################################################################
### fetch-list-one-pkg (PRIVATE)
######################################################################
### fetch-list-one-pkg outputs the standalone shell script code to
### fetch the distfiles for the package.
###
.PHONY: fetch-list-one-pkg
fetch-list-one-pkg:
.if !empty(_ALLFILES) && empty(INTERACTIVE_STAGE:Mfetch)
@${ECHO}
@${ECHO} '#'
@location=`${PWD_CMD} | ${AWK} -F / '{ print $$(NF-1) "/" $$NF }'`; \
${ECHO} '# Need additional files for ${PKGNAME} ('$$location')...'
. for fetchfile in ${_ALLFILES}
. if exists(${DYNAMIC_SITES_SCRIPT})
@(if [ ! -f ${_DISTDIR}/${fetchfile:T} ]; then \
${ECHO}; \
filesize=`${AWK} ' \
/^Size/ && $$2 == "(${fetchfile})" { print $$4 } \
' ${DISTINFO_FILE}` || true; \
${ECHO} '# Fetch ${fetchfile} ('$${filesize-???}' bytes):'; \
${ECHO} '#'; \
${ECHO} '${SH} -s ${fetchfile:T} <<"EOF" |('; \
${CAT} ${DYNAMIC_SITES_SCRIPT}; \
${ECHO} EOF; \
${ECHO} read unsorted_sites; \
${ECHO} 'unsorted_sites="$${unsorted_sites} ${_MASTER_SITE_BACKUP}"'; \
${ECHO} sites='"'${_ORDERED_SITES:Q}'"'; \
${ECHO} "${MKDIR} ${_DISTDIR}"; \
${ECHO} 'cd ${_DISTDIR} && { [ -f ${fetchfile} -o -f ${fetchfile:T} ] ||'; \
${ECHO} 'for site in $$sites; do'; \
${ECHO} ' ${_FETCH_CMD.${FETCH_USING}} ${_FETCH_BEFORE_ARGS.${FETCH_USING}} ${_FETCH_OUTPUT_ARGS.${FETCH_USING}} ${fetchfile:T} "$${site}${fetchfile:T}" ${_FETCH_AFTER_ARGS.${FETCH_USING}} && break ||'; \
${ECHO} ' ${ECHO} ${fetchfile:T} not fetched'; \
${ECHO} 'done; }'; \
${ECHO} ')'; \
fi)
. else
@(if [ ! -f ${_DISTDIR}/${fetchfile:T} ]; then \
${ECHO}; \
filesize=`${AWK} ' \
/^Size/ && $$2 == "(${fetchfile})" { print $$4 } \
' ${DISTINFO_FILE}` || true; \
${ECHO} '# Fetch ${fetchfile} ('$${filesize-???}' bytes):'; \
${ECHO} '#'; \
${ECHO} 'unsorted_sites="${SITES.${fetchfile:T:S/=/--/}} ${_MASTER_SITE_BACKUP}"'; \
${ECHO} sites='"'${_ORDERED_SITES:Q}'"'; \
${ECHO} "${MKDIR} ${_DISTDIR}"; \
${ECHO} 'cd ${_DISTDIR} && { [ -f ${fetchfile} -o -f ${fetchfile:T} ] ||'; \
${ECHO} 'for site in $$sites; do'; \
${ECHO} ' ${_FETCH_CMD.${FETCH_USING}} ${_FETCH_BEFORE_ARGS.${FETCH_USING}} ${_FETCH_OUTPUT_ARGS.${FETCH_USING}} ${fetchfile:T} "$${site}${fetchfile:T}" ${_FETCH_AFTER_ARGS.${FETCH_USING}} && break ||'; \
${ECHO} ' ${ECHO} ${fetchfile:T} not fetched'; \
${ECHO} 'done; }'; \
fi)
. endif
. endfor
.endif

341
mk/fetch/fetch.mk Normal file
View File

@@ -0,0 +1,341 @@
# $NetBSD: fetch.mk,v 1.60 2013/02/16 07:32:28 obache Exp $
_MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP:=${DIST_SUBDIR}${DIST_SUBDIR:D/}}
_MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE:=${DIST_SUBDIR}${DIST_SUBDIR:D/}}
# Where to put distfiles that don't have any other master site
MASTER_SITE_LOCAL?= ${MASTER_SITE_BACKUP:=LOCAL_PORTS/}
# Set up _ORDERED_SITES to work out the exact list of sites for every file,
# using the dynamic sites script, or ordering according to the master site
# list, MASTER_SORT_RANDOM randomization feature, or the patterns in
# MASTER_SORT or MASTER_SORT_REGEX as appropriate.
# No actual sorting is done until _ORDERED_SITES is expanded.
#
.if defined(MASTER_SORT_RANDOM) && !empty(MASTER_SORT_RANDOM:M[yY][eE][sS])
_MASTER_RAND_AWK= BEGIN { srand(seed); ORS = " " } { \
n = split($$0, site); \
for (i = n; i > 0; i--) { \
ir = int(rand() * i + 1); \
t = site[i]; site[i] = site[ir]; site[ir] = t; \
print site[i]; } }
_RAND_SITES_CMD= | ${AWK} -v seed=$$$$ '${_MASTER_RAND_AWK}'
.endif
.if defined(MASTER_SORT) || defined(MASTER_SORT_REGEX)
MASTER_SORT?=
MASTER_SORT_REGEX?=
MASTER_SORT_REGEX+= ${MASTER_SORT:S/./\\./g:C/.*/:\/\/[^\/]*&\//}
_MASTER_SORT_AWK= BEGIN { RS = " "; ORS = " "; IGNORECASE = 1 ; gl = "${MASTER_SORT_REGEX:S/\\/\\\\/g}"; }
. for srt in ${MASTER_SORT_REGEX}
_MASTER_SORT_AWK+= /${srt:C/\//\\\//g}/ { good["${srt:S/\\/\\\\/g}"] = good["${srt:S/\\/\\\\/g}"] " " $$0 ; next; }
. endfor
_MASTER_SORT_AWK+= { rest = rest " " $$0; } END { n=split(gl, gla); for(i=1;i<=n;i++) { print good[gla[i]]; } print rest; }
_SORT_SITES_CMD= | ${AWK} '${_MASTER_SORT_AWK}'
.endif
.if defined(_RAND_SITES_CMD) || defined(_SORT_SITES_CMD)
_SORT_SITES_FULL_CMD= ${ECHO} $$unsorted_sites ${_RAND_SITES_CMD} ${_SORT_SITES_CMD}
_ORDERED_SITES= ${_MASTER_SITE_OVERRIDE} `${_SORT_SITES_FULL_CMD:S/\\/\\\\/g:C/"/\"/g}`
.else
_ORDERED_SITES= ${_MASTER_SITE_OVERRIDE} $$unsorted_sites
.endif
#
# Associate each file to fetch with the correct site(s).
#
DYNAMIC_SITES_SCRIPT?= ${FILESDIR}/getsite.sh
DYNAMIC_SITES_CMD?= ${PKGSRC_SETENV} PATH=${PATH:Q} ${SH} ${DYNAMIC_SITES_SCRIPT}
.if exists(${DYNAMIC_SITES_SCRIPT})
. for fetchfile in ${_ALLFILES}
SITES.${fetchfile:T:S/=/--/}?= `${DYNAMIC_SITES_CMD} ${fetchfile:T}`
. endfor
.endif
.if !empty(_DISTFILES)
. for fetchfile in ${_DISTFILES}
SITES.${fetchfile:T:S/=/--/}?= ${MASTER_SITES}
. endfor
.endif
.if !empty(_PATCHFILES)
. for fetchfile in ${_PATCHFILES}
SITES.${fetchfile:T:S/=/--/}?= ${PATCH_SITES}
. endfor
.endif
######################################################################
### fetch (PUBLIC)
######################################################################
### fetch is a public target to fetch all of the package distribution
### files.
###
_FETCH_TARGETS+= ${_PKG_INSTALL_DEPENDS:Dpkg_install-depends}
_FETCH_TARGETS+= bootstrap-depends
_FETCH_TARGETS+= check-vulnerable
_FETCH_TARGETS+= pre-fetch
_FETCH_TARGETS+= do-fetch
_FETCH_TARGETS+= post-fetch
.PHONY: fetch
.if !target(fetch)
fetch: ${_FETCH_TARGETS}
.endif
######################################################################
### pre-fetch, do-fetch, post-fetch (PUBLIC, override)
######################################################################
### {pre,do,post}-fetch are the heart of the package-customizable
### fetch targets, and may be overridden within a package Makefile.
###
.PHONY: pre-fetch do-fetch post-fetch
.if !target(do-fetch)
. if !empty(_ALLFILES)
do-fetch: ${_ALLFILES:S/^/${DISTDIR}\//}
@${DO_NADA}
. else
do-fetch:
@${DO_NADA}
. endif
.endif
.if !target(pre-fetch)
pre-fetch:
@${DO_NADA}
.endif
.if !target(post-fetch)
post-fetch:
@${DO_NADA}
.endif
.for _file_ in ${_ALLFILES}
. if empty(PKG_RESUME_TRANSFERS:M[yY][eE][sS]) && \
exists(${DISTDIR}/${_file_})
${DISTDIR}/${_file_}:
@${DO_NADA}
. else
${DISTDIR}/${_file_}: fetch-check-interactive do-fetch-file error-check
. endif
.endfor
######################################################################
### fetch-check-interactive (PRIVATE)
######################################################################
### fetch-check-interactive is a macro target that is inserted at the
### head of a target's command list, and will check whether the fetch
### stage for this package requires user interaction to proceed.
###
.PHONY: fetch-check-interactive
fetch-check-interactive: .USEBEFORE
.if !empty(INTERACTIVE_STAGE:Mfetch) && defined(BATCH) && !defined(FETCH_MESSAGE)
@${TEST} ! -f ${.TARGET} || exit 0; \
${ERROR_MSG} "The fetch stage of this package requires user interaction to download"; \
${ERROR_MSG} "the distfiles. Please fetch the distfiles manually and place them in:"; \
${ERROR_MSG} " ${_DISTDIR}"; \
if ${TEST} -n ${MASTER_SITES:Q}""; then \
${ERROR_MSG} "The distfiles are available from:"; \
for site in ${MASTER_SITES}; do \
${ERROR_MSG} " $$site"; \
done; \
fi; \
if ${TEST} -n ${HOMEPAGE:Q}""; then \
${ERROR_MSG} "See the following URL for more details:"; \
${ERROR_MSG} " "${HOMEPAGE:Q}; \
fi; \
exit 1
.elif defined(FETCH_MESSAGE) && !empty(FETCH_MESSAGE)
@${TEST} ! -f ${.TARGET} || exit 0; \
${ERROR_MSG} "======================================================================"; \
${ERROR_MSG} ""; \
for line in ${FETCH_MESSAGE}; do ${ERROR_MSG} "$$line"; done; \
${ERROR_MSG} ""; \
${ERROR_MSG} "======================================================================"; \
exit 1
.else
@${DO_NADA}
.endif
######################################################################
### do-fetch-file (PRIVATE)
######################################################################
### do-fetch-file is a macro target that runs the "fetch" script to
### transfer the files from the appropriate sites if needed.
###
#
# FETCH_CMD is the program used to fetch files for FETCH_USING=custom.
# It must understand fetching files located via URLs,
# e.g. NetBSD's ftp, net/tnftp, etc.
#
# The following variables are all lists of options to pass to the command
# used to do the actual fetching of the file.
#
# FETCH_BEFORE_ARGS appear before all other options on the command line.
#
# FETCH_AFTER_ARGS appear after all other options on the command line.
#
# FETCH_RESUME_ARGS appears just after FETCH_BEFORE_ARGS and is the set
# of options for causing the command to resume a previous transfer.
#
# FETCH_OUTPUT_ARGS is a set of options for specifying the name of the
# local file that will hold the contents of the fetched file.
#
# FAILOVER_FETCH, if defined, will cause a checksum to be performed during
# a fetch to verify the transferred file is correct; if the checksum
# is incorrect, then the next site will be tried.
#
# PKG_RESUME_TRANSFERS is a yes/no variable that causes the fetch script
# to try to resume interrupted file transfers to avoid downloading
# the whole file. The default is set in pkgsrc/mk/defaults/mk.conf.
#
# FETCH_TIMEOUT, if defined, will cause the fetch command to quit on stalled
# connections after the given amount of seconds.
# The specific behavior depends on the command used.
#
# FETCH_USE_IPV4_ONLY, if defined, will cause the fetch command to force
# connecting to only IPv4 addresses.
#
# If this host is behind a filtering firewall, use passive ftp(1)
_FETCH_BEFORE_ARGS.ftp= ${PASSIVE_FETCH:D-p} \
${FETCH_TIMEOUT:D-q ${FETCH_TIMEOUT}} \
${FETCH_USE_IPV4_ONLY:D-4}
_FETCH_AFTER_ARGS.ftp= # empty
_FETCH_RESUME_ARGS.ftp= -R
_FETCH_OUTPUT_ARGS.ftp= -o
_FETCH_CMD.ftp= ${TOOLS_PATH.ftp}
_FETCH_BEFORE_ARGS.fetch= ${FETCH_TIMEOUT:D-T ${FETCH_TIMEOUT}} \
${FETCH_USE_IPV4_ONLY:D-4}
_FETCH_AFTER_ARGS.fetch= # empty
_FETCH_RESUME_ARGS.fetch= -r
_FETCH_OUTPUT_ARGS.fetch= -o
_FETCH_CMD.fetch= ${TOOLS_PATH.fetch}
_FETCH_BEFORE_ARGS.wget= ${PASSIVE_FETCH:D--passive-ftp} \
--no-check-certificate \
${FETCH_TIMEOUT:D--timeout=${FETCH_TIMEOUT}} \
${FETCH_USE_IPV4_ONLY:D--inet4-only}
_FETCH_AFTER_ARGS.wget= # empty
_FETCH_RESUME_ARGS.wget= -c
_FETCH_OUTPUT_ARGS.wget= -O
_FETCH_CMD.wget= ${PREFIX}/bin/wget
_FETCH_BEFORE_ARGS.curl= ${PASSIVE_FETCH:D--ftp-pasv} \
--fail --insecure --location \
${FETCH_TIMEOUT:D--connect-timeout ${FETCH_TIMEOUT}} \
${FETCH_TIMEOUT:D--speed-time ${FETCH_TIMEOUT}} \
${FETCH_USE_IPV4_ONLY:D--ipv4}
_FETCH_AFTER_ARGS.curl= -O # must be here to honor -o option
_FETCH_RESUME_ARGS.curl= -C -
_FETCH_OUTPUT_ARGS.curl= -o
_FETCH_CMD.curl= ${TOOLS_PATH.curl}
_FETCH_CMD.manual= ${TOOLS_PATH.false}
_FETCH_CMD.custom= ${FETCH_CMD}
_FETCH_BEFORE_ARGS.custom= ${FETCH_BEFORE_ARGS}
_FETCH_AFTER_ARGS.custom= ${FETCH_AFTER_ARGS}
_FETCH_RESUME_ARGS.custom= ${FETCH_RESUME_ARGS}
_FETCH_OUTPUT_ARGS.custom= ${FETCH_OUTPUT_ARGS}
_FETCH_CMD= ${PKGSRC_SETENV} CHECKSUM=${_CHECKSUM_CMD:Q} \
CP=${TOOLS_CP:Q} \
ECHO=${TOOLS_ECHO:Q} \
FETCH_CMD=${_FETCH_CMD.${FETCH_USING}:Q} \
FETCH_BEFORE_ARGS=${_FETCH_BEFORE_ARGS.${FETCH_USING}:Q} \
FETCH_AFTER_ARGS=${_FETCH_AFTER_ARGS.${FETCH_USING}:Q} \
FETCH_RESUME_ARGS=${_FETCH_RESUME_ARGS.${FETCH_USING}:Q} \
FETCH_OUTPUT_ARGS=${_FETCH_OUTPUT_ARGS.${FETCH_USING}:Q} \
MKDIR=${TOOLS_MKDIR:Q} MV=${TOOLS_MV:Q} \
RM=${TOOLS_RM:Q} \
TEST=${TOOLS_TEST:Q} TOUCH=${TOOLS_TOUCH:Q} \
WC=${TOOLS_WC:Q} \
${SH} ${PKGSRCDIR}/mk/fetch/fetch
_FETCH_ARGS+= ${PKG_VERBOSE:D-v}
.if exists(${DISTINFO_FILE})
_FETCH_ARGS+= ${FAILOVER_FETCH:D-c} -f ${DISTINFO_FILE:Q}
.endif
.if !empty(PKG_RESUME_TRANSFERS:M[yY][eE][sS])
_FETCH_ARGS+= -r
.endif
.if defined(DIST_SUBDIR) && !empty(DIST_SUBDIR)
_FETCH_ARGS+= -d ${DIST_SUBDIR}
.endif
.PHONY: do-fetch-file
do-fetch-file: .USE
@${STEP_MSG} "Fetching ${.TARGET:T}"
${RUN} ${MKDIR} ${.TARGET:H}
${RUN} \
for d in "" ${DIST_PATH:S/:/ /g}; do \
case $$d in \
""|${DISTDIR}) continue ;; \
esac; \
file="$$d/${DIST_SUBDIR}/${.TARGET:T}"; \
if ${TEST} -f $$file; then \
${ECHO} "Using $$file"; \
${RM} -f ${.TARGET}; \
${LN} -s $$file ${.TARGET}; \
fi; \
done
${RUN} \
unsorted_sites="${SITES.${.TARGET:T:S/=/--/}}"; \
sites="${_ORDERED_SITES} ${_MASTER_SITE_BACKUP}"; \
cd ${.TARGET:H:S/\/${DIST_SUBDIR}$//} && \
${_FETCH_CMD} ${_FETCH_ARGS} ${.TARGET:T} $$sites
${RUN} \
if ${TEST} ! -f ${.TARGET}; then \
${ERROR_MSG} "Could not fetch the following file:"; \
${ERROR_MSG} " ${.TARGET:T}"; \
${ERROR_MSG} ""; \
${ERROR_MSG} "Please retrieve this file manually into:"; \
${ERROR_MSG} " ${.TARGET:H}"; \
exit 1; \
fi
######################################################################
### mirror-distfiles (PUBLIC)
######################################################################
### mirror-distfiles is a public target that is mostly of use only to
### sites that wish to provide distfiles that others may fetch. It
### only fetches distfiles that are freely re-distributable by setting
### NO_SKIP (see bsd.fetch-vars.mk).
###
.PHONY: mirror-distfiles
.if defined(NO_SRC_ON_FTP)
mirror-distfiles:
@${DO_NADA}
.elif defined(EMUL_PLATFORMS) && !empty(EMUL_PLATFORMS)
mirror-distfiles: emul-fetch
.else
mirror-distfiles: fetch
.endif
# XXX
# XXX Is this target actually used? (jlam 20060718)
# XXX
.PHONY: show-distfiles
.if !target(show-distfiles)
show-distfiles:
. if defined(PKG_FAIL_REASON)
${RUN} ${DO_NADA}
. else
${RUN} \
for file in "" ${_CKSUMFILES}; do \
if [ "X$$file" = "X" ]; then continue; fi; \
${ECHO} $$file; \
done
. endif
.endif
.PHONY: depends-fetch
depends-fetch:
${RUN} \
${_DEPENDS_WALK_CMD} ${PKGPATH} | \
while read dir; do \
${ECHO} "===> Checksumming for $${dir}" && \
cd ${.CURDIR}/../../$$dir && \
${RECURSIVE_MAKE} ${MAKEFLAGS} fetch; \
done

404
mk/fetch/sites.mk Normal file
View File

@@ -0,0 +1,404 @@
# $NetBSD: sites.mk,v 1.98 2013/06/14 07:40:15 wiz Exp $
#
# This Makefile fragment defines read-only MASTER_SITE_* variables
# representing some well-known master distribution sites for software.
#
MASTER_SITE_XCONTRIB+= \
ftp://ftp.gwdg.de/pub/x11/x.org/contrib/ \
ftp://sunsite.icm.edu.pl/pub/X11/contrib/ \
ftp://mirror.switch.ch/mirror/X11/contrib/ \
ftp://ftp.x.org/contrib/
MASTER_SITE_GNU+= \
http://ftp.gnu.org/pub/gnu/ \
ftp://ftp.gnu.org/pub/gnu/ \
ftp://ftp.funet.fi/pub/gnu/prep/ \
ftp://ftp.kddlabs.co.jp/pub/gnu/gnu/ \
ftp://ftp.dti.ad.jp/pub/GNU/ \
ftp://mirrors.kernel.org/gnu/ \
ftp://ftp.sunet.se/pub/gnu/ \
ftp://ftp.lip6.fr/pub/gnu/ \
http://gd.tuwien.ac.at/gnu/gnusrc/
MASTER_SITE_GNUSTEP+= \
ftp://ftp.gnustep.org/pub/gnustep/
MASTER_SITE_PERL_CPAN+= \
ftp://cpan.pair.com/modules/by-module/ \
ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module/ \
ftp://ftp.gmd.de/mirrors/CPAN/modules/by-module/ \
http://ftp.tuwien.ac.at/pub/CPAN/modules/by-module/ \
http://cpan.perl.org/CPAN/modules/by-module/ \
ftp://ftp.fi.muni.cz/pub/CPAN/modules/by-module/
MASTER_SITE_R_CRAN+= \
http://cran.r-project.org/src/ \
ftp://cran.r-project.org/pub/R/src/ \
http://cran.at.r-project.org/src/ \
ftp://cran.at.r-project.org/pub/R/src/ \
http://cran.ch.r-project.org/src/ \
http://cran.uk.r-project.org/src/ \
http://cran.us.r-project.org/src/ \
http://lib.stat.cmu.edu/R/CRAN/src/ \
ftp://ftp.u-aizu.ac.jp/pub/lang/R/CRAN/src/ \
http://stat.ethz.ch/CRAN/src/ \
http://www.stats.bris.ac.uk/R/src/
MASTER_SITE_TEX_CTAN+= \
ftp://ftp.funet.fi/pub/TeX/CTAN/ \
ftp://ftp.tex.ac.uk/tex-archive/ \
ftp://ftp.dante.de/tex-archive/ \
ftp://www.dnsbalance.ring.gr.jp/pub/text/CTAN/ \
http://www.dnsbalance.ring.gr.jp/archives/text/CTAN/
MASTER_SITE_SUNSITE+= \
ftp://sunsite.unc.edu/pub/Linux/ \
ftp://ftp.kddlabs.co.jp/Linux/metalab.unc.edu/ \
ftp://ftp.icm.edu.pl/pub/Linux/sunsite/ \
ftp://ftp.nvg.ntnu.no/pub/mirrors/metalab.unc.edu/ \
ftp://ftp.lip6.fr/pub/linux/sunsite/ \
ftp://ftp.cs.tu-berlin.de/pub/linux/Mirrors/sunsite.unc.edu/ \
http://ftp.tuwien.ac.at/pub/linux/ibiblio/
MASTER_SITE_GNOME+= \
http://ftp.gnome.org/pub/GNOME/ \
ftp://ftp.gnome.org/pub/GNOME/ \
ftp://ftp.sunet.se/pub/X11/GNOME/ \
http://ftp.tuwien.ac.at/hci/gnome.org/ \
ftp://ftp.cse.buffalo.edu/pub/Gnome/ \
ftp://ftp.dti.ad.jp/pub/X/gnome/ \
ftp://ftp.kddlabs.co.jp/pub/GNOME/ \
ftp://ftp.dit.upm.es/linux/gnome/
MASTER_SITE_KDE+= \
ftp://ftp.kde.org/pub/kde/stable/ \
ftp://www.dnsbalance.ring.gr.jp/pub/X/kde/stable/ \
http://www.dnsbalance.ring.gr.jp/archives/X/kde/stable/ \
ftp://ftp.kddlabs.co.jp/pub/X/kde/stable/ \
http://mirrors.isc.org/pub/kde/stable/ \
ftp://ftp.gtlib.cc.gatech.edu/pub/kde/stable/ \
ftp://kde.mirrors.tds.net/pub/kde/stable/ \
http://gd.tuwien.ac.at/kde/stable/ \
ftp://ftp.solnet.ch/mirror/KDE/stable/ \
ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.kde.org/pub/kde/stable/ \
ftp://mirrors.dotsrc.org/kde/stable/ \
ftp://ftp.fi.muni.cz/pub/kde/stable/
MASTER_SITE_SOURCEFORGE+= \
http://downloads.sourceforge.net/sourceforge/
MASTER_SITE_SOURCEFORGE_JP+= \
http://osdn.dl.sourceforge.jp/ \
http://jaist.dl.sourceforge.jp/ \
http://keihanna.dl.sourceforge.jp/ \
http://globalbase.dl.sourceforge.jp/ \
http://iij.dl.sourceforge.jp/ \
http://download.sourceforge.jp/
MASTER_SITE_SUSE+= \
ftp://rpmfind.net/linux/SuSE-Linux/${MACHINE_ARCH}/update/${SUSE_VERSION}/ \
ftp://fr.rpmfind.net/linux/SuSE-Linux/${MACHINE_ARCH}/update/${SUSE_VERSION}/ \
ftp://fr2.rpmfind.net/linux/SuSE-Linux/${MACHINE_ARCH}/update/${SUSE_VERSION}/
MASTER_SITE_MOZILLA_ALL+= \
http://download-origin.cdn.mozilla.net/pub/mozilla.org/ \
http://dm-download02.mozilla.org/pub/mozilla.org/ \
http://ftp.mozilla.org/pub/mozilla.org/ \
ftp://ftp.mozilla.org/pub/mozilla.org/
# see http://www.mozilla.org/mirrors.html
MASTER_SITE_MOZILLA+= \
http://releases.mozilla.org/pub/mozilla.org/ \
http://mirror.atlanticmetro.net/mozilla/ \
ftp://releases.mozilla.org/pub/mozilla.org/ \
http://www.artfiles.org/mozilla.org/ \
http://ftp.plusline.de/mozilla/ \
http://ftp.sunet.se/pub/www/clients/mozilla.org/ \
http://mirror.switch.ch/ftp/mirror/mozilla/ \
http://mozmirror01.true.nl/pub/mozilla.org/ \
http://mirror.yandex.ru/mozilla/ \
http://ftp.cvut.cz/mozilla/ \
http://ftp.pwr.wroc.pl/pub/mozilla/ \
http://ftp.heanet.ie/mirrors/ftp.mozilla.org/pub/mozilla.org/ \
http://mozilla.c3sl.ufpr.br/releases/ \
http://mozilla.mirror.ac.za/ \
http://mozilla-mirror.naist.jp/ \
http://mirror.waia.asn.au/pub/mozilla/ \
http://mozilla.mirror.ihug.co.nz/ \
http://download-origin.cdn.mozilla.net/pub/mozilla.org/
# for Extended Support Release version
MASTER_SITE_MOZILLA_ESR+= \
http://download-origin.cdn.mozilla.net/pub/mozilla.org/ \
http://pv-mirror01.mozilla.org/pub/mozilla.org/ \
http://dm-download02.mozilla.org/pub/mozilla.org/ \
ftp://ftp.mozilla.org/pub/mozilla.org/
MASTER_SITE_XEMACS+= \
ftp://ftp.xemacs.org/pub/xemacs/ \
ftp://ftp.dti.ad.jp/pub/unix/editor/xemacs/ \
ftp://ftp.pasteur.fr/pub/computing/xemacs/ \
ftp://mirror.aarnet.edu.au/pub/xemacs/ \
ftp://mirror.cict.fr/xemacs/ \
ftp://ftp.dnsbalance.ring.gr.jp/pub/text/xemacs/
MASTER_SITE_APACHE+= \
http://www.apache.org/dist/ \
http://www.eu.apache.org/dist/ \
http://apache.mirror.aussiehq.net.au/ \
http://apache.oregonstate.edu/ \
http://www.ibiblio.org/pub/mirrors/apache/ \
http://mirror.nyi.net/apache/ \
http://apache.mirrors.tds.net/ \
http://ftp.unicamp.br/pub/apache/ \
http://www.mirrorservice.org/sites/ftp.apache.org/ \
http://www.meisei-u.ac.jp/mirror/apache/dist/ \
http://ftp.twaren.net/Unix/Web/apache/ \
http://ftp.cuhk.edu.hk/pub/packages/apache.org/ \
ftp://ftp.oregonstate.edu/pub/apache/ \
ftp://mirror.nyi.net/apache/ \
ftp://apache.mirrors.tds.net/pub/apache.org/ \
ftp://ftp.mirrorservice.org/sites/ftp.apache.org/ \
http://gd.tuwien.ac.at/pub/infosys/servers/http/apache/dist/ \
ftp://ftp.meisei-u.ac.jp/pub/www/apache/dist/ \
ftp://ftp.twaren.net/Unix/Web/apache/
MASTER_SITE_MYSQL+= \
http://mysql.skynet.be/Downloads/ \
ftp://ftp.mysql.skynet.be/pub/ftp.mysql.com/Downloads/ \
http://mysql.mirror.kangaroot.net/Downloads/ \
ftp://mysql.mirror.kangaroot.net/pub/mysql/Downloads/ \
http://mysql.linux.cz/Downloads/ \
ftp://ftp.fi.muni.cz/pub/mysql/Downloads/ \
http://mirrors.dotsrc.org/mysql/Downloads/ \
ftp://mirrors.dotsrc.org/mysql/Downloads/ \
http://mysql.borsen.dk/Downloads/ \
http://mirrors.ircam.fr/pub/mysql/Downloads/ \
ftp://mirrors.ircam.fr/pub/mysql/Downloads/ \
http://ftp.gwdg.de/pub/misc/mysql/Downloads/ \
ftp://ftp.gwdg.de/pub/misc/mysql/Downloads/ \
http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/ \
ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/www.mysql.com/Downloads/ \
ftp://ftp.fu-berlin.de/unix/databases/mysql/Downloads/ \
http://ftp.ntua.gr/pub/databases/mysql/Downloads/ \
ftp://ftp.ntua.gr/pub/databases/mysql/Downloads/ \
http://mysql.mirrors.crysys.hit.bme.hu/Downloads/ \
ftp://ftp.crysys.hu/pub/mysql/Downloads/ \
http://ftp.heanet.ie/mirrors/www.mysql.com/Downloads/ \
ftp://ftp.heanet.ie/mirrors/www.mysql.com/Downloads/ \
http://na.mirror.garr.it/mirrors/MySQL/Downloads/ \
http://mysql.proserve.nl/Downloads/ \
http://mysql.nfsi.pt/Downloads/ \
ftp://ftp.nfsi.pt/pub/mysql/Downloads/ \
http://mirrors.xservers.ro/mysql/Downloads/ \
http://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/ \
ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/ \
http://mysql.dataphone.se/Downloads/ \
ftp://mirror2.dataphone.se/pub/mysql/Downloads/ \
ftp://ftp.solnet.ch/mirror/mysql/Downloads/ \
http://mirror.switch.ch/ftp/mirror/mysql/Downloads/ \
ftp://mirror.switch.ch/mirror/mysql/Downloads/ \
http://ftp.itu.edu.tr/Mirror/Mysql/Downloads/ \
ftp://ftp.itu.edu.tr/Mirror/Mysql/Downloads/ \
http://mysql.infocom.ua/Downloads/ \
http://mirrors.dedipower.com/www.mysql.com/Downloads/ \
http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/ \
ftp://ftp.mirrorservice.org/sites/ftp.mysql.com/Downloads/ \
http://mysql.mirror.rafal.ca/Downloads/ \
ftp://mysql.mirror.rafal.ca/pub/mysql/Downloads/ \
http://mirror.csclub.uwaterloo.ca/mysql/Downloads/ \
ftp://mirror.csclub.uwaterloo.ca/mysql/Downloads/ \
http://mirror.trouble-free.net/mysql_mirror/Downloads/ \
http://mysql.llarian.net/Downloads/ \
ftp://mysql.llarian.net/pub/mysql/Downloads/ \
ftp://mirror.anl.gov/pub/mysql/Downloads/ \
http://mirror.services.wisc.edu/mysql/Downloads/ \
ftp://mirror.services.wisc.edu/mirrors/mysql/Downloads/ \
http://mysql.he.net/Downloads/ \
http://mysql.mirrors.arminco.com/Downloads/ \
http://mysql.spd.co.il/Downloads/ \
http://ftp.iij.ad.jp/pub/db/mysql/Downloads/ \
ftp://ftp.iij.ad.jp/pub/db/mysql/Downloads/ \
http://mysql.oss.eznetsols.org/Downloads/ \
ftp://ftp.oss.eznetsols.org/mysql/Downloads/ \
http://mysql.cs.pu.edu.tw/Downloads/ \
http://mysql.ntu.edu.tw/Downloads/ \
ftp://ftp.ntu.edu.tw/pub/MySQL/Downloads/ \
http://mysql.cdpa.nsysu.edu.tw/Downloads/ \
ftp://mysql.cdpa.nsysu.edu.tw/Unix/Database/MySQL/Downloads/ \
http://mirror-fpt-telecom.fpt.net/mysql/Downloads/ \
http://mysql.mirror.ac.za/Downloads/ \
http://mysql.inspire.net.nz/Downloads/ \
ftp://mysql.inspire.net.nz/mysql/Downloads/
MASTER_SITE_DEBIAN+= \
http://ftp.debian.org/debian/ \
http://ftp.at.debian.org/debian/ \
http://ftp.au.debian.org/debian/ \
http://ftp.wa.au.debian.org/debian/ \
http://ftp.bg.debian.org/debian/ \
http://ftp.cl.debian.org/debian/ \
http://ftp.cz.debian.org/debian/ \
http://ftp.de.debian.org/debian/ \
http://ftp2.de.debian.org/debian/ \
http://ftp.ee.debian.org/debian/ \
http://ftp.fi.debian.org/debian/ \
http://ftp.fr.debian.org/debian/ \
http://ftp2.fr.debian.org/debian/ \
http://ftp.uk.debian.org/debian/ \
http://ftp.hr.debian.org/debian/ \
http://ftp.ie.debian.org/debian/ \
http://ftp.is.debian.org/debian/ \
http://ftp.it.debian.org/debian/ \
http://ftp.jp.debian.org/debian/ \
http://ftp.nl.debian.org/debian/ \
http://ftp.no.debian.org/debian/ \
http://ftp.nz.debian.org/debian/ \
http://ftp.pl.debian.org/debian/ \
http://ftp.ru.debian.org/debian/ \
http://ftp.se.debian.org/debian/ \
http://ftp.sk.debian.org/debian/ \
http://ftp.us.debian.org/debian/
MASTER_SITE_OPENOFFICE+= \
http://mirrors.isc.org/pub/openoffice/ \
http://openoffice.mirrors.ilisys.com.au/ \
http://www.ibiblio.org/pub/mirrors/openoffice/ \
ftp://ftp.ussg.iu.edu/pub/openoffice/ \
http://gd.tuwien.ac.at/office/openoffice/ \
http://ftp.sh.cvut.cz/MIRRORS/OpenOffice/ \
ftp://ftp.funet.fi/pub/mirrors/openoffice.org/ \
ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/OpenOffice/ \
ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/ftp.openoffice.org/ \
ftp://ftp.join.uni-muenster.de/pub/software/OpenOffice/ \
http://ftp.ntua.gr/pub/OpenOffice/ \
http://ftp.rhnet.is/pub/OpenOffice/ \
http://na.mirror.garr.it/mirrors/openoffice/ \
http://vlaai.snt.utwente.nl/pub/software/openoffice/ \
http://niihau.student.utwente.nl/openoffice/ \
http://borft.student.utwente.nl/openoffice/ \
http://ftp.iasi.roedu.net/mirrors/openoffice.org/ \
ftp://ftp.arnes.si/packages/OpenOffice.org/ \
ftp://ftp.saix.net/pub/OpenOffice.org/ \
http://ftp.sunet.se/pub/Office/OpenOffice.org/ \
ftp://mirror.switch.ch/mirror/OpenOffice/ \
http://komo.vlsm.org/openoffice/ \
ftp://ftp.kddlabs.co.jp/office/openoffice/ \
ftp://ftp.dnsbalance.ring.gr.jp/pub/misc/openoffice/ \
ftp://ftp.kr.freebsd.org/pub/openoffice/
MASTER_SITE_CYGWIN+= \
http://mirrors.kernel.org/sources.redhat.com/cygwin/ \
http://mirrors.xmission.com/cygwin/ \
ftp://ftp.dnsbalance.ring.gr.jp/pub/pc/gnu-win32/ \
ftp://ftp.funet.fi/pub/mirrors/cygwin.com/pub/cygwin/
MASTER_SITE_IFARCHIVE+= \
http://ifarchive.flavorplex.com/if-archive/ \
http://ifarchive.heanet.ie/if-archive/ \
ftp://ftp.giga.or.at/pub/ifarchive/
### PGSQL list was last updated on 20110328
MASTER_SITE_PGSQL+= \
ftp://ftp5.ca.postgresql.org/mirrors/postgresql/ \
http://ftp2.cz.postgresql.org/pub/postgresql/ \
ftp://ftp2.cz.postgresql.org/pub/postgresql/ \
http://ftp.dk.postgresql.org/postgresql/ \
ftp://ftp.dk.postgresql.org/postgresql/ \
http://ftp.ee.postgresql.org/pub/postgresql/ \
ftp://ftp.fi.postgresql.org/pub/postgresql/ \
http://ftp4.fr.postgresql.org/pub/mirrors/postgresql/ \
ftp://ftp4.fr.postgresql.org/pub/mirrors/postgresql/ \
http://ftp3.de.postgresql.org/pub/Mirrors/ftp.postgresql.org/ \
ftp://ftp3.de.postgresql.org/pub/Mirrors/ftp.postgresql.org/ \
http://ftp8.de.postgresql.org/pub/misc/pgsql/ \
ftp://ftp8.de.postgresql.org/pub/misc/pgsql/ \
ftp://ftp7.de.postgresql.org/pub/ftp.postgresql.org/ \
ftp://ftp9.de.postgresql.org/unix/databases/postgresql/ \
http://ftp.gr.postgresql.org/pub/databases/postgresql/ \
ftp://ftp.gr.postgresql.org/pub/databases/postgresql/ \
http://ftp3.gr.postgresql.org/ \
ftp://ftp3.gr.postgresql.org/mirrors/postgresql/ \
http://ftp.ie.postgresql.org/mirrors/ftp.postgresql.org/pub/ \
ftp://ftp.ie.postgresql.org/mirrors/ftp.postgresql.org/pub/ \
http://ftp2.ie.postgresql.org/mirrors/ftp.postgresql.org/ \
ftp://ftp2.ie.postgresql.org/mirrors/ftp.postgresql.org/ \
http://ftp2.it.postgresql.org/mirrors/postgres/ \
ftp://ftp2.it.postgresql.org/mirrors/postgres/ \
ftp://ftp3.jp.postgresql.org/pub/db/postgresql/ \
ftp://ftp.lv.postgresql.org/mirrors/ftp.postgresql.org/ \
http://ftp2.nl.postgresql.org/ \
ftp://ftp2.nl.postgresql.org/mirror/postgresql/ \
ftp://ftp.nz.postgresql.org/postgresql/ \
http://ftp6.pl.postgresql.org/pub/postgresql/ \
ftp://ftp6.pl.postgresql.org/pub/postgresql/ \
http://ftp8.pl.postgresql.org/pub/postgresql/ \
ftp://ftp8.pl.postgresql.org/pub/postgresql/ \
ftp://ftp7.pl.postgresql.org/pub/mirror/ftp.postgresql.org/ \
http://ftp.pt.postgresql.org/pub/postgresql/ \
ftp://ftp.pt.postgresql.org/pub/postgresql/ \
ftp://ftp6.ro.postgresql.org/pub/mirrors/ftp.postgresql.org/ \
ftp://ftp3.ru.postgresql.org/pub/mirror/postgresql/pub/ \
ftp://ftp.si.postgresql.org/pub/mirrors/postgresql/ \
ftp://ftp.za.postgresql.org/mirror/ftp.postgresql.org/ \
http://ftp.se.postgresql.org/pub/databases/relational/postgresql/ \
ftp://ftp.se.postgresql.org/pub/databases/relational/postgresql/ \
http://ftp2.ch.postgresql.org/pub/mirrors/postgresql/ \
ftp://ftp2.ch.postgresql.org/pub/mirrors/postgresql/ \
ftp://ftp.ch.postgresql.org/mirror/postgresql/ \
http://ftp3.tw.postgresql.org/postgresql/ \
ftp://ftp3.tw.postgresql.org/postgresql/ \
ftp://ftp5.us.postgresql.org/pub/PostgreSQL/ \
http://ftp2.uk.postgresql.org/sites/ftp.postgresql.org/ \
ftp://ftp2.uk.postgresql.org/sites/ftp.postgresql.org/
MASTER_SITE_GENTOO+= \
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ \
http://ftp.heanet.ie/pub/gentoo/ \
http://mirror.bytemark.co.uk/gentoo/ \
http://mirror.switch.ch/ftp/mirror/gentoo/ \
http://gentoo.mirror.dkm.cz/pub/gentoo/ \
http://ftp.ds.karen.hj.se/gentoo/ \
ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ \
ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo/ \
http://darkstar.ist.utl.pt/gentoo/ \
http://gentoo-euetib.upc.es/mirror/gentoo/ \
http://ftp.ntua.gr/pub/linux/gentoo/ \
http://www.las.ic.unicamp.br/pub/gentoo/ \
http://mirror.yandex.ru/gentoo-distfiles/ \
http://ftp.swin.edu.au/gentoo/ \
http://ftp.iij.ad.jp/pub/linux/gentoo/ \
http://ftp.jaist.ac.jp/pub/Linux/Gentoo/ \
http://ftp.cs.pu.edu.tw/Linux/Gentoo/ \
http://distfiles.gentoo.org/
MASTER_SITE_XORG+= \
http://xorg.freedesktop.org/releases/individual/ \
ftp://ftp.x.org/pub/individual/ \
ftp://ftp.sunet.se/pub/X11/ftp.x.org/individual/
MASTER_SITE_FREEBSD+= \
ftp://ftp.FreeBSD.org/pub/FreeBSD/distfiles/ \
ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/distfiles/
MASTER_SITE_FREEBSD_LOCAL+= \
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/ \
ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/
MASTER_SITE_NETLIB+= \
http://netlib.org/ \
http://netlib.sandia.gov/ \
http://www.netlib.no/netlib/ \
http://www.mirrorservice.org/sites/netlib.bell-labs.com/netlib/
MASTER_SITE_RUBYGEMS+= \
http://rubygems.org/gems/ \
http://gems.rubyforge.org/gems/
# The primary backup site.
MASTER_SITE_BACKUP?= \
ftp://ftp.fi.NetBSD.org/pub/NetBSD/packages/distfiles/ \
ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/ \
http://ftp.NetBSD.org/pub/pkgsrc/distfiles/ \
ftp://ftp.FreeBSD.org/pub/FreeBSD/distfiles/