summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cb7e18c299c0d2fe88ff2eb50be1c68034d30644 (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
pkgname=lpython-git
pkgver=r13855.615e7e7d6
pkgrel=1
pkgdesc="Python compiler" 
license=('BSD')
arch=('x86_64')
url="https://lpython.org/"
depends=(llvm)
makedepends=(cmake git)
provides=(lpython)
conflicts=(lpython)
source=(git+https://github.com/lcompilers/lpython.git)
sha512sums=('SKIP')

pkgver() {
  cd "$srcdir/lpython"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd lpython
  ./build0.sh
}

build() {
  cmake -S lpython -B build -DCMAKE_INSTALL_PREFIX=/usr \
    -DWITH_LLVM=ON -DWITH_XEUS=ON -DLPYTHON_BUILD_ALL=ON 
  cmake --build build --target all
}

check() {
  ctest --verbose --output-on-failure --test-dir build
}

package() {
  DESTDIR="${pkgdir}" cmake --build build --target install
}