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.diff -r1.180 -r1.181 pkgsrc/mk/defaults/mk.conf
(joerg)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: mk.conf,v 1.180 2008/11/29 13:38:52 rillig Exp $ | 1 | # $NetBSD: mk.conf,v 1.181 2009/02/10 18:55:54 joerg Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | # This file provides default values for variables that may be overridden | 4 | # This file provides default values for variables that may be overridden | |
5 | # in the MAKECONF file, which is /etc/mk.conf by default. | 5 | # in the MAKECONF file, which is /etc/mk.conf by default. | |
6 | # | 6 | # | |
7 | # Note: This file is included after the MAKECONF file, so you cannot query | 7 | # Note: This file is included after the MAKECONF file, so you cannot query | |
8 | # these default values in the MAKECONF using the ".if" and ".for" | 8 | # these default values in the MAKECONF using the ".if" and ".for" | |
9 | # preprocessing directives. | 9 | # preprocessing directives. | |
10 | 10 | |||
11 | # ************************************************************************ | 11 | # ************************************************************************ | |
12 | # NOTE TO PEOPLE EDITING THIS FILE - USE LEADING SPACES, NOT LEADING TABS. | 12 | # NOTE TO PEOPLE EDITING THIS FILE - USE LEADING SPACES, NOT LEADING TABS. | |
13 | # ************************************************************************ | 13 | # ************************************************************************ | |
14 | 14 | |||
@@ -337,30 +337,35 @@ DISTDIR?= ${PKGSRCDIR}/distfiles | @@ -337,30 +337,35 @@ DISTDIR?= ${PKGSRCDIR}/distfiles | |||
337 | # of the directories in ${DIST_PATH}, it will be downloaded into | 337 | # of the directories in ${DIST_PATH}, it will be downloaded into | |
338 | # ${DISTDIR}. If the requested file is in one of the directories in | 338 | # ${DISTDIR}. If the requested file is in one of the directories in | |
339 | # ${DIST_PATH}, a symbolic link will be made to it from ${DISTDIR}. | 339 | # ${DIST_PATH}, a symbolic link will be made to it from ${DISTDIR}. | |
340 | # ${DIST_PATH} directories will will be searched before ${DISTDIR}, | 340 | # ${DIST_PATH} directories will will be searched before ${DISTDIR}, | |
341 | # letting a CD hold the main distfiles archive, and local ${DISTDIR} | 341 | # letting a CD hold the main distfiles archive, and local ${DISTDIR} | |
342 | # hold any updated distfiles, for example. | 342 | # hold any updated distfiles, for example. | |
343 | # Possible: any directories | 343 | # Possible: any directories | |
344 | # Default: none | 344 | # Default: none | |
345 | 345 | |||
346 | DEFAULT_VIEW?= "" | 346 | DEFAULT_VIEW?= "" | |
347 | # This is the default view to which packages are added after installation. | 347 | # This is the default view to which packages are added after installation. | |
348 | # Default: "" (the empty view) | 348 | # Default: "" (the empty view) | |
349 | 349 | |||
350 | FETCH_CMD?= ${TOOLS_PATH.ftp} | 350 | FETCH_USING?= ftp | |
351 | # Default program to fetch the files with pkgsrc. | 351 | # The program type to fetch files. | |
352 | # Default: NetBSD's ftp(1). | 352 | # "manual" will explicitly fail if the DISTFILES don't exist locally. | |
353 | # Possible: any. | 353 | # "custom" requires setting FETCH_CMD, FETCH_BEFORE_ARGS, FETCH_AFTER_ARGS, | |
354 | # FETCH_RESUME_ARGS and FETCH_OUTPUT_ARGS. | |||
355 | # | |||
356 | # The default value can be overriden by a package before including | |||
357 | # bsd.prefs.mk and by the user in mk.conf. | |||
358 | # Possible: curl, custom, fetch, ftp, manual, wget | |||
354 | 359 | |||
355 | #FIX_SYSTEM_HEADERS= | 360 | #FIX_SYSTEM_HEADERS= | |
356 | # Make pkgtools/posix_headers an automatic build dependency for all | 361 | # Make pkgtools/posix_headers an automatic build dependency for all | |
357 | # packages except those in the pkgtools category. | 362 | # packages except those in the pkgtools category. | |
358 | # Possible: "yes", not defined | 363 | # Possible: "yes", not defined | |
359 | # Default: not defined | 364 | # Default: not defined | |
360 | 365 | |||
361 | LIBTOOLIZE_PLIST?= yes | 366 | LIBTOOLIZE_PLIST?= yes | |
362 | # This determines whether to expand libtool archives (.la files) in PLISTs | 367 | # This determines whether to expand libtool archives (.la files) in PLISTs | |
363 | # into the represented library names. | 368 | # into the represented library names. | |
364 | # Possible: yes, no | 369 | # Possible: yes, no | |
365 | # Default: yes | 370 | # Default: yes | |
366 | 371 |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: bsd.fetch-vars.mk,v 1.11 2008/05/22 20:11:55 joerg Exp $ | 1 | # $NetBSD: bsd.fetch-vars.mk,v 1.12 2009/02/10 18:55:54 joerg Exp $ | |
2 | # | 2 | # | |
3 | # This Makefile fragment is included separately by bsd.pkg.mk and | 3 | # This Makefile fragment is included separately by bsd.pkg.mk and | |
4 | # defines some variables which must be defined earlier than where | 4 | # defines some variables which must be defined earlier than where | |
5 | # bsd.fetch.mk is included. | 5 | # bsd.fetch.mk is included. | |
6 | # | 6 | # | |
7 | # The following variables may be set by the user: | 7 | # The following variables may be set by the user: | |
8 | # | 8 | # | |
9 | # DISTDIR is the top-level directory into which all original | 9 | # DISTDIR is the top-level directory into which all original | |
10 | # distribution files are fetched. | 10 | # distribution files are fetched. | |
11 | # | 11 | # | |
12 | # DIST_PATH is a list of directories, separated by colons, in which | 12 | # DIST_PATH is a list of directories, separated by colons, in which | |
13 | # the distribution files are looked up, additionally to DISTDIR. | 13 | # the distribution files are looked up, additionally to DISTDIR. | |
14 | # No files will ever be created in these directories. | 14 | # No files will ever be created in these directories. | |
@@ -63,19 +63,25 @@ _ALLFILES?= ${_DISTFILES} ${_PATCHFILES} | @@ -63,19 +63,25 @@ _ALLFILES?= ${_DISTFILES} ${_PATCHFILES} | |||
63 | _ALLFILES:= ${_ALLFILES:O:u} # remove duplicates | 63 | _ALLFILES:= ${_ALLFILES:O:u} # remove duplicates | |
64 | 64 | |||
65 | _BUILD_DEFS+= _DISTFILES _PATCHFILES | 65 | _BUILD_DEFS+= _DISTFILES _PATCHFILES | |
66 | 66 | |||
67 | # When mirroring distfiles which others may fetch, only fetch the | 67 | # When mirroring distfiles which others may fetch, only fetch the | |
68 | # distfiles if it is allowed to be re-distributed freely. Also, | 68 | # distfiles if it is allowed to be re-distributed freely. Also, | |
69 | # suppress some bootstrap-depends output. | 69 | # suppress some bootstrap-depends output. | |
70 | # | 70 | # | |
71 | .if make(mirror-distfiles) | 71 | .if make(mirror-distfiles) | |
72 | NO_SKIP= # defined | 72 | NO_SKIP= # defined | |
73 | _BOOTSTRAP_VERBOSE= # defined | 73 | _BOOTSTRAP_VERBOSE= # defined | |
74 | .endif | 74 | .endif | |
75 | 75 | |||
76 | .if !empty(_CKSUMFILES) | 76 | .if !empty(_CKSUMFILES) && defined(FAILOVER_FETCH) | |
77 | USE_TOOLS+= ftp:bootstrap | |||
78 | . if defined(FAILOVER_FETCH) | |||
79 | USE_TOOLS+= digest:bootstrap | 77 | USE_TOOLS+= digest:bootstrap | |
80 | . endif | |||
81 | .endif | 78 | .endif | |
79 | ||||
80 | _FETCH_TOOLS.ftp= ftp | |||
81 | _FETCH_TOOLS.fetch= fetch | |||
82 | _FETCH_DEPENDS.wget= wget-[0-9]*:../../net/wget | |||
83 | _FETCH_DEPENDS.curl= curl-[0-9]*:../../www/curl | |||
84 | _FETCH_TOOLS.manual= false | |||
85 | ||||
86 | USE_TOOLS+= ${_FETCH_TOOLS.${FETCH_USING}:C/$/:bootstrap/} | |||
87 | BOOTSTRAP_DEPENDS+= ${_FETCH_DEPENDS.${FETCH_USING}} |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: fetch-list.mk,v 1.10 2009/02/08 23:16:08 wiz Exp $ | 1 | # $NetBSD: fetch-list.mk,v 1.11 2009/02/10 18:55:54 joerg Exp $ | |
2 | 2 | |||
3 | ###################################################################### | 3 | ###################################################################### | |
4 | ### fetch-list (PUBLIC) | 4 | ### fetch-list (PUBLIC) | |
5 | ###################################################################### | 5 | ###################################################################### | |
6 | ### fetch-list is a public target to print out a standalone shell | 6 | ### fetch-list is a public target to print out a standalone shell | |
7 | ### script to fetch all distfiles needed to build the package, | 7 | ### script to fetch all distfiles needed to build the package, | |
8 | ### including distfiles needed by dependencies. This script does not | 8 | ### including distfiles needed by dependencies. This script does not | |
9 | ### perform any checksumming of the distfiles and does not resume | 9 | ### perform any checksumming of the distfiles and does not resume | |
10 | ### interrupted file transfers. | 10 | ### interrupted file transfers. | |
11 | ### | 11 | ### | |
12 | .PHONY: fetch-list | 12 | .PHONY: fetch-list | |
13 | fetch-list: fetch-list-header fetch-list-recursive | 13 | fetch-list: fetch-list-header fetch-list-recursive | |
14 | 14 | |||
@@ -72,38 +72,38 @@ fetch-list-one-pkg: | @@ -72,38 +72,38 @@ fetch-list-one-pkg: | |||
72 | /^Size/ && $$2 == "(${fetchfile})" { print $$4 } \ | 72 | /^Size/ && $$2 == "(${fetchfile})" { print $$4 } \ | |
73 | ' ${DISTINFO_FILE}` || true; \ | 73 | ' ${DISTINFO_FILE}` || true; \ | |
74 | ${ECHO} '# Fetch ${fetchfile} ('$${filesize-???}' bytes):'; \ | 74 | ${ECHO} '# Fetch ${fetchfile} ('$${filesize-???}' bytes):'; \ | |
75 | ${ECHO} '#'; \ | 75 | ${ECHO} '#'; \ | |
76 | ${ECHO} '${SH} -s ${fetchfile:T} <<"EOF" |('; \ | 76 | ${ECHO} '${SH} -s ${fetchfile:T} <<"EOF" |('; \ | |
77 | ${CAT} ${DYNAMIC_SITES_SCRIPT}; \ | 77 | ${CAT} ${DYNAMIC_SITES_SCRIPT}; \ | |
78 | ${ECHO} EOF; \ | 78 | ${ECHO} EOF; \ | |
79 | ${ECHO} read unsorted_sites; \ | 79 | ${ECHO} read unsorted_sites; \ | |
80 | ${ECHO} 'unsorted_sites="$${unsorted_sites} ${_MASTER_SITE_BACKUP}"'; \ | 80 | ${ECHO} 'unsorted_sites="$${unsorted_sites} ${_MASTER_SITE_BACKUP}"'; \ | |
81 | ${ECHO} sites='"'${_ORDERED_SITES:Q}'"'; \ | 81 | ${ECHO} sites='"'${_ORDERED_SITES:Q}'"'; \ | |
82 | ${ECHO} "${MKDIR} ${_DISTDIR}"; \ | 82 | ${ECHO} "${MKDIR} ${_DISTDIR}"; \ | |
83 | ${ECHO} 'cd ${_DISTDIR} && { [ -f ${fetchfile} -o -f ${fetchfile:T} ] ||'; \ | 83 | ${ECHO} 'cd ${_DISTDIR} && { [ -f ${fetchfile} -o -f ${fetchfile:T} ] ||'; \ | |
84 | ${ECHO} 'for site in $$sites; do'; \ | 84 | ${ECHO} 'for site in $$sites; do'; \ | |
85 | ${ECHO} ' ${FETCH_CMD} ${FETCH_BEFORE_ARGS} "$${site}${fetchfile:T}" ${FETCH_AFTER_ARGS} && break ||'; \ | 85 | ${ECHO} ' ${_FETCH_CMD.${FETCH_USING}:Q} ${_FETCH_BEFORE_ARGS.${FETCH_USING}:Q} "$${site}${fetchfile:T}" ${_FETCH_AFTER_ARGS.${FETCH_USING}:Q} && break ||'; \ | |
86 | ${ECHO} ' ${ECHO} ${fetchfile:T} not fetched'; \ | 86 | ${ECHO} ' ${ECHO} ${fetchfile:T} not fetched'; \ | |
87 | ${ECHO} 'done; }'; \ | 87 | ${ECHO} 'done; }'; \ | |
88 | ${ECHO} ')'; \ | 88 | ${ECHO} ')'; \ | |
89 | fi) | 89 | fi) | |
90 | . else | 90 | . else | |
91 | @(if [ ! -f ${_DISTDIR}/${fetchfile:T} ]; then \ | 91 | @(if [ ! -f ${_DISTDIR}/${fetchfile:T} ]; then \ | |
92 | ${ECHO}; \ | 92 | ${ECHO}; \ | |
93 | filesize=`${AWK} ' \ | 93 | filesize=`${AWK} ' \ | |
94 | /^Size/ && $$2 == "(${fetchfile})" { print $$4 } \ | 94 | /^Size/ && $$2 == "(${fetchfile})" { print $$4 } \ | |
95 | ' ${DISTINFO_FILE}` || true; \ | 95 | ' ${DISTINFO_FILE}` || true; \ | |
96 | ${ECHO} '# Fetch ${fetchfile} ('$${filesize-???}' bytes):'; \ | 96 | ${ECHO} '# Fetch ${fetchfile} ('$${filesize-???}' bytes):'; \ | |
97 | ${ECHO} '#'; \ | 97 | ${ECHO} '#'; \ | |
98 | ${ECHO} 'unsorted_sites="${SITES.${fetchfile:T:S/=/--/}} ${_MASTER_SITE_BACKUP}"'; \ | 98 | ${ECHO} 'unsorted_sites="${SITES.${fetchfile:T:S/=/--/}} ${_MASTER_SITE_BACKUP}"'; \ | |
99 | ${ECHO} sites='"'${_ORDERED_SITES:Q}'"'; \ | 99 | ${ECHO} sites='"'${_ORDERED_SITES:Q}'"'; \ | |
100 | ${ECHO} "${MKDIR} ${_DISTDIR}"; \ | 100 | ${ECHO} "${MKDIR} ${_DISTDIR}"; \ | |
101 | ${ECHO} 'cd ${_DISTDIR} && { [ -f ${fetchfile} -o -f ${fetchfile:T} ] ||'; \ | 101 | ${ECHO} 'cd ${_DISTDIR} && { [ -f ${fetchfile} -o -f ${fetchfile:T} ] ||'; \ | |
102 | ${ECHO} 'for site in $$sites; do'; \ | 102 | ${ECHO} 'for site in $$sites; do'; \ | |
103 | ${ECHO} ' ${FETCH_CMD} ${FETCH_BEFORE_ARGS} "$${site}${fetchfile:T}" ${FETCH_AFTER_ARGS} && break ||'; \ | 103 | ${ECHO} ' ${_FETCH_CMD.${FETCH_USING}:Q} ${_FETCH_BEFORE_ARGS.${FETCH_USING}:Q} "$${site}${fetchfile:T}" ${_FETCH_AFTER_ARGS.${FETCH_USING}:Q} && break ||'; \ | |
104 | ${ECHO} ' ${ECHO} ${fetchfile:T} not fetched'; \ | 104 | ${ECHO} ' ${ECHO} ${fetchfile:T} not fetched'; \ | |
105 | ${ECHO} 'done; }'; \ | 105 | ${ECHO} 'done; }'; \ | |
106 | fi) | 106 | fi) | |
107 | . endif | 107 | . endif | |
108 | . endfor | 108 | . endfor | |
109 | .endif | 109 | .endif |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: fetch.mk,v 1.37 2008/10/08 15:39:07 joerg Exp $ | 1 | # $NetBSD: fetch.mk,v 1.38 2009/02/10 18:55:54 joerg Exp $ | |
2 | 2 | |||
3 | _MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP:=${DIST_SUBDIR}${DIST_SUBDIR:D/}} | 3 | _MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP:=${DIST_SUBDIR}${DIST_SUBDIR:D/}} | |
4 | _MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE:=${DIST_SUBDIR}${DIST_SUBDIR:D/}} | 4 | _MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE:=${DIST_SUBDIR}${DIST_SUBDIR:D/}} | |
5 | 5 | |||
6 | # Where to put distfiles that don't have any other master site | 6 | # Where to put distfiles that don't have any other master site | |
7 | MASTER_SITE_LOCAL?= ${MASTER_SITE_BACKUP:=LOCAL_PORTS/} | 7 | MASTER_SITE_LOCAL?= ${MASTER_SITE_BACKUP:=LOCAL_PORTS/} | |
8 | 8 | |||
9 | # Set up _ORDERED_SITES to work out the exact list of sites for every file, | 9 | # Set up _ORDERED_SITES to work out the exact list of sites for every file, | |
10 | # using the dynamic sites script, or ordering according to the master site | 10 | # using the dynamic sites script, or ordering according to the master site | |
11 | # list, MASTER_SORT_RANDOM randomization feature, or the patterns in | 11 | # list, MASTER_SORT_RANDOM randomization feature, or the patterns in | |
12 | # MASTER_SORT or MASTER_SORT_REGEX as appropriate. | 12 | # MASTER_SORT or MASTER_SORT_REGEX as appropriate. | |
13 | # No actual sorting is done until _ORDERED_SITES is expanded. | 13 | # No actual sorting is done until _ORDERED_SITES is expanded. | |
14 | # | 14 | # | |
@@ -153,91 +153,98 @@ fetch-check-interactive: .USEBEFORE | @@ -153,91 +153,98 @@ fetch-check-interactive: .USEBEFORE | |||
153 | ${ERROR_MSG} "======================================================================"; \ | 153 | ${ERROR_MSG} "======================================================================"; \ | |
154 | exit 1 | 154 | exit 1 | |
155 | .else | 155 | .else | |
156 | @${DO_NADA} | 156 | @${DO_NADA} | |
157 | .endif | 157 | .endif | |
158 | 158 | |||
159 | ###################################################################### | 159 | ###################################################################### | |
160 | ### do-fetch-file (PRIVATE) | 160 | ### do-fetch-file (PRIVATE) | |
161 | ###################################################################### | 161 | ###################################################################### | |
162 | ### do-fetch-file is a macro target that runs the "fetch" script to | 162 | ### do-fetch-file is a macro target that runs the "fetch" script to | |
163 | ### transfer the files from the appropriate sites if needed. | 163 | ### transfer the files from the appropriate sites if needed. | |
164 | ### | 164 | ### | |
165 | # | 165 | # | |
166 | # FETCH_CMD is the program used to fetch files. It must understand | 166 | # FETCH_CMD is the program used to fetch files for FETCH_USING=manual. | |
167 | # fetching files located via URLs, e.g. NetBSD's ftp, net/tnftp, | 167 | # It must understand fetching files located via URLs, | |
168 | # etc. The default value is set in pkgsrc/mk/defaults/mk.conf. | 168 | # e.g. NetBSD's ftp, net/tnftp, etc. | |
169 | # | 169 | # | |
170 | # The following variables are all lists of options to pass to he command | 170 | # The following variables are all lists of options to pass to he command | |
171 | # used to do the actual fetching of the file. | 171 | # used to do the actual fetching of the file. | |
172 | # | 172 | # | |
173 | # FETCH_BEFORE_ARGS appear before all other options on the command line. | 173 | # FETCH_BEFORE_ARGS appear before all other options on the command line. | |
174 | # | 174 | # | |
175 | # FETCH_AFTER_ARGS appear after all other options on the command line. | 175 | # FETCH_AFTER_ARGS appear after all other options on the command line. | |
176 | # | 176 | # | |
177 | # FETCH_RESUME_ARGS appears just after FETCH_BEFORE_ARGS and is the set | 177 | # FETCH_RESUME_ARGS appears just after FETCH_BEFORE_ARGS and is the set | |
178 | # of options for causing the command to resume a previous transfer. | 178 | # of options for causing the command to resume a previous transfer. | |
179 | # | 179 | # | |
180 | # FETCH_OUTPUT_ARGS is a set of options for specifying the name of the | 180 | # FETCH_OUTPUT_ARGS is a set of options for specifying the name of the | |
181 | # local file that will hold the contents of the fetched file. | 181 | # local file that will hold the contents of the fetched file. | |
182 | # | 182 | # | |
183 | # FAILOVER_FETCH, if defined, will cause a checksum to be performed during | 183 | # FAILOVER_FETCH, if defined, will cause a checksum to be performed during | |
184 | # a fetch to verify the transferred file is correct; if the checksum | 184 | # a fetch to verify the transferred file is correct; if the checksum | |
185 | # is incorrect, then the next site will be tried. | 185 | # is incorrect, then the next site will be tried. | |
186 | # | 186 | # | |
187 | # PKG_RESUME_TRANSFERS is a yes/no variable that causes the fetch script | 187 | # PKG_RESUME_TRANSFERS is a yes/no variable that causes the fetch script | |
188 | # to try to resume interrupted file transfers to avoid downloading | 188 | # to try to resume interrupted file transfers to avoid downloading | |
189 | # the whole file. The default is set in pkgsrc/mk/defaults/mk.conf. | 189 | # the whole file. The default is set in pkgsrc/mk/defaults/mk.conf. | |
190 | # | 190 | # | |
191 | #FETCH_CMD?= ftp # default is set by pkgsrc/mk/defaults/mk.conf | |||
192 | FETCH_BEFORE_ARGS?= ${_FETCH_BEFORE_ARGS.${FETCH_CMD:T}} | |||
193 | FETCH_AFTER_ARGS?= ${_FETCH_AFTER_ARGS.${FETCH_CMD:T}} | |||
194 | FETCH_RESUME_ARGS?= ${_FETCH_RESUME_ARGS.${FETCH_CMD:T}} | |||
195 | FETCH_OUTPUT_ARGS?= ${_FETCH_OUTPUT_ARGS.${FETCH_CMD:T}} | |||
196 | 191 | |||
197 | _FETCH_BEFORE_ARGS.ftp= # empty | 192 | _FETCH_BEFORE_ARGS.ftp= # empty | |
198 | # If this host is behind a filtering firewall, use passive ftp(1) | 193 | # If this host is behind a filtering firewall, use passive ftp(1) | |
199 | _FETCH_BEFORE_ARGS.ftp+= ${PASSIVE_FETCH:D-p} | 194 | _FETCH_BEFORE_ARGS.ftp+= ${PASSIVE_FETCH:D-p} | |
200 | _FETCH_AFTER_ARGS.ftp= # empty | 195 | _FETCH_AFTER_ARGS.ftp= # empty | |
201 | _FETCH_RESUME_ARGS.ftp= -R | 196 | _FETCH_RESUME_ARGS.ftp= -R | |
202 | _FETCH_OUTPUT_ARGS.ftp= -o | 197 | _FETCH_OUTPUT_ARGS.ftp= -o | |
198 | _FETCH_CMD.ftp= ${TOOLS_PATH.ftp} | |||
203 | 199 | |||
204 | _FETCH_BEFORE_ARGS.fetch= # empty | 200 | _FETCH_BEFORE_ARGS.fetch= # empty | |
205 | _FETCH_AFTER_ARGS.fetch= # empty | 201 | _FETCH_AFTER_ARGS.fetch= # empty | |
206 | _FETCH_RESUME_ARGS.fetch= -r | 202 | _FETCH_RESUME_ARGS.fetch= -r | |
207 | _FETCH_OUTPUT_ARGS.fetch= -o | 203 | _FETCH_OUTPUT_ARGS.fetch= -o | |
204 | _FETCH_CMD.fetch= ${TOOLS_PATH.fetch} | |||
208 | 205 | |||
209 | _FETCH_BEFORE_ARGS.wget= # empty | 206 | _FETCH_BEFORE_ARGS.wget= # empty | |
210 | _FETCH_AFTER_ARGS.wget= # empty | 207 | _FETCH_AFTER_ARGS.wget= # empty | |
211 | _FETCH_RESUME_ARGS.wget= -c | 208 | _FETCH_RESUME_ARGS.wget= -c | |
212 | _FETCH_OUTPUT_ARGS.wget= -O | 209 | _FETCH_OUTPUT_ARGS.wget= -O | |
210 | _FETCH_CMD.wget= ${PREFIX}/bin/wget | |||
213 | 211 | |||
214 | _FETCH_BEFORE_ARGS.curl= # empty | 212 | _FETCH_BEFORE_ARGS.curl= # empty | |
215 | _FETCH_BEFORE_ARGS.curl+= ${PASSIVE_FETCH:D--ftp-pasv} | 213 | _FETCH_BEFORE_ARGS.curl+= ${PASSIVE_FETCH:D--ftp-pasv} | |
216 | _FETCH_AFTER_ARGS.curl= -O # must be here to honor -o option | 214 | _FETCH_AFTER_ARGS.curl= -O # must be here to honor -o option | |
217 | _FETCH_RESUME_ARGS.curl= -C - | 215 | _FETCH_RESUME_ARGS.curl= -C - | |
218 | _FETCH_OUTPUT_ARGS.curl= -o | 216 | _FETCH_OUTPUT_ARGS.curl= -o | |
217 | _FETCH_CMD.curl= ${PREFIX}/bin/wget | |||
218 | ||||
219 | _FETCH_CMD.manual= ${TOOLS_PATH.false} | |||
220 | ||||
221 | _FETCH_CMD.custom= ${FETCH_CMD} | |||
222 | _FETCH_BEFORE_ARGS.custom= ${FETCH_BEFORE_ARGS} | |||
223 | _FETCH_AFTER_ARGS.custom= ${FETCH_AFTER_ARGS} | |||
224 | _FETCH_RESUME_ARGS.custom= ${FETCH_RESUME_ARGS} | |||
225 | _FETCH_OUTPUT_ARGS.custom= ${FETCH_OUTPUT_ARGS} | |||
219 | 226 | |||
220 | _FETCH_CMD= ${SETENV} CHECKSUM=${_CHECKSUM_CMD:Q} \ | 227 | _FETCH_CMD= ${SETENV} CHECKSUM=${_CHECKSUM_CMD:Q} \ | |
221 | CP=${TOOLS_CP:Q} \ | 228 | CP=${TOOLS_CP:Q} \ | |
222 | ECHO=${TOOLS_ECHO:Q} \ | 229 | ECHO=${TOOLS_ECHO:Q} \ | |
223 | FETCH_CMD=${FETCH_CMD:Q} \ | 230 | FETCH_CMD=${_FETCH_CMD.${FETCH_USING}:Q} \ | |
224 | FETCH_BEFORE_ARGS=${FETCH_BEFORE_ARGS:Q} \ | 231 | FETCH_BEFORE_ARGS=${_FETCH_BEFORE_ARGS.${FETCH_USING}:Q} \ | |
225 | FETCH_AFTER_ARGS=${FETCH_AFTER_ARGS:Q} \ | 232 | FETCH_AFTER_ARGS=${_FETCH_AFTER_ARGS.${FETCH_USING}:Q} \ | |
226 | FETCH_RESUME_ARGS=${FETCH_RESUME_ARGS:Q} \ | 233 | FETCH_RESUME_ARGS=${_FETCH_RESUME_ARGS.${FETCH_USING}:Q} \ | |
227 | FETCH_OUTPUT_ARGS=${FETCH_OUTPUT_ARGS:Q} \ | 234 | FETCH_OUTPUT_ARGS=${_FETCH_OUTPUT_ARGS.${FETCH_USING}:Q} \ | |
228 | MKDIR=${TOOLS_MKDIR:Q} MV=${TOOLS_MV:Q} \ | 235 | MKDIR=${TOOLS_MKDIR:Q} MV=${TOOLS_MV:Q} \ | |
229 | TEST=${TOOLS_TEST:Q} TOUCH=${TOOLS_TOUCH:Q} \ | 236 | TEST=${TOOLS_TEST:Q} TOUCH=${TOOLS_TOUCH:Q} \ | |
230 | WC=${TOOLS_WC:Q} \ | 237 | WC=${TOOLS_WC:Q} \ | |
231 | ${SH} ${PKGSRCDIR}/mk/fetch/fetch | 238 | ${SH} ${PKGSRCDIR}/mk/fetch/fetch | |
232 | 239 | |||
233 | _FETCH_ARGS+= ${PKG_VERBOSE:D-v} | 240 | _FETCH_ARGS+= ${PKG_VERBOSE:D-v} | |
234 | .if exists(${DISTINFO_FILE}) | 241 | .if exists(${DISTINFO_FILE}) | |
235 | _FETCH_ARGS+= ${FAILOVER_FETCH:D-c} -f ${DISTINFO_FILE:Q} | 242 | _FETCH_ARGS+= ${FAILOVER_FETCH:D-c} -f ${DISTINFO_FILE:Q} | |
236 | .endif | 243 | .endif | |
237 | .if !empty(PKG_RESUME_TRANSFERS:M[yY][eE][sS]) | 244 | .if !empty(PKG_RESUME_TRANSFERS:M[yY][eE][sS]) | |
238 | _FETCH_ARGS+= -r | 245 | _FETCH_ARGS+= -r | |
239 | .endif | 246 | .endif | |
240 | .if defined(DIST_SUBDIR) && !empty(DIST_SUBDIR) | 247 | .if defined(DIST_SUBDIR) && !empty(DIST_SUBDIR) | |
241 | _FETCH_ARGS+= -d ${DIST_SUBDIR} | 248 | _FETCH_ARGS+= -d ${DIST_SUBDIR} | |
242 | .endif | 249 | .endif | |
243 | 250 |