2009/07/29

FreBSD ports, switch from fetch to wget

The FreeBSD ports system uses fetch to download the files from the distfiles
i stand behind "i-can't-guess" firewall and proxy
many fetch options don't give me solutions
someday i try wget, and it works perfectly
and i want to switch ports system from "fetch" to "wget"

First

install wget
( by ports, by package, or anything you can install )

Second
[root@ ~]# cd /usr/ports/Mk
[root@ /usr/ports/Mk]# vi bsd.port.mk


edit to
.if exists(/usr/bin/fetch)
#FETCH_BINARY?= /usr/bin/fetch
#FETCH_ARGS?= -ApRr
#FETCH_REGET?= 1

.if !defined(DISABLE_SIZE)
#FETCH_BEFORE_ARGS+= $${CKSIZE:+-S $$CKSIZE}
.endif
.else
FETCH_BINARY?= /usr/bin/ftp
FETCH_ARGS?= -R
FETCH_REGET?= 0
.endif
FETCH_CMD?= /usr/local/bin/wget
#FETCH_CMD?= ${FETCH_BINARY} ${FETCH_ARGS}


wget configuration

/usr/local/etc/wgetrc

1 comment:

Anonymous said...

just put
FETCH_CMD= /usr/local/bin/wget
to /etc/make.conf