summaryrefslogtreecommitdiff
path: root/archivers/rar
diff options
context:
space:
mode:
authorwiz <wiz>2000-01-10 00:16:11 +0000
committerwiz <wiz>2000-01-10 00:16:11 +0000
commitd67a7f81e6ffadc4bae9a0540b0280e289197c20 (patch)
tree3322bc003f536af01800b9f7b83d9746901c512e /archivers/rar
parent6b53c7e4a5edf43ca83cbbf424c4a0b11b21301b (diff)
downloadpkgsrc-d67a7f81e6ffadc4bae9a0540b0280e289197c20.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: