aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1998-09-22 23:58:49 +0000
committerSatoshi Asami <asami@FreeBSD.org>1998-09-22 23:58:49 +0000
commit2bd263cd9db36d80b2819cfbd98be5d76ad5000b (patch)
tree38f1b47173907b38250448ec05a6e3c911e8a4bf /Mk
parent0f04fe19023bbf5e027db784c3c40ee2d7d431fa (diff)
downloadports-2bd263cd9db36d80b2819cfbd98be5d76ad5000b.tar.gz
ports-2bd263cd9db36d80b2819cfbd98be5d76ad5000b.zip
Notes
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk28
1 files changed, 24 insertions, 4 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 5889b649e048..10b195a1898a 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1,7 +1,7 @@
#-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4
#
-# $Id: bsd.port.mk,v 1.289 1998/09/17 01:00:23 asami Exp $
+# $Id: bsd.port.mk,v 1.290 1998/09/17 01:22:05 asami Exp $
# $NetBSD: $
#
# bsd.port.mk - 940820 Jordan K. Hubbard.
@@ -92,6 +92,7 @@ OpenBSD_MAINTAINER= imp@OpenBSD.ORG
# NO_CDROM - Port may not go on CDROM.
# NO_PACKAGE - Port should not be packaged but distfiles can be put on
# ftp sites and CDROMs.
+# BROKEN_ELF - Port doesn't build on ELF machines.
# BROKEN - Port is broken.
#
# This variable is a boolean, so you don't need to set it to the reason.
@@ -575,6 +576,7 @@ MAKE_ENV+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB=
.if exists(/usr/bin/fetch)
FETCH_CMD?= /usr/bin/fetch
+#FETCH_BEFORE_ARGS+= $${CKSIZE:+-S $$CKSIZE}
.else
FETCH_CMD?= /usr/bin/ftp
.endif
@@ -979,6 +981,8 @@ _MANPAGES:= ${_MANPAGES:S/$/.gz/}
# Don't build a port if it's restricted and we don't want to get
# into that.
#
+# Don't build a port on an ELF machine if it's broken for ELF.
+#
# Don't build a port if it's broken.
################################################################
@@ -1016,6 +1020,8 @@ IGNORE= "is restricted: ${RESTRICTED}"
IGNORE= "defines NO_CONFIGURE, which is obsoleted"
.elif defined(NO_PATCH)
IGNORE= "defines NO_PATCH, which is obsoleted"
+.elif (defined(BROKEN_ELF) && (${PORTOBJFORMAT} == "elf"))
+IGNORE= "is broken for ELF: ${BROKEN_ELF}"
.elif defined(BROKEN)
IGNORE= "is marked as broken: ${BROKEN}"
.endif
@@ -1152,6 +1158,8 @@ do-fetch:
${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \
for site in ${MASTER_SITES}; do \
${ECHO_MSG} ">> Attempting to fetch from $${site}."; \
+ DIR=${DIST_SUBDIR}; \
+ CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \
if ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} ${FETCH_AFTER_ARGS}; then \
continue 2; \
fi \
@@ -1174,6 +1182,8 @@ do-fetch:
${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \
for site in ${PATCH_SITES}; do \
${ECHO_MSG} ">> Attempting to fetch from $${site}."; \
+ DIR=${DIST_SUBDIR}; \
+ CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \
if ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} ${FETCH_AFTER_ARGS}; then \
continue 2; \
fi \
@@ -1373,7 +1383,7 @@ _PORT_USE: .USE
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} fetch-depends
.endif
.if make(real-extract)
- @cd ${.CURDIR} && ${MAKE} checksum
+ @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} checksum REAL_EXTRACT=yes
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} build-depends lib-depends misc-depends
.endif
.if make(real-install)
@@ -1596,7 +1606,7 @@ pre-distclean:
.if !target(distclean)
distclean: pre-distclean clean
@${ECHO_MSG} "===> Dist cleaning for ${PKGNAME}"
- @(if [ -d ${_DISTDIR} ]; then \
+ @(if [ "X${DISTFILES}${PATCHFILES}" != "X" -a -d ${_DISTDIR} ]; then \
cd ${_DISTDIR}; \
${RM} -f ${DISTFILES} ${PATCHFILES}; \
fi)
@@ -1614,6 +1624,8 @@ fetch-list:
for file in ${DISTFILES}; do \
if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \
for site in ${MASTER_SITES}; do \
+ DIR=${DIST_SUBDIR}; \
+ CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \
${ECHO} -n ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} "${FETCH_AFTER_ARGS}" '||' ; \
break; \
done; \
@@ -1625,6 +1637,8 @@ fetch-list:
for file in ${PATCHFILES}; do \
if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \
for site in ${PATCH_SITES}; do \
+ DIR=${DIST_SUBDIR}; \
+ CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \
${ECHO} -n ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} "${FETCH_AFTER_ARGS}" '||' ; \
break; \
done; \
@@ -1648,9 +1662,15 @@ makesum: fetch
${ECHO} "MD5 ($$file) = IGNORE" >> ${MD5_FILE}; \
done
.endif
+# this line goes after the ${MD5} above
+# echo "SIZE ($$file) = "`wc -c < $$file` >> ${MD5_FILE}; \
+
.if !target(checksum)
-checksum: fetch
+checksum:
+.if !defined(REAL_EXTRACT)
+ @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} fetch
+.endif
@if [ ! -f ${MD5_FILE} ]; then \
${ECHO_MSG} ">> No MD5 checksum file."; \
else \