summaryrefslogtreecommitdiff
path: root/community/parrot/PKGBUILD
blob: 0f0d9d4bef808c5f047ce77e8c80e8355f71c9c4 (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
# $Id: PKGBUILD 62750 2012-01-25 18:56:38Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributer: mpie <michael.kyne-phillips1@ntlworld.com>

pkgname=parrot
pkgver=4.0.0
#_rel=devel
_rel=stable
pkgrel=2
pkgdesc="standalone virtual machine that can be used to execute bytecode compiled dynamic languages"
arch=(i686 x86_64)
url="http://www.parrotcode.org/"
license=('GPL')
depends=('gmp' 'gdbm' 'readline' 'icu' 'openssl' 'libffi')
makedepends=('perl-json')
optdepends=('freeglut')
options=(!emptydirs !makeflags)
source=(ftp://ftp.parrot.org/pub/parrot/releases/${_rel}/$pkgver/parrot-$pkgver.tar.gz)
md5sums=('fc613c41771baf79307c519072302299')

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

  [ $NOEXTRACT -eq 1 ] || perl Configure.pl --prefix=/usr --parrot_is_shared

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

  OLD_LIB_PATH=$LD_LIBRARY_PATH
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$srcdir/parrot-$pkgver/blib/lib
  make -j1 all parrot_utils docs html RPATH_BLIB=

  export LD_LIBRARY_PATH=`pwd`/blib/lib
  make -j1 DESTDIR=$pkgdir install-dev

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

  export LD_LIBRARY_PATH=$OLD_LIB_PATH
}