summaryrefslogtreecommitdiff
path: root/archivers/rar
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2000-01-10 00:16:11 +0000
committerwiz <wiz@pkgsrc.org>2000-01-10 00:16:11 +0000
commitcae81499cbfbec9cf67ccf0eb223676b927f1929 (patch)
tree3322bc003f536af01800b9f7b83d9746901c512e /archivers/rar
parent36d887d5d5ea234cf70b7dbcf7cf46ed8230097b (diff)
downloadpkgsrc-cae81499cbfbec9cf67ccf0eb223676b927f1929.tar.gz
recognize if necessary compatibility options are in the kernel;
stop if not
Diffstat (limited to 'archivers/rar')
-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: