summaryrefslogtreecommitdiff
path: root/community/mathomatic/PKGBUILD
blob: d098d45dfc106d419cf833e8d38a3cde4b602f7d (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
41
42
43
44
45
46
47
# $Id: PKGBUILD 70112 2012-04-29 22:28:19Z ttopper $
# Contributor: G_Syme <demichan(at)mail(dot)upb(dot)de>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Maintainer:  Thorsten Töpper <atsutane-tu@freethoughts.de>

pkgname=mathomatic
pkgver=15.8.3
pkgrel=1
pkgdesc="General purpose Computer Algebra System written in C"
arch=('i686' 'x86_64' 'mips64el')
license=('LGPL')
url="http://mathomatic.orgserve.de/math/"
depends=('readline')
makedepends=('time')
optdepends=('python2: for running /usr/share/doc/mathomatic/factorial/factorial'
            'bash: for running a test script' 
            'm4: for complex operations using the matho script' 
            'gnuplot: for plotting')
source=(http://mathomatic.org/$pkgname-$pkgver.tar.bz2)
md5sums=('df4296e27840ecafe87f16ff9cf181ac')

build() {
  cd "$srcdir"/$pkgname-$pkgver

  # python2 fix
  for file in primes/{primorial,matho-sum,matho-mult} examples/factorial; do
    sed -i 's_#!.*/usr/bin/python_#!/usr/bin/python2_' $file
    sed -i 's_#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
  done

  make READLINE=1
  make test
  cd "$srcdir"/$pkgname-$pkgver/primes
  make
  make test
}

package() {
  cd "$srcdir"/$pkgname-$pkgver
  make prefix="$pkgdir"/usr m4install
  sed -i 's+/build/pkg++' "$pkgdir"/usr/bin/matho

  cd "$srcdir"/$pkgname-$pkgver/primes
  make prefix="$pkgdir"/usr install
}

# vim:set ts=2 sw=2 et: