1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit flag-o-matic eutils toolchain-funcs multilib
7 DESCRIPTION
="A portable, bytecode-compiled implementation of Common Lisp"
8 HOMEPAGE
="http://clisp.sourceforge.net/"
9 SRC_URI
="mirror://sourceforge/clisp/${P}.tar.gz"
13 KEYWORDS
="~amd64 ~ppc ~ppc64 -sparc x86"
14 IUSE
="hyperspec X new-clx fastcgi gdbm gtk pcre postgres readline svm zlib"
16 RDEPEND
="dev-lisp/gentoo-init
18 >=dev-libs/libsigsegv-2.4
19 >=dev-libs/ffcall-1.10
20 fastcgi? ( dev-libs/fcgi )
21 gdbm? ( sys-libs/gdbm )
22 gtk? ( >=x11-libs/gtk+-2.10 >=gnome-base/libglade-2.6 )
23 postgres? ( >=dev-db/postgresql-8.0 )
24 readline? ( sys-libs/readline )
25 pcre? ( dev-libs/libpcre )
26 svm? ( sci-libs/libsvm )
27 zlib? ( sys-libs/zlib )
28 X? ( new-clx? ( x11-libs/libXpm ) )
29 hyperspec? ( dev-lisp/hyperspec )"
31 # + Not needed on systems with glibc 2.2 or newer, but recommended on all
32 # other systems: needed if you want clisp with native language support.
35 DEPEND
="${RDEPEND} X? ( new-clx? ( x11-misc/imake x11-proto/xextproto ) )"
37 PROVIDE
="virtual/commonlisp"
40 [[ $# = 0 ]] && die
"${FUNCNAME[0]} must receive at least one argument"
42 einfo
"enabling module $m"
43 myconf
="${myconf} --with-module=${m}"
51 local myconf
="--with-ffcall"
52 use readline || myconf
="${myconf} --with-noreadline"
55 enable_modules wildcard rawsock i18n
57 use elibc_glibc
&& enable_modules bindings
/glibc
60 enable_modules clx
/new-clx
62 enable_modules clx
/mit-clx
66 enable_modules postgresql
67 CPPFLAGS
="-I $(pg_config --includedir)"
69 use fastcgi
&& enable_modules fastcgi
70 use gdbm
&& enable_modules gdbm
71 use gtk
&& enable_modules gtk2
72 use pcre
&& enable_modules pcre
73 use svm
&& enable_modules libsvm
74 use zlib
&& enable_modules zlib
76 # configure chokes on --infodir option
77 .
/configure
--prefix=/usr
--libdir=/usr
/$
(get_libdir
) \
78 ${myconf} ${BUILDDIR} || die
"./configure failed"
80 sed -i 's,"vi","nano",g' config.lisp
81 if use hyperspec
; then
82 CLHSROOT
="file:///usr/share/doc/hyperspec/HyperSpec/"
84 CLHSROOT
="http://www.lispworks.com/reference/HyperSpec/"
86 sed -i "s,http://www.lisp.org/HyperSpec/,${CLHSROOT},g" config.lisp
87 IMPNOTES
="file://${ROOT%/}/usr/share/doc/${PN}-${PVR}/html/impnotes.html"
88 sed -i "s,http://clisp.cons.org/impnotes/,${IMPNOTES},g" config.lisp
89 # parallel build fails
90 emake
-j1 || die
"emake failed"
95 make DESTDIR
="${D}" prefix
=/usr install-bin || die
97 dodoc SUMMARY README
* NEWS MAGIC.add ANNOUNCE clisp.dvi clisp.html
98 chmod a
+x
"${D}"/usr
/$
(get_libdir
)/clisp-
${PV}/clisp-link
100 dohtml
doc
/impnotes.
{css
,html
} ${BUILDDIR}/clisp.html
doc
/clisp.png
101 dodoc
${BUILDDIR}/clisp.ps
doc
/{editors
,CLOS-guide
,LISP-tutorial
}.txt