summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2012-07-27 10:48:36 +0000
committerjperkin <jperkin@pkgsrc.org>2012-07-27 10:48:36 +0000
commit4cf96d2ffb27f05581180d2342c8641cb56afdaf (patch)
treed51375a5ce768169d6b4e26fc4c340907a1a036c /mk
parentc9e21d595ca4ff6063d9f73b6d9defe9f2338547 (diff)
downloadpkgsrc-4cf96d2ffb27f05581180d2342c8641cb56afdaf.tar.gz
Make curl a tool. Add support for /usr/bin/curl, if available, on Solaris.
SmartOS and OmniOS users can now set FETCH_USING=curl and no longer require pkgsrc dependencies for downloading distfiles.
Diffstat (limited to 'mk')
-rw-r--r--mk/fetch/bsd.fetch-vars.mk4
-rw-r--r--mk/fetch/fetch.mk4
-rw-r--r--mk/tools/replace.mk12
-rw-r--r--mk/tools/tools.SunOS.mk5
4 files changed, 19 insertions, 6 deletions
diff --git a/mk/fetch/bsd.fetch-vars.mk b/mk/fetch/bsd.fetch-vars.mk
index 0ea60e495d8..0eb551d0ed5 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.13 2009/03/20 16:23:48 joerg Exp $
+# $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
@@ -80,7 +80,7 @@ USE_TOOLS+= digest:bootstrap
_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.curl= curl
_FETCH_TOOLS.manual= false
.if !empty(_ALLFILES)
diff --git a/mk/fetch/fetch.mk b/mk/fetch/fetch.mk
index af4adc26116..fdbccffd3e1 100644
--- a/mk/fetch/fetch.mk
+++ b/mk/fetch/fetch.mk
@@ -1,4 +1,4 @@
-# $NetBSD: fetch.mk,v 1.55 2012/02/06 12:49:38 fhajny Exp $
+# $NetBSD: fetch.mk,v 1.56 2012/07/27 10:48:36 jperkin Exp $
_MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP:=${DIST_SUBDIR}${DIST_SUBDIR:D/}}
_MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE:=${DIST_SUBDIR}${DIST_SUBDIR:D/}}
@@ -229,7 +229,7 @@ _FETCH_BEFORE_ARGS.curl= ${PASSIVE_FETCH:D--ftp-pasv} \
_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= ${PREFIX}/bin/curl
+_FETCH_CMD.curl= ${TOOLS_PATH.curl}
_FETCH_CMD.manual= ${TOOLS_PATH.false}
diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk
index df34c516ba0..067a28dd4d5 100644
--- a/mk/tools/replace.mk
+++ b/mk/tools/replace.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.250 2012/07/06 14:08:50 wiz Exp $
+# $NetBSD: replace.mk,v 1.251 2012/07/27 10:48:36 jperkin Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -331,6 +331,16 @@ TOOLS_PATH.csh= ${TOOLS_PREFIX.csh}/bin/tcsh
. endif
.endif
+.if !defined(TOOLS_IGNORE.curl) && !empty(_USE_TOOLS:Mcurl)
+. if !empty(PKGPATH:Mwww/curl)
+MAKEFLAGS+= TOOLS_IGNORE.curl=
+. elif !empty(_TOOLS_USE_PKGSRC.curl:M[yY][eE][sS])
+TOOLS_DEPENDS.curl?= curl-[0-9]*:../../www/curl
+TOOLS_FIND_PREFIX+= TOOLS_PREFIX.curl=curl
+TOOLS_PATH.curl= ${TOOLS_PREFIX.curl}/bin/curl
+. endif
+.endif
+
.if !defined(TOOLS_IGNORE.fetch) && !empty(_USE_TOOLS:Mfetch)
. if !empty(PKGPATH:Mnet/fetch)
MAKEFLAGS+= TOOLS_IGNORE.fetch=
diff --git a/mk/tools/tools.SunOS.mk b/mk/tools/tools.SunOS.mk
index 82e582dd960..bd4ff3b0bf9 100644
--- a/mk/tools/tools.SunOS.mk
+++ b/mk/tools/tools.SunOS.mk
@@ -1,4 +1,4 @@
-# $NetBSD: tools.SunOS.mk,v 1.40 2012/06/25 22:05:17 jperkin Exp $
+# $NetBSD: tools.SunOS.mk,v 1.41 2012/07/27 10:48:36 jperkin Exp $
#
# System-supplied tools for the Solaris operating system.
#
@@ -38,6 +38,9 @@ TOOLS_PLATFORM.cmp?= /usr/bin/cmp
.endif
TOOLS_PLATFORM.cp?= /bin/cp
TOOLS_PLATFORM.csh?= /bin/csh
+.if exists(/usr/bin/curl)
+TOOLS_PLATFORM.curl?= /usr/bin/curl
+.endif
TOOLS_PLATFORM.cut?= /usr/bin/cut
TOOLS_PLATFORM.date?= /usr/xpg4/bin/date
.if exists(/usr/bin/gdiff)