summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorabs <abs>2002-02-13 20:05:02 +0000
committerabs <abs>2002-02-13 20:05:02 +0000
commit635d3a9f60eb5b54e8978bca4a526d4b135e0167 (patch)
tree45620cf03960795843a8b73d16fa2646e17f801a /mk
parentdf58e9544a3b0f9c21380cfd66822f0591bd411f (diff)
downloadpkgsrc-635d3a9f60eb5b54e8978bca4a526d4b135e0167.tar.gz
Implement DYNAMIC_MASTER_SITES
If you need to download from a dynamic URL you can set DYNAMIC_MASTER_SITES and a 'make fetch' will call files/getsite.sh with the name of each file to download as an argument, expecting it to output the URL of the directory from which to download it. graphics/ns-cult3d is an example of this usage.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 91f50b407fc..c6ab1137bb4 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.923 2002/02/07 20:34:21 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.924 2002/02/13 20:05:04 abs Exp $
#
# This file is in the public domain.
#
@@ -1295,6 +1295,14 @@ SITES_${fetchfile:T}?= ${PATCH_SITES}
_FETCH_ALLFILES= ${TEST} -d ${_DISTDIR} || ${MKDIR} ${_DISTDIR};
_FETCH_ALLFILES+= cd ${_DISTDIR};
. for fetchfile in ${_ALLFILES}
+. if defined(DYNAMIC_MASTER_SITES)
+_FETCH_ALLFILES+= \
+ file="${fetchfile}"; \
+ bfile="${fetchfile:T}"; \
+ sites=`sh ${FILESDIR}/getsite.sh $${file}`; \
+ ${_CHECK_DIST_PATH}; \
+ ${_FETCH_FILE};
+. else
_FETCH_ALLFILES+= \
unsorted_sites="${SITES_${fetchfile:T}} ${_MASTER_SITE_BACKUP}"; \
sites="${ORDERED_SITES}"; \
@@ -1302,6 +1310,7 @@ _FETCH_ALLFILES+= \
bfile="${fetchfile:T}"; \
${_CHECK_DIST_PATH}; \
${_FETCH_FILE};
+. endif
. endfor
. endif
_FETCH_ALLFILES?= ${DO_NADA}