aboutsummaryrefslogtreecommitdiff
path: root/sci
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-01-27 15:56:22 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-01-27 15:56:22 +0000
commitdb77a1b3ef69459471acd785166c8bb7a6a647f6 (patch)
tree6454aa23391492f2f481e2b6bcba012658de81f6 /sci
parent3cab539d0a7f5593fec7a702b5e63efaba1cea41 (diff)
downloadslackbuilds-db77a1b3ef69459471acd785166c8bb7a6a647f6.tar.gz
slackbuilds-db77a1b3ef69459471acd785166c8bb7a6a647f6.tar.bz2
scilab: added Manifest and patch for GLSA 200901-14
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2095 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'sci')
-rw-r--r--sci/mathematics/scilab/Manifest25
-rw-r--r--sci/mathematics/scilab/scilab-4.1.2.diff133
-rwxr-xr-xsci/mathematics/scilab/scilab.SlackBuild98
3 files changed, 253 insertions, 3 deletions
diff --git a/sci/mathematics/scilab/Manifest b/sci/mathematics/scilab/Manifest
new file mode 100644
index 00000000..fa4f88a7
--- /dev/null
+++ b/sci/mathematics/scilab/Manifest
@@ -0,0 +1,25 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+DIST scilab-4.1.2-src.tar.gz 15892277 MD5 17a7a6aa52918f33d96777a0dc423658 RMD160 f708b966143ccbf989f7a0dbed95e4dab324e66f SHA1 d3f3190bd11fe23eebec03fe9feaced0406ddfe3 SHA256 4c0318a316c62a1206e53b936bbb1262d940e390c1d14da77c231e49b134b3a9 SHA512 de8e0fae3be0741dc009e6ce3653cfda6d26f05d4ee1ef1e36f8081a2dcf270834b9d3349f2bc105ad953084fd145e5bb09134f78e8e648a4b52d2b839edd150
+MKBUILD scilab.mkbuild 5463 MD5 e810d70199460f7c87b822acf95998be RMD160 0e07a9166ea2c32c7158fcd71c133d1c25457455 SHA1 9ec09880c931df50ab2d560f39bd4ec92499675c SHA256 ee5b1e7db2ac0dc6b403a51587d92014e0db77ce679a425b7904bbd6923822f1 SHA512 15df1eba897340771ad5c7e22930c265f0d63f32eaa8b659b67c4cf8d8a6b844916538690aee5aa6279690851857dd7cb594be4d3c31e31a17f18ccc27804e86
+PATCH scilab-4.1.2.diff 6067 MD5 f7196b1cf7b2c93ecec838367b720110 RMD160 63f217f41edb721d1717724931410c228ad92dd9 SHA1 9a4856ce02c47d4bbcbffeb449d0861bb13dedf2 SHA256 b25b46e0738b2f37d8333128dc32d2f40358e0a217615f65b5e5811c423e336f SHA512 f8de5d4ab0f8f158780c096be04952751e56755818e6b49899dc6661ff5e9fb97413c674c9c7c418fd07d597430ae5d1b543013867e6ebc1fad4b9e4594ada34
+SLACK-REQUIRED slack-required 76 MD5 58877d11353e21c86686bda806edbafb RMD160 9c03b4214742cfc3973d61a56a788acb3a80b72c SHA1 971c9e383637733753dda64c18e909b079ea9f2a SHA256 6a141b67282e1d70bf1ed31a443c0b3a07e04f6f36c2aad58932077950fd34fa SHA512 fb859c114df9d61a200759d523a05f789001b14be5f05f4ad41d6f904235a7078249b1daebeba828eb5e31e0924f4ebe4cd39dea0b366420389bef1dd2cb1cc9
+SLACKBUILD scilab.SlackBuild 8952 MD5 b3b68c8ec24c7b59786681ec48f9bde8 RMD160 0c10a00d51b1d4bc88a8b98df408bb3005298f6f SHA1 1b809dde26e12d9031cf98912762fa4c87a6ddbf SHA256 9fcbcc9bc2cade584e2239c3e82e5055011a7ffd24fa7bd1c314ed543a89b544 SHA512 82b717a27a1df830b912ec3bcc2c8ccd0ed78118fc2c0e7606bdcb5b89e9e64c3ca174ffd01e5dd270e2ebcc7e420993e5a2a6d7991f5ff8b1db4f282104bc1d
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBAgAGBQJJfy2NAAoJEEHL93ESzgeiYhEQAJJlDpe9Wyze+WWVSmvyepbk
+3189x2rcXxpbqmWnkz0mOoIrnZkSUIQsXirNFiG7H+/mAjU9Zc6vGBTtrmC5AEDz
+L4tAz5jpfGqwpskWArPt1kO7vuxRHp0KlSUbPh9Z7dSlIBiwpM6AOvDISxYCnrCw
+MzHgMN2tQTMi+5GfRmYt8NJgtMgA6xwMJjeyKE9pGxEtciEfjWkVquHxE3dGCWQj
+KA1euiwxc2OQCFcHjIBwrVlRaEk+Bf8CY2ZDuwOaNSRmvoG5wqV1ia/gP/3s5By0
+FDibFLcckPlTCMql01Y6DKt7ljQnZ8QkIjt1IY0t6RFzebO7CBtkprdi1FhZ+cWO
+MiRnN+gnzEN6pNS2bvSRkGR35k0m9ASCyEOBhE+LSqhV8GGZkOfDgXeSbKwSchlf
+V1gl1URBVEBw2uPW2ec05HfjRwVKaKgtlPETxsDau/tYPlzgnsMI/RcxWDiCKgqK
+etn+cG7OyFJXSAyeK+xBV91Y/S+7+yOodK9j0bLwSfdLtLkqdIt//L7z4fgrzt5P
+fIjWKIubXt56E8kNrkP7+7WZygwak2T+Ra022vLe1zBb0Ltwy7MrZtg8mNhQRMLt
+WZXkpUtqEx/CJi9R1so9vSkSewkjFtMw+8Cid+hv9VLrMcyPC+ZAAxMeOJtg04Qh
+lmdpASEaDjdiMWMQCVoP
+=RzQm
+-----END PGP SIGNATURE-----
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 00000000..f945fe12
--- /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
+
diff --git a/sci/mathematics/scilab/scilab.SlackBuild b/sci/mathematics/scilab/scilab.SlackBuild
index 082a656b..ef42399d 100755
--- a/sci/mathematics/scilab/scilab.SlackBuild
+++ b/sci/mathematics/scilab/scilab.SlackBuild
@@ -15,7 +15,7 @@
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
#
# slackbuild for scilab, by Rudson R. Alves
-# requires: gtk+2
+# requires:
# tested: scilab-4.1.2
#
@@ -47,9 +47,9 @@ NUMJOBS=${NUMJOBS:="-j4"}
LIBDIR="$PREFIX/lib"
if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686"
elif [ "$ARCH" = "s390" ]; then
@@ -65,6 +65,7 @@ ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
+ERROR_MANIFEST=43;
# Clean up any leftovers of previous builds
rm -rf "$PKG_WORK" 2> /dev/null
@@ -84,12 +85,103 @@ if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
+# Check Manifest file
+if [ -e "$CWD/Manifest" ]; then
+
+ # Manifest signature checking
+ if grep -q -- "-----BEGIN PGP SIGNED MESSAGE-----" $CWD/Manifest; then
+ echo "Checking Manifest signature..."
+ gpg --verify $CWD/Manifest
+ if [ "$?" != "0" ]; then
+ exit $ERROR_MANIFEST
+ fi
+ fi
+
+ MANIFEST_LINES="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | wc -l`"
+
+ for ((MANIFEST_COUNT=1; MANIFEST_COUNT <= $MANIFEST_LINES; MANIFEST_COUNT++)); do
+
+ MANIFEST_LINE="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | head -n $MANIFEST_COUNT | tail -n 1`"
+ MANIFEST_FILE="`echo $MANIFEST_LINE | awk '{ print $2 }'`"
+ MANIFEST_FILE_TYPE="`echo $MANIFEST_LINE | awk '{ print $1 }'`"
+
+ if [ -e "$SRC_DIR/$MANIFEST_FILE" ]; then
+ MANIFEST_FILE="$SRC_DIR/$MANIFEST_FILE"
+ else
+ MANIFEST_FILE="`find $CWD -name $MANIFEST_FILE`"
+ fi
+
+ if [ ! -e "$MANIFEST_FILE" ] || [ -d "$MANIFEST_FILE" ]; then
+ continue
+ fi
+
+ echo "Checking Manifest for $MANIFEST_FILE_TYPE $MANIFEST_FILE integrity..."
+
+ SIZE_SRC="`wc -c $MANIFEST_FILE | awk '{ print $1 }'`"
+ SIZE_MANIFEST="`echo $MANIFEST_LINE | awk '{ print $3 }'`"
+
+ # Check source code size
+ if [ "$SIZE_SRC" != "$SIZE_MANIFEST" ]; then
+ echo "SIZE Manifest: $SIZE_MANIFEST; SIZE $SRC: $SIZE_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "Size match."
+ fi
+
+ # Check source code integrity
+ for ALGO in md5 rmd160 sha1 sha256 sha512; do
+ if [ $ALGO = "rmd160" ]; then
+ ALGO_SRC="`openssl rmd160 $MANIFEST_FILE | awk '{ print $2 }'`"
+ else
+ ALGO_SRC="`"$ALGO"sum $MANIFEST_FILE | awk '{ print $1 }'`"
+ fi
+ ALGO="`echo $ALGO | tr '[:lower:]' '[:upper:]'`"
+ ALGO_MANIFEST=$(echo $MANIFEST_LINE | sed "s/.* $ALGO //" | awk '{ print $1 }')
+ if [ "$ALGO_SRC" != "$ALGO_MANIFEST" ]; then
+ echo "$ALGO Manifest: $ALGO_MANIFEST; $ALGO $SRC: $ALGO_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "$ALGO match."
+ fi
+ done
+
+ done
+
+else
+ exit $ERROR_MANIFEST
+fi
+
# Untar
cd "$PKG_WORK"
tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
cd "$PKG_SRC"
+# Patch source
+patches=" [[PATCH URLS]]
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ patch="`basename $patch`"
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$SRC_DIR/$patch" ]; then
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ else
+ patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ fi
+done
+
# Configure
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \