| 1 |
hkbst |
1.1 |
# Copyright 1999-2009 Gentoo Foundation
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
armin76 |
1.4 |
# $Header: /var/cvsroot/gentoo-x86/dev-lisp/clisp/clisp-2.47-r1.ebuild,v 1.3 2009/01/10 11:05:50 maekke Exp $
|
| 4 |
hkbst |
1.1 |
|
| 5 |
|
|
inherit flag-o-matic eutils toolchain-funcs multilib
|
| 6 |
|
|
|
| 7 |
|
|
DESCRIPTION="A portable, bytecode-compiled implementation of Common Lisp"
|
| 8 |
|
|
HOMEPAGE="http://clisp.sourceforge.net/"
|
| 9 |
|
|
SRC_URI="mirror://sourceforge/clisp/${P}.tar.bz2"
|
| 10 |
|
|
LICENSE="GPL-2"
|
| 11 |
|
|
|
| 12 |
|
|
# EAPI="1"
|
| 13 |
|
|
SLOT="2"
|
| 14 |
armin76 |
1.4 |
KEYWORDS="alpha amd64 ia64 ~ppc -sparc x86"
|
| 15 |
hkbst |
1.1 |
IUSE="hyperspec X new-clx dbus fastcgi gdbm gtk pari pcre postgres readline svm zlib"
|
| 16 |
|
|
|
| 17 |
|
|
RDEPEND="virtual/libiconv
|
| 18 |
|
|
>=dev-libs/libsigsegv-2.4
|
| 19 |
|
|
>=dev-libs/ffcall-1.10
|
| 20 |
|
|
dbus? ( sys-apps/dbus )
|
| 21 |
|
|
fastcgi? ( dev-libs/fcgi )
|
| 22 |
|
|
gdbm? ( sys-libs/gdbm )
|
| 23 |
|
|
gtk? ( >=x11-libs/gtk+-2.10 >=gnome-base/libglade-2.6 )
|
| 24 |
|
|
pari? ( >=sci-mathematics/pari-2.3.0 )
|
| 25 |
|
|
postgres? ( >=virtual/postgresql-base-8.0 )
|
| 26 |
|
|
readline? ( >=sys-libs/readline-5.0 )
|
| 27 |
|
|
pcre? ( dev-libs/libpcre )
|
| 28 |
|
|
svm? ( sci-libs/libsvm )
|
| 29 |
|
|
zlib? ( sys-libs/zlib )
|
| 30 |
|
|
X? ( new-clx? ( x11-libs/libXpm ) )
|
| 31 |
|
|
hyperspec? ( dev-lisp/hyperspec )"
|
| 32 |
|
|
# berkdb? ( sys-libs/db:4.5 )
|
| 33 |
|
|
|
| 34 |
|
|
DEPEND="${RDEPEND} X? ( new-clx? ( x11-misc/imake x11-proto/xextproto ) )"
|
| 35 |
|
|
|
| 36 |
|
|
PDEPEND="dev-lisp/gentoo-init"
|
| 37 |
|
|
|
| 38 |
|
|
PROVIDE="virtual/commonlisp"
|
| 39 |
|
|
|
| 40 |
|
|
enable_modules() {
|
| 41 |
|
|
[[ $# = 0 ]] && die "${FUNCNAME[0]} must receive at least one argument"
|
| 42 |
|
|
for m in "$@" ; do
|
| 43 |
|
|
einfo "enabling module $m"
|
| 44 |
|
|
myconf="${myconf} --with-module=${m}"
|
| 45 |
|
|
done
|
| 46 |
|
|
}
|
| 47 |
|
|
|
| 48 |
|
|
BUILDDIR="builddir"
|
| 49 |
|
|
|
| 50 |
|
|
# modules not enabled:
|
| 51 |
|
|
# * berkdb: must figure out a way to make the configure script pick up the
|
| 52 |
|
|
# currect version of the library and headers
|
| 53 |
|
|
# * dirkey: fails to compile, requiring windows.h, possibly wrong #ifdefs
|
| 54 |
|
|
# * matlab, netica: not in portage
|
| 55 |
|
|
# * oracle: can't install oracle-instantclient
|
| 56 |
|
|
|
| 57 |
|
|
src_unpack() {
|
| 58 |
|
|
unpack ${A}
|
| 59 |
|
|
cd "${S}"
|
| 60 |
|
|
|
| 61 |
hkbst |
1.2 |
epatch "${FILESDIR}"/pari.patch #bug 246074
|
| 62 |
|
|
|
| 63 |
hkbst |
1.1 |
# More than -O1 breaks alpha/ia64
|
| 64 |
|
|
use alpha || use ia64 && sed -i -e 's/-O2//g' src/makemake.in
|
| 65 |
|
|
}
|
| 66 |
|
|
|
| 67 |
|
|
src_compile() {
|
| 68 |
|
|
# built-in features
|
| 69 |
|
|
local myconf="--with-ffcall --with-dynamic-modules"
|
| 70 |
|
|
use readline || myconf="${myconf} --with-noreadline"
|
| 71 |
|
|
|
| 72 |
|
|
# We need this to build on alpha/ia64
|
| 73 |
|
|
if use alpha || use ia64; then
|
| 74 |
|
|
replace-flags -O? -O1
|
| 75 |
|
|
append-flags '-D NO_MULTIMAP_SHM -D NO_MULTIMAP_FILE -D NO_SINGLEMAP -D NO_TRIVIALMAP'
|
| 76 |
|
|
fi
|
| 77 |
|
|
# default modules
|
| 78 |
|
|
enable_modules wildcard rawsock
|
| 79 |
|
|
# optional modules
|
| 80 |
|
|
use elibc_glibc && enable_modules bindings/glibc
|
| 81 |
|
|
if use X; then
|
| 82 |
|
|
if use new-clx; then
|
| 83 |
|
|
enable_modules clx/new-clx
|
| 84 |
|
|
else
|
| 85 |
|
|
enable_modules clx/mit-clx
|
| 86 |
|
|
fi
|
| 87 |
|
|
fi
|
| 88 |
|
|
if use postgres; then
|
| 89 |
|
|
enable_modules postgresql
|
| 90 |
|
|
CPPFLAGS="-I $(pg_config --includedir)"
|
| 91 |
|
|
fi
|
| 92 |
|
|
# if use berkdb; then
|
| 93 |
|
|
# enable_modules berkley-db
|
| 94 |
|
|
# CPPFLAGS="${CPPFLAGS} -I /usr/include/db4.5"
|
| 95 |
|
|
# fi
|
| 96 |
|
|
use dbus && enable_modules dbus
|
| 97 |
|
|
use fastcgi && enable_modules fastcgi
|
| 98 |
|
|
use gdbm && enable_modules gdbm
|
| 99 |
|
|
use gtk && enable_modules gtk2
|
| 100 |
|
|
use pari && enable_modules pari
|
| 101 |
|
|
use pcre && enable_modules pcre
|
| 102 |
|
|
use svm && enable_modules libsvm
|
| 103 |
|
|
use zlib && enable_modules zlib
|
| 104 |
|
|
|
| 105 |
|
|
if use hyperspec; then
|
| 106 |
|
|
CLHSROOT="file:///usr/share/doc/hyperspec/HyperSpec/"
|
| 107 |
|
|
else
|
| 108 |
|
|
CLHSROOT="http://www.lispworks.com/reference/HyperSpec/"
|
| 109 |
|
|
fi
|
| 110 |
|
|
|
| 111 |
|
|
# configure chokes on --infodir option
|
| 112 |
|
|
local configure="./configure --prefix=/usr --libdir=/usr/$(get_libdir) \
|
| 113 |
|
|
${myconf} --hyperspec=${CLHSROOT} ${BUILDDIR}"
|
| 114 |
|
|
einfo "${configure}"
|
| 115 |
|
|
${configure} || die "./configure failed"
|
| 116 |
|
|
|
| 117 |
|
|
cd ${BUILDDIR}
|
| 118 |
|
|
sed -i 's,"vi","nano",g' config.lisp
|
| 119 |
|
|
IMPNOTES="file://${ROOT%/}/usr/share/doc/${PN}-${PVR}/html/impnotes.html"
|
| 120 |
|
|
sed -i "s,http://clisp.cons.org/impnotes/,${IMPNOTES},g" config.lisp
|
| 121 |
|
|
# parallel build fails
|
| 122 |
|
|
emake -j1 || die "emake failed"
|
| 123 |
|
|
}
|
| 124 |
|
|
|
| 125 |
|
|
src_install() {
|
| 126 |
|
|
pushd ${BUILDDIR}
|
| 127 |
|
|
make DESTDIR="${D}" prefix=/usr install-bin || die
|
| 128 |
|
|
doman clisp.1
|
| 129 |
|
|
dodoc SUMMARY README* NEWS MAGIC.add ANNOUNCE clisp.dvi clisp.html
|
| 130 |
|
|
chmod a+x "${D}"/usr/$(get_libdir)/clisp-${PV/_*/}/clisp-link
|
| 131 |
|
|
# stripping them removes common symbols (defined but unitialised variables)
|
| 132 |
|
|
# which are then needed to build modules...
|
| 133 |
|
|
export STRIP_MASK="*/usr/$(get_libdir)/clisp-${PV}/*/*"
|
| 134 |
|
|
popd
|
| 135 |
|
|
dohtml doc/impnotes.{css,html} doc/regexp.html doc/clisp.png
|
| 136 |
|
|
dodoc doc/{editors,CLOS-guide,LISP-tutorial}.txt
|
| 137 |
|
|
}
|