/[gentoo-x86]/dev-lisp/clisp/clisp-2.49-r8.ebuild
Gentoo

Contents of /dev-lisp/clisp/clisp-2.49-r8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sat May 23 15:15:00 2015 UTC (4 years, 4 months ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +3 -3 lines
x86 stable wrt bug #511170

(Portage version: 2.2.19/cvs/Linux x86_64, RepoMan options: --include-arches="x86", signed Manifest commit with key A188FBD4)

1 # Copyright 1999-2015 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.49-r8.ebuild,v 1.5 2014/12/28 15:36:16 titanofold Exp $
4
5 EAPI=5
6 inherit eutils flag-o-matic multilib toolchain-funcs
7
8 DESCRIPTION="A portable, bytecode-compiled implementation of Common Lisp"
9 HOMEPAGE="http://clisp.sourceforge.net/"
10 SRC_URI="mirror://sourceforge/clisp/${P}.tar.bz2"
11
12 LICENSE="GPL-2"
13 SLOT="2/${PV}"
14 KEYWORDS="amd64 ~ppc ~sparc x86"
15 IUSE="hyperspec X berkdb dbus fastcgi gdbm gtk pari +pcre postgres +readline svm -threads +unicode +zlib"
16 # "jit" disabled ATM
17
18 RDEPEND=">=dev-lisp/asdf-2.33-r3
19 virtual/libiconv
20 >=dev-libs/libsigsegv-2.4
21 >=dev-libs/ffcall-1.10
22 dbus? ( sys-apps/dbus )
23 fastcgi? ( dev-libs/fcgi )
24 gdbm? ( sys-libs/gdbm )
25 gtk? ( >=x11-libs/gtk+-2.10 >=gnome-base/libglade-2.6 )
26 pari? ( <sci-mathematics/pari-2.5.0 )
27 postgres? ( >=dev-db/postgresql-8.0 )
28 readline? ( >=sys-libs/readline-5.0 )
29 pcre? ( dev-libs/libpcre )
30 svm? ( sci-libs/libsvm )
31 zlib? ( sys-libs/zlib )
32 X? ( x11-libs/libXpm )
33 hyperspec? ( dev-lisp/hyperspec )
34 berkdb? ( sys-libs/db:4.8 )"
35 # jit? ( >=dev-libs/lightning-1.2 )
36
37 DEPEND="${RDEPEND}
38 X? ( x11-misc/imake x11-proto/xextproto )"
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 # * 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_prepare() {
58 # More than -O1 breaks alpha/ia64
59 if use alpha || use ia64; then
60 sed -i -e 's/-O2//g' src/makemake.in || die
61 fi
62 epatch "${FILESDIR}"/${P}-bits_ipctypes_to_sys_ipc.patch
63 epatch "${FILESDIR}"/${P}-get_hostname.patch
64 epatch "${FILESDIR}"/${P}-tinfo.patch
65 }
66
67 src_configure() {
68 # We need this to build on alpha/ia64
69 if use alpha || use ia64; then
70 replace-flags -O? -O1
71 append-flags '-D NO_MULTIMAP_SHM -D NO_MULTIMAP_FILE -D NO_SINGLEMAP -D NO_TRIVIALMAP'
72 fi
73
74 # QA issue with lisp.run
75 append-flags -Wa,--noexecstack
76
77 # built-in features
78 local myconf="--with-ffcall --without-dynamic-modules"
79 # There's a problem with jit_allocai function
80 # if use jit; then
81 # myconf+=" --with-jitc=lightning"
82 # fi
83 if use threads; then
84 myconf+=" --with-threads=POSIX_THREADS"
85 fi
86
87 # default modules
88 enable_modules wildcard rawsock
89 # optional modules
90 use elibc_glibc && enable_modules bindings/glibc
91 use X && enable_modules clx/new-clx
92 if use postgres; then
93 enable_modules postgresql
94 append-cppflags -I$(pg_config --includedir)
95 fi
96 if use berkdb; then
97 enable_modules berkeley-db
98 append-cppflags -I/usr/include/db4.8
99 fi
100 use dbus && enable_modules dbus
101 use fastcgi && enable_modules fastcgi
102 use gdbm && enable_modules gdbm
103 use gtk && enable_modules gtk2
104 use pari && enable_modules pari
105 use pcre && enable_modules pcre
106 use svm && enable_modules libsvm
107 use zlib && enable_modules zlib
108
109 if use hyperspec; then
110 CLHSROOT="file:///usr/share/doc/hyperspec/HyperSpec/"
111 else
112 CLHSROOT="http://www.lispworks.com/reference/HyperSpec/"
113 fi
114
115 # configure chokes on --sysconfdir option
116 local configure="./configure --prefix=/usr --libdir=/usr/$(get_libdir) \
117 $(use_with readline) $(use_with unicode) \
118 ${myconf} --hyperspec=${CLHSROOT} ${BUILDDIR}"
119 einfo "${configure}"
120 ${configure} || die "./configure failed"
121
122 IMPNOTES="file://${ROOT%/}/usr/share/doc/${PN}-${PVR}/html/impnotes.html"
123 sed -i "s,http://clisp.cons.org/impnotes/,${IMPNOTES},g" \
124 "${BUILDDIR}"/config.lisp || die "Cannot fix link to implementation notes"
125 }
126
127 src_compile() {
128 export VARTEXFONTS="${T}"/fonts
129 cd "${BUILDDIR}"
130 # parallel build fails
131 emake -j1
132 }
133
134 src_install() {
135 pushd "${BUILDDIR}"
136 make DESTDIR="${D}" prefix=/usr install-bin || die "Installation failed"
137 doman clisp.1
138 dodoc ../SUMMARY README* ../src/NEWS ../unix/MAGIC.add ../ANNOUNCE
139 # stripping them removes common symbols (defined but uninitialised variables)
140 # which are then needed to build modules...
141 export STRIP_MASK="*/usr/$(get_libdir)/clisp-${PV}/*/*"
142 popd
143 dohtml doc/impnotes.{css,html} doc/regexp.html doc/clisp.png
144 dodoc doc/{CLOS-guide,LISP-tutorial}.txt
145 }

  ViewVC Help
Powered by ViewVC 1.1.20