pkgsrc/devel/pvs/patches/patch-aa
jlam fa9a6affcf Convert to use the emulator framework and properly support the
"solaris-sparc" emulation so that NetBSD/sparc and NetBSD/sparc64 and
use this package.
2007-08-22 17:28:08 +00:00

54 lines
1.5 KiB
Text

$NetBSD: patch-aa,v 1.5 2007/08/22 17:28:09 jlam Exp $
--- pvs.orig 2004-10-05 20:04:54.000000000 -0400
+++ pvs
@@ -45,7 +45,7 @@
# PVSPATH should be set after installation by <PVS>/bin/relocate or by hand
# to the location of the PVS installation
-PVSPATH=/homes/owre/pvs3.0
+PVSPATH=@PREFIX@/pvs
#-------------------------------------------------
# Nothing below this line should need modification
@@ -155,12 +155,18 @@ done
PVSEMACS=${PVSEMACS:-"emacs"}
+# Handle NetBSD binary emulation.
+case $opsys in
+ NetBSD) arch=`uname -p`
+ case $arch in
+ *86*) opsys=Linux ;;
+ sparc*) opsys=SunOS ;;
+ esac ;;
+esac
+
# Determine the system type and set PVSARCH accordingly
case $opsys in
- SunOS) majvers=`uname -r | cut -d"." -f1`
- if [ $majvers = 4 ]
- then echo "PVS 3.0 only runs under Solaris or Linux"; exit 1
- fi
+ SunOS) majvers=5
PVSARCH=sun4;;
Linux) # If Linux, we need to determine the Redhat version to use.
opsys=redhat
@@ -215,8 +221,15 @@ PVSVERBOSE=${PVSVERBOSE:-0}
PVSIMAGE="$PVSLISP"
export ALLEGRO_CL_HOME DISPLAY LD_LIBRARY_PATH
-export PVSARCH PVSIMAGE PVSPATH PATH PVSLISP PVSVERBOSE PVSTIMEOUT
-export PVSPATCHLEVEL PVSMINUSQ PVSFORCEDP PVSDEFAULTDP
+export PVSARCH PVSIMAGE PVSPATH PATH PVSLISP PVSVERBOSE
+export PVSPATCHLEVEL PVSMINUSQ PVSFORCEDP
+if [ "$PVSTIMEOUT" ]; then
+ export PVSTIMEOUT
+fi
+if [ "$PVSDEFAULTDP" ]; then
+ export PVSDEFAULTDP;
+fi
+
pvsemacsinit="-load $PVSPATH/emacs/go-pvs.el $loadafter"