summaryrefslogtreecommitdiff
path: root/community/freemat/PKGBUILD
blob: 67a1fa216f84a2afe83b9c198c8eea49353e4dca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# $Id: PKGBUILD 62525 2012-01-20 17:49:51Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=freemat
pkgver=4.1
pkgrel=1
pkgdesc="A free environment for rapid engineering, scientific prototyping and data processing"
arch=('i686' 'x86_64' 'mips64el')
url="http://freemat.sourceforge.net"
license=('GPL')
depends=('qt' 'ffcall' 'fftw' 'mesa' 'portaudio' 'libffi')
makedepends=('arpack' 'lapack' 'umfpack' 'blas' 'libmatio' 'cmake' 'python2')
install=freemat.install
source=(http://downloads.sourceforge.net/project/freemat/FreeMat4/FreeMat-$pkgver-Source.tar.gz
	build-fix.patch)
md5sums=('929d31e2310feaff5d380fc2f7b4d1a2'
         '2d11a28aa2a7df89c4618ed1c4be5973')

build() {
  cd $srcdir/FreeMat-$pkgver-Source

  rm -f CMakeCache.txt
  find . -type f -name '*.moc.cpp' -exec rm -f {} \;
  find . -type f -name 'add.so' -exec rm -f {} \;
  patch -p1 <$srcdir/build-fix.patch
  echo >libs/libMatC/CJitFuncClang.hpp
  echo >libs/libMatC/CJitFuncClang.cpp

  cmake \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DUSE_LLVM=OFF \
	-DFFI_INCLUDE_DIR=/usr/lib/libffi-`pacman -Q libffi | cut -f2 -d\ |cut -f1 -d-`/include/ \
	-DPYTHON_EXECUTABLE=/usr/bin/python2 \
	.
  make
  make DESTDIR=$pkgdir install
  sed -i "s|/FreeMat-.*/|/FreeMat-$pkgver/|g" $startdir/freemat.install
  rm $pkgdir/usr/bin/blas.ini
}