summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f7ee34f85b816ad9778ab23fbeb7d07ab442e4b9 (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
pkgname=python-assimulo
pkgver=3.0
pkgrel=1
pkgdesc="A package for solving ordinary differential equations and differential algebraic equations"
url="http://www.jmodelica.org/assimulo"
arch=('i686' 'x86_64')
license=('LGPL')
makedepends=('python-setuptools' 'cython' 'gcc-fortran' 'sundials' 'lapack')
depends=('python-scipy' 'python-matplotlib' 'lapack' 'sundials')
source=("https://github.com/modelon/Assimulo/archive/Assimulo-${pkgver}.tar.gz" sundials4.patch)
sha256sums=('6a1437af8ea0c9af3c0afa1efb44f5d1e11edfec1250ce3510f9e33397a04e6b'
            'SKIP')

prepare() {
  cd "${srcdir}"/Assimulo-Assimulo-$pkgver

  # try to build with sundials 4.0
  patch -p0 -i "${srcdir}"/sundials4.patch

  # use shared lib
  sed -i "s|BLASname_t+'.a'|BLASname_t+'.so'|g" setup.py
}

build() {
  cp -r "${srcdir}"/Assimulo-Assimulo-$pkgver "${srcdir}"/Assimulo-Assimulo-$pkgver-py2
}

package() {
  depends=('python-scipy' 'python-matplotlib' 'lapack' 'sundials')

  cd "${srcdir}/Assimulo-Assimulo-$pkgver"
  python setup.py install --root=${pkgdir} --optimize=1 --extra-fortran-link-flags="-shared" --sundials-home=/usr --blas-home=/usr/lib --blas-name="blas" --lapack-home=/usr
}