summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0e2bf96dadc7058998f2f22b19e43d3ff9d93646 (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
48
49
# -*- shell-script -*-
# Maintainer: Alastair Pharo  asppsa at gmail dot com
# Maintainer: Albert Graef <aggraef@gmail.com>

pkgname=pure-hg
pkgver=5614.6078c8bf1c2e
pkgrel=1
pkgdesc="Pure is a modern-style functional programming language based on term rewriting."
arch=("i686" "x86_64")
license=('GPL3' 'LGPL3')
url="http://purelang.bitbucket.org/"
depends=('llvm35-libs' 'gmp' 'mpfr' 'readline')
makedepends=('mercurial' 'llvm35')
optdepends=("clang35: needed for inlining C/C++ code"
	    "pure-docs-hg: online documentation"
            "pcre: Perl regex support"
            "w3m: access to help in interactive mode"
            "emacs-pure-mode: editing Pure files from Emacs"
            "texmacs-pure: embedding Pure sessions in TeXmacs")
provides=('pure')
conflicts=('pure')
source=("hg+https://bitbucket.org/purelang/pure-lang")
md5sums=(SKIP)

pkgver() {
  cd $srcdir/pure-lang
  echo $(hg identify -n).$(hg identify -i)
}

build() {
  cd $srcdir/pure-lang/pure
  autoreconf
  # For Perl5 regex support, at present you still need to add --with-pcre
  # below (and make sure that you have pcre installed). This may become the
  # default in the future.
  ./configure --enable-release --prefix=/usr --without-elisp --without-texmacs
  make || return 1
  make check || return 1
}

package() {
  cd "$srcdir/pure-lang/pure"
  make DESTDIR=$pkgdir install || return 1
  # Copy the needed binaries from the LLVM toolchain to make the batch
  # compiler work without having the llvm35 package installed.
  cp /usr/bin/llc /usr/bin/llvm-as /usr/bin/opt $pkgdir/usr/lib/pure
}

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