Gentoo Archives: gentoo-commits

From: "José María Alonso" <nimiux@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lisp/clisp/, dev-lisp/clisp/files/
Date: Mon, 11 Dec 2017 18:56:59
Message-Id: 1513018557.a08b6eec14e224be89311a9bfe52fbfe298dfe73.nimiux@gentoo
1 commit: a08b6eec14e224be89311a9bfe52fbfe298dfe73
2 Author: Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 11 18:55:57 2017 +0000
4 Commit: José María Alonso <nimiux <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 11 18:55:57 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a08b6eec
7
8 dev-lisp/clisp: Bumps version to 2.49.60
9
10 Bug: https://bugs.gentoo.org/638942
11 Package-Manager: Portage-2.3.13, Repoman-2.3.3
12
13 dev-lisp/clisp/Manifest | 1 +
14 dev-lisp/clisp/clisp-2.49.60.ebuild | 147 +++++++++++++++
15 .../clisp-2.49.60-after_glibc_cfree_bdb.patch | 207 +++++++++++++++++++++
16 3 files changed, 355 insertions(+)
17
18 diff --git a/dev-lisp/clisp/Manifest b/dev-lisp/clisp/Manifest
19 index 670c7cbe49f..4b0e12dda85 100644
20 --- a/dev-lisp/clisp/Manifest
21 +++ b/dev-lisp/clisp/Manifest
22 @@ -1,2 +1,3 @@
23 DIST clisp-2.48.tar.bz2 7885098 BLAKE2B 42ebfe4721015f522184bce710bf95d79aa7f2a239410af249a8e85d80f140344ec80daaa34f7cdbfd2ae86407984657163ce3f6e4201eb132f7c71e21523cba SHA512 3288b6a2973c924006b14bbed1e8e3e688276a187ac2a6c7851dc7ae699e7832d30e5e7eecdabc76c08c7e8e8ce1b562eb97a44570d3035e558ea2310de2b719
24 +DIST clisp-2.49.60.tar.bz2 8745713 BLAKE2B 5dffd594c6d00c2057a98e3f93c888cd5cdc60009cd8fc987e39ff5182e71e575e148839d9c973fbfd0842b82ddf1b5918e86d128d9c79f6d0d4b6afcdc5853f SHA512 656cd59a23ba9be5304a6e0d64d79ac518072c431820b8cf95759fa8f3a66e2efe4d07939315b93e5e06b6e5348d8b32739b129a9e8ac0dc362dd5d1f1eb8aa8
25 DIST clisp-2.49.tar.bz2 8091011 BLAKE2B e034c581b8100837b34d0adf1ef45bd667272d062945875175958178b4ef5b11e899dfb76505eb8cb51fca6101c11a9f21fb2cc9a78a3c0f82b06166211434f7 SHA512 eef66fc85199a2c283b616db61bf67ff103eeb0f19fa907da48994dc790b6f5f8d0c74fb3bd723c6b827c0ff3cfd89fa6ba67934fc669ed5d5249044b5140d81
26
27 diff --git a/dev-lisp/clisp/clisp-2.49.60.ebuild b/dev-lisp/clisp/clisp-2.49.60.ebuild
28 new file mode 100644
29 index 00000000000..84dc47a3bc6
30 --- /dev/null
31 +++ b/dev-lisp/clisp/clisp-2.49.60.ebuild
32 @@ -0,0 +1,147 @@
33 +# Copyright 1999-2017 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/clisp-2.49.60.tar.bz2"
43 +
44 +LICENSE="GPL-2"
45 +SLOT="2/7"
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 + append-flags '-D NO_MULTIMAP_SHM -D NO_MULTIMAP_FILE -D NO_SINGLEMAP -D NO_TRIVIALMAP'
102 + fi
103 +
104 + if use x86; then
105 + append-flags -falign-functions=4
106 + fi
107 +
108 + # QA issue with lisp.run
109 + append-flags -Wa,--noexecstack
110 +
111 + # built-in features
112 + local myconf="--with-ffcall --without-dynamic-modules"
113 +# There's a problem with jit_allocai function
114 +# if use jit; then
115 +# myconf+=" --with-jitc=lightning"
116 +# fi
117 + if use threads; then
118 + myconf+=" --with-threads=POSIX_THREADS"
119 + fi
120 +
121 + # default modules
122 + enable_modules rawsock
123 + # optional modules
124 + use elibc_glibc && enable_modules bindings/glibc
125 + use X && enable_modules clx/new-clx
126 + if use postgres; then
127 + enable_modules postgresql
128 + append-cppflags -I$(pg_config --includedir)
129 + fi
130 + if use berkdb; then
131 + enable_modules berkeley-db
132 + append-cppflags -I/usr/include/db4.8
133 + fi
134 + use dbus && enable_modules dbus
135 + use fastcgi && enable_modules fastcgi
136 + use gdbm && enable_modules gdbm
137 + use gtk && enable_modules gtk2
138 + use pari && enable_modules pari
139 + use pcre && enable_modules pcre
140 + use svm && enable_modules libsvm
141 + use zlib && enable_modules zlib
142 +
143 + if use hyperspec; then
144 + CLHSROOT="file:///usr/share/doc/hyperspec/HyperSpec/"
145 + else
146 + CLHSROOT="http://www.lispworks.com/reference/HyperSpec/"
147 + fi
148 +
149 + # configure chokes on --sysconfdir option
150 + local configure="./configure --prefix=/usr --enable-portability \
151 + --libdir=/usr/$(get_libdir) $(use_with readline) $(use_with unicode) \
152 + ${myconf} --hyperspec=${CLHSROOT} ${BUILDDIR}"
153 + einfo "${configure}"
154 + ${configure} || die "./configure failed"
155 +
156 + IMPNOTES="file://${ROOT%/}/usr/share/doc/${PN}-${PVR}/html/impnotes.html"
157 + sed -i "s,http://clisp.cons.org/impnotes/,${IMPNOTES},g" \
158 + "${BUILDDIR}"/config.lisp || die "Cannot fix link to implementation notes"
159 +}
160 +
161 +src_compile() {
162 + export VARTEXFONTS="${T}"/fonts
163 + cd "${BUILDDIR}" || die
164 + # parallel build fails
165 + emake -j1
166 +}
167 +
168 +src_install() {
169 + pushd "${BUILDDIR}"
170 + make DESTDIR="${D}" prefix=/usr install-bin || die "Installation failed"
171 + doman clisp.1
172 + dodoc ../SUMMARY README* ../src/NEWS ../unix/MAGIC.add ../ANNOUNCE
173 + # stripping them removes common symbols (defined but uninitialised variables)
174 + # which are then needed to build modules...
175 + export STRIP_MASK="*/usr/$(get_libdir)/clisp-${PV}/*/*"
176 + popd
177 + dohtml doc/impnotes.{css,html} doc/regexp.html doc/clisp.png
178 + dodoc doc/{CLOS-guide,LISP-tutorial}.txt
179 +}
180
181 diff --git a/dev-lisp/clisp/files/clisp-2.49.60-after_glibc_cfree_bdb.patch b/dev-lisp/clisp/files/clisp-2.49.60-after_glibc_cfree_bdb.patch
182 new file mode 100644
183 index 00000000000..3ab075badf4
184 --- /dev/null
185 +++ b/dev-lisp/clisp/files/clisp-2.49.60-after_glibc_cfree_bdb.patch
186 @@ -0,0 +1,207 @@
187 +diff --git a/modules/berkeley-db/bdb.c b/modules/berkeley-db/bdb.c
188 +index a266d41..942652a 100644
189 +--- a/modules/berkeley-db/bdb.c
190 ++++ b/modules/berkeley-db/bdb.c
191 +@@ -2216,7 +2216,13 @@ DEFUN(BDB:DB-COMPACT, db &key TRANSACTION :START STOP FREE FILL TIMEOUT \
192 + c_data.compact_timeout = timeout;
193 + c_data.compact_pages = pages;
194 + SYSCALL(db->compact,(db,txn,pstart,pstop,&c_data,flags,&end));
195 +- pushSTACK(uint32_to_I(c_data.compact_empty_buckets));
196 ++ /* ====
197 ++ * compact_empty_buckets is in bdb-5.3 as part of output stats
198 ++ * however this version use bdb-4.8 which does not have it
199 ++ * ====
200 ++ *
201 ++ * pushSTACK(uint32_to_I(c_data.compact_empty_buckets));
202 ++ * */
203 + pushSTACK(uint32_to_I(c_data.compact_pages_free));
204 + pushSTACK(uint32_to_I(c_data.compact_pages_examine));
205 + pushSTACK(uint32_to_I(c_data.compact_levels));
206 +diff --git a/modules/bindings/glibc/linux.lisp b/modules/bindings/glibc/linux.lisp
207 +index c960753..2993990 100644
208 +--- a/modules/bindings/glibc/linux.lisp
209 ++++ b/modules/bindings/glibc/linux.lisp
210 +@@ -1,7 +1,7 @@
211 + ;; Foreign functions provided by the Linux C library version 6,
212 + ;; i.e. the GNU C library version 2.0.7.
213 + ;; Bruno Haible 10.4.1998, 19.4.1998
214 +-;; Sam Steingold 2002-2008, 2011
215 ++;; Sam Steingold 2002-2008, 2011, 2013, 2016-2017
216 +
217 + ;; NB: quite a few functions here have more portable counterparts in POSIX
218 +
219 +@@ -649,7 +649,6 @@
220 + (def-call-out calloc (:arguments (nmemb size_t) (size size_t))
221 + (:return-type c-pointer))
222 + (def-call-out free (:arguments (ptr c-pointer)) (:return-type nil))
223 +-(def-call-out cfree (:arguments (ptr c-pointer)) (:return-type nil))
224 + (def-call-out valloc (:arguments (size size_t)) (:return-type c-pointer))
225 +
226 + (def-call-out abort (:arguments) (:return-type nil))
227 +@@ -687,9 +686,8 @@
228 + (def-call-out system? (:arguments (null c-string))
229 + (:return-type boolean) (:name "system"))
230 +
231 +-; You can uncomment this if your compiler sets __USE_GNU
232 +-; (def-call-out canonicalize_file_name (:arguments (name c-string))
233 +-; (:return-type c-string :malloc-free))
234 ++(def-call-out canonicalize_file_name (:arguments (name c-string))
235 ++ (:return-type c-string :malloc-free) (:guard "defined(__USE_GNU)"))
236 +
237 + (def-call-out realpath
238 + (:arguments (name c-string)
239 +@@ -1041,9 +1039,8 @@
240 + (def-call-out access (:arguments (name c-string) (type int))
241 + (:return-type int))
242 +
243 +-; You can uncomment this if your compiler sets __USE_GNU
244 +-; (def-call-out euidaccess (:arguments (name c-string) (type int))
245 +-; (:return-type int))
246 ++(def-call-out euidaccess (:arguments (name c-string) (type int))
247 ++ (:return-type int) (:guard "defined(__USE_GNU)"))
248 +
249 + (defconstant SEEK_SET 0)
250 + (defconstant SEEK_CUR 1)
251 +@@ -1094,9 +1091,8 @@
252 + ;(def-call-out getcwd (:arguments (buf c-string :out) (size size_t)) ; ??
253 + ; (:return-type c-string))
254 +
255 +-; You can uncomment this if your compiler sets __USE_GNU
256 +-; (def-call-out get_current_dir_name (:arguments)
257 +-; (:return-type c-string :malloc-free))
258 ++(def-call-out get_current_dir_name (:arguments)
259 ++ (:return-type c-string :malloc-free) (:guard "defined(__USE_GNU)"))
260 +
261 + ;(def-call-out getwd (:arguments (buf c-string :out)) ; ??
262 + ; (:return-type c-string))
263 +@@ -1324,8 +1320,8 @@
264 + ; (:arguments (size int) (list (c-ptr (c-array gid_t ??)) :out)) ; ??
265 + ; (:return-type int))
266 +
267 +-; You can uncomment this if your compiler sets __USE_GNU
268 +-; (def-call-out group_member (:arguments (gid gid_t)) (:return-type boolean))
269 ++(def-call-out group_member (:arguments (gid gid_t)) (:return-type boolean)
270 ++ (:guard "defined(__USE_GNU)"))
271 + (def-call-out setuid (:arguments (uid uid_t)) (:return-type int))
272 + (def-call-out setreuid (:arguments (ruid uid_t) (euid uid_t))
273 + (:return-type int))
274 +@@ -1822,8 +1818,8 @@
275 + (:return-type c-string :malloc-free))
276 + (def-call-out ungetc (:arguments (c int) (fp FILE))
277 + (:return-type int))
278 +-; You can uncomment this if your compiler sets __USE_GNU
279 +-; (def-call-out fcloseall (:arguments) (:return-type int))
280 ++(def-call-out fcloseall (:arguments) (:return-type int)
281 ++ (:guard "defined(__USE_GNU)"))
282 + (def-call-out fdopen (:arguments (fildes int) (mode c-string))
283 + (:return-type c-pointer))
284 + (def-call-out fileno (:arguments (fp FILE)) (:return-type int))
285 +@@ -1901,11 +1897,11 @@ typedef __off64_t clisp_dirent_off_t;
286 + (:return-type (c-ptr-null dirent)))
287 + (def-call-out readdir64 (:arguments (dirp c-pointer))
288 + (:return-type (c-ptr-null dirent64)))
289 +-(def-call-out readdir_r
290 ++(def-call-out readdir_r ; deprecated
291 + (:arguments (dirp c-pointer) (entry (c-ptr dirent) :out :alloca)
292 + (result (c-ptr (c-ptr dirent)) :out :alloca)) ; ??
293 + (:return-type int))
294 +-(def-call-out readdir64_r
295 ++(def-call-out readdir64_r ; deprecated
296 + (:arguments (dirp c-pointer) (entry (c-ptr dirent64) :out :alloca)
297 + (result (c-ptr (c-ptr dirent64)) :out :alloca)) ; ??
298 + (:return-type int))
299 +diff --git a/modules/bindings/glibc/test.tst b/modules/bindings/glibc/test.tst
300 +index f807389..b2c1222 100644
301 +--- a/modules/bindings/glibc/test.tst
302 ++++ b/modules/bindings/glibc/test.tst
303 +@@ -5,6 +5,16 @@
304 + (progn (require "linux") T) T
305 + (listp (show (multiple-value-list (ext:module-info "linux" t)) :pretty t)) T
306 +
307 ++(stringp (show (linux:get-domain-name))) T
308 ++(stringp (show (linux:get-host-name))) T
309 ++
310 ++;; usually __USE_GNU is defined, so this should work:
311 ++(let* ((d (linux:get_current_dir_name))
312 ++ (c (linux:canonicalize_file_name (concatenate 'string d "/."))))
313 ++ (or (string= d c)
314 ++ (list :cur-dir d :canonical c)))
315 ++T
316 ++
317 + (defparameter *d* (show (linux:opendir "."))) *D*
318 + (linux:dirent64-d_name (show (linux:readdir64 *d*))) "."
319 + (linux:dirent64-d_name (show (linux:readdir64 *d*))) ".."
320 +diff --git a/src/foreign1.lisp b/src/foreign1.lisp
321 +index 26a3ba5..0e43de7 100644
322 +--- a/src/foreign1.lisp
323 ++++ b/src/foreign1.lisp
324 +@@ -1,6 +1,6 @@
325 + ;;; Foreign function interface for CLISP
326 + ;;; Bruno Haible 19.2.1995
327 +-;;; Sam Steingold 1998-2010
328 ++;;; Sam Steingold 1998-2010, 2017
329 +
330 + #+UNICODE
331 + (progn
332 +@@ -805,14 +805,17 @@
333 + c-name (to-c-string c-name) (third variable) (first variable))
334 + (when *foreign-guard* (format *coutput-stream* "# endif~%"))))
335 + (dolist (function *function-list*)
336 +- (let ((c-name (first function)))
337 +- (when *foreign-guard*
338 +- (format *coutput-stream* "# if defined(HAVE_~A)~%"
339 +- (string-upcase c-name)))
340 ++ (let ((c-name (first function))
341 ++ (guard (fourth function)))
342 ++ (when guard
343 ++ (format *coutput-stream* "# if ~A~%"
344 ++ (if (eq guard t)
345 ++ (format nil "defined(HAVE_~A)" (string-upcase c-name))
346 ++ guard)))
347 + (format *coutput-stream*
348 + " register_foreign_function((void*)&~A,~A,~D);~%"
349 + c-name (to-c-string c-name) (svref (second function) 3))
350 +- (when *foreign-guard* (format *coutput-stream* "# endif~%"))))
351 ++ (when guard (format *coutput-stream* "# endif~%"))))
352 + (maphash (lambda (type fun-vec)
353 + (declare (ignore type))
354 + (let ((c-name (to-c-name (car fun-vec))))
355 +@@ -1083,7 +1086,7 @@
356 + (defmacro DEF-CALL-OUT (&whole whole-form name &rest options)
357 + (setq name (check-symbol name (first whole-form)))
358 + (let* ((alist
359 +- (parse-options options '(:name :arguments :return-type :language
360 ++ (parse-options options '(:name :arguments :return-type :language :guard
361 + :built-in :library :version :documentation)
362 + whole-form))
363 + (def (gensym "DEF-CALL-OUT-"))
364 +@@ -1095,6 +1098,7 @@
365 + (version (second (assoc :version alist)))
366 + (c-name (foreign-name name (assoc :name alist)))
367 + (built-in (second (assoc :built-in alist)))
368 ++ (guard (get-assoc :guard alist '*foreign-guard*))
369 + ;; Maximize sharing in .fas file, reuse options
370 + ;; parse-c-function ignores unknown options, e.g. :name
371 + (ctype `(PARSE-C-FUNCTION ',options ',whole-form)))
372 +@@ -1102,7 +1106,7 @@
373 + ',c-name ,ctype ',properties ,library ,version NIL)))
374 + (EXT:COMPILER-LET ((,def ,ctype))
375 + (EVAL-WHEN (COMPILE)
376 +- (UNLESS ,LIBRARY (NOTE-C-FUN ',c-name ,def ',built-in)))
377 ++ (UNLESS ,LIBRARY (NOTE-C-FUN ',c-name ,def ',built-in ,guard)))
378 + (SYSTEM::EVAL-WHEN-COMPILE
379 + (SYSTEM::C-DEFUN ',name (C-TYPE-TO-SIGNATURE ,ctype))))
380 + (WHEN ,def ; found library function
381 +@@ -1110,10 +1114,10 @@
382 + (SYSTEM::%PUTD ',name ,def))
383 + ',name)))
384 +
385 +-(defun note-c-fun (c-name ctype built-in) ; not ABI, compile-time only
386 ++(defun note-c-fun (c-name ctype built-in guard) ; not ABI, compile-time only
387 + (when (system::prepare-coutput-file)
388 + (prepare-module)
389 +- (push (list c-name ctype built-in)
390 ++ (push (list c-name ctype built-in guard)
391 + *function-list*)))
392 +
393 + (defun count-inarguments (arg-vector)