blob: 078567e4320c8aec1045583cd21a5c117ed4fa5e (
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
|
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils java-utils-2
DESCRIPTION="Armed Bear Common Lisp is a Common Lisp implementation for the JVM."
HOMEPAGE="http://armedbear.org/abcl.html"
SRC_URI="http://armedbear.org/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="jad clisp cmucl"
RDEPEND=">=virtual/jdk-1.4
jad? ( dev-java/jad-bin )"
DEPEND="${RDEPEND}
!cmucl? ( !clisp? ( dev-lisp/sbcl ) )
cmucl? ( dev-lisp/cmucl )
clisp? ( dev-lisp/clisp )"
src_unpack() {
unpack ${A}
cat > "${S}"/customizations.lisp <<EOF
(in-package #:build-abcl)
(setf
*javac-options* "-g"
*jdk* "$(java-config --jdk-home)/"
*java-compiler* "javac"
*jar* "jar")
EOF
echo ; einfo "Building with the following customizations.lisp:"
while read line; do einfo "${line}"; done < "${S}"/customizations.lisp
cat > "${S}"/build.lisp <<EOF
(load "build-abcl")
(funcall 'build-abcl:build-abcl :clean t :full t)
#+sbcl (sb-ext:quit)
#+clisp (ext:quit)
#+cmu (ext: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 "Failed to compiled ABCL"
}
src_install() {
exeinto /usr/$(get_libdir)/abcl
doexe src/org/armedbear/lisp/libabcl.so
java-pkg_dojar abcl.jar
java-pkg_dolauncher "${PN}" \
--main "org.armedbear.lisp.Main" \
--java_args "-server -Xrs -Djava.library.path=/usr/$(get_libdir)/${PN}/"
dodoc README
}
|