/[gentoo-x86]/dev-lisp/clisp/clisp-2.48-r2.ebuild
Gentoo

Contents of /dev-lisp/clisp/clisp-2.48-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri Dec 17 20:17:25 2010 UTC (3 years, 9 months ago) by ulm
Branch: MAIN
Changes since 1.2: +1 -3 lines
Remove PROVIDE, commonlisp is now a new-style virtual.

(Portage version: 2.1.9.25/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-lisp/clisp/clisp-2.48-r2.ebuild,v 1.2 2010/06/17 20:15:40 patrick Exp $
4
5 EAPI="2"
6
7 inherit flag-o-matic eutils toolchain-funcs multilib
8
9 DESCRIPTION="A portable, bytecode-compiled implementation of Common Lisp"
10 HOMEPAGE="http://clisp.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
12
13 LICENSE="GPL-2"
14 SLOT="2"
15 KEYWORDS="~alpha ~amd64 ~ia64 ~ppc -sparc ~x86"
16 IUSE="berkdb hyperspec X new-clx dbus fastcgi gdbm gtk pari +pcre postgres +readline svm -threads +unicode +zlib"
17
18 RDEPEND="virtual/libiconv
19 >=dev-libs/libsigsegv-2.4
20 >=dev-libs/ffcall-1.10
21 dbus? ( sys-apps/dbus )
22 fastcgi? ( dev-libs/fcgi )
23 gdbm? ( sys-libs/gdbm )
24 gtk? ( >=x11-libs/gtk+-2.10 >=gnome-base/libglade-2.6 )
25 pari? ( >=sci-mathematics/pari-2.3.0 )
26 postgres? ( >=dev-db/postgresql-base-8.0 )
27 readline? ( >=sys-libs/readline-5.0 )
28 pcre? ( dev-libs/libpcre )
29 svm? ( sci-libs/libsvm )
30 zlib? ( sys-libs/zlib )
31 X? ( new-clx? ( x11-libs/libXpm ) )
32 hyperspec? ( dev-lisp/hyperspec )
33 berkdb? ( sys-libs/db:4.7 )"
34
35 DEPEND="${RDEPEND}
36 X? ( new-clx? ( x11-misc/imake x11-proto/xextproto ) )"
37
38 PDEPEND="dev-lisp/gentoo-init"
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+=" --with-module=${m}"
45 done
46 }
47
48 BUILDDIR="builddir"
49
50 # modules not enabled:
51 # * dirkey: fails to compile, requiring windows.h, possibly wrong #ifdefs
52 # * matlab, netica: not in portage
53 # * oracle: can't install oracle-instantclient
54
55 src_prepare() {
56 # More than -O1 breaks alpha/ia64
57 if use alpha || use ia64; then
58 sed -i -e 's/-O2//g' src/makemake.in || die
59 fi
60 }
61
62 src_configure() {
63 # We need this to build on alpha/ia64
64 if use alpha || use ia64; then
65 replace-flags -O? -O1
66 append-flags '-D NO_MULTIMAP_SHM -D NO_MULTIMAP_FILE -D NO_SINGLEMAP -D NO_TRIVIALMAP'
67 fi
68
69 # QA issue with lisp.run
70 append-flags -Wa,--noexecstack
71
72 # built-in features
73 local myconf="--with-ffcall --without-dynamic-modules"
74 # There's a problem with jit_allocai function
75 # if use jit; then
76 # myconf+=" --with-jitc=lightning"
77 # fi
78 if use threads; then
79 myconf+=" --with-threads=POSIX_THREADS"
80 fi
81
82 # default modules
83 enable_modules wildcard rawsock
84 # optional modules
85 use elibc_glibc && enable_modules bindings/glibc
86 if use X; then
87 if use new-clx; then
88 enable_modules clx/new-clx
89 else
90 enable_modules clx/mit-clx
91 fi
92 fi
93 if use postgres; then
94 enable_modules postgresql
95 append-flags -I$(pg_config --includedir)
96 fi
97 if use berkdb; then
98 enable_modules berkeley-db
99 append-flags -I/usr/include/db4.7
100 fi
101 use dbus && enable_modules dbus
102 use fastcgi && enable_modules fastcgi
103 use gdbm && enable_modules gdbm
104 use gtk && enable_modules gtk2
105 use pari && enable_modules pari
106 use pcre && enable_modules pcre
107 use svm && enable_modules libsvm
108 use zlib && enable_modules zlib
109
110 if use hyperspec; then
111 CLHSROOT="file:///usr/share/doc/hyperspec/HyperSpec/"
112 else
113 CLHSROOT="http://www.lispworks.com/reference/HyperSpec/"
114 fi
115
116 # configure chokes on --sysconfdir option
117 local configure="./configure --prefix=/usr --libdir=/usr/$(get_libdir) \
118 $(use_with readline) $(use_with unicode) \
119 ${myconf} --hyperspec=${CLHSROOT} ${BUILDDIR}"
120 einfo "${configure}"
121 ${configure} || die "./configure failed"
122
123 sed -i 's,"vi","nano",g' "${BUILDDIR}"/config.lisp || die
124
125 IMPNOTES="file://${ROOT%/}/usr/share/doc/${PN}-${PVR}/html/impnotes.html"
126 sed -i "s,http://clisp.cons.org/impnotes/,${IMPNOTES},g" \
127 "${BUILDDIR}"/config.lisp || die
128 }
129
130 src_compile() {
131 export VARTEXFONTS="${T}"/fonts
132 cd "${BUILDDIR}"
133 # parallel build fails
134 emake -j1 || die "emake failed"
135 }
136
137 src_install() {
138 pushd "${BUILDDIR}"
139 make DESTDIR="${D}" prefix=/usr install-bin || die
140 doman clisp.1 || die
141 dodoc SUMMARY README* NEWS MAGIC.add ANNOUNCE || die
142 fperms a+x /usr/$(get_libdir)/clisp-${PV/_*/}/clisp-link || die
143 # stripping them removes common symbols (defined but uninitialised variables)
144 # which are then needed to build modules...
145 export STRIP_MASK="*/usr/$(get_libdir)/clisp-${PV}/*/*"
146 popd
147 dohtml doc/impnotes.{css,html} doc/regexp.html doc/clisp.png || die
148 dodoc doc/{CLOS-guide,LISP-tutorial}.txt || die
149 }
150
151 pkg_postinst() {
152 if use threads || use jit; then
153 while read line; do elog ${line}; done <<EOF
154
155 Upstream considers threads to be of Alpha quality, therefore
156 it is likely that you will encounter bugs in using them. If you do,
157 please report bugs upstream:
158
159 Mailing list: https://lists.sourceforge.net/lists/listinfo/clisp-devel
160 Bug tracker: http://sourceforge.net/tracker/?atid=101355&group_id=1355
161
162 EOF
163 fi
164 }

  ViewVC Help
Powered by ViewVC 1.1.20