aboutsummaryrefslogtreecommitdiffstats
path: root/net/dgd
diff options
context:
space:
mode:
authoradam <adam@FreeBSD.org>1994-09-14 09:42:47 +0800
committeradam <adam@FreeBSD.org>1994-09-14 09:42:47 +0800
commit777185c1692ffe3702135d2db6df785efe5d9d73 (patch)
tree058170f3096cdb514a84d8cea74a0e413cb7ef94 /net/dgd
parenta2b6be29ca3077403dbe1df6db7de2ac80763514 (diff)
downloadfreebsd-ports-gnome-777185c1692ffe3702135d2db6df785efe5d9d73.tar.gz
freebsd-ports-gnome-777185c1692ffe3702135d2db6df785efe5d9d73.tar.zst
freebsd-ports-gnome-777185c1692ffe3702135d2db6df785efe5d9d73.zip
Accommodate fetch: target.
Relocate author's patchfiles to subdir ${DISTDIR}/${DISTNAME}
Diffstat (limited to 'net/dgd')
-rw-r--r--net/dgd/Makefile38
1 files changed, 33 insertions, 5 deletions
diff --git a/net/dgd/Makefile b/net/dgd/Makefile
index 65618cedde54..a5ad8f3a345a 100644
--- a/net/dgd/Makefile
+++ b/net/dgd/Makefile
@@ -5,8 +5,9 @@
#
DISTNAME= dgd-1.0.8
-HOME_LOCATION= ftp.lysator.liu.se:~ftp/pub/lpmud/drivers/dgd/dgd-1.0.8
-PATCH_LOCATION= epsilon.me.chalmers.se:~dgd/patches/$@ Password: foo&&bar
+PATCHFILES= 1.0.8-1.0.8.1.gz 1.0.8.1-1.0.8.2.gz 1.0.8.2-1.0.8.3.gz
+PATCHSITE= epsilon.me.chalmers.se
+NCFTPFLAGS=
PATCH_COOKIE= ${.CURDIR}/work/.patch_done
PATCHLIST= ${.CURDIR}/work/.patchlist
PATCHLEVEL= `tail -1 ${PATCHLIST} | sed 's/^.*\.\(.*\)\.gz$$/\1/'`
@@ -14,6 +15,33 @@ WRKSRC= ${WRKDIR}/dgd/src
PKG_ARGS= -v -c ${PKGDIR}/COMMENT -d ${PKGDIR}/DESCR -f ${PKGDIR}/PLIST \
-r ${PKGDIR}/REQ
+### rely on DISTFILES being a single filename
+
+pre-fetch:
+ @if [ ! -d ${DISTDIR}/${DISTNAME} ]; then mkdir -p ${DISTDIR}/${DISTNAME}; fi
+ @if [ ! -f ${DISTDIR}/${DISTFILES} ]; then \
+ echo ">> Fetching distribution file from remote system..." \
+ ${NCFTP} ${NCFTPFLAGS} ${PATCHSITE}:${DISTFILES} \
+ && mv ${DISTFILES} ${DISTDIR}; \
+ fi
+ @for file in ${PATCHFILES}; do \
+ if [ ! -f ${DISTDIR}/${DISTNAME}/$$file ]; then \
+ echo ">> $$file doesn't seem to exist on this system."; \
+ echo ">> Attempting to fetch it from a master site."; \
+ if ${NCFTP} ${NCFTPFLAGS} ${PATCHSITE}:patches/$$file; \
+ then \
+ echo ">> $$file Fetched!" ; \
+ mv patches/$$file ${DISTDIR}/${DISTNAME}; \
+ break; \
+ fi; \
+ if [ ! -f ${DISTDIR}/${DISTNAME}/$$file ]; then \
+ echo ">> Couldn't fetch it - please try to retreive this";\
+ echo ">> file manually into ${DISTDIR}/${DISTNAME} and try again."; \
+ exit 1; \
+ fi; \
+ fi \
+ done
+
# We need to determine whether all author-supplied patches are present
# and whether they are applied correctly
### not yet implemented
@@ -22,14 +50,14 @@ pre-configure: extract ${PATCH_COOKIE}
@find -X ${WRKDIR}/dgd -name '*.orig' -print | xargs rm -f
${PATCHLIST}:
- @cd ${DISTDIR}; \
- ls ${DISTNAME}*.[0-9].gz ${DISTNAME}*.[0-9][0-9].gz \
+ @cd ${DISTDIR}/${DISTNAME}; \
+ ls *.[0-9].gz *.[0-9][0-9].gz \
2>/dev/null >${PATCHLIST}
${PATCH_COOKIE}: ${PATCHLIST}
@if [ -s ${PATCHLIST} ]; then \
echo "===> Updating to ${DISTNAME}.${PATCHLEVEL}"; \
- cd ${DISTDIR}; \
+ cd ${DISTDIR}/${DISTNAME}; \
gzcat `cat ${PATCHLIST}` | patch -d ${WRKDIR} --quiet -E -p0; \
fi
@touch -f ${PATCH_COOKIE}