summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 32638d8dd619023bd172e43fc4c92eb39fe58ed0 (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
# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
# Contributor: spider-mario <spidermario@free.fr>

pkgname=rakudo-git
pkgver=20160522
pkgrel=1
pkgdesc="Perl6 on MoarVM"
arch=('i686' 'x86_64')
depends=('moarvm' 'nqp')
makedepends=('git' 'make' 'perl')
optdepends=('gdb: GDB runner'
            'valgrind: Valgrind runner')
groups=('perl6')
url="https://github.com/rakudo/rakudo"
license=('PerlArtistic')
source=(git+https://github.com/rakudo/rakudo)
sha256sums=('SKIP')
provides=('perl6' 'rakudo')
conflicts=('perl6' 'rakudo')

pkgver() {
  cd ${pkgname%-git}
  git log -1 --format="%cd" --date=short | sed "s|-||g"
}

build() {
  cd ${pkgname%-git}

  msg2 'Building...'
  perl Configure.pl --prefix=/usr --backends=moar
  make
}

package() {
  cd ${pkgname%-git}

  msg2 'Installing...'
  RAKUDO_LOG_PRECOMP=1 make DESTDIR="$pkgdir" install
  install -Dm 755 tools/install-dist.pl "$pkgdir/usr/bin/perl6-install-dist"

  msg2 'Cleaning up pkgdir...'
  find "$pkgdir" -type f -name "*.lock" -exec rm '{}' \;
  find "$pkgdir/usr/share/perl6/precomp" -type f -name "*.deps" -exec \
    sed -i "s,$pkgdir,,g" '{}' +
}