1 |
commit: beb52002a3f12695af63071a74b52736eea5fe1c |
2 |
Author: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 2 03:38:44 2016 +0000 |
4 |
Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 2 03:38:44 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=beb52002 |
7 |
|
8 |
dev-lisp/clisp: 2.49-r9 for readline-7 |
9 |
|
10 |
Bug: 595624 |
11 |
|
12 |
Package-Manager: portage-2.3.0 |
13 |
|
14 |
dev-lisp/clisp/clisp-2.49-r9.ebuild | 147 +++++++++++++++++++++++ |
15 |
dev-lisp/clisp/files/clisp-2.49-readline-7.patch | 10 ++ |
16 |
2 files changed, 157 insertions(+) |
17 |
|
18 |
diff --git a/dev-lisp/clisp/clisp-2.49-r9.ebuild b/dev-lisp/clisp/clisp-2.49-r9.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000..937eae5 |
21 |
--- /dev/null |
22 |
+++ b/dev-lisp/clisp/clisp-2.49-r9.ebuild |
23 |
@@ -0,0 +1,147 @@ |
24 |
+# Copyright 1999-2016 Gentoo Foundation |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+# $Id$ |
27 |
+ |
28 |
+EAPI=5 |
29 |
+inherit eutils flag-o-matic multilib toolchain-funcs |
30 |
+ |
31 |
+DESCRIPTION="A portable, bytecode-compiled implementation of Common Lisp" |
32 |
+HOMEPAGE="http://clisp.sourceforge.net/" |
33 |
+SRC_URI="mirror://sourceforge/clisp/${P}.tar.bz2" |
34 |
+ |
35 |
+LICENSE="GPL-2" |
36 |
+SLOT="2/${PF}" |
37 |
+KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
38 |
+IUSE="hyperspec X berkdb dbus fastcgi gdbm gtk pari +pcre postgres +readline svm -threads +unicode +zlib" |
39 |
+# "jit" disabled ATM |
40 |
+ |
41 |
+RDEPEND=">=dev-lisp/asdf-2.33-r3 |
42 |
+ virtual/libiconv |
43 |
+ >=dev-libs/libsigsegv-2.4 |
44 |
+ >=dev-libs/ffcall-1.10 |
45 |
+ dbus? ( sys-apps/dbus ) |
46 |
+ fastcgi? ( dev-libs/fcgi ) |
47 |
+ gdbm? ( sys-libs/gdbm ) |
48 |
+ gtk? ( >=x11-libs/gtk+-2.10 >=gnome-base/libglade-2.6 ) |
49 |
+ pari? ( <sci-mathematics/pari-2.5.0 ) |
50 |
+ postgres? ( >=dev-db/postgresql-8.0 ) |
51 |
+ readline? ( >=sys-libs/readline-7.0 ) |
52 |
+ pcre? ( dev-libs/libpcre ) |
53 |
+ svm? ( sci-libs/libsvm ) |
54 |
+ zlib? ( sys-libs/zlib ) |
55 |
+ X? ( x11-libs/libXpm ) |
56 |
+ hyperspec? ( dev-lisp/hyperspec ) |
57 |
+ berkdb? ( sys-libs/db:4.8 )" |
58 |
+# jit? ( >=dev-libs/lightning-1.2 ) |
59 |
+ |
60 |
+DEPEND="${RDEPEND} |
61 |
+ X? ( x11-misc/imake x11-proto/xextproto )" |
62 |
+ |
63 |
+enable_modules() { |
64 |
+ [[ $# = 0 ]] && die "${FUNCNAME[0]} must receive at least one argument" |
65 |
+ for m in "$@" ; do |
66 |
+ einfo "enabling module $m" |
67 |
+ myconf+=" --with-module=${m}" |
68 |
+ done |
69 |
+} |
70 |
+ |
71 |
+BUILDDIR="builddir" |
72 |
+ |
73 |
+# modules not enabled: |
74 |
+# * berkdb: must figure out a way to make the configure script pick up the |
75 |
+# currect version of the library and headers |
76 |
+# * dirkey: fails to compile, requiring windows.h, possibly wrong #ifdefs |
77 |
+# * matlab, netica: not in portage |
78 |
+# * oracle: can't install oracle-instantclient |
79 |
+ |
80 |
+src_prepare() { |
81 |
+ # More than -O1 breaks alpha/ia64 |
82 |
+ if use alpha || use ia64; then |
83 |
+ sed -i -e 's/-O2//g' src/makemake.in || die |
84 |
+ fi |
85 |
+ epatch "${FILESDIR}"/${P}-bits_ipctypes_to_sys_ipc.patch |
86 |
+ epatch "${FILESDIR}"/${P}-get_hostname.patch |
87 |
+ epatch "${FILESDIR}"/${P}-tinfo.patch |
88 |
+ # bug #594552 |
89 |
+ epatch "${FILESDIR}"/${P}-readline-7.patch |
90 |
+} |
91 |
+ |
92 |
+src_configure() { |
93 |
+ # We need this to build on alpha/ia64 |
94 |
+ if use alpha || use ia64; then |
95 |
+ replace-flags -O? -O1 |
96 |
+ append-flags '-D NO_MULTIMAP_SHM -D NO_MULTIMAP_FILE -D NO_SINGLEMAP -D NO_TRIVIALMAP' |
97 |
+ fi |
98 |
+ |
99 |
+ # QA issue with lisp.run |
100 |
+ append-flags -Wa,--noexecstack |
101 |
+ |
102 |
+ # built-in features |
103 |
+ local myconf="--with-ffcall --without-dynamic-modules" |
104 |
+# There's a problem with jit_allocai function |
105 |
+# if use jit; then |
106 |
+# myconf+=" --with-jitc=lightning" |
107 |
+# fi |
108 |
+ if use threads; then |
109 |
+ myconf+=" --with-threads=POSIX_THREADS" |
110 |
+ fi |
111 |
+ |
112 |
+ # default modules |
113 |
+ enable_modules wildcard rawsock |
114 |
+ # optional modules |
115 |
+ use elibc_glibc && enable_modules bindings/glibc |
116 |
+ use X && enable_modules clx/new-clx |
117 |
+ if use postgres; then |
118 |
+ enable_modules postgresql |
119 |
+ append-cppflags -I$(pg_config --includedir) |
120 |
+ fi |
121 |
+ if use berkdb; then |
122 |
+ enable_modules berkeley-db |
123 |
+ append-cppflags -I/usr/include/db4.8 |
124 |
+ fi |
125 |
+ use dbus && enable_modules dbus |
126 |
+ use fastcgi && enable_modules fastcgi |
127 |
+ use gdbm && enable_modules gdbm |
128 |
+ use gtk && enable_modules gtk2 |
129 |
+ use pari && enable_modules pari |
130 |
+ use pcre && enable_modules pcre |
131 |
+ use svm && enable_modules libsvm |
132 |
+ use zlib && enable_modules zlib |
133 |
+ |
134 |
+ if use hyperspec; then |
135 |
+ CLHSROOT="file:///usr/share/doc/hyperspec/HyperSpec/" |
136 |
+ else |
137 |
+ CLHSROOT="http://www.lispworks.com/reference/HyperSpec/" |
138 |
+ fi |
139 |
+ |
140 |
+ # configure chokes on --sysconfdir option |
141 |
+ local configure="./configure --prefix=/usr --libdir=/usr/$(get_libdir) \ |
142 |
+ $(use_with readline) $(use_with unicode) \ |
143 |
+ ${myconf} --hyperspec=${CLHSROOT} ${BUILDDIR}" |
144 |
+ einfo "${configure}" |
145 |
+ ${configure} || die "./configure failed" |
146 |
+ |
147 |
+ IMPNOTES="file://${ROOT%/}/usr/share/doc/${PN}-${PVR}/html/impnotes.html" |
148 |
+ sed -i "s,http://clisp.cons.org/impnotes/,${IMPNOTES},g" \ |
149 |
+ "${BUILDDIR}"/config.lisp || die "Cannot fix link to implementation notes" |
150 |
+} |
151 |
+ |
152 |
+src_compile() { |
153 |
+ export VARTEXFONTS="${T}"/fonts |
154 |
+ cd "${BUILDDIR}" |
155 |
+ # parallel build fails |
156 |
+ emake -j1 |
157 |
+} |
158 |
+ |
159 |
+src_install() { |
160 |
+ pushd "${BUILDDIR}" |
161 |
+ make DESTDIR="${D}" prefix=/usr install-bin || die "Installation failed" |
162 |
+ doman clisp.1 |
163 |
+ dodoc ../SUMMARY README* ../src/NEWS ../unix/MAGIC.add ../ANNOUNCE |
164 |
+ # stripping them removes common symbols (defined but uninitialised variables) |
165 |
+ # which are then needed to build modules... |
166 |
+ export STRIP_MASK="*/usr/$(get_libdir)/clisp-${PV}/*/*" |
167 |
+ popd |
168 |
+ dohtml doc/impnotes.{css,html} doc/regexp.html doc/clisp.png |
169 |
+ dodoc doc/{CLOS-guide,LISP-tutorial}.txt |
170 |
+} |
171 |
|
172 |
diff --git a/dev-lisp/clisp/files/clisp-2.49-readline-7.patch b/dev-lisp/clisp/files/clisp-2.49-readline-7.patch |
173 |
new file mode 100644 |
174 |
index 00000000..0be5bd8 |
175 |
--- /dev/null |
176 |
+++ b/dev-lisp/clisp/files/clisp-2.49-readline-7.patch |
177 |
@@ -0,0 +1,10 @@ |
178 |
+diff -r -U2 clisp-2.49.orig/modules/readline/readline.lisp clisp-2.49/modules/readline/readline.lisp |
179 |
+--- clisp-2.49.orig/modules/readline/readline.lisp 2010-01-07 04:18:03.000000000 +0600 |
180 |
++++ clisp-2.49/modules/readline/readline.lisp 2016-09-29 22:23:53.837631568 +0700 |
181 |
+@@ -425,5 +425,5 @@ |
182 |
+ (def-c-var gnu-readline-p (:name "rl_gnu_readline_p") (:type int) |
183 |
+ (:documentation "True if this is real GNU readline.")) |
184 |
+-(def-c-var readline-state (:name "rl_readline_state") (:type int) |
185 |
++(def-c-var readline-state (:name "rl_readline_state") (:type ulong) |
186 |
+ (:documentation "Flags word encapsulating the current readline state.")) |
187 |
+ (def-c-var editing-mode (:name "rl_editing_mode") (:type int) |