1 # Contributor: JJDaNiMoTh <jjdanimoth@gmail.com>
6 pkgdesc="Scilab is a scientific software package for numerical computations"
8 url="http://www.scilab.org/"
10 depends=('bash' 'tk' 'tcl' 'libgtkhtml' 'vte' 'gcc-libs' 'libxml2' 'libzvt' 'xaw3d' 'sablotron' 'gcc-fortran' 'ocaml')
12 source=(http://www.scilab.org/download/$pkgver/scilab-$pkgver-src.tar.gz \
13 http://www.scilab.org/download/4.1.2/man-eng-scilab-$pkgver.tar.gz \
14 http://www.scilab.org/download/4.1.2/man-fr-scilab-$pkgver.tar.gz \
16 scilab-4.1.2-gcc45.patch)
17 md5sums=('17a7a6aa52918f33d96777a0dc423658'
18 '49f57fceba6a6aa03fa2e585b8e7156c'
19 '5a0df745d529c73224f2dab6f268f3cb'
20 'dfc9c8b86bb2539769f2d14c535ad0a1'
21 '34c9a20ae9ae16d0e53e51229b31d75b')
24 cd $srcdir/scilab-$pkgver
25 patch -p0 < ../../scilab-4.1.2-gcc45.patch
26 export MAKEFLAGS="-j1"
27 [ "$CARCH" = "x86_64" ] && sed -i "s/CC_PLAT_OPTIONS='-march=athlon64 -mfpmath=sse -msse2 -m3dnow -m64'/CC_PLAT_OPTIONS='-march=x86-64 -mtune=generic -pipe'/" configure
28 ./configure --prefix=/usr --with-gfortran --with-tk --without-pvm
30 make PREFIX=$pkgdir/usr install
31 install -D -m644 X11_defaults/scilab.xpm $pkgdir/usr/share/icons/scilab4.xpm
32 install -D -m644 license.txt $pkgdir/usr/share/licenses/scilab4/license.txt
33 install -D -m644 $srcdir/scilab4.desktop $pkgdir/usr/share/applications/scilab4.desktop
34 mv $pkgdir/usr/lib/scilab-$pkgver/ $pkgdir/usr/share/scilab-$pkgver/
35 mkdir $pkgdir/usr/lib/scilab-$pkgver/
36 cp $srcdir/scilab-$pkgver/libs/*.a $pkgdir/usr/lib/scilab-$pkgver/
38 sed -i -e "s=SCI\=\"$pkgdir/usr/lib/scilab-$pkgver\"=SCI\=\"/usr/share/scilab-$pkgver\"=" $pkgdir/usr/share/scilab-$pkgver/bin/scilab
39 ln -fs /usr/share/scilab-$pkgver/bin/scilab $pkgdir/usr/bin/scilab4
40 rm $pkgdir/usr/bin/scilab
41 rm $pkgdir/usr/bin/intersci
42 rm $pkgdir/usr/bin/intersci-n
44 #ln -fs /usr/lib/scilab-$pkgver/bin/intersci $pkgdir/usr/bin/intersci
45 #ln -fs /usr/lib/scilab-$pkgver/bin/intersci-n $pkgdir/usr/bin/intersci-n