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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Aug 12 15:11:30 2013 UTC (6 years, 2 months ago) by grozin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Fixed doc installation (bug #479526), added subslot, old files cleaned

(Portage version: 2.2.0_alpha195/cvs/Linux i686, signed Manifest commit with key 0x3AFFCE974D34BD8C!)

1 # Copyright 1999-2013 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-r7.ebuild,v 1.2 2013/06/14 02:31:10 patrick Exp $
4
5 EAPI=5
6 inherit flag-o-matic eutils toolchain-funcs multilib
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"
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-base-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 }
65
66 src_configure() {
67 # We need this to build on alpha/ia64
68 if use alpha || use ia64; then
69 replace-flags -O? -O1
70 append-flags '-D NO_MULTIMAP_SHM -D NO_MULTIMAP_FILE -D NO_SINGLEMAP -D NO_TRIVIALMAP'
71 fi
72
73 # QA issue with lisp.run
74 append-flags -Wa,--noexecstack
75
76 # built-in features
77 local myconf="--with-ffcall --without-dynamic-modules"
78 # There's a problem with jit_allocai function
79 # if use jit; then
80 # myconf+=" --with-jitc=lightning"
81 # fi
82 if use threads; then
83 myconf+=" --with-threads=POSIX_THREADS"
84 fi
85
86 # default modules
87 enable_modules wildcard rawsock
88 # optional modules
89 use elibc_glibc && enable_modules bindings/glibc
90 use X && enable_modules clx/new-clx
91 if use postgres; then
92 enable_modules postgresql
93 append-cppflags -I$(pg_config --includedir)
94 fi
95 if use berkdb; then
96 enable_modules berkeley-db
97 append-cppflags -I/usr/include/db4.8
98 fi
99 use dbus && enable_modules dbus
100 use fastcgi && enable_modules fastcgi
101 use gdbm && enable_modules gdbm
102 use gtk && enable_modules gtk2
103 use pari && enable_modules pari
104 use pcre && enable_modules pcre
105 use svm && enable_modules libsvm
106 use zlib && enable_modules zlib
107
108 if use hyperspec; then
109 CLHSROOT="file:///usr/share/doc/hyperspec/HyperSpec/"
110 else
111 CLHSROOT="http://www.lispworks.com/reference/HyperSpec/"
112 fi
113
114 # configure chokes on --sysconfdir option
115 local configure="./configure --prefix=/usr --libdir=/usr/$(get_libdir) \
116 $(use_with readline) $(use_with unicode) \
117 ${myconf} --hyperspec=${CLHSROOT} ${BUILDDIR}"
118 einfo "${configure}"
119 ${configure} || die "./configure failed"
120
121 IMPNOTES="file://${ROOT%/}/usr/share/doc/${PN}-${PVR}/html/impnotes.html"
122 sed -i "s,http://clisp.cons.org/impnotes/,${IMPNOTES},g" \
123 "${BUILDDIR}"/config.lisp || die "Cannot fix link to implementation notes"
124 }
125
126 src_compile() {
127 export VARTEXFONTS="${T}"/fonts
128 cd "${BUILDDIR}"
129 # parallel build fails
130 emake -j1 || die "emake failed"
131 }
132
133 src_install() {
134 pushd "${BUILDDIR}"
135 make DESTDIR="${D}" prefix=/usr install-bin || die "Installation failed"
136 doman clisp.1 || die
137 dodoc SUMMARY README* NEWS MAGIC.add ANNOUNCE || die
138 # stripping them removes common symbols (defined but uninitialised variables)
139 # which are then needed to build modules...
140 export STRIP_MASK="*/usr/$(get_libdir)/clisp-${PV}/*/*"
141 popd
142 dohtml doc/impnotes.{css,html} doc/regexp.html doc/clisp.png || die
143 dodoc doc/{CLOS-guide,LISP-tutorial}.txt || die
144 }

  ViewVC Help
Powered by ViewVC 1.1.20