updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / larceny / PKGBUILD
blobc155d504389e1a86c097966a3d7c8556b2c4aa5f
1 # Contributor: Victor van den Elzen <victor dot vde at gmail dot com>
3 pkgname=larceny
4 pkgver=0.97
5 pkgrel=1
6 pkgdesc="A simple and efficient implementation of the Scheme programming language."
7 url="http://www.ccs.neu.edu/home/will/Larceny/"
8 arch=('i686')
9 depends=('sh')
10 makedepends=('drscheme>=4.0.0' 'nasm')
11 license=('LGPL')
12 source=("http://www.ccs.neu.edu/home/will/Larceny/LarcenyReleases/$pkgname-$pkgver-src.tar.gz")
13 md5sums=('da35e2340b54371122531ddf3b6d3981')
15 build() {
16   cd $srcdir/$pkgname-$pkgver-src
17   plt-r5rs --no-prim <<EOF
18 (load "setup.sch")
19 (setup 'scheme: 'plt-r5rs 'host: 'linux86 'string-rep: 'flat4 'sassy)
20 (build-config-files)
21 (load-compiler)
22 (build-heap)
23 (build-runtime)
24 (build-executable)
25 (build-larceny-files)
26 EOF
27   ./larceny.bin -stopcopy -- src/Build/iasn-larceny-heap.fasl <<EOF
28 (exit)
29 EOF
30   ./larceny.bin -stopcopy -- src/Build/iasn-twobit-heap.fasl <<EOF
31 (exit)
32 EOF
33   cp larceny twobit
34   ./larceny <<EOF
35 (require 'r6rsmode)
36 (larceny:compile-r6rs-runtime)
37 (exit)
38 EOF
39   local LARCENY_ROOT=/usr/lib/larceny
40   mkdir -p $pkgdir$LARCENY_ROOT
41   cp * $pkgdir$LARCENY_ROOT
42   cp -r doc examples lib $pkgdir$LARCENY_ROOT
43   mkdir -p $pkgdir/usr/bin
44   cp larceny $pkgdir/usr/bin
45   sed -i "s|# LARCENY_ROOT=.*|LARCENY_ROOT=$LARCENY_ROOT|" $pkgdir/usr/bin/larceny
46   cp $pkgdir/usr/bin/larceny $pkgdir/usr/bin/twobit