summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c17599129625a0a77b178657c041b4a023235d9a (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
50
51
52
53
54
55
56
#  Maintainer: Xuanrui Qi <me@xuanruiqi.com>
# Contributor: Naoya Inada <inaoya@kushinada.org>
#     Updated: Yuki Chiba <yuki.from.akita@gmail.com>

pkgname=smlsharp
pkgver=4.0.0
pkgrel=1
pkgdesc="A new programming language in the Standard ML family"
arch=('x86_64')
url="https://smlsharp.github.io/"
license=('MIT')
depends=('gmp'
         'massivethreads=1.00'
         'llvm>=3.9.1')
makedepends=('chrpath')
source=("https://github.com/smlsharp/smlsharp/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz"
        remove-tz-test.patch)
sha256sums=('0b44fb1f369f7cfced197c68f0d3102e940dbe5288adc3bdf618a5a3ec3165db'
            '9ad167dd7582349a84218c1d61347376e439d476cca1ffa26b6addeaf162dc6c')
options=(libtool staticlibs)

# Set this variable to anything non-empty to bootstrap the compiler
_stage=

prepare() {
  cd $srcdir/$pkgname-$pkgver
  ./configure --prefix=/usr
}

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

  if [ -n "${_stage}" ]; then
    make stage
    make
  fi
}

check() {
  cd $srcdir/$pkgname-$pkgver

  # Remove a Date test that only succeeds if in JST
  patch -Np0 -i ../remove-tz-test.patch

  make test
}

package(){  
  cd $srcdir/$pkgname-$pkgver
  chrpath -d src/compiler/smlsharp
  make DESTDIR="$pkgdir" install

  install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
  install -Dm644 src/smlnj/LICENSE $pkgdir/usr/share/licenses/$pkgname/SMLNJ_LICENSE
}