/[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.6 - (show annotations) (download)
Fri Jul 11 03:22:37 2014 UTC (35 hours, 52 minutes ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +3 -3 lines
Stable for amd64 and x86 to fix compilation #425748

(Portage version: 2.2.10/cvs/Linux x86_64, unsigned Manifest commit)

1 # Copyright 1999-2014 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.5 2012/12/04 00:00:48 pchrist 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:2 >=gnome-base/libglade-2.6:2.0 )
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 epatch "${FILESDIR}/${P}-bits_ipctypes_to_sys_ipc.patch"
61 }
62
63 src_configure() {
64 # We need this to build on alpha/ia64
65 if use alpha || use ia64; then
66 replace-flags -O? -O1
67 append-flags '-D NO_MULTIMAP_SHM -D NO_MULTIMAP_FILE -D NO_SINGLEMAP -D NO_TRIVIALMAP'
68 fi
69
70 # QA issue with lisp.run
71 append-flags -Wa,--noexecstack
72
73 # built-in features
74 local myconf="--with-ffcall --without-dynamic-modules"
75 # There's a problem with jit_allocai function
76 # if use jit; then
77 # myconf+=" --with-jitc=lightning"
78 # fi
79 if use threads; then
80 myconf+=" --with-threads=POSIX_THREADS"
81 fi
82
83 # default modules
84 enable_modules wildcard rawsock
85 # optional modules
86 use elibc_glibc && enable_modules bindings/glibc
87 if use X; then
88 if use new-clx; then
89 enable_modules clx/new-clx
90 else
91 enable_modules clx/mit-clx
92 fi
93 fi
94 if use postgres; then
95 enable_modules postgresql
96 append-flags -I$(pg_config --includedir)
97 fi
98 if use berkdb; then
99 enable_modules berkeley-db
100 append-flags -I/usr/include/db4.7
101 fi
102 use dbus && enable_modules dbus
103 use fastcgi && enable_modules fastcgi
104 use gdbm && enable_modules gdbm
105 use gtk && enable_modules gtk2
106 use pari && enable_modules pari
107 use pcre && enable_modules pcre
108 use svm && enable_modules libsvm
109 use zlib && enable_modules zlib
110
111 if use hyperspec; then
112 CLHSROOT="file:///usr/share/doc/hyperspec/HyperSpec/"
113 else
114 CLHSROOT="http://www.lispworks.com/reference/HyperSpec/"
115 fi
116
117 # configure chokes on --sysconfdir option
118 local configure="./configure --prefix=/usr --libdir=/usr/$(get_libdir) \
119 $(use_with readline) $(use_with unicode) \
120 ${myconf} --hyperspec=${CLHSROOT} ${BUILDDIR}"
121 einfo "${configure}"
122 ${configure} || die "./configure failed"
123
124 sed -i 's,"vi","nano",g' "${BUILDDIR}"/config.lisp || die
125
126 IMPNOTES="file://${ROOT%/}/usr/share/doc/${PN}-${PVR}/html/impnotes.html"
127 sed -i "s,http://clisp.cons.org/impnotes/,${IMPNOTES},g" \
128 "${BUILDDIR}"/config.lisp || die
129 }
130
131 src_compile() {
132 export VARTEXFONTS="${T}"/fonts
133 cd "${BUILDDIR}"
134 # parallel build fails
135 emake -j1 || die "emake failed"
136 }
137
138 src_install() {
139 pushd "${BUILDDIR}"
140 make DESTDIR="${D}" prefix=/usr install-bin || die
141 doman clisp.1 || die
142 dodoc SUMMARY README* NEWS MAGIC.add ANNOUNCE || die
143 fperms a+x /usr/$(get_libdir)/clisp-${PV/_*/}/clisp-link || die
144 # stripping them removes common symbols (defined but uninitialised variables)
145 # which are then needed to build modules...
146 export STRIP_MASK="*/usr/$(get_libdir)/clisp-${PV}/*/*"
147 popd
148 dohtml doc/impnotes.{css,html} doc/regexp.html doc/clisp.png || die
149 dodoc doc/{CLOS-guide,LISP-tutorial}.txt || die
150 }
151
152 pkg_postinst() {
153 if use threads || use jit; then
154 while read line; do elog ${line}; done <<EOF
155
156 Upstream considers threads to be of Alpha quality, therefore
157 it is likely that you will encounter bugs in using them. If you do,
158 please report bugs upstream:
159
160 Mailing list: https://lists.sourceforge.net/lists/listinfo/clisp-devel
161 Bug tracker: http://sourceforge.net/tracker/?atid=101355&group_id=1355
162
163 EOF
164 fi
165 }

  ViewVC Help
Powered by ViewVC 1.1.20