summaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>2000-04-16 11:35:52 +0000
committerSatoshi Asami <asami@FreeBSD.org>2000-04-16 11:35:52 +0000
commitf4a3cea3336e48efb112d8f90eb40a2fd3e0fb33 (patch)
tree4927cf815e8c4f10ff9bf04be5162cc65c58a691 /Mk/bsd.port.mk
parent'' (diff)
(1) Do not accept old-style ports anymore. PORTNAME/PORTVERSION is
now required. (2) Check whether a distfile is in files/md5 before fetching instead of after. Also print out a distinct message so we can easily catch someone screwing up the distfile list (usually via DISTNAME).
Notes
Notes: svn path=/head/; revision=27651
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk20
1 files changed, 9 insertions, 11 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index b74c261a89a5..4499d7b1cd81 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -511,24 +511,14 @@ MASTERDIR?= ${.CURDIR}
.include "${MASTERDIR}/Makefile.local"
.endif
-.if defined(REQUIRE_PORTNAME) && !defined(PORTNAME)
+.if !defined(PORTNAME) || !defined(PORTVERSION) || defined(PKGNAME)
.BEGIN:
@${ECHO} "${PKGNAME}: You need to define PORTNAME and PORTVERSION instead of PKGNAME."
@${ECHO} "(This port is too old for your bsd.port.mk.)"
@${FALSE}
.endif
-.if defined(PORTNAME)
-.if defined(PKGNAME) || !defined(PORTVERSION)
-.BEGIN:
- @${ECHO} "${PKGNAME}: You need to define PORTNAME and PORTVERSION instead of PKGNAME."
- @${FALSE}
-.endif
PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION}
DISTNAME?= ${PORTNAME}-${PORTVERSION}
-.else
-# old style
-PKGNAME?= ${DISTNAME}
-.endif
# These need to be absolute since we don't know how deep in the ports
# tree we are and thus can't go relative. They can, of course, be overridden
@@ -1576,6 +1566,14 @@ do-fetch:
${ECHO_MSG} ">> Please correct this problem and try again."; \
exit 1; \
fi ; \
+ if [ -f ${MD5_FILE} ]; then \
+ if ! ${GREP} -q "^MD5 (.*$$file)" ${MD5_FILE}; then \
+ ${ECHO_MSG} ">> $$file is not in ${MD5_FILE}."; \
+ ${ECHO_MSG} ">> Either ${MD5_FILE} is out of date, or"; \
+ ${ECHO_MSG} ">> $$file is spelled incorrectly."; \
+ exit 1; \
+ fi; \
+ fi; \
${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \
for site in ${MASTER_SITES}; do \
${ECHO_MSG} ">> Attempting to fetch from $${site}."; \