# $Id: PKGBUILD 74885 2012-08-08 16:34:04Z ttopper $ # Contributor: G_Syme # Contributor: Stefan Husmann # Maintainer: Thorsten Töpper pkgname=mathomatic pkgver=16.0.2 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=('17d4034b9f4af59d55095d47e9096c7b') 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: