aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorClement Laforet <clement@FreeBSD.org>2006-01-15 18:58:38 +0000
committerClement Laforet <clement@FreeBSD.org>2006-01-15 18:58:38 +0000
commitc5d4c969c8fd1e64cfee5dfdd8b3402d335114ea (patch)
tree3984993639b14fb0df67890bc349795bedf9a88a /Mk
parent236bc34aee98227b2d85e9f190e8edb1bae4156b (diff)
downloadports-c5d4c969c8fd1e64cfee5dfdd8b3402d335114ea.tar.gz
ports-c5d4c969c8fd1e64cfee5dfdd8b3402d335114ea.zip
Notes
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.apache.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/Mk/bsd.apache.mk b/Mk/bsd.apache.mk
index 1d456147f997..098b6a6966d2 100644
--- a/Mk/bsd.apache.mk
+++ b/Mk/bsd.apache.mk
@@ -337,6 +337,17 @@ AP_EXTRAS+= -L ${AP_LIB}
.endif
.if defined(AP_PORT_IS_SERVER)
+.if !target(print-closest-mirrors)
+print-closest-mirrors:
+ @${ECHO_MSG} -n "Fetching list of nearest mirror: " >&2
+ @MIRRORS=`${FETCH_CMD} -T 30 -qo - http://www.apache.org/dyn/closer.cgi/httpd/ 2> /dev/null\
+ | ${GREP} /httpd/ | ${SED} 's/.*href="\(.*\)"><str.*/\1/g' | \
+ ${HEAD} -7 | ${TAIL} -6` ; \
+ ${ECHO_MSG} done >&2; if [ "x$$MIRRORS" != "x" ]; then \
+ ${ECHO_MSG} -n "MASTER_SITE_APACHE_HTTPD?= ";\
+ ${ECHO_MSG} $$MIRRORS; else \
+ ${ECHO_MSG} "No mirrors found!">&2 ; fi
+.endif
.if !target(show-categories)
show-categories: