summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.prefs.mk12
-rw-r--r--mk/defaults/mk.conf10
-rw-r--r--mk/tools/tools.DragonFly.mk3
3 files changed, 16 insertions, 9 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 018f0f72889..bbfd661b435 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.338 2013/09/12 11:01:47 jperkin Exp $
+# $NetBSD: bsd.prefs.mk,v 1.339 2013/12/19 23:50:29 tron Exp $
#
# This file includes the mk.conf file, which contains the user settings.
#
@@ -673,6 +673,16 @@ USE_TOOLS+= awk:pkgsrc cut:pkgsrc echo:pkgsrc pwd:pkgsrc \
.include "${_PKGSRC_TOPDIR}/mk/tools/defaults.mk"
+.if ${FETCH_USING} == "auto"
+. if defined(TOOLS_PLATFORM.fetch)
+FETCH_USING= fetch
+. elif defined(TOOLS_PLATFORM.curl)
+FETCH_USING= curl
+. else
+FETCH_USING= ftp
+. endif
+.endif
+
.if !defined(_PKGSRCDIR)
_PKGSRCDIR!= cd ${_PKGSRC_TOPDIR} && ${PWD_CMD}
MAKEFLAGS+= _PKGSRCDIR=${_PKGSRCDIR:Q}
diff --git a/mk/defaults/mk.conf b/mk/defaults/mk.conf
index f5f0eff4626..e2ca34e309e 100644
--- a/mk/defaults/mk.conf
+++ b/mk/defaults/mk.conf
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf,v 1.227 2013/12/16 05:47:43 obache Exp $
+# $NetBSD: mk.conf,v 1.228 2013/12/19 23:50:29 tron Exp $
#
# This file provides default values for variables that may be overridden
@@ -351,11 +351,7 @@ DEFAULT_VIEW?= ""
# This is the default view to which packages are added after installation.
# Default: "" (the empty view)
-.if ${OPSYS} == "FreeBSD"
-FETCH_USING?= fetch
-.else
-FETCH_USING?= ftp
-.endif
+FETCH_USING?= auto
# The program type to fetch files.
# "manual" will explicitly fail if the DISTFILES don't exist locally.
# "custom" requires setting FETCH_CMD, FETCH_BEFORE_ARGS, FETCH_AFTER_ARGS,
@@ -363,7 +359,7 @@ FETCH_USING?= ftp
#
# The default value can be overriden by a package before including
# bsd.prefs.mk and by the user in mk.conf.
-# Possible: curl, custom, fetch, ftp, manual, wget
+# Possible: auto, curl, custom, fetch, ftp, manual, wget
#FIX_SYSTEM_HEADERS=
# Make pkgtools/posix_headers an automatic build dependency for all
diff --git a/mk/tools/tools.DragonFly.mk b/mk/tools/tools.DragonFly.mk
index 0b9dcb44d27..58d1bdd7417 100644
--- a/mk/tools/tools.DragonFly.mk
+++ b/mk/tools/tools.DragonFly.mk
@@ -1,4 +1,4 @@
-# $NetBSD: tools.DragonFly.mk,v 1.40 2013/11/06 13:12:50 obache Exp $
+# $NetBSD: tools.DragonFly.mk,v 1.41 2013/12/19 23:50:29 tron Exp $
#
# System-supplied tools for the DragonFly operating system.
@@ -28,6 +28,7 @@ TOOLS_PLATFORM.egrep?= /usr/bin/egrep
TOOLS_PLATFORM.env?= /usr/bin/env
TOOLS_PLATFORM.expr?= /bin/expr
TOOLS_PLATFORM.false?= /usr/bin/false
+TOOLS_PLATFORM.fetch?= /usr/bin/fetch
TOOLS_PLATFORM.fgrep?= /usr/bin/fgrep
TOOLS_PLATFORM.file?= /usr/bin/file
TOOLS_PLATFORM.find?= /usr/bin/find