summaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authorwiz <wiz>2000-01-10 00:16:11 +0000
committerwiz <wiz>2000-01-10 00:16:11 +0000
commit0906e9f261fa06a3db85c36ecce32a1668e3caee (patch)
tree3322bc003f536af01800b9f7b83d9746901c512e /archivers
parentab389c26f6817f28afaba54d347bf94eb6e7c1df (diff)
downloadpkgsrc-0906e9f261fa06a3db85c36ecce32a1668e3caee.tar.gz
recognize if necessary compatibility options are in the kernel;
stop if not
Diffstat (limited to 'archivers')
-rw-r--r--archivers/rar/Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/archivers/rar/Makefile b/archivers/rar/Makefile
index 7f58abdd020..f2459a55a01 100644
--- a/archivers/rar/Makefile
+++ b/archivers/rar/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2000/01/08 05:07:36 wiz Exp $
+# $NetBSD: Makefile,v 1.20 2000/01/10 00:16:11 wiz Exp $
# FreeBSD Id: Makefile,v 1.7 1997/08/10 22:31:27 fenner Exp
#
@@ -21,9 +21,19 @@ NO_CDROM= ${RESTRICTED}
NO_WRKSUBDIR= yes
EXTRACT_CMD= ${DOWNLOADED_DISTFILE} >/dev/null
+KERNEL= /`sysctl machdep.booted_kernel | sed 's/.* = //'`
+
pre-extract:
- @${ECHO} You must have COMPAT_12 enabled in your kernel,
- @${ECHO} else extraction \(and running the program\) will fail.
+ @if (${NM} ${KERNEL} | ${GREP} -q compat_12 && \
+ ${NM} ${KERNEL} | ${GREP} -q exec_aout); then true; \
+ else \
+ ${ECHO} "****************************************************";\
+ ${ECHO} Make can not proceed! In order to extract \(and run\); \
+ ${ECHO} this package, you must have have booted from a kernel; \
+ ${ECHO} with options COMPAT_12 \(and EXEC_AOUT, if ELF\).; \
+ ${ECHO} "****************************************************";\
+ false; \
+ fi
@${CHMOD} a+x ${DISTDIR}/${DISTFILES}
do-build: