# $Id: PKGBUILD 112205 2014-05-29 20:46:16Z spupykin $ # Maintainer: Sergej Pupykin # Contributor: William Rea pkgname=freemat pkgver=4.2 pkgrel=4 pkgdesc="A free environment for rapid engineering, scientific prototyping and data processing" arch=('i686' 'x86_64') url="http://freemat.sourceforge.net" license=('GPL') depends=('arpack' 'fftw' 'glu' 'portaudio' 'qtwebkit' 'qt4' 'libffi') makedepends=('cmake' 'python2' 'suitesparse' 'doxygen' 'gcc-fortran') install=freemat.install source=(http://downloads.sourceforge.net/project/freemat/FreeMat4/FreeMat-$pkgver-Source.tar.gz build-fix.patch) md5sums=('ace147e49273ae935d363da8e2a56d4d' '042f43dcae863e3fc4c9a10b46761344') prepare() { cd $srcdir/FreeMat-$pkgver-Source patch -p1 <$srcdir/build-fix.patch } build() { cd $srcdir/FreeMat-$pkgver-Source unset LDFLAGS CFLAGS CXXFLAGS CPPFLAGS rm -f CMakeCache.txt find . -type f -name '*.moc.cpp' -exec rm -f {} \; find . -type f -name 'add.so' -exec rm -f {} \; echo >libs/libMatC/CJitFuncClang.hpp echo >libs/libMatC/CJitFuncClang.cpp cmake \ -DCMAKE_INSTALL_PREFIX=/usr \ -DUSE_LLVM=OFF \ -DFORCE_BUNDLED_UMFPACK=ON \ -DFFI_INCLUDE_DIR=/usr/lib/libffi-`pacman -Q libffi | cut -f2 -d\ |cut -f1 -d-`/include/ \ -DPYTHON_EXECUTABLE=/usr/bin/python2 \ . make } package() { cd $srcdir/FreeMat-$pkgver-Source make DESTDIR=$pkgdir install -j1 sed -i "s|/FreeMat-.*/|/FreeMat-$pkgver/|g" $startdir/freemat.install rm $pkgdir/usr/bin/blas.ini }