1 |
commit: d1ba0277d56eb0b836fa0c1e687e59993bc8a023 |
2 |
Author: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 12 20:37:04 2018 +0000 |
4 |
Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 12 20:37:04 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1ba0277 |
7 |
|
8 |
dev-lisp/clisp: bump to 2.49.90 |
9 |
|
10 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
11 |
|
12 |
dev-lisp/clisp/Manifest | 1 + |
13 |
dev-lisp/clisp/clisp-2.49.90.ebuild | 143 ++++++++++++++++ |
14 |
.../clisp-2.49.90-after_glibc_cfree_bdb.patch | 185 +++++++++++++++++++++ |
15 |
3 files changed, 329 insertions(+) |
16 |
|
17 |
diff --git a/dev-lisp/clisp/Manifest b/dev-lisp/clisp/Manifest |
18 |
index 4b0e12dda85..7c0c8d6ab64 100644 |
19 |
--- a/dev-lisp/clisp/Manifest |
20 |
+++ b/dev-lisp/clisp/Manifest |
21 |
@@ -1,3 +1,4 @@ |
22 |
DIST clisp-2.48.tar.bz2 7885098 BLAKE2B 42ebfe4721015f522184bce710bf95d79aa7f2a239410af249a8e85d80f140344ec80daaa34f7cdbfd2ae86407984657163ce3f6e4201eb132f7c71e21523cba SHA512 3288b6a2973c924006b14bbed1e8e3e688276a187ac2a6c7851dc7ae699e7832d30e5e7eecdabc76c08c7e8e8ce1b562eb97a44570d3035e558ea2310de2b719 |
23 |
DIST clisp-2.49.60.tar.bz2 8745713 BLAKE2B 5dffd594c6d00c2057a98e3f93c888cd5cdc60009cd8fc987e39ff5182e71e575e148839d9c973fbfd0842b82ddf1b5918e86d128d9c79f6d0d4b6afcdc5853f SHA512 656cd59a23ba9be5304a6e0d64d79ac518072c431820b8cf95759fa8f3a66e2efe4d07939315b93e5e06b6e5348d8b32739b129a9e8ac0dc362dd5d1f1eb8aa8 |
24 |
+DIST clisp-2.49.90.tar.bz2 8921458 BLAKE2B 3be7cfe41038f42d8844d500877fa5c20e5c21dc0e162aa0018b297e4dfcd5374ef608793c9d809852e1f9885a155bb5b25fef8efe66016dd0ee400007386b70 SHA512 1fa7205e38883dcc863160b5418ddaaa2c45ee2d2f936de4067d1ea4a1e5043bf1235361bbbfc366afd6d8f1144497ccdccf1767ecf327f7a672b18742ceb651 |
25 |
DIST clisp-2.49.tar.bz2 8091011 BLAKE2B e034c581b8100837b34d0adf1ef45bd667272d062945875175958178b4ef5b11e899dfb76505eb8cb51fca6101c11a9f21fb2cc9a78a3c0f82b06166211434f7 SHA512 eef66fc85199a2c283b616db61bf67ff103eeb0f19fa907da48994dc790b6f5f8d0c74fb3bd723c6b827c0ff3cfd89fa6ba67934fc669ed5d5249044b5140d81 |
26 |
|
27 |
diff --git a/dev-lisp/clisp/clisp-2.49.90.ebuild b/dev-lisp/clisp/clisp-2.49.90.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..e1167a08a89 |
30 |
--- /dev/null |
31 |
+++ b/dev-lisp/clisp/clisp-2.49.90.ebuild |
32 |
@@ -0,0 +1,143 @@ |
33 |
+# Copyright 1999-2018 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
37 |
+ |
38 |
+inherit eutils flag-o-matic multilib toolchain-funcs |
39 |
+ |
40 |
+DESCRIPTION="A portable, bytecode-compiled implementation of Common Lisp" |
41 |
+HOMEPAGE="http://clisp.sourceforge.net/" |
42 |
+SRC_URI="https://haible.de/bruno/gnu/${P}.tar.bz2" |
43 |
+ |
44 |
+LICENSE="GPL-2" |
45 |
+SLOT="2/8" |
46 |
+KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
47 |
+IUSE="hyperspec X berkdb dbus fastcgi gdbm gtk pari +pcre postgres +readline svm -threads +unicode +zlib" |
48 |
+# "jit" disabled ATM |
49 |
+ |
50 |
+RDEPEND=">=dev-lisp/asdf-2.33-r3 |
51 |
+ virtual/libiconv |
52 |
+ >=dev-libs/libsigsegv-2.10 |
53 |
+ >=dev-libs/ffcall-1.10 |
54 |
+ dbus? ( sys-apps/dbus ) |
55 |
+ fastcgi? ( dev-libs/fcgi ) |
56 |
+ gdbm? ( sys-libs/gdbm ) |
57 |
+ gtk? ( >=x11-libs/gtk+-2.10:2 >=gnome-base/libglade-2.6 ) |
58 |
+ pari? ( <sci-mathematics/pari-2.5.0 ) |
59 |
+ postgres? ( >=dev-db/postgresql-8.0:* ) |
60 |
+ readline? ( >=sys-libs/readline-7.0:0= ) |
61 |
+ pcre? ( dev-libs/libpcre:3 ) |
62 |
+ svm? ( sci-libs/libsvm ) |
63 |
+ zlib? ( sys-libs/zlib ) |
64 |
+ X? ( x11-libs/libXpm ) |
65 |
+ hyperspec? ( dev-lisp/hyperspec ) |
66 |
+ berkdb? ( sys-libs/db:4.8 )" |
67 |
+ |
68 |
+DEPEND="${RDEPEND} |
69 |
+ X? ( x11-misc/imake x11-proto/xextproto )" |
70 |
+ |
71 |
+enable_modules() { |
72 |
+ [[ $# = 0 ]] && die "${FUNCNAME[0]} must receive at least one argument" |
73 |
+ for m in "$@" ; do |
74 |
+ einfo "enabling module $m" |
75 |
+ myconf+=" --with-module=${m}" |
76 |
+ done |
77 |
+} |
78 |
+ |
79 |
+BUILDDIR="builddir" |
80 |
+ |
81 |
+# modules not enabled: |
82 |
+# * berkdb: must figure out a way to make the configure script pick up the |
83 |
+# currect version of the library and headers |
84 |
+# * dirkey: fails to compile, requiring windows.h, possibly wrong #ifdefs |
85 |
+# * matlab, netica: not in portage |
86 |
+# * oracle: can't install oracle-instantclient |
87 |
+ |
88 |
+src_prepare() { |
89 |
+ # More than -O1 breaks alpha/ia64 |
90 |
+ if use alpha || use ia64; then |
91 |
+ sed -i -e 's/-O2//g' src/makemake.in || die |
92 |
+ fi |
93 |
+ eapply "${FILESDIR}"/"${P}"-after_glibc_cfree_bdb.patch |
94 |
+ eapply_user |
95 |
+} |
96 |
+ |
97 |
+src_configure() { |
98 |
+ # We need this to build on alpha/ia64 |
99 |
+ if use alpha || use ia64; then |
100 |
+ replace-flags -O? -O1 |
101 |
+ fi |
102 |
+ |
103 |
+ if use x86; then |
104 |
+ append-flags -falign-functions=4 |
105 |
+ fi |
106 |
+ |
107 |
+ # built-in features |
108 |
+ local myconf="--with-ffcall --without-dynamic-modules" |
109 |
+# There's a problem with jit_allocai function |
110 |
+# if use jit; then |
111 |
+# myconf+=" --with-jitc=lightning" |
112 |
+# fi |
113 |
+ if use threads; then |
114 |
+ myconf+=" --with-threads=POSIX_THREADS" |
115 |
+ fi |
116 |
+ |
117 |
+ # default modules |
118 |
+ enable_modules rawsock |
119 |
+ # optional modules |
120 |
+ use elibc_glibc && enable_modules bindings/glibc |
121 |
+ use X && enable_modules clx/new-clx |
122 |
+ if use postgres; then |
123 |
+ enable_modules postgresql |
124 |
+ append-cppflags -I$(pg_config --includedir) |
125 |
+ fi |
126 |
+ if use berkdb; then |
127 |
+ enable_modules berkeley-db |
128 |
+ append-cppflags -I/usr/include/db4.8 |
129 |
+ fi |
130 |
+ use dbus && enable_modules dbus |
131 |
+ use fastcgi && enable_modules fastcgi |
132 |
+ use gdbm && enable_modules gdbm |
133 |
+ use gtk && enable_modules gtk2 |
134 |
+ use pari && enable_modules pari |
135 |
+ use pcre && enable_modules pcre |
136 |
+ use svm && enable_modules libsvm |
137 |
+ use zlib && enable_modules zlib |
138 |
+ |
139 |
+ if use hyperspec; then |
140 |
+ CLHSROOT="file:///usr/share/doc/hyperspec/HyperSpec/" |
141 |
+ else |
142 |
+ CLHSROOT="http://www.lispworks.com/reference/HyperSpec/" |
143 |
+ fi |
144 |
+ |
145 |
+ # configure chokes on --sysconfdir option |
146 |
+ local configure="./configure --prefix=/usr --enable-portability \ |
147 |
+ --libdir=/usr/$(get_libdir) $(use_with readline) $(use_with unicode) \ |
148 |
+ ${myconf} --hyperspec=${CLHSROOT} ${BUILDDIR}" |
149 |
+ einfo "${configure}" |
150 |
+ ${configure} || die "./configure failed" |
151 |
+ |
152 |
+ IMPNOTES="file://${ROOT%/}/usr/share/doc/${PN}-${PVR}/html/impnotes.html" |
153 |
+ sed -i "s,http://clisp.cons.org/impnotes/,${IMPNOTES},g" \ |
154 |
+ "${BUILDDIR}"/config.lisp || die "Cannot fix link to implementation notes" |
155 |
+} |
156 |
+ |
157 |
+src_compile() { |
158 |
+ export VARTEXFONTS="${T}"/fonts |
159 |
+ cd "${BUILDDIR}" || die |
160 |
+ # parallel build fails |
161 |
+ emake -j1 |
162 |
+} |
163 |
+ |
164 |
+src_install() { |
165 |
+ pushd "${BUILDDIR}" |
166 |
+ make DESTDIR="${D}" prefix=/usr install-bin || die "Installation failed" |
167 |
+ doman clisp.1 |
168 |
+ dodoc ../SUMMARY README* ../src/NEWS ../unix/MAGIC.add ../ANNOUNCE |
169 |
+ # stripping them removes common symbols (defined but uninitialised variables) |
170 |
+ # which are then needed to build modules... |
171 |
+ export STRIP_MASK="*/usr/$(get_libdir)/clisp-${PV}/*/*" |
172 |
+ popd |
173 |
+ dohtml doc/impnotes.{css,html} doc/regexp.html doc/clisp.png |
174 |
+ dodoc doc/{CLOS-guide,LISP-tutorial}.txt |
175 |
+} |
176 |
|
177 |
diff --git a/dev-lisp/clisp/files/clisp-2.49.90-after_glibc_cfree_bdb.patch b/dev-lisp/clisp/files/clisp-2.49.90-after_glibc_cfree_bdb.patch |
178 |
new file mode 100644 |
179 |
index 00000000000..ae83bbb8770 |
180 |
--- /dev/null |
181 |
+++ b/dev-lisp/clisp/files/clisp-2.49.90-after_glibc_cfree_bdb.patch |
182 |
@@ -0,0 +1,185 @@ |
183 |
+diff -r -U3 clisp-2.49.90.orig/modules/berkeley-db/bdb.c clisp-2.49.90/modules/berkeley-db/bdb.c |
184 |
+--- clisp-2.49.90.orig/modules/berkeley-db/bdb.c 2018-01-27 12:03:01.000000000 +0100 |
185 |
++++ clisp-2.49.90/modules/berkeley-db/bdb.c 2018-02-12 20:37:24.203803219 +0100 |
186 |
+@@ -2216,7 +2216,13 @@ |
187 |
+ c_data.compact_timeout = timeout; |
188 |
+ c_data.compact_pages = pages; |
189 |
+ SYSCALL(db->compact,(db,txn,pstart,pstop,&c_data,flags,&end)); |
190 |
+- pushSTACK(uint32_to_I(c_data.compact_empty_buckets)); |
191 |
++ /* ==== |
192 |
++ * compact_empty_buckets is in bdb-5.3 as part of output stats |
193 |
++ * however this version use bdb-4.8 which does not have it |
194 |
++ * ==== |
195 |
++ * |
196 |
++ * pushSTACK(uint32_to_I(c_data.compact_empty_buckets)); |
197 |
++ * */ |
198 |
+ pushSTACK(uint32_to_I(c_data.compact_pages_free)); |
199 |
+ pushSTACK(uint32_to_I(c_data.compact_pages_examine)); |
200 |
+ pushSTACK(uint32_to_I(c_data.compact_levels)); |
201 |
+diff -r -U3 clisp-2.49.90.orig/modules/bindings/glibc/linux.lisp clisp-2.49.90/modules/bindings/glibc/linux.lisp |
202 |
+--- clisp-2.49.90.orig/modules/bindings/glibc/linux.lisp 2018-01-10 00:32:25.000000000 +0100 |
203 |
++++ clisp-2.49.90/modules/bindings/glibc/linux.lisp 2018-02-12 20:48:22.467775536 +0100 |
204 |
+@@ -1,7 +1,7 @@ |
205 |
+ ;; Foreign functions provided by the Linux C library version 6, |
206 |
+ ;; i.e. the GNU C library version 2.0.7. |
207 |
+ ;; Bruno Haible 10.4.1998, 19.4.1998 |
208 |
+-;; Sam Steingold 2002-2008, 2011 |
209 |
++;; Sam Steingold 2002-2008, 2011, 2013, 2016-2017 |
210 |
+ |
211 |
+ ;; NB: quite a few functions here have more portable counterparts in POSIX |
212 |
+ |
213 |
+@@ -686,9 +686,8 @@ |
214 |
+ (def-call-out system? (:arguments (null c-string)) |
215 |
+ (:return-type boolean) (:name "system")) |
216 |
+ |
217 |
+-; You can uncomment this if your compiler sets __USE_GNU |
218 |
+-; (def-call-out canonicalize_file_name (:arguments (name c-string)) |
219 |
+-; (:return-type c-string :malloc-free)) |
220 |
++(def-call-out canonicalize_file_name (:arguments (name c-string)) |
221 |
++ (:return-type c-string :malloc-free)) |
222 |
+ |
223 |
+ (def-call-out realpath |
224 |
+ (:arguments (name c-string) |
225 |
+@@ -1040,9 +1039,8 @@ |
226 |
+ (def-call-out access (:arguments (name c-string) (type int)) |
227 |
+ (:return-type int)) |
228 |
+ |
229 |
+-; You can uncomment this if your compiler sets __USE_GNU |
230 |
+-; (def-call-out euidaccess (:arguments (name c-string) (type int)) |
231 |
+-; (:return-type int)) |
232 |
++(def-call-out euidaccess (:arguments (name c-string) (type int)) |
233 |
++ (:return-type int)) |
234 |
+ |
235 |
+ (defconstant SEEK_SET 0) |
236 |
+ (defconstant SEEK_CUR 1) |
237 |
+@@ -1093,9 +1091,8 @@ |
238 |
+ ;(def-call-out getcwd (:arguments (buf c-string :out) (size size_t)) ; ?? |
239 |
+ ; (:return-type c-string)) |
240 |
+ |
241 |
+-; You can uncomment this if your compiler sets __USE_GNU |
242 |
+-; (def-call-out get_current_dir_name (:arguments) |
243 |
+-; (:return-type c-string :malloc-free)) |
244 |
++(def-call-out get_current_dir_name (:arguments) |
245 |
++ (:return-type c-string :malloc-free)) |
246 |
+ |
247 |
+ ;(def-call-out getwd (:arguments (buf c-string :out)) ; ?? |
248 |
+ ; (:return-type c-string)) |
249 |
+@@ -1323,8 +1320,7 @@ |
250 |
+ ; (:arguments (size int) (list (c-ptr (c-array gid_t ??)) :out)) ; ?? |
251 |
+ ; (:return-type int)) |
252 |
+ |
253 |
+-; You can uncomment this if your compiler sets __USE_GNU |
254 |
+-; (def-call-out group_member (:arguments (gid gid_t)) (:return-type boolean)) |
255 |
++(def-call-out group_member (:arguments (gid gid_t)) (:return-type boolean)) |
256 |
+ (def-call-out setuid (:arguments (uid uid_t)) (:return-type int)) |
257 |
+ (def-call-out setreuid (:arguments (ruid uid_t) (euid uid_t)) |
258 |
+ (:return-type int)) |
259 |
+@@ -1821,8 +1817,7 @@ |
260 |
+ (:return-type c-string :malloc-free)) |
261 |
+ (def-call-out ungetc (:arguments (c int) (fp FILE)) |
262 |
+ (:return-type int)) |
263 |
+-; You can uncomment this if your compiler sets __USE_GNU |
264 |
+-; (def-call-out fcloseall (:arguments) (:return-type int)) |
265 |
++(def-call-out fcloseall (:arguments) (:return-type int)) |
266 |
+ (def-call-out fdopen (:arguments (fildes int) (mode c-string)) |
267 |
+ (:return-type c-pointer)) |
268 |
+ (def-call-out fileno (:arguments (fp FILE)) (:return-type int)) |
269 |
+@@ -1900,11 +1895,11 @@ |
270 |
+ (:return-type (c-ptr-null dirent))) |
271 |
+ (def-call-out readdir64 (:arguments (dirp c-pointer)) |
272 |
+ (:return-type (c-ptr-null dirent64))) |
273 |
+-(def-call-out readdir_r |
274 |
++(def-call-out readdir_r ; deprecated |
275 |
+ (:arguments (dirp c-pointer) (entry (c-ptr dirent) :out :alloca) |
276 |
+ (result (c-ptr (c-ptr dirent)) :out :alloca)) ; ?? |
277 |
+ (:return-type int)) |
278 |
+-(def-call-out readdir64_r |
279 |
++(def-call-out readdir64_r ; deprecated |
280 |
+ (:arguments (dirp c-pointer) (entry (c-ptr dirent64) :out :alloca) |
281 |
+ (result (c-ptr (c-ptr dirent64)) :out :alloca)) ; ?? |
282 |
+ (:return-type int)) |
283 |
+diff -r -U3 clisp-2.49.90.orig/modules/bindings/glibc/test.tst clisp-2.49.90/modules/bindings/glibc/test.tst |
284 |
+--- clisp-2.49.90.orig/modules/bindings/glibc/test.tst 2018-01-10 00:04:26.000000000 +0100 |
285 |
++++ clisp-2.49.90/modules/bindings/glibc/test.tst 2018-02-12 20:50:48.225769407 +0100 |
286 |
+@@ -14,6 +14,16 @@ |
287 |
+ (= linux:DT_DIR (linux:dirent64-d_type (show (linux:readdir64 *d*)))) T |
288 |
+ (linux:closedir *d*) 0 |
289 |
+ |
290 |
++(stringp (show (linux:get-domain-name))) T |
291 |
++(stringp (show (linux:get-host-name))) T |
292 |
++ |
293 |
++;; usually __USE_GNU is defined, so this should work: |
294 |
++(let* ((d (linux:get_current_dir_name)) |
295 |
++ (c (linux:canonicalize_file_name (concatenate 'string d "/.")))) |
296 |
++ (or (string= d c) |
297 |
++ (list :cur-dir d :canonical c))) |
298 |
++T |
299 |
++ |
300 |
+ (defparameter *d* (show (linux:opendir "."))) *D* |
301 |
+ (linux:dirent-d_name (show (linux:readdir *d*))) "." |
302 |
+ (linux:dirent-d_name (show (linux:readdir *d*))) ".." |
303 |
+diff -r -U3 clisp-2.49.90.orig/src/foreign1.lisp clisp-2.49.90/src/foreign1.lisp |
304 |
+--- clisp-2.49.90.orig/src/foreign1.lisp 2018-01-10 00:04:26.000000000 +0100 |
305 |
++++ clisp-2.49.90/src/foreign1.lisp 2018-02-12 21:03:56.768736245 +0100 |
306 |
+@@ -805,14 +805,17 @@ |
307 |
+ c-name (to-c-string c-name) (third variable) (first variable)) |
308 |
+ (when *foreign-guard* (format *coutput-stream* "# endif~%")))) |
309 |
+ (dolist (function *function-list*) |
310 |
+- (let ((c-name (first function))) |
311 |
+- (when *foreign-guard* |
312 |
+- (format *coutput-stream* "# if defined(HAVE_~A)~%" |
313 |
+- (string-upcase c-name))) |
314 |
++ (let ((c-name (first function)) |
315 |
++ (guard (fourth function))) |
316 |
++ (when guard |
317 |
++ (format *coutput-stream* "# if ~A~%" |
318 |
++ (if (eq guard t) |
319 |
++ (format nil "defined(HAVE_~A)" (string-upcase c-name)) |
320 |
++ guard))) |
321 |
+ (format *coutput-stream* |
322 |
+ " register_foreign_function((void*)&~A,~A,~D);~%" |
323 |
+ c-name (to-c-string c-name) (svref (second function) 3)) |
324 |
+- (when *foreign-guard* (format *coutput-stream* "# endif~%")))) |
325 |
++ (when guard (format *coutput-stream* "# endif~%")))) |
326 |
+ (maphash (lambda (type fun-vec) |
327 |
+ (declare (ignore type)) |
328 |
+ (let ((c-name (to-c-name (car fun-vec)))) |
329 |
+@@ -1083,7 +1086,7 @@ |
330 |
+ (defmacro DEF-CALL-OUT (&whole whole-form name &rest options) |
331 |
+ (setq name (check-symbol name (first whole-form))) |
332 |
+ (let* ((alist |
333 |
+- (parse-options options '(:name :arguments :return-type :language |
334 |
++ (parse-options options '(:name :arguments :return-type :language :guard |
335 |
+ :built-in :library :version :documentation) |
336 |
+ whole-form)) |
337 |
+ (def (gensym "DEF-CALL-OUT-")) |
338 |
+@@ -1095,6 +1098,7 @@ |
339 |
+ (version (second (assoc :version alist))) |
340 |
+ (c-name (foreign-name name (assoc :name alist))) |
341 |
+ (built-in (second (assoc :built-in alist))) |
342 |
++ (guard (get-assoc :guard alist '*foreign-guard*)) |
343 |
+ ;; Maximize sharing in .fas file, reuse options |
344 |
+ ;; parse-c-function ignores unknown options, e.g. :name |
345 |
+ (ctype `(PARSE-C-FUNCTION ',options ',whole-form))) |
346 |
+@@ -1102,7 +1106,7 @@ |
347 |
+ ',c-name ,ctype ',properties ,library ,version NIL))) |
348 |
+ (EXT:COMPILER-LET ((,def ,ctype)) |
349 |
+ (EVAL-WHEN (COMPILE) |
350 |
+- (UNLESS ,LIBRARY (NOTE-C-FUN ',c-name ,def ',built-in))) |
351 |
++ (UNLESS ,LIBRARY (NOTE-C-FUN ',c-name ,def ',built-in ,guard))) |
352 |
+ (SYSTEM::EVAL-WHEN-COMPILE |
353 |
+ (SYSTEM::C-DEFUN ',name (C-TYPE-TO-SIGNATURE ,ctype)))) |
354 |
+ (WHEN ,def ; found library function |
355 |
+@@ -1110,10 +1114,10 @@ |
356 |
+ (SYSTEM::%PUTD ',name ,def)) |
357 |
+ ',name))) |
358 |
+ |
359 |
+-(defun note-c-fun (c-name ctype built-in) ; not ABI, compile-time only |
360 |
++(defun note-c-fun (c-name ctype built-in guard) ; not ABI, compile-time only |
361 |
+ (when (system::prepare-coutput-file) |
362 |
+ (prepare-module) |
363 |
+- (push (list c-name ctype built-in) |
364 |
++ (push (list c-name ctype built-in guard) |
365 |
+ *function-list*))) |
366 |
+ |
367 |
+ (defun count-inarguments (arg-vector) |