blob: a0f4782f38d93259e605f3ae06988eba25e0a2ed (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lisp/abcl/abcl-0.0.9.ebuild,v 1.1 2006/01/11 23:51:00 mkennedy Exp $
inherit eutils java-pkg
DESCRIPTION="Armed Bear Common Lisp (ABCL) is an implementation of ANSI Common Lisp that runs in a Java virtual machine."
HOMEPAGE="http://armedbear.org/abcl.html"
SRC_URI="http://armedbear.org/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="jad jikes clisp cmucl"
RDEPEND=">=virtual/jdk-1.4
jad? ( dev-java/jad-bin )"
DEPEND=">=virtual/jdk-1.4
!cmucl? ( !clisp? ( dev-lisp/sbcl ) )
cmucl? ( dev-lisp/cmucl )
clisp? ( dev-lisp/clisp )
jikes? ( dev-java/jikes )"
S=${WORKDIR}/${P}
src_unpack() {
unpack ${A}
local java_compiler="javac"
use jikes && java_compiler="jikes"
cat >${S}/customizations.lisp <<EOF
(in-package #:build-abcl)
(setf
*javac-options* "-g"
*jikes-options* "+D -g"
*jdk* "$(java-config --jdk-home)/"
*java-compiler* "$java_compiler"
*jar* "jar")
EOF
einfo "Building with the following customizations.lisp:"
cat ${S}/customizations.lisp
cat >${S}/build.lisp <<'EOF'
(progn (load "build-abcl") (funcall (intern "BUILD-ABCL" "BUILD-ABCL") :clean t :full t) #+sbcl (sb-ext:quit) #+clisp (ext:quit) #+cmu (extensions:quit))
EOF
}
src_compile() {
local lisp_compiler lisp_compiler_args
if use clisp; then
lisp_compiler="clisp"
lisp_compiler_args="-ansi build.lisp"
elif use cmucl; then
lisp_compiler="lisp"
lisp_compiler_args="-noinit -nositeinit -batch -load build.lisp"
else
lisp_compiler="sbcl"
lisp_compiler_args="--sysinit /dev/null --userinit /dev/null --disable-debugger --load build.lisp"
fi
$lisp_compiler $lisp_compiler_args || die
}
src_install() {
cat >abcl <<EOF
#!/bin/sh
exec \$(java-config --java) -Xmx256M -Xrs -Djava.library.path=/usr/$(get_libdir)/abcl/ -cp \$(java-config -p abcl) org.armedbear.lisp.Main "\$@"
EOF
dobin abcl
insinto /usr/$(get_libdir)/abcl
doins src/org/armedbear/lisp/libabcl.so
java-pkg_dojar abcl.jar
dodoc README COPYING
}
|