summaryrefslogtreecommitdiff
path: root/extra/cln/PKGBUILD
blob: 7e6c63cc706df28391656008292865dc16540859 (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
# $Id: PKGBUILD 197218 2013-10-24 05:09:05Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=cln
pkgver=1.3.3
pkgrel=2
pkgdesc="Class library for numbers"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.ginac.de/CLN/"
license=('GPL')
[[ "${CARCH}" == 'mips64el' ]] || depends=('gmp')
makedepends=('texlive-core')
install=cln.install
source=(http://www.ginac.de/CLN/${pkgname}-${pkgver}.tar.bz2)
sha1sums=('11c56780eb83ed54f2ad1ecef7f0dc0f609c426d')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  sed -i 's/<sizeof(mp_limb_t) > sizeof(long)>/<(sizeof(mp_limb_t) > sizeof(long))>/' configure
  # For unknown reasons it fails.
  if [[ "${CARCH}" == 'mips64el' ]] ; then
      use_gmp=--without-gmp
  else
      use_gmp=
  fi
  ./configure --prefix=/usr $use_gmp
  make all html
}

check() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make check
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install install-html
}