Add support for distfile-specific master sites, as requested in pkg/7471.
Syntax: MASTER_SITES_completefilename= http://specific.master/site and similarly for PATCH_SITES. Convert print/ghostscript-nox11 and x11/kterm to take advantage of this.
This commit is contained in:
parent
02a3c0b417
commit
1a9a466f05
4 changed files with 63 additions and 59 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Packages.txt,v 1.217 2001/11/30 01:26:32 wiz Exp $
|
||||
# $NetBSD: Packages.txt,v 1.218 2001/12/02 21:29:20 wiz Exp $
|
||||
###########################################################################
|
||||
|
||||
==========================
|
||||
|
@ -595,6 +595,10 @@ a subdirectory:
|
|||
(Note the trailing slash after the subdirectory name.) Use of the deprecated
|
||||
MASTER_SITE_SUBDIR will not work.
|
||||
|
||||
If the package has multiple DISTFILES from different MASTER_SITES, set
|
||||
MASTER_SITE_name_of_file-0.1.2.tar.gz= ftp://some.url/path/
|
||||
for all except the first distribution file, to speed up fetching the files.
|
||||
|
||||
Currently the following values are available for CATEGORIES. If more than
|
||||
one is used, they need to be separated by spaces:
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: bsd.pkg.mk,v 1.872 2001/12/02 03:11:35 jlam Exp $
|
||||
# $NetBSD: bsd.pkg.mk,v 1.873 2001/12/02 21:29:21 wiz Exp $
|
||||
#
|
||||
# This file is in the public domain.
|
||||
#
|
||||
|
@ -857,7 +857,7 @@ PATCH_SITES+= ${_MASTER_SITE_BACKUP}
|
|||
MASTER_SITES:= ${_MASTER_SITE_OVERRIDE} ${MASTER_SITES}
|
||||
PATCH_SITES:= ${_MASTER_SITE_OVERRIDE} ${PATCH_SITES}
|
||||
.endif
|
||||
|
||||
|
||||
# Derived names so that they're easily overridable.
|
||||
DISTFILES?= ${DISTNAME}${EXTRACT_SUFX}
|
||||
.if defined(PKGREVISION) && ${PKGREVISION} != ""
|
||||
|
@ -1229,20 +1229,22 @@ _FETCH_FILE= \
|
|||
CKSUM=`${DIGEST} $$alg < ${_DISTDIR}/$$bfile`; \
|
||||
CKSUM2=`${AWK} '$$1 == "'$$alg'" && $$2 == "('$$file')" {print $$4;}' <${DISTINFO_FILE}`; \
|
||||
if [ "$$CKSUM" = "$$CKSUM2" -o "$$CKSUM2" = "IGNORE" ]; then \
|
||||
continue 2; \
|
||||
break; \
|
||||
else \
|
||||
${ECHO_MSG} "=> Checksum failure - trying next site."; \
|
||||
fi; \
|
||||
elif [ ! -f ${_DISTDIR}/$$bfile ]; then \
|
||||
${ECHO_MSG} "=> FTP didn't fetch expected file, trying next site." ; \
|
||||
else \
|
||||
continue 2; \
|
||||
break; \
|
||||
fi; \
|
||||
fi \
|
||||
done; \
|
||||
${ECHO_MSG} "=> Couldn't fetch $$bfile - please try to retrieve this";\
|
||||
${ECHO_MSG} "=> file manually into ${_DISTDIR} and try again."; \
|
||||
exit 1; \
|
||||
if [ ! -f ${_DISTDIR}/$$bfile ]; then \
|
||||
${ECHO_MSG} "=> Couldn't fetch $$bfile - please try to retrieve this";\
|
||||
${ECHO_MSG} "=> file manually into ${_DISTDIR} and try again."; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
fi
|
||||
|
||||
_CHECK_DIST_PATH= \
|
||||
|
@ -1277,23 +1279,25 @@ SORTED_PATCH_SITES_CMD= ${ECHO} '${PATCH_SITES}' | ${AWK} '${MASTER_SORT_AWK}'
|
|||
.if !target(do-fetch)
|
||||
do-fetch:
|
||||
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${_DISTDIR}
|
||||
.for fetchfile in ${_DISTFILES}
|
||||
${_PKG_SILENT}${_PKG_DEBUG}cd ${_DISTDIR}; \
|
||||
sites=`${SORTED_MASTER_SITES_CMD}`; \
|
||||
for file in "" ${_DISTFILES}; do \
|
||||
if [ "X$$file" = X"" ]; then continue; fi; \
|
||||
bfile=`${BASENAME} $$file`; \
|
||||
${_CHECK_DIST_PATH}; \
|
||||
${_FETCH_FILE} \
|
||||
done
|
||||
sortedsites=`${SORTED_MASTER_SITES_CMD}`; \
|
||||
sites="${MASTER_SITES_${fetchfile:T}} $$sortedsites"; \
|
||||
file="${fetchfile}"; \
|
||||
bfile="${fetchfile:T}"; \
|
||||
${_CHECK_DIST_PATH}; \
|
||||
${_FETCH_FILE}
|
||||
.endfor
|
||||
. if defined(_PATCHFILES)
|
||||
.for fetchfile in ${_PATCHFILES}
|
||||
${_PKG_SILENT}${_PKG_DEBUG}cd ${_DISTDIR}; \
|
||||
sites=`${SORTED_PATCH_SITES_CMD}`; \
|
||||
for file in "" ${_PATCHFILES}; do \
|
||||
if [ "X$$file" = X"" ]; then continue; fi; \
|
||||
bfile=`${BASENAME} $$file`; \
|
||||
${_CHECK_DIST_PATH}; \
|
||||
${_FETCH_FILE} \
|
||||
done
|
||||
sortedsites=`${SORTED_PATCH_SITES_CMD}`; \
|
||||
sites="${PATCH_SITES_${fetchfile:T}} $$sortedsites"; \
|
||||
file="${fetchfile}"; \
|
||||
bfile="${fetchfile:T}"; \
|
||||
${_CHECK_DIST_PATH}; \
|
||||
${_FETCH_FILE}
|
||||
.endfor
|
||||
. endif
|
||||
.endif
|
||||
|
||||
|
@ -1989,7 +1993,7 @@ show-shlib-type:
|
|||
${ECHO} "$$sotype"; \
|
||||
${RM} -f a.$$$$.c a.$$$$.out
|
||||
.endif
|
||||
|
||||
|
||||
|
||||
################################################################
|
||||
# Skeleton targets start here
|
||||
|
@ -2482,33 +2486,29 @@ fetch-list-one-pkg:
|
|||
@${MKDIR} ${_DISTDIR}
|
||||
@[ -z "${_DISTDIR}" ] || ${ECHO} "${MKDIR} ${_DISTDIR}"
|
||||
. if defined(DISTFILES)
|
||||
.for fetchfile in ${DISTFILES}
|
||||
@(cd ${_DISTDIR}; \
|
||||
for file in "" ${DISTFILES}; do \
|
||||
if [ "X$$file" = X"" ]; then continue; fi; \
|
||||
bfile=`${BASENAME} $$file`; \
|
||||
if [ ! -f $$file -a ! -f $$bfile ]; then \
|
||||
${ECHO} -n "cd ${_DISTDIR} && [ -f $$file -o -f $$bfile ] || "; \
|
||||
for site in "" `${SORTED_MASTER_SITES_CMD}`; do \
|
||||
if [ "X$$site" = X"" ]; then continue; fi; \
|
||||
${ECHO} -n ${FETCH_CMD} ${FETCH_BEFORE_ARGS} "'"$${site}$${file}"'" "${FETCH_AFTER_ARGS}" '|| '; \
|
||||
done; \
|
||||
${ECHO} "${ECHO} $${file} not fetched"; \
|
||||
fi \
|
||||
done)
|
||||
if [ ! -f ${fetchfile} -a ! -f ${fetchfile:T} ]; then \
|
||||
${ECHO} -n "cd ${_DISTDIR} && [ -f ${fetchfile} -o -f ${fetchfile:T} ] || "; \
|
||||
for site in "" ${MASTER_SITES_${fetchfile:T}} `${SORTED_MASTER_SITES_CMD}`; do \
|
||||
if [ "X$$site" = X"" ]; then continue; fi; \
|
||||
${ECHO} -n ${FETCH_CMD} ${FETCH_BEFORE_ARGS} "'"$${site}${fetchfile}"'" "${FETCH_AFTER_ARGS}" '|| '; \
|
||||
done; \
|
||||
${ECHO} "${ECHO} ${fetchfile} not fetched"; \
|
||||
fi)
|
||||
.endfor
|
||||
. endif # DISTFILES
|
||||
. if defined(PATCHFILES)
|
||||
.for fetchfile in ${PATCHFILE}
|
||||
@(cd ${_DISTDIR}; \
|
||||
for file in "" ${PATCHFILES}; do \
|
||||
if [ "X$$file" = X"" ]; then continue; fi; \
|
||||
bfile=`${BASENAME} $$file`; \
|
||||
if [ ! -f $$file -a ! -f $$bfile ]; then \
|
||||
${ECHO} -n "cd ${_DISTDIR} && [ -f $$file -o -f $$bfile ] || "; \
|
||||
for site in `${SORTED_PATCH_SITES_CMD}`; do \
|
||||
${ECHO} -n ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} "${FETCH_AFTER_ARGS}" '|| '; \
|
||||
done; \
|
||||
${ECHO} "${ECHO} $${file} not fetched"; \
|
||||
fi \
|
||||
done)
|
||||
if [ ! -f ${fetchfile} -a ! -f ${fetchfile:T} ]; then \
|
||||
${ECHO} -n "cd ${_DISTDIR} && [ -f ${fetchfile} -o -f ${fetchfile:T} ] || "; \
|
||||
for site in ${PATCH_SITES_${fetchfile:T}} `${SORTED_PATCH_SITES_CMD}`; do \
|
||||
${ECHO} -n ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${fetchfile} "${FETCH_AFTER_ARGS}" '|| '; \
|
||||
done; \
|
||||
${ECHO} "${ECHO} $${fetchfile} not fetched"; \
|
||||
fi)
|
||||
.endfor
|
||||
. endif # defined(PATCHFILES)
|
||||
.endif # !target(fetch-list-one-pkg)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile.common,v 1.21 2001/11/01 09:41:13 jlam Exp $
|
||||
# $NetBSD: Makefile.common,v 1.22 2001/12/02 21:29:21 wiz Exp $
|
||||
|
||||
DISTNAME= ghostscript-${GS_VERS}
|
||||
GS_VERS= 6.01
|
||||
|
@ -19,8 +19,8 @@ DISTFILES+= ${GS_SOURCES}
|
|||
# Adobe's JPEG implementation in their PDF/PS documents is non-standard,
|
||||
# so we can't use an already installed libjpeg.so.
|
||||
#
|
||||
MASTER_SITES+= ftp://ftp.uu.net/graphics/jpeg/
|
||||
JPEG_SOURCES= jpegsrc.v6b.tar.gz
|
||||
MASTER_SITES_${JPEG_SOURCES}= ftp://ftp.uu.net/graphics/jpeg/
|
||||
DISTFILES+= ${JPEG_SOURCES}
|
||||
EXTRACT_LIST+= ${JPEG_SOURCES}
|
||||
|
||||
|
@ -30,19 +30,19 @@ PATCHFILES= gs${GS_VERS}-jpdf-exp.patch.gz
|
|||
PATCH_DIST_STRIP= -p1
|
||||
|
||||
# PostScript source to decode encrypted PDF files
|
||||
MASTER_SITES+= http://www.ozemail.com.au/~geoffk/pdfencrypt/
|
||||
PDF_SEC= pdf_sec.ps
|
||||
MASTER_SITES_${PDF_SEC}= http://www.ozemail.com.au/~geoffk/pdfencrypt/
|
||||
DISTFILES+= ${PDF_SEC}
|
||||
|
||||
# Additional driver for several HP deskjets
|
||||
MASTER_SITES+= ftp://ftp.sbs.de/pub/graphics/ghostscript/pcl3/
|
||||
HPDJ_DRV= hpdj-2.6
|
||||
MASTER_SITES_${HPDJ_DRV}.tar.gz= ftp://ftp.sbs.de/pub/graphics/ghostscript/pcl3/
|
||||
DISTFILES+= ${HPDJ_DRV}.tar.gz
|
||||
EXTRACT_LIST+= ${HPDJ_DRV}.tar.gz
|
||||
|
||||
# I don't know the primary destribution sites of these drivers....
|
||||
MASTER_SITES+= ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/
|
||||
DMPRT_DRV= dmprt-2.01
|
||||
MASTER_SITES_${DMPRT_DRV}.tar.gz= ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/
|
||||
DISTFILES+= ${DMPRT_DRV}.tar.gz
|
||||
EXTRACT_LIST+= ${DMPRT_DRV}.tar.gz
|
||||
|
||||
|
@ -61,26 +61,26 @@ DISTFILES+= ${MD5000_DRV}.tar.gz
|
|||
EXTRACT_LIST+= ${MD5000_DRV}.tar.gz
|
||||
|
||||
# Alps MD-2000/2010/4000/1300/1500/5000
|
||||
MASTER_SITES+= http://plaza26.mbn.or.jp/~higamasa/gdevmd2k/
|
||||
MD2000_DRV= gdevmd2k-0.2a
|
||||
MASTER_SITES_${MD2000_DRV}.tar.gz= http://plaza26.mbn.or.jp/~higamasa/gdevmd2k/
|
||||
DISTFILES+= ${MD2000_DRV}.tar.gz
|
||||
EXTRACT_LIST+= ${MD2000_DRV}.tar.gz
|
||||
|
||||
# Canon LIPS II+, III, IV; EPSON ESC/Page; NEC NPDL drivers
|
||||
MASTER_SITES+= http://www.bukka.p.chiba-u.ac.jp/~ohmori/gs/
|
||||
LIPS_DRV= gdevlips-2.3.6
|
||||
MASTER_SITES_${LIPS_DRV}.tar.gz= http://www.bukka.p.chiba-u.ac.jp/~ohmori/gs/
|
||||
DISTFILES+= ${LIPS_DRV}.tar.gz
|
||||
EXTRACT_LIST+= ${LIPS_DRV}.tar.gz
|
||||
|
||||
# Ricoh RPDL
|
||||
MASTER_SITES+= http://home.jp.FreeBSD.org/~mita/LOCAL_PORTS/
|
||||
RPDL_DRV= gdevrpdl
|
||||
MASTER_SITES_${RPDL_DRV}.tar.gz= http://home.jp.FreeBSD.org/~mita/LOCAL_PORTS/
|
||||
DISTFILES+= ${RPDL_DRV}.tar.gz
|
||||
EXTRACT_LIST+= ${RPDL_DRV}.tar.gz
|
||||
|
||||
# Kyocera Prescribe
|
||||
MASTER_SITES+= ${MASTER_SITE_LOCAL}
|
||||
PRESCR_DRV= gdevprsc-0.3
|
||||
MASTER_SITES_${PRESCR_DRV}.tar.gz= ${MASTER_SITE_LOCAL}
|
||||
DISTFILES+= ${PRESCR_DRV}.tar.gz
|
||||
EXTRACT_LIST+= ${PRESCR_DRV}.tar.gz
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# $NetBSD: Makefile,v 1.15 2001/08/23 04:26:55 jlam Exp $
|
||||
# $NetBSD: Makefile,v 1.16 2001/12/02 21:29:21 wiz Exp $
|
||||
|
||||
DISTNAME= kterm-6.2.0
|
||||
CATEGORIES= x11
|
||||
MASTER_SITES= ${MASTER_SITE_XCONTRIB:=applications/}
|
||||
|
||||
# the following patch includes NFS xauth patch, and kamo's wd0.2 patch.
|
||||
PATCH_SITES+= ftp://ftp.kame.net/pub/kame/misc/
|
||||
PATCH_SITES= ftp://ftp.kame.net/pub/kame/misc/
|
||||
PATCHFILES+= kterm-620-0213-20010706.diff.gz
|
||||
PATCH_DIST_STRIP= -p1
|
||||
|
||||
|
@ -20,13 +20,13 @@ BUILD_DEFS+= KTERM_USE_WALLPAPER
|
|||
|
||||
.if defined(KTERM_USE_WALLPAPER)
|
||||
.if ${KTERM_USE_WALLPAPER} == "imlib"
|
||||
PATCH_SITES+= http://delegate.uec.ac.jp:8081/club/mma/%7Etakkun/fun/handling/
|
||||
PATCH_SITES_KTerm-BGP-Imlib-1.0.patch.gz= http://delegate.uec.ac.jp:8081/club/mma/%7Etakkun/fun/handling/
|
||||
PATCHFILES+= KTerm-BGP-Imlib-1.0.patch.gz
|
||||
BUILDLINK_DEPENDS.imlib?= imlib>=1.9.4
|
||||
USE_CONFIG_WRAPPER= YES
|
||||
.include "../../graphics/imlib/buildlink.mk"
|
||||
.elif ${KTERM_USE_WALLPAPER} == "YES"
|
||||
PATCH_SITES+= http://delegate.uec.ac.jp:8081/club/mma/%7Etakkun/fun/handling/
|
||||
PATCH_SITES_KTerm-BGP-1.0.patch.gz= http://delegate.uec.ac.jp:8081/club/mma/%7Etakkun/fun/handling/
|
||||
PATCHFILES+= KTerm-BGP-1.0.patch.gz
|
||||
.include "../../graphics/xpm/buildlink.mk"
|
||||
.endif
|
||||
|
|
Loading…
Reference in a new issue