summaryrefslogtreecommitdiff
path: root/community/parrot/PKGBUILD
blob: 873ad8f012ff700a511fb65765f3706f1f0d041d (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
# $Id: PKGBUILD 69768 2012-04-23 09:16:14Z ibiru $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: mpie <michael.kyne-phillips1@ntlworld.com>

pkgname=parrot
pkgver=4.2.0
#_rel=stable
_rel=devel
pkgrel=1
pkgdesc="Standalone VM that can execute bytecode compiled dynamic languages"
arch=('x86_64' 'i686')
url="http://www.parrotcode.org/"
license=('GPL')
depends=('icu' 'openssl' 'libffi')
makedepends=('perl-json')
optdepends=('freeglut')
options=(!makeflags)
source=("ftp://ftp.parrot.org/pub/parrot/releases/$_rel/$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('69ee93d9f81babcff67b747cc614358958a32f274e407b65771ca5a056d4c3d4')

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

  sed -i 's#auto::sha1##' lib/Parrot/Configure/Step/List.pm
  sed -i 's#auto::git_describe##' lib/Parrot/Configure/Step/List.pm

  perl Configure.pl --prefix=/usr \
    --parrot_is_shared \
    --disable-rpath

  find -type f -name Makefile | while read F; do
    grep "$srcdir" $F  && sed -i \
      "s#-Wl,-rpath=$srcdir/$pkgname-$pkgver/blib/lib##" $F
    grep "$srcdir" $F  && sed -i \
      "s#-rpath=$srcdir/$pkgname-$pkgver/blib/lib##" $F
  done

  export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(pwd)/blib/lib"
  make all parrot_utils docs html
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install-dev

  sed -i "s#$srcdir#/usr/src#" \
    $pkgdir/usr/lib/parrot/$pkgver/tools/lib/Parrot/Config/Generated.pm
}