1 # Maintainer: Eric Belanger <belanger@astro.umontreal.ca>
6 pkgdesc="rlabplus (RLaB2) is a scripting environment for scientific computations."
7 url="http://rlabplus.sourceforge.net/index.html"
10 depends=('gsl' 'termcap-compat' 'pgplot' 'blas' 'gcc-fortran' 'readline')
11 makedepends=('lapack')
12 source=(http://dl.sourceforge.net/sourceforge/rlabplus/rlab-$pkgver.tgz test.diff 579.diff coqual.diff parzen.diff)
13 md5sums=('c86ed35ebfc86e968126f43c3f9235da' '13be00dbaaa2b81cb235c9edf41bb1ad'\
14 '4ae3e2fc79e0d12dc204426fabba6081' 'c60f93a4265bac1b11b8abc907acdf6d'\
15 'fbf78cb357f2832301fa9cdf6a001265')
18 cd $startdir/src/rlab-2.2.9
20 # Clean objects files/libs
21 find . -name '*.o' -exec rm {} \;
22 find . -name '*.a' -exec rm {} \;
23 find . -name '*.so' -exec rm {} \;
25 patch -p1 < ../parzen.diff || return 1
26 patch -p1 < ../579.diff || return 1
27 patch -p1 < ../coqual.diff || return 1
28 patch -p1 < ../test.diff || return 1
30 ./configure --prefix=/usr --with-pgplot=/usr/lib --enable-SUPERLU
31 sed -i 's|/usr/local/lib|/usr/lib|' Makefile
32 sed -i 's|./pgplot/|/usr/lib/|g' Makefile
35 for dir in cephes glpk harminv superlu ; do
36 cd $dir; make LDFLAGS+=-lgfortran || return 1; cd ..
41 make || return 1; cd ../..
44 for dir in AMD UMFPACK ;do
45 cd $dir; make || return 1; cd ..
50 for dir in bacol clawpack contin genzpak hompack lapack loess minpack odebim odrpack slatec sparskit2; do
51 cd $dir; make F77="gfortran -c" FORTRAN=gfortran G77=gfortran FC=gfortran || return 1; cd ..
54 cd arpack; make F77="gfortran -c" FORTRAN=gfortran G77=gfortran FC=gfortran lib || return 1; cd ../..
56 make F77=gfortran G77=gfortran FCONV=-DUSE_F2C || return 1
58 # Equivallent of 'make check || return 1' without the need of the time package in [community]
59 time ./rlab -qrl ./test.r || return 1
61 make prefix=$startdir/pkg/usr INSTALL=/bin/install install
62 chmod 644 $startdir/pkg/usr/lib/rlab-2.2.9/toolbox/spy.r
63 sed -i -e "s|RROOT=\"$startdir/pkg/usr\"|RROOT=\"/usr\"|" $startdir/pkg/usr/bin/rlab2