summaryrefslogtreecommitdiff
path: root/mk/fetch/bsd.fetch-vars.mk
diff options
context:
space:
mode:
authorjoerg <joerg>2009-02-10 18:55:54 +0000
committerjoerg <joerg>2009-02-10 18:55:54 +0000
commitf3bc19df9befd8a136a04ff392c5d21bb109a177 (patch)
treeaf3c21628b384d6c057c3d456f12964d3929d7e0 /mk/fetch/bsd.fetch-vars.mk
parent814d9d9aa5e00ec4db006e58d610d24a6359e9fd (diff)
downloadpkgsrc-f3bc19df9befd8a136a04ff392c5d21bb109a177.tar.gz
Change the way the fetch process is organised as proposed on tech-pkg:
- Introduce FETCH_USING, which specifies the mechanism to use; possible values are ftp, fetch, curl, wget, manual and custom. - Depend on the correct tool/program if not using manual or custom. - For manual, just use /usr/bin/false to bail out if a distfile is missing. - For custom, FETCH_CMD and related variables are used as before. - Default value is ftp.
Diffstat (limited to 'mk/fetch/bsd.fetch-vars.mk')
-rw-r--r--mk/fetch/bsd.fetch-vars.mk16
1 files changed, 11 insertions, 5 deletions
diff --git a/mk/fetch/bsd.fetch-vars.mk b/mk/fetch/bsd.fetch-vars.mk
index 8427fa0c42d..77f98efc9fd 100644
--- a/mk/fetch/bsd.fetch-vars.mk
+++ b/mk/fetch/bsd.fetch-vars.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.fetch-vars.mk,v 1.11 2008/05/22 20:11:55 joerg Exp $
+# $NetBSD: bsd.fetch-vars.mk,v 1.12 2009/02/10 18:55:54 joerg Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
@@ -73,9 +73,15 @@ NO_SKIP= # defined
_BOOTSTRAP_VERBOSE= # defined
.endif
-.if !empty(_CKSUMFILES)
-USE_TOOLS+= ftp:bootstrap
-. if defined(FAILOVER_FETCH)
+.if !empty(_CKSUMFILES) && defined(FAILOVER_FETCH)
USE_TOOLS+= digest:bootstrap
-. endif
.endif
+
+_FETCH_TOOLS.ftp= ftp
+_FETCH_TOOLS.fetch= fetch
+_FETCH_DEPENDS.wget= wget-[0-9]*:../../net/wget
+_FETCH_DEPENDS.curl= curl-[0-9]*:../../www/curl
+_FETCH_TOOLS.manual= false
+
+USE_TOOLS+= ${_FETCH_TOOLS.${FETCH_USING}:C/$/:bootstrap/}
+BOOTSTRAP_DEPENDS+= ${_FETCH_DEPENDS.${FETCH_USING}}