updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / pure-hg / PKGBUILD
blob6a2733299e90e72a6d0277d2c06554f9ef42368a
1 # Contributor: Alastair Pharo  asppsa at gmail dot com
3 pkgname=pure-hg
4 pkgver=20111220
5 pkgrel=2
6 pkgdesc="Pure is a modern-style functional programming language based on term rewriting."
7 arch=("i686" "x86_64")
8 license=('GPL3')
9 url="http://code.google.com/p/pure-lang"
10 depends=('llvm' 'gsl' 'gmp' 'libffi' 'mpfr' 'readline')
11 makedepends=('autoconf' 'bison' 'flex' 'gcc' 'make' 'mercurial' 'wget')
12 optdepends=('w3m: help in interactive mode')
13 provides=('pure')
14 conflicts=('pure')
15 source=()
16 md5sums=()
18 _hgtrunk=https://code.google.com/p/pure-lang
20 build() {
21         cd ${srcdir}
23         if [ -d pure-lang ]; then
24                 (cd pure-lang && hg pull -u; cd $srcdir)
25         else
26                 hg clone $_hgtrunk pure-lang
27         fi
29         rm -rf $srcdir/pure-build
30         cp -r $srcdir/pure-lang/pure $srcdir/pure-build
31         cd pure-build
32         autoreconf
33         ./configure --enable-release --prefix=/usr
34         make || return 1
35         make DESTDIR=$pkgdir install || return 1
36         make DESTDIR=$pkgdir install-docs || return 1
38         # The docs will be installed in the wrong place if pure was not already
39         # installed on the system at build time.
40         if [ -d $pkgdir/usr/local/lib/pure/docs ]; then
41                 mv $pkgdir/usr/local/lib/pure/docs $pkgdir/usr/lib/pure/docs
42                 rm -rf $pkgdir/usr/local
43         fi