summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfredb <fredb@pkgsrc.org>2002-03-04 19:41:03 +0000
committerfredb <fredb@pkgsrc.org>2002-03-04 19:41:03 +0000
commit2f53857f2953490ab3cb2552a7d6cefe67b70c7e (patch)
tree81fb74e21b3de2fbc9c29841caa4eb46bf038535
parent6c0548753f3ed5dbdd6b29b3a77cc5f78eeb7e08 (diff)
downloadpkgsrc-2f53857f2953490ab3cb2552a7d6cefe67b70c7e.tar.gz
Generalize the handling for packages where "fetch" and "fetch-list"
only emit a message and don't actually fetch anything. This allows us to make the output of "fetch-list" for these packages consistent with other packages. While we're in here, integrate DYNAMIC_MASTER_SITES with the ${ORDERED_SITES} macro. The only functional change here is that ${MASTER_SITE_OVERRIDE} is now respected. Still to do -- something appropriate for "fetch-list" for these packages, like sourcing "getsites.sh" into the generated script. (Well, "package", but there are two others that do something similar in their "Makefile".) Also eliminate the misbegotten _FETCH_ALLFILES macro -- now that only "fetch" uses it, move it's functionality directly under "do-fetch".
-rw-r--r--audio/realplayer/Makefile11
-rw-r--r--cad/simian/Makefile11
-rw-r--r--devel/ipv6socket_scrub/Makefile11
-rw-r--r--emulators/vmware-module/Makefile11
-rw-r--r--fonts/acroread-jpnfont/Makefile11
-rw-r--r--mk/bsd.pkg.mk85
-rw-r--r--mk/bsd.pkg.subdir.mk3
-rw-r--r--sysutils/storage-manager/Makefile11
-rw-r--r--www/ap-aolserver/Makefile11
-rw-r--r--www/openacs/Makefile11
10 files changed, 60 insertions, 116 deletions
diff --git a/audio/realplayer/Makefile b/audio/realplayer/Makefile
index d1740dc41f1..61f0f6c7faf 100644
--- a/audio/realplayer/Makefile
+++ b/audio/realplayer/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2002/02/26 21:28:47 fredb Exp $
+# $NetBSD: Makefile,v 1.8 2002/03/04 19:41:06 fredb Exp $
DISTNAME= rp8_linux20_libc6_i386_cs2
PKGNAME= realplayer-8.0.1
@@ -45,15 +45,6 @@ _FETCH_MESSAGE= \
${ECHO} " ${DOWNLOAD}."; \
${ECHO} "==============================================================="
-do-fetch:
- @if [ ! -f ${RP_INSTALLER} ]; then \
- ${_FETCH_MESSAGE}; \
- ${FALSE}; \
- fi
-
-fetch-list-one-pkg:
- @${ECHO} ${_FETCH_MESSAGE:Q}
-
pre-extract:
@delay=15; \
${SED} -e "s|@WRKSRC@|${WRKSRC}|g" \
diff --git a/cad/simian/Makefile b/cad/simian/Makefile
index d3ace07c020..888c032f9dc 100644
--- a/cad/simian/Makefile
+++ b/cad/simian/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2002/02/26 21:28:48 fredb Exp $
+# $NetBSD: Makefile,v 1.4 2002/03/04 19:41:06 fredb Exp $
#
DISTNAME= simian_12_98
@@ -27,15 +27,6 @@ _FETCH_MESSAGE= \
${ECHO} ' with which to fetch "${DISTNAME}${EXTRACT_SUFX}" manually.'; \
${ECHO} '======================================================='
-do-fetch:
- @if ${TEST} \! -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}; then \
- ${_FETCH_MESSAGE}; \
- exit 1; \
- fi
-
-fetch-list-one-pkg:
- @${ECHO} ${_FETCH_MESSAGE:Q}
-
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/simian ${PREFIX}/bin
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/simian
diff --git a/devel/ipv6socket_scrub/Makefile b/devel/ipv6socket_scrub/Makefile
index 4d0a33b22fe..30f3cccd766 100644
--- a/devel/ipv6socket_scrub/Makefile
+++ b/devel/ipv6socket_scrub/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2002/02/26 21:28:48 fredb Exp $
+# $NetBSD: Makefile,v 1.11 2002/03/04 19:41:06 fredb Exp $
# KAME Id: Makefile,v 1.6 1999/11/28 14:36:04 itojun Exp
#
@@ -28,15 +28,6 @@ _FETCH_MESSAGE= \
${ECHO} ' and fetch on your own.'; \
${ECHO} '======================================================='
-do-fetch:
- @if ${TEST} \! -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}; then \
- ${_FETCH_MESSAGE}; \
- exit 1; \
- fi
-
-fetch-list-one-pkg:
- @${ECHO} ${_FETCH_MESSAGE:Q}
-
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/ipv6socket_scrub ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/../Docs/man/man1/ipv6socket_scrub.1 \
diff --git a/emulators/vmware-module/Makefile b/emulators/vmware-module/Makefile
index 31bf44a854c..99cd1b726bb 100644
--- a/emulators/vmware-module/Makefile
+++ b/emulators/vmware-module/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2002/02/26 21:28:48 fredb Exp $
+# $NetBSD: Makefile,v 1.4 2002/03/04 19:41:07 fredb Exp $
DISTNAME= vmware-netbsd-1.0
PKGNAME= vmware-module-1.0
@@ -29,15 +29,6 @@ _FETCH_MESSAGE= \
${ECHO} " ${DOWNLOAD}"; \
${ECHO} "==============================================================="
-do-fetch:
- @if [ ! -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \
- ${_FETCH_MESSAGE}; \
- ${FALSE}; \
- fi
-
-fetch-list-one-pkg:
- @${ECHO} ${_FETCH_MESSAGE:Q}
-
# to override <bsd.own.mk>, MUST be set this way BEFORE bsd.prefs.mk
BSDSRCDIR?= /nonexistent
diff --git a/fonts/acroread-jpnfont/Makefile b/fonts/acroread-jpnfont/Makefile
index 31dde16b07d..5c1225e8833 100644
--- a/fonts/acroread-jpnfont/Makefile
+++ b/fonts/acroread-jpnfont/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2002/02/26 21:28:49 fredb Exp $
+# $NetBSD: Makefile,v 1.4 2002/03/04 19:41:07 fredb Exp $
#
DISTNAME= jpnfont
@@ -20,13 +20,4 @@ _FETCH_MESSAGE= \
${ECHO} " http://www.adobe.com/prodindex/acrobat/readstep.html"; \
${ECHO} "======================================================="
-do-fetch:
- @if [ ! -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \
- ${_FETCH_MESSAGE}; \
- ${FALSE}; \
- fi
-
-fetch-list-one-pkg:
- @${ECHO} ${_FETCH_MESSAGE:Q}
-
.include "../acroread-font-share/Makefile.common"
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 2855d41afa8..ff70c98835e 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.940 2002/03/04 17:21:46 jmc Exp $
+# $NetBSD: bsd.pkg.mk,v 1.941 2002/03/04 19:41:03 fredb Exp $
#
# This file is in the public domain.
#
@@ -1251,17 +1251,22 @@ _CHECK_DIST_PATH= \
fi
#
-# Sort the master site list according to the patterns in MASTER_SORT.
+# Set up ORDERED_SITES to work out the exact list of sites for every file,
+# using the dynamic sites script, or sorting according to the master site
+# list or the patterns in MASTER_SORT or MASTER_SORT_REGEX as appropriate.
+# No actual sorting is done until ORDERED_SITES is expanded.
#
-.if defined(MASTER_SORT) || defined(MASTER_SORT_REGEX)
+.if defined(DYNAMIC_MASTER_SITES)
+ORDERED_SITES= ${_MASTER_SITE_OVERRIDE} `${SH} ${FILESDIR}/getsite.sh $${file}`
+.elif defined(MASTER_SORT) || defined(MASTER_SORT_REGEX)
MASTER_SORT?=
MASTER_SORT_REGEX?=
MASTER_SORT_REGEX+= ${MASTER_SORT:S/./\\./g:C/.*/:\/\/[^\/]*&\//}
MASTER_SORT_AWK= BEGIN { RS = " "; ORS = " "; IGNORECASE = 1 ; gl = "${MASTER_SORT_REGEX}"; }
-.for srt in ${MASTER_SORT_REGEX}
+. for srt in ${MASTER_SORT_REGEX}
MASTER_SORT_AWK+= /${srt:C/\//\\\//g}/ { good["${srt}"] = good["${srt}"] " " $$0 ; next; }
-.endfor
+. endfor
MASTER_SORT_AWK+= { rest = rest " " $$0; } END { n=split(gl, gla); for(i=1;i<=n;i++) { print good[gla[i]]; } print rest; }
SORT_SITES_CMD= ${ECHO} $$unsorted_sites | ${AWK} '${MASTER_SORT_AWK}'
@@ -1271,47 +1276,43 @@ ORDERED_SITES= ${_MASTER_SITE_OVERRIDE} $$unsorted_sites
.endif
#
-# Complete macro for the do-fetch target.
+# Associate each file to fetch with the correct site(s).
#
-.if !defined(_FETCH_ALLFILES)
-. if !empty(_DISTFILES)
-. for fetchfile in ${_DISTFILES}
+.if !empty(_DISTFILES)
+. for fetchfile in ${_DISTFILES}
SITES_${fetchfile:T}?= ${MASTER_SITES}
-. endfor
-. endif
-. if !empty(_PATCHFILES)
-. for fetchfile in ${_PATCHFILES}
+. endfor
+.endif
+.if !empty(_PATCHFILES)
+. for fetchfile in ${_PATCHFILES}
SITES_${fetchfile:T}?= ${PATCH_SITES}
-. endfor
-. endif
+. endfor
+.endif
+
+.if !target(do-fetch)
+do-fetch:
. if !empty(_ALLFILES)
-_FETCH_ALLFILES= ${TEST} -d ${_DISTDIR} || ${MKDIR} ${_DISTDIR};
-_FETCH_ALLFILES+= cd ${_DISTDIR};
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ ${TEST} -d ${_DISTDIR} || ${MKDIR} ${_DISTDIR}
. for fetchfile in ${_ALLFILES}
-. if defined(DYNAMIC_MASTER_SITES)
-_FETCH_ALLFILES+= \
+. if defined(_FETCH_MESSAGE)
+ ${_PKG_SILENT}${_PKG_DEBUG} \
file="${fetchfile}"; \
- bfile="${fetchfile:T}"; \
- sites=`sh ${FILESDIR}/getsite.sh $${file}`; \
- ${_CHECK_DIST_PATH}; \
- ${_FETCH_FILE};
+ if [ ! -f ${DISTDIR}/$$file ]; then \
+ ${_FETCH_MESSAGE}; \
+ fi
. else
-_FETCH_ALLFILES+= \
- unsorted_sites="${SITES_${fetchfile:T}} ${_MASTER_SITE_BACKUP}"; \
- sites="${ORDERED_SITES}"; \
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ cd ${_DISTDIR}; \
file="${fetchfile}"; \
bfile="${fetchfile:T}"; \
+ unsorted_sites="${SITES_${fetchfile:T}} ${_MASTER_SITE_BACKUP}"; \
+ sites="${ORDERED_SITES}"; \
${_CHECK_DIST_PATH}; \
${_FETCH_FILE};
-. endif
+. endif # defined(_FETCH_MESSAGE)
. endfor
-. endif
-_FETCH_ALLFILES?= ${DO_NADA}
-.endif
-
-.if !target(do-fetch)
-do-fetch:
- ${_PKG_SILENT}${_PKG_DEBUG}${_FETCH_ALLFILES}
+. endif # !empty(_ALLFILES)
.endif
# show both build and run depends directories (non-recursively)
@@ -2844,6 +2845,7 @@ fetch-list-recursive:
| ${AWK} ' \
/^[^#]/ { FoundSomething = 1 } \
/^unsorted/ { gsub(/[[:space:]]+/, " \\\n\t") } \
+ /^echo/ { gsub(/;[[:space:]]+/, "\n") } \
{ block[line_c++] = $$0 } \
END { if (FoundSomething) \
for (line = 0; line < line_c; line++) \
@@ -2864,8 +2866,20 @@ fetch-list-one-pkg:
@${ECHO} '#'
@${MKDIR} ${_DISTDIR}
. for fetchfile in ${_ALLFILES}
+. if defined(_FETCH_MESSAGE)
+ @(cd ${_DISTDIR}; \
+ if [ ! -f ${fetchfile:T} ]; then \
+ ${ECHO}; \
+ filesize=`${AWK} ' \
+ /^Size/ && $$2 == "(${fetchfile})" { print $$4 } \
+ ' ${DISTINFO_FILE}` || true; \
+ ${ECHO} '# Prompt user to get ${fetchfile} ('$${filesize-???}' bytes) manually:'; \
+ ${ECHO} '#'; \
+ ${ECHO} ${_FETCH_MESSAGE:Q}; \
+ fi)
+. else
@(cd ${_DISTDIR}; \
- if [ ! -f ${fetchfile} -a ! -f ${fetchfile:T} ]; then \
+ if [ ! -f ${fetchfile:T} ]; then \
${ECHO}; \
filesize=`${AWK} ' \
/^Size/ && $$2 == "(${fetchfile})" { print $$4 } \
@@ -2881,6 +2895,7 @@ fetch-list-one-pkg:
${ECHO} ' ${ECHO} ${fetchfile} not fetched'; \
${ECHO} done; \
fi)
+. endif # defined(_FETCH_MESSAGE)
. endfor
. endif # !empty(_ALLFILES)
.endif # !target(fetch-list-one-pkg)
diff --git a/mk/bsd.pkg.subdir.mk b/mk/bsd.pkg.subdir.mk
index b64fc7366ba..cf76fdaddbb 100644
--- a/mk/bsd.pkg.subdir.mk
+++ b/mk/bsd.pkg.subdir.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.subdir.mk,v 1.46 2002/02/28 14:42:39 fredb Exp $
+# $NetBSD: bsd.pkg.subdir.mk,v 1.47 2002/03/04 19:41:05 fredb Exp $
# Derived from: FreeBSD Id: bsd.port.subdir.mk,v 1.19 1997/03/09 23:10:56 wosch Exp
# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
#
@@ -236,6 +236,7 @@ fetch-list:
} \
/^[^#=]/ { FoundSomething = 1 } \
/^unsorted/ { gsub(/[[:space:]]+/, " \\\n\t") } \
+ /^echo/ { gsub(/;[[:space:]]+/, "\n") } \
!/^=/ { block[c++] = $$0 } \
/^=/ { do_block() } \
END { do_block() } \
diff --git a/sysutils/storage-manager/Makefile b/sysutils/storage-manager/Makefile
index a1df4a2dca4..7a8af66fade 100644
--- a/sysutils/storage-manager/Makefile
+++ b/sysutils/storage-manager/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2002/02/26 21:28:49 fredb Exp $
+# $NetBSD: Makefile,v 1.4 2002/03/04 19:41:08 fredb Exp $
DISTNAME= sm_linux_v314_install
PKGNAME= storage-manager-3.14
@@ -37,15 +37,6 @@ _FETCH_MESSAGE= \
${ECHO} " ${DOWNLOAD}."; \
${ECHO} "================================================================="
-do-fetch:
- @if [ ! -f ${DISTDIR}/${DISTFILES} ]; then \
- ${_FETCH_MESSAGE}; \
- ${FALSE}; \
- fi
-
-fetch-list-one-pkg:
- @${ECHO} ${_FETCH_MESSAGE:Q}
-
do-extract:
${MKDIR} ${WRKSRC}
cd ${WRKSRC}; rpm2cpio ${DISTDIR}/${DISTNAME}.rpm > ${DISTNAME}.cpio
diff --git a/www/ap-aolserver/Makefile b/www/ap-aolserver/Makefile
index 61359e7c66d..099ccdd6ee4 100644
--- a/www/ap-aolserver/Makefile
+++ b/www/ap-aolserver/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2002/02/26 21:28:49 fredb Exp $
+# $NetBSD: Makefile,v 1.8 2002/03/04 19:41:08 fredb Exp $
#
DISTNAME= mod_aolserver-1.1
@@ -29,15 +29,6 @@ _FETCH_MESSAGE= \
${ECHO} " from ${HOMEPAGE} ." ; \
${ECHO} "===================================================================="
-do-fetch:
- @if [ ! -f ${DISTDIR}/${DISTFILES} ] ; then \
- ${_FETCH_MESSAGE}; \
- exit 1 ; \
- fi
-
-fetch-list-one-pkg:
- @${ECHO} ${_FETCH_MESSAGE:Q}
-
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mod_aolserver
${INSTALL_DATA} ${FILESDIR}/README ${FILESDIR}/nsd.tcl.sample \
diff --git a/www/openacs/Makefile b/www/openacs/Makefile
index a02b08d9943..1a82e149fc8 100644
--- a/www/openacs/Makefile
+++ b/www/openacs/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2002/02/26 21:28:49 fredb Exp $
+# $NetBSD: Makefile,v 1.5 2002/03/04 19:41:08 fredb Exp $
#
DISTNAME= openacs-3.2.5
@@ -28,15 +28,6 @@ _FETCH_MESSAGE= \
${ECHO} "from ${HOMEPAGE} ." ; \
${ECHO} "==============================================================="
-do-fetch:
- @if [ ! -f ${DISTDIR}/${DISTFILES} ] ; then \
- ${_FETCH_MESSAGE}; \
- exit 1 ; \
- fi
-
-fetch-list-one-pkg:
- @${ECHO} ${_FETCH_MESSAGE:Q}
-
SEDFILES=${WRKSRC}/parameters/ad.tcl \
${WRKSRC}/bin/aolserver-errors.pl \
${WRKSRC}/bin/queue-message.pl \