1 # Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
2 # Contributor: Simon Lipp <sloonz+aur@gmail.com>
8 pkgdesc='Scilab is a scientific software package for numerical computations.'
10 url='http://www.scilab.org/'
11 license=('custom:CeCILL')
12 depends=('libxml2' 'pcre' 'lapack' 'java-batik' 'java-flexdock>=0.5.2'
13 'jogl' 'jeuclid-core' 'fftw' 'libmatio' 'bash' 'tk' 'jrosetta'
14 'ocaml' 'javahelp2' 'jgraphx=1_4_1_0' 'jlatexmath>=0.9.4'
15 'jlatexmath-fop>=0.9.4' 'junit' 'java-skinlf' 'xalan-java'
16 'java-commons-logging' 'hdf5')
17 makedepends=('apache-ant' 'antlr2' 'gcc-fortran' 'java-avalon-framework' 'xorg-fonts-type1')
18 [[ $CARCH == x86_64 ]] && \
19 source=("http://www.scilab.org/download/${pkgver}/${pkgname}-${pkgver}-src.tar.gz" \
20 "http://www.scilab.org/download/5.3.1/prerequirements-scilab-5.3.1-x86_64-src.tar.gz" \
21 'scilab.desktop' 'classpath.xml' 'configure-hdf5-vercheck.patch')
23 [[ $CARCH == i686 ]] && \
24 source=("http://www.scilab.org/download/${pkgver}/${pkgname}-${pkgver}-src.tar.gz" \
25 "http://www.scilab.org/download/5.3.1/prerequirements-scilab-5.3.1-src.tar.gz" \
26 'scilab.desktop' 'classpath.xml' 'configure-hdf5-vercheck.patch')
28 [[ $CARCH == x86_64 ]] && md5sums=('0002653e670efabb8faf9e6403367134'
29 '7c9bda373d8dfd75a4f8227a08ced588'
30 'ad6286f324891fe8b86c60e4012a36b7'
31 'efe6e8d06968ba5e1a3e5ab540a79667'
32 '7bf1a2149521db9e1c9a2ed684f9ce52')
33 [[ $CARCH == i686 ]] && md5sums=('0002653e670efabb8faf9e6403367134'
34 '7545859e4078d3b77436b7f322967f26'
35 'ad6286f324891fe8b86c60e4012a36b7'
36 'efe6e8d06968ba5e1a3e5ab540a79667'
37 '7bf1a2149521db9e1c9a2ed684f9ce52')
39 options=('!libtool' '!emptydirs')
42 # we do not want things we already have in Arch Linux
43 cd ${pkgname}-${pkgver}/thirdparty
44 rm avalon* batik* commons-* flexdock* gluegen-rt* jeuclid* jgraphx* \
45 jhall* jlatexmath* jogl* jrosetta* junit* looks-2.1.1.jar xalan* \
47 # fix undefined references (scilab needs to fix its cyclic dependencies)
48 LDFLAGS=${LDFLAGS/ -Wl,--as-needed}
49 # begin configuring and building
52 # dirty hack to remove non-working hdf5 version check from configure
53 patch -Np0 -i ${srcdir}/configure-hdf5-vercheck.patch
57 --enable-build-localization \
63 --with-gfortran # Needed for 64 bits, don't hurt for 32 bits
68 cd ${pkgname}-${pkgver}
70 make DESTDIR="${pkgdir}" install install-html
72 install -d ${pkgdir}/usr/share/licenses/${pkgname}
73 install -Dm644 ${srcdir}/scilab-${pkgver}/COPYING \
74 ${pkgdir}/usr/share/licenses/${pkgname}
75 install -Dm644 ${srcdir}/${pkgname}.desktop \
76 ${pkgdir}/usr/share/applications/${pkgname}.desktop
77 sed -i 's#/jni##' ${pkgdir}/usr/share/scilab/etc/librarypath.xml
78 install -Dm644 $srcdir/classpath.xml $pkgdir/usr/share/scilab/etc/classpath.xml
79 for i in jhdf5.jar fop.jar saxon.jar
81 install -Dm644 $srcdir/$pkgname-$pkgver/thirdparty/$i \
82 $pkgdir/usr/share/java/scilab/$i
84 install -Dm644 $srcdir/$pkgname-$pkgver/bin/libjhdf5.so \
85 $pkgdir/usr/lib/libjhdf5.so