diff options
Diffstat (limited to 'sci/mathematics/scilab/scilab-4.1.2.diff')
-rw-r--r-- | sci/mathematics/scilab/scilab-4.1.2.diff | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/sci/mathematics/scilab/scilab-4.1.2.diff b/sci/mathematics/scilab/scilab-4.1.2.diff new file mode 100644 index 0000000..f945fe1 --- /dev/null +++ b/sci/mathematics/scilab/scilab-4.1.2.diff @@ -0,0 +1,133 @@ +diff -Naur scilab-4.1.2/bin/scilink scilab-4.1.2.new/bin/scilink +--- scilab-4.1.2/bin/scilink 2001-04-26 03:43:33.000000000 -0400 ++++ scilab-4.1.2.new/bin/scilink 2008-11-07 08:57:27.000000000 -0500 +@@ -15,30 +15,31 @@ + shift + LOCALPOS=`pwd` + cd $SCI +-make show | grep -v make > /tmp/SciLink$$1 +-sed -e "s+routines/default+\$SD+g" -e "s+libs+\$SL+g" -e "s+./pvm3+\$SPVM+g" /tmp/SciLink$$1 > /tmp/SciLink$$2 ++TMPWRKDIR=`mktemp -d sci.XXXXXXXXXX` ++make show | grep -v make > $TMPWRKDIR/SciLink$$1 ++sed -e "s+routines/default+\$SD+g" -e "s+libs+\$SL+g" -e "s+./pvm3+\$SPVM+g" $TMPWRKDIR/SciLink$$1 > $TMPWRKDIR/SciLink$$2 + for i in $* + do + x=`basename $i` +- sed "s+\$SD/$x++g" /tmp/SciLink$$2 > /tmp/SciLink$$3 +- rm -f /tmp/SciLink$$2 +- mv /tmp/SciLink$$3 /tmp/SciLink$$2 ++ sed "s+\$SD/$x++g" $TMPWRKDIR/SciLink$$2 > $TMPWRKDIR/SciLink$$3 ++ rm -f $TMPWRKDIR/SciLink$$2 ++ mv $TMPWRKDIR/SciLink$$3 $TMPWRKDIR/SciLink$$2 + done +-echo "#!/bin/sh" > /tmp/SciLink$$3 +-echo SCI=$SCI >> /tmp/SciLink$$3 +-echo "SD=\$SCI/routines/default" >> /tmp/SciLink$$3 +-echo "SPVM=\$SCI/pvm3" >> /tmp/SciLink$$3 +-echo "SL=\$SCI/libs" >> /tmp/SciLink$$3 +-echo "LOCAL=\"$*\"" >> /tmp/SciLink$$3 +-sed -e "s+\$SL+ \$LOCAL \$SL+" -e "s+show+scilex+g" /tmp/SciLink$$2 >> /tmp/SciLink$$3 ++echo "#!/bin/sh" > $TMPWRKDIR/SciLink$$3 ++echo SCI=$SCI >> $TMPWRKDIR/SciLink$$3 ++echo "SD=\$SCI/routines/default" >> $TMPWRKDIR/SciLink$$3 ++echo "SPVM=\$SCI/pvm3" >> $TMPWRKDIR/SciLink$$3 ++echo "SL=\$SCI/libs" >> $TMPWRKDIR/SciLink$$3 ++echo "LOCAL=\"$*\"" >> $TMPWRKDIR/SciLink$$3 ++sed -e "s+\$SL+ \$LOCAL \$SL+" -e "s+show+scilex+g" $TMPWRKDIR/SciLink$$2 >> $TMPWRKDIR/SciLink$$3 + cd $LOCALPOS +-mv /tmp/SciLink$$3 Script ++mv $TMPWRKDIR/SciLink$$3 Script + chmod +x Script + echo "Linking a new Scilab with " $* + ./Script + echo "I've created : scilex and scilab which uses that scilex" + sed -e "s+\$SCI/bin/scilex+`pwd`/scilex+g" $SCI/bin/scilab > scilab + chmod +x scilab +-#rm -f /tmp/SciLink* ++#rm -f $TMPWRKDIR/SciLink* + + +diff -Naur scilab-4.1.2/util/scidem scilab-4.1.2.new/util/scidem +--- scilab-4.1.2/util/scidem 2002-09-02 07:14:52.000000000 -0400 ++++ scilab-4.1.2.new/util/scidem 2008-11-07 08:57:27.000000000 -0500 +@@ -6,33 +6,34 @@ + echo ------------------- File $2-------------------- + SCI1=$1 + if [ -f $3 ]; then rm $3;fi; +-trap "rm -f /tmp/$2.$$ /tmp/$2.$$.res /tmp/$2.$$.err /tmp/$2.$$.diff\ ++TMPWRKDIR=`mktemp -d sci.XXXXXXXXXX` ++trap "rm -f $TMPWRKDIR/$2.$$ $TMPWRKDIR/$2.$$.res $TMPWRKDIR/$2.$$.err $TMPWRKDIR/$2.$$.diff\ + ;exit 1" 1 2 13 15 + echo "clear;lines(0);deff('[]=bugmes()','write(%io(2),''error on test'')');\ +- diary('$3');driver('Pos');" >> /tmp/$2.$$ ; ++ diary('$3');driver('Pos');" >> $TMPWRKDIR/$2.$$ ; + sed -e "s/pause,end/bugmes();quit;end/" \ + -e "s/halt()//" \ +- $2 >> /tmp/$2.$$ ; +-echo "diary(0);xend();exit;" >> /tmp/$2.$$ ; +-($SCI1/bin/scilab -nwni < /tmp/$2.$$ > /tmp/$2.$$.res ) 2> /tmp/$2.$$.err ; ++ $2 >> $TMPWRKDIR/$2.$$ ; ++echo "diary(0);xend();exit;" >> $TMPWRKDIR/$2.$$ ; ++($SCI1/bin/scilab -nwni < $TMPWRKDIR/$2.$$ > $TMPWRKDIR/$2.$$.res ) 2> $TMPWRKDIR/$2.$$.err ; + sed -e "s/ \./0\./g" -e "s/E+/D+/g" -e "s/E-/D-/g" -e "s/-\./-0\./g" -e "s/^-->//g" -e "s/^-1->//g" $3 > $3.n + grep -v "xinit(" $3.n | grep -v "diary(" | grep -v "exec(" > $3 + rm -f $3.n +-if ( grep " error" /tmp/$2.$$.res > /dev/null ) ; then ++if ( grep " error" $TMPWRKDIR/$2.$$.res > /dev/null ) ; then + if [ $# != 4 ]; then + echo "Test failed ERROR DETECTED while executing $2" ; +- else if (grep "$4" /tmp/$2.$$.res > /dev/null ) ; ++ else if (grep "$4" $TMPWRKDIR/$2.$$.res > /dev/null ) ; + then echo Test skipped ; + else echo "Test failed ERROR DETECTED while executing $2" ; + fi; + fi; + else if [ -f $3.ref ];then +- if ( diff -w $3 $3.ref > /tmp/$2.$$.diff ) ; ++ if ( diff -w $3 $3.ref > $TMPWRKDIR/$2.$$.diff ) ; + then echo Test passed ; + else echo Test Failed SEE : diff -w $3 $3.ref ; + fi; + fi; + fi; + echo ---------------------------------------------------------- +-#rm -f /tmp/$2.$$ /tmp/$2.$$.res /tmp/$2.$$.err /tmp/$2.$$.diff ++#rm -f $TMPWRKDIR/$2.$$ $TMPWRKDIR/$2.$$.res $TMPWRKDIR/$2.$$.err $TMPWRKDIR/$2.$$.diff + exit 0 +diff -Naur scilab-4.1.2/util/scidoc scilab-4.1.2.new/util/scidoc +--- scilab-4.1.2/util/scidoc 2006-01-04 09:40:34.000000000 -0500 ++++ scilab-4.1.2.new/util/scidoc 2008-11-07 08:57:27.000000000 -0500 +@@ -7,24 +7,26 @@ + SCI=$1 + export SCI + if [ -f $3 ]; then rm $3;fi; +-trap "rm -f /tmp/$2.$$ /tmp/$2.$$.res /tmp/$2.$$.err /tmp/$2.$$.diff\ ++TMPWRKDIR=`mktemp -d sci.XXXXXXXXXX` ++trap "rm -f $TMPWRKDIR/$2.$$ $TMPWRKDIR/$2.$$.res $TMPWRKDIR/$2.$$.err $TMPWRKDIR/$2.$$.diff\ + ;exit 1" 1 2 13 15 + echo "clear;lines(0);deff('[]=bugmes()','write(%io(2),''error on test'')');\ +- diary('$3');driver('Pos');" >> /tmp/$2.$$ ; ++ diary('$3');driver('Pos');" >> $TMPWRKDIR/$2.$$ ; + sed -e "s/pause,end/bugmes();quit;end/" \ + -e "s/halt()//" \ +- $2 >> /tmp/$2.$$ ; +-echo "diary(0);xend();quit;quit;quit;quit;quit;quit;" >> /tmp/$2.$$ ; +-($SCI/bin/scilex -nw < /tmp/$2.$$ > /tmp/$2.$$.res ) 2> /tmp/$2.$$.err ; ++ $2 >> $TMPWRKDIR/$2.$$ ; ++echo "diary(0);xend();quit;quit;quit;quit;quit;quit;" >> $TMPWRKDIR/$2.$$ ; ++($SCI/bin/scilex -nw < $TMPWRKDIR/$2.$$ > $TMPWRKDIR/$2.$$.res ) 2> $TMPWRKDIR/$2.$$.err ; + sed -e "s/ \.[0-9]/0&/g" -e "s/0 \./0./g" -e "s/E+/D+/g" -e "s/E-/D-/g" -e "s/-\./-0\./g" $3 > $3.n + grep -v "xinit(" $3.n | grep -v "diary(" | grep -v "exec(" > $3 + rm -f $3.n +-if ( grep error /tmp/$2.$$.res > /dev/null ) ; then ++if ( grep error $TMPWRKDIR/$2.$$.res > /dev/null ) ; then + if [ $# != 4 ]; then + echo "ERROR DETECTED while executing $2" ; + fi; + fi; + echo ---------------------------------------------------------- +-rm -f /tmp/$2.$$ /tmp/$2.$$.res /tmp/$2.$$.err /tmp/$2.$$.diff ++rm -f $TMPWRKDIR/$2.$$ $TMPWRKDIR/$2.$$.res $TMPWRKDIR/$2.$$.err $TMPWRKDIR/$2.$$.diff ++rmdir $TMPWRKDIR + exit 0 + |