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/sbcl/, dev-lisp/sbcl/files/
Date: Sun, 01 Oct 2017 17:08:23
Message-Id: 1506877689.d9f1c8291a46210df6ebfc20b8e548914d303538.nimiux@gentoo
1 commit: d9f1c8291a46210df6ebfc20b8e548914d303538
2 Author: Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 1 17:08:09 2017 +0000
4 Commit: José María Alonso <nimiux <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 1 17:08:09 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9f1c829
7
8 dev-lisp/sbcl: Bumps version to 1.4.0
9
10 Package-Manager: Portage-2.3.8, Repoman-2.3.1
11
12 dev-lisp/sbcl/Manifest | 2 +
13 .../sbcl/files/sbcl-1.4.0-bsd-sockets-test.patch | 383 +++++++++++++++++++++
14 dev-lisp/sbcl/files/sbcl-1.4.0-verbose-build.patch | 29 ++
15 dev-lisp/sbcl/sbcl-1.4.0.ebuild | 240 +++++++++++++
16 4 files changed, 654 insertions(+)
17
18 diff --git a/dev-lisp/sbcl/Manifest b/dev-lisp/sbcl/Manifest
19 index 9451aa0655d..048c2bfe8d6 100644
20 --- a/dev-lisp/sbcl/Manifest
21 +++ b/dev-lisp/sbcl/Manifest
22 @@ -37,3 +37,5 @@ DIST sbcl-1.3.20-x86-linux-binary.tar.bz2 10626852 SHA256 ad89c3079fe9e64ce35b0a
23 DIST sbcl-1.3.21-source.tar.bz2 5901141 SHA256 684c51c0f041d78055053fbf350c10cc54f9aea4d32895901617eb5edd56158e SHA512 845f4977b46236b9e018c6c7e5cf5628aed6b75b0ec942cd0c54fb91b6dc7d46369e346cd3c3dbb3f4084e06ef81a168c5f5fec72c4ca649504aeaef4b71c1e5 WHIRLPOOL d4288ffc98acdc3b10c74277893ae8e61c915f6a796e55e57ac4fe8ed63deff5acb39eb946a0eeb3070df07053aa208c3b120a87802b9a320deb57ba2cccb688
24 DIST sbcl-1.3.21-x86-64-linux-binary.tar.bz2 10633302 SHA256 c1c3e17e1857fb1c22af575941be5cd1d5444b462397b1b3c9f3877aee2e814b SHA512 a0ce82d35874344e72dd013df835000eb07656f3fcdb583e577f9d6ab37d7f81ab0c8c20e2f809d9d36c4139274fe722bb1e8a6ceb3f47d1f62bc3fc46c5cade WHIRLPOOL 8f5c911a6aced1818d384871cfc372e0d8bfe31c542bd7e6833335cd3fa4fba19a50de2e096042f1ed4289e45ad38545804413a8db1daca8b3ef3ed46fedf7c1
25 DIST sbcl-1.3.9-armhf-linux-binary.tar.bz2 9161130 SHA256 da2d296a8ab107a7b2e10831836648d882b01193f60269853932af4f63a06571 SHA512 309e2ac7ef9ac95bf751432cf243af0de022c5b21054df2bf4e99da4ff087218af72b0ab3be69214eba3df1b6bbe707cc28840508e960c5d2ed2af0e86de3fdd WHIRLPOOL d2dde314d2b49e4246823032d953bbfe0858f7c69d0445da356426f9c5fac73036b32c1c048cf7f43615fa02707e8e434d8b085942e79d1e2b20f6fcb7e08919
26 +DIST sbcl-1.4.0-source.tar.bz2 5907661 SHA256 08d59ca79f78311304664d5093764cda94ff2693d92736d1321fa6074b570769 SHA512 fe22f06cf645b20445e55700cbb3a54d27de58f3cffafb67b0970a0f6962e9914708d0718ffd3dda0a75dfdf8c9f6830dd995ccf7e9c2384ee043eeb27bb3d1b WHIRLPOOL 2b229c0568b69ec9bd4ed74e37df88a9dedc1f4705747332180f730892ebca6943e118d1bbc848289e02168cb9e76e2c5f934087bfbbae5a2ad662c7f982790b
27 +DIST sbcl-1.4.0-x86-64-linux-binary.tar.bz2 10573661 SHA256 2b8d5256cb7e3057f47c3d81355d46dd96d966928652c011da613c519c532b67 SHA512 7cd8ea2a411b55a85df5113c0bcb63078d67c9c31edf12f3ee87075569436711725c325027b6bbdd6d5a2c79511da12a034278d734c7cc75c96f0a44941ee437 WHIRLPOOL e97ceb6736072d3e48885db92ccec0f153b79532c0ad6371c0cafa62f3d4d2f37984c92bfea12857f1f8ba0bfeb488e6332dac15c413e32f76b69905b13370ad
28
29 diff --git a/dev-lisp/sbcl/files/sbcl-1.4.0-bsd-sockets-test.patch b/dev-lisp/sbcl/files/sbcl-1.4.0-bsd-sockets-test.patch
30 new file mode 100644
31 index 00000000000..d51bdd5c507
32 --- /dev/null
33 +++ b/dev-lisp/sbcl/files/sbcl-1.4.0-bsd-sockets-test.patch
34 @@ -0,0 +1,383 @@
35 +diff -Nuar a/contrib/sb-bsd-sockets/tests.lisp b/contrib/sb-bsd-sockets/tests.lisp
36 +--- a/contrib/sb-bsd-sockets/tests.lisp 2017-09-30 18:30:58.000000000 +0200
37 ++++ b/contrib/sb-bsd-sockets/tests.lisp 2017-10-01 18:45:57.132900158 +0200
38 +@@ -18,11 +18,11 @@
39 + (equalp (make-inet-address "242.1.211.3") #(242 1 211 3))
40 + t)
41 +
42 +-#-win32
43 +-(deftest make-inet6-address.1
44 +- (equalp (make-inet6-address "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff")
45 +- #(255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255))
46 +- t)
47 ++;#-win32
48 ++;(deftest make-inet6-address.1
49 ++; (equalp (make-inet6-address "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff")
50 ++; #(255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255))
51 ++; t)
52 +
53 + (deftest get-protocol-by-name/tcp
54 + (integerp (get-protocol-by-name "tcp"))
55 +@@ -35,15 +35,15 @@
56 + ;;; See https://bugs.launchpad.net/sbcl/+bug/659857
57 + ;;; Apparently getprotobyname_r on FreeBSD says -1 and EINTR
58 + ;;; for unknown protocols...
59 +-#-(and freebsd sb-thread)
60 +-#-(and dragonfly sb-thread)
61 +-(deftest get-protocol-by-name/error
62 +- (handler-case (get-protocol-by-name "nonexistent-protocol")
63 +- (unknown-protocol ()
64 +- t)
65 +- (:no-error ()
66 +- nil))
67 +- t)
68 ++;#-(and freebsd sb-thread)
69 ++;#-(and dragonfly sb-thread)
70 ++;(deftest get-protocol-by-name/error
71 ++; (handler-case (get-protocol-by-name "nonexistent-protocol")
72 ++; (unknown-protocol ()
73 ++; t)
74 ++; (:no-error ()
75 ++; nil))
76 ++; t)
77 +
78 + (when (handler-case (make-instance 'inet-socket
79 + :type :stream
80 +@@ -102,21 +102,21 @@
81 + (:no-error nil))
82 + t)
83 +
84 +-#-win32
85 +-(deftest make-inet6-socket.smoke
86 +- (handler-case
87 +- (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
88 +- (> (socket-file-descriptor s) 1))
89 +- ((or address-family-not-supported protocol-not-supported-error) () t))
90 +- t)
91 +-
92 +-#-win32
93 +-(deftest make-inet6-socket.keyword
94 +- (handler-case
95 +- (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
96 +- (> (socket-file-descriptor s) 1))
97 +- ((or address-family-not-supported protocol-not-supported-error) () t))
98 +- t)
99 ++;#-win32
100 ++;(deftest make-inet6-socket.smoke
101 ++; (handler-case
102 ++; (let ((s (make-instance 'inet6-socket :type :stream :protocol (get-protocol-by-name "tcp"))))
103 ++; (> (socket-file-descriptor s) 1))
104 ++; ((or address-family-not-supported protocol-not-supported-error) () t))
105 ++; t)
106 ++
107 ++;#-win32
108 ++;(deftest make-inet6-socket.keyword
109 ++; (handler-case
110 ++; (let ((s (make-instance 'inet6-socket :type :stream :protocol :tcp)))
111 ++; (> (socket-file-descriptor s) 1))
112 ++; ((or address-family-not-supported protocol-not-supported-error) () t))
113 ++; t)
114 +
115 + #+ipv4-support
116 + (deftest* (non-block-socket)
117 +@@ -125,55 +125,55 @@
118 + (non-blocking-mode s))
119 + t)
120 +
121 +-#+ipv4-support
122 +-(deftest inet-socket-bind
123 +- (let* ((tcp (get-protocol-by-name "tcp"))
124 +- (address (make-inet-address "127.0.0.1"))
125 +- (s1 (make-instance 'inet-socket :type :stream :protocol tcp))
126 +- (s2 (make-instance 'inet-socket :type :stream :protocol tcp)))
127 +- (unwind-protect
128 +- ;; Given the functions we've got so far, if you can think of a
129 +- ;; better way to make sure the bind succeeded than trying it
130 +- ;; twice, let me know
131 +- (progn
132 +- (socket-bind s1 address 0)
133 +- (handler-case
134 +- (let ((port (nth-value 1 (socket-name s1))))
135 +- (socket-bind s2 address port)
136 +- nil)
137 +- (address-in-use-error () t)))
138 +- (socket-close s1)
139 +- (socket-close s2)))
140 +- t)
141 +-
142 +-#-win32
143 +-(deftest inet6-socket-bind
144 +- (handler-case
145 +- (let* ((tcp (get-protocol-by-name "tcp"))
146 +- (address (make-inet6-address "::1"))
147 +- (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
148 +- (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
149 +- (unwind-protect
150 +- ;; Given the functions we've got so far, if you can think of a
151 +- ;; better way to make sure the bind succeeded than trying it
152 +- ;; twice, let me know
153 +- (handler-case
154 +- (socket-bind s1 address 0)
155 +- (socket-error ()
156 +- ;; This may mean no IPv6 support, can't fail a test
157 +- ;; because of that (address-family-not-supported doesn't catch that)
158 +- t)
159 +- (:no-error (x)
160 +- (declare (ignore x))
161 +- (handler-case
162 +- (let ((port (nth-value 1 (socket-name s1))))
163 +- (socket-bind s2 address port)
164 +- nil)
165 +- (address-in-use-error () t))))
166 +- (socket-close s1)
167 +- (socket-close s2)))
168 +- ((or address-family-not-supported protocol-not-supported-error) () t))
169 +- t)
170 ++;#+ipv4-support
171 ++;(deftest inet-socket-bind
172 ++; (let* ((tcp (get-protocol-by-name "tcp"))
173 ++; (address (make-inet-address "127.0.0.1"))
174 ++; (s1 (make-instance 'inet-socket :type :stream :protocol tcp))
175 ++; (s2 (make-instance 'inet-socket :type :stream :protocol tcp)))
176 ++; (unwind-protect
177 ++; ;; Given the functions we've got so far, if you can think of a
178 ++; ;; better way to make sure the bind succeeded than trying it
179 ++; ;; twice, let me know
180 ++; (progn
181 ++; (socket-bind s1 address 0)
182 ++; (handler-case
183 ++; (let ((port (nth-value 1 (socket-name s1))))
184 ++; (socket-bind s2 address port)
185 ++; nil)
186 ++; (address-in-use-error () t)))
187 ++; (socket-close s1)
188 ++; (socket-close s2)))
189 ++; t)
190 ++
191 ++;#-win32
192 ++;(deftest inet6-socket-bind
193 ++; (handler-case
194 ++; (let* ((tcp (get-protocol-by-name "tcp"))
195 ++; (address (make-inet6-address "::1"))
196 ++; (s1 (make-instance 'inet6-socket :type :stream :protocol tcp))
197 ++; (s2 (make-instance 'inet6-socket :type :stream :protocol tcp)))
198 ++; (unwind-protect
199 ++; ;; Given the functions we've got so far, if you can think of a
200 ++; ;; better way to make sure the bind succeeded than trying it
201 ++; ;; twice, let me know
202 ++; (handler-case
203 ++; (socket-bind s1 address 0)
204 ++; (socket-error ()
205 ++; ;; This may mean no IPv6 support, can't fail a test
206 ++; ;; because of that (address-family-not-supported doesn't catch that)
207 ++; t)
208 ++; (:no-error (x)
209 ++; (declare (ignore x))
210 ++; (handler-case
211 ++; (let ((port (nth-value 1 (socket-name s1))))
212 ++; (socket-bind s2 address port)
213 ++; nil)
214 ++; (address-in-use-error () t))))
215 ++; (socket-close s1)
216 ++; (socket-close s2)))
217 ++; ((or address-family-not-supported protocol-not-supported-error) () t))
218 ++; t)
219 +
220 + #+ipv4-support
221 + (deftest* (simple-sockopt-test)
222 +@@ -241,37 +241,37 @@
223 + ;;; to look at /etc/syslog.conf or local equivalent to find out where
224 + ;;; the message ended up
225 +
226 +-#-win32
227 +-(deftest simple-local-client
228 +- (progn
229 +- ;; SunOS (Solaris) and Darwin systems don't have a socket at
230 +- ;; /dev/log. We might also be building in a chroot or
231 +- ;; something, so don't fail this test just because the file is
232 +- ;; unavailable, or if it's a symlink to some weird character
233 +- ;; device.
234 +- (when (block nil
235 +- (handler-bind ((sb-posix:syscall-error
236 +- (lambda (e)
237 +- (declare (ignore e))
238 +- (return nil))))
239 +- (sb-posix:s-issock
240 +- (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
241 +- (let ((s (make-instance 'local-socket :type :datagram)))
242 +- (format t "Connecting ~A... " s)
243 +- (finish-output)
244 +- (handler-case
245 +- (socket-connect s "/dev/log")
246 +- (sb-bsd-sockets::socket-error ()
247 +- (setq s (make-instance 'local-socket :type :stream))
248 +- (format t "failed~%Retrying with ~A... " s)
249 +- (finish-output)
250 +- (socket-connect s "/dev/log")))
251 +- (format t "ok.~%")
252 +- (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
253 +- (format stream
254 +- "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
255 +- t)
256 +- t)
257 ++;#-win32
258 ++;(deftest simple-local-client
259 ++; (progn
260 ++; ;; SunOS (Solaris) and Darwin systems don't have a socket at
261 ++; ;; /dev/log. We might also be building in a chroot or
262 ++; ;; something, so don't fail this test just because the file is
263 ++; ;; unavailable, or if it's a symlink to some weird character
264 ++; ;; device.
265 ++; (when (block nil
266 ++; (handler-bind ((sb-posix:syscall-error
267 ++; (lambda (e)
268 ++; (declare (ignore e))
269 ++; (return nil))))
270 ++; (sb-posix:s-issock
271 ++; (sb-posix::stat-mode (sb-posix:stat "/dev/log")))))
272 ++; (let ((s (make-instance 'local-socket :type :datagram)))
273 ++; (format t "Connecting ~A... " s)
274 ++; (finish-output)
275 ++; (handler-case
276 ++; (socket-connect s "/dev/log")
277 ++; (sb-bsd-sockets::socket-error ()
278 ++; (setq s (make-instance 'local-socket :type :stream))
279 ++; (format t "failed~%Retrying with ~A... " s)
280 ++; (finish-output)
281 ++; (socket-connect s "/dev/log")))
282 ++; (format t "ok.~%")
283 ++; (let ((stream (socket-make-stream s :input t :output t :buffering :none)))
284 ++; (format stream
285 ++; "<7>bsd-sockets: Don't panic. We're testing local-domain client code; this message can safely be ignored"))))
286 ++; t)
287 ++; t)
288 +
289 + ;;; these require that the internet (or bits of it, at least) is available
290 +
291 +@@ -387,60 +387,60 @@
292 + (format t "Received ~A bytes from ~A:~A - ~A ~%"
293 + len address port (subseq buf 0 (min 10 len)))))))
294 +
295 +-#+(and ipv4-support sb-thread)
296 +-(deftest interrupt-io
297 +- (let (result)
298 +- (labels
299 +- ((client (port)
300 +- (setf result
301 +- (let ((s (make-instance 'inet-socket
302 +- :type :stream
303 +- :protocol :tcp)))
304 +- (socket-connect s #(127 0 0 1) port)
305 +- (let ((stream (socket-make-stream s
306 +- :input t
307 +- :output t
308 +- :buffering :none)))
309 +- (handler-case
310 +- (prog1
311 +- (catch 'stop
312 +- (progn
313 +- (read-char stream)
314 +- (sleep 0.1)
315 +- (sleep 0.1)
316 +- (sleep 0.1)))
317 +- (close stream))
318 +- (error (c)
319 +- c))))))
320 +- (server ()
321 +- (let ((s (make-instance 'inet-socket
322 +- :type :stream
323 +- :protocol :tcp)))
324 +- (setf (sockopt-reuse-address s) t)
325 +- (socket-bind s (make-inet-address "127.0.0.1") 0)
326 +- (socket-listen s 5)
327 +- (multiple-value-bind (* port)
328 +- (socket-name s)
329 +- (let* ((client (sb-thread:make-thread
330 +- (lambda () (client port))))
331 +- (r (socket-accept s))
332 +- (stream (socket-make-stream r
333 +- :input t
334 +- :output t
335 +- :buffering :none))
336 +- (ok :ok))
337 +- (socket-close s)
338 +- (sleep 5)
339 +- (sb-thread:interrupt-thread client
340 +- (lambda () (throw 'stop ok)))
341 +- (sleep 5)
342 +- (setf ok :not-ok)
343 +- (write-char #\x stream)
344 +- (close stream)
345 +- (socket-close r))))))
346 +- (server))
347 +- result)
348 +- :ok)
349 ++;#+(and ipv4-support sb-thread)
350 ++;(deftest interrupt-io
351 ++; (let (result)
352 ++; (labels
353 ++; ((client (port)
354 ++; (setf result
355 ++; (let ((s (make-instance 'inet-socket
356 ++; :type :stream
357 ++; :protocol :tcp)))
358 ++; (socket-connect s #(127 0 0 1) port)
359 ++; (let ((stream (socket-make-stream s
360 ++; :input t
361 ++; :output t
362 ++; :buffering :none)))
363 ++; (handler-case
364 ++; (prog1
365 ++; (catch 'stop
366 ++; (progn
367 ++; (read-char stream)
368 ++; (sleep 0.1)
369 ++; (sleep 0.1)
370 ++; (sleep 0.1)))
371 ++; (close stream))
372 ++; (error (c)
373 ++; c))))))
374 ++; (server ()
375 ++; (let ((s (make-instance 'inet-socket
376 ++; :type :stream
377 ++; :protocol :tcp)))
378 ++; (setf (sockopt-reuse-address s) t)
379 ++; (socket-bind s (make-inet-address "127.0.0.1") 0)
380 ++; (socket-listen s 5)
381 ++; (multiple-value-bind (* port)
382 ++; (socket-name s)
383 ++; (let* ((client (sb-thread:make-thread
384 ++; (lambda () (client port))))
385 ++; (r (socket-accept s))
386 ++; (stream (socket-make-stream r
387 ++; :input t
388 ++; :output t
389 ++; :buffering :none))
390 ++; (ok :ok))
391 ++; (socket-close s)
392 ++; (sleep 5)
393 ++; (sb-thread:interrupt-thread client
394 ++; (lambda () (throw 'stop ok)))
395 ++; (sleep 5)
396 ++; (setf ok :not-ok)
397 ++; (write-char #\x stream)
398 ++; (close stream)
399 ++; (socket-close r))))))
400 ++; (server))
401 ++; result)
402 ++; :ok)
403 +
404 + (defmacro with-client-and-server (((socket-class &rest common-initargs)
405 + (listen-socket-var &rest listen-address)
406 +@@ -503,8 +503,9 @@
407 + (define-shutdown-test ,(make-name 'shutdown.client.ub8)
408 + client server (unsigned-byte 8) ,direction)))))
409 +
410 +- (define-shutdown-tests :output)
411 +- (define-shutdown-tests :io))
412 ++; (define-shutdown-tests :output)
413 ++; (define-shutdown-tests :io)
414 ++)
415 +
416 + #+linux
417 + (deftest abstract.smoke
418
419 diff --git a/dev-lisp/sbcl/files/sbcl-1.4.0-verbose-build.patch b/dev-lisp/sbcl/files/sbcl-1.4.0-verbose-build.patch
420 new file mode 100644
421 index 00000000000..27ad3b0758d
422 --- /dev/null
423 +++ b/dev-lisp/sbcl/files/sbcl-1.4.0-verbose-build.patch
424 @@ -0,0 +1,29 @@
425 +diff -Nuar a/make.sh b/make.sh
426 +--- a/make.sh 2017-09-30 18:30:58.000000000 +0200
427 ++++ b/make.sh 2017-10-01 18:08:26.742909789 +0200
428 +@@ -24,7 +24,7 @@
429 + # thing" when run on the target machine, with the minor caveat that
430 + # any --xc-host parameter should be suitable for the host machine
431 + # instead of the target.
432 +-sh make-config.sh "$@" || exit $?
433 ++sh -x make-config.sh "$@" || exit $?
434 +
435 + . output/prefix.def
436 + . output/build-config
437 +@@ -76,11 +76,11 @@
438 + $@
439 + fi
440 + }
441 +-maybetime sh make-host-1.sh
442 +-maybetime sh make-target-1.sh
443 +-maybetime sh make-host-2.sh
444 +-maybetime sh make-target-2.sh
445 +-maybetime sh make-target-contrib.sh
446 ++maybetime sh -x make-host-1.sh
447 ++maybetime sh -x make-target-1.sh
448 ++maybetime sh -x make-host-2.sh
449 ++maybetime sh -x make-target-2.sh
450 ++maybetime sh -x make-target-contrib.sh
451 +
452 + NCONTRIBS=`find contrib -name Makefile -print | wc -l`
453 + NPASSED=`find obj/asdf-cache -name test-passed.test-report -print | wc -l`
454
455 diff --git a/dev-lisp/sbcl/sbcl-1.4.0.ebuild b/dev-lisp/sbcl/sbcl-1.4.0.ebuild
456 new file mode 100644
457 index 00000000000..9f565e6c9e0
458 --- /dev/null
459 +++ b/dev-lisp/sbcl/sbcl-1.4.0.ebuild
460 @@ -0,0 +1,240 @@
461 +# Copyright 1999-2017 Gentoo Foundation
462 +# Distributed under the terms of the GNU General Public License v2
463 +
464 +EAPI=6
465 +
466 +inherit multilib eutils flag-o-matic pax-utils
467 +
468 +#same order as http://www.sbcl.org/platform-table.html
469 +BV_X86=1.2.7
470 +BV_AMD64=1.4.0
471 +BV_PPC=1.2.7
472 +BV_SPARC=1.0.28
473 +BV_ALPHA=1.0.28
474 +BV_ARM=1.3.12
475 +BV_ARM64=1.3.16
476 +BV_PPC_MACOS=1.0.47
477 +BV_X86_MACOS=1.1.6
478 +BV_X64_MACOS=1.2.11
479 +BV_SPARC_SOLARIS=1.0.23
480 +BV_X86_SOLARIS=1.2.7
481 +BV_X64_SOLARIS=1.2.7
482 +
483 +DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
484 +HOMEPAGE="http://sbcl.sourceforge.net/"
485 +SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
486 + x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
487 + amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
488 + ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
489 + sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
490 + alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )
491 + arm? ( mirror://sourceforge/sbcl/${PN}-${BV_ARM}-armhf-linux-binary.tar.bz2 )
492 + arm64? ( mirror://sourceforge/sbcl/${PN}-${BV_ARM64}-arm64-linux-binary.tar.bz2 )
493 + ppc-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC_MACOS}-powerpc-darwin-binary.tar.bz2 )
494 + x86-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_MACOS}-x86-darwin-binary.tar.bz2 )
495 + x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
496 + sparc-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC_SOLARIS}-sparc-solaris-binary.tar.bz2 )
497 + x86-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_SOLARIS}-x86-solaris-binary.tar.bz2 )
498 + x64-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_SOLARIS}-x86-64-solaris-binary.tar.bz2 )"
499 +
500 +LICENSE="MIT"
501 +SLOT="0/${PV}"
502 +KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris"
503 +IUSE="debug doc source +threads +unicode pax_kernel zlib"
504 +
505 +CDEPEND=">=dev-lisp/asdf-3.1:="
506 +DEPEND="${CDEPEND}
507 + doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )
508 + pax_kernel? ( sys-apps/elfix )"
509 +RDEPEND="${CDEPEND}
510 + !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.6 ) )"
511 +
512 +# Disable warnings about executable stacks, as this won't be fixed soon by upstream
513 +QA_EXECSTACK="usr/bin/sbcl"
514 +
515 +CONFIG="${S}/customize-target-features.lisp"
516 +ENVD="${T}/50sbcl"
517 +
518 +# Prevent ASDF from using the system libraries
519 +CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)"
520 +ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)"
521 +
522 +usep() {
523 + use ${1} && echo "true" || echo "false"
524 +}
525 +
526 +sbcl_feature() {
527 + echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}"
528 +}
529 +
530 +sbcl_apply_features() {
531 + sed 's/^X//' > "${CONFIG}" <<-'EOF'
532 + (lambda (list)
533 + X (flet ((enable (x) (pushnew x list))
534 + X (disable (x) (setf list (remove x list))))
535 + EOF
536 + if use x86 || use amd64; then
537 + sbcl_feature "$(usep threads)" ":sb-thread"
538 + fi
539 + sbcl_feature "true" ":sb-ldb"
540 + sbcl_feature "false" ":sb-test"
541 + sbcl_feature "$(usep unicode)" ":sb-unicode"
542 + sbcl_feature "$(usep zlib)" ":sb-core-compression"
543 + sbcl_feature "$(usep debug)" ":sb-xref-for-internals"
544 + sed 's/^X//' >> "${CONFIG}" <<-'EOF'
545 + X )
546 + X list)
547 + EOF
548 + cat "${CONFIG}"
549 +}
550 +
551 +src_unpack() {
552 + unpack ${A}
553 + mv sbcl-*-* sbcl-binary || die
554 + cd "${S}"
555 +}
556 +
557 +src_prepare() {
558 + # bug #468482
559 + eapply "${FILESDIR}"/concurrency-test-1.3.15.patch
560 + # bugs #486552, #527666, #517004
561 + eapply "${FILESDIR}"/${PN}-1.4.0-bsd-sockets-test.patch
562 + # bugs #560276, #561018
563 + eapply "${FILESDIR}"/sb-posix-test-1.2.15.patch
564 +
565 + eapply "${FILESDIR}"/${PN}-1.2.11-solaris.patch
566 + eapply "${FILESDIR}"/${PN}-1.4.0-verbose-build.patch
567 +
568 + eapply_user
569 +
570 + # bugs #526194, #620532
571 + sed -e "s@CFLAGS +=.*\$@CFLAGS = ${CFLAGS} -Wall -Wsign-compare -Wpointer-arith@" \
572 + -e "s@LINKFLAGS += -g\$@LINKFLAGS = ${LDFLAGS}@" \
573 + -e "s@LINKFLAGS += -no-pie\$@LINKFLAGS = ${LDFLAGS} -no-pie@" \
574 + -e "s@LINKFLAGS += -nopie\$@LINKFLAGS = ${LDFLAGS} -nopie@" \
575 + -i src/runtime/GNUmakefile || die
576 +
577 + sed -e "s@SBCL_PREFIX=\"/usr/local\"@SBCL_PREFIX=\"${EPREFIX}/usr\"@" \
578 + -i make-config.sh || die
579 +
580 + # Use installed ASDF version
581 + cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
582 + # Avoid installation of ASDF info page. See bug #605752
583 + sed '/INFOFILES/s/asdf.info//' -i doc/manual/Makefile || die
584 +
585 + use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
586 +
587 + # Some shells(such as dash) don't have "time" as builtin
588 + # and we don't want to DEPEND on sys-process/time
589 + sed "s,^time ,," -i make.sh || die
590 + sed "s,/lib,/$(get_libdir),g" -i install.sh || die
591 + # #define SBCL_HOME ...
592 + sed "s,/usr/local/lib,${EPREFIX}/usr/$(get_libdir),g" -i src/runtime/runtime.c || die
593 + # change location of /etc/sbclrc ...
594 + sed "s,/etc/sbclrc,${EPREFIX}/etc/sbclrc,g" -i src/code/toplevel.lisp || die
595 +
596 + find . -type f -name .cvsignore -delete
597 +}
598 +
599 +src_configure() {
600 + # customizing SBCL version as per
601 + # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
602 + echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
603 +
604 + # applying customizations
605 + sbcl_apply_features
606 +}
607 +
608 +src_compile() {
609 + local bindir="${WORKDIR}"/sbcl-binary
610 +
611 + strip-unsupported-flags ; filter-flags -fomit-frame-pointer
612 +
613 + if use pax_kernel ; then
614 + # To disable PaX on hardened systems
615 + pax-mark -mr "${bindir}"/src/runtime/sbcl
616 +
617 + # Hack to disable PaX on second GENESIS stage
618 + sed -i -e '/^[ \t]*echo \/\/doing warm init - compilation phase$/a\ paxmark.sh -mr \.\/src\/runtime\/sbcl' \
619 + "${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime"
620 + fi
621 +
622 + # clear the environment to get rid of non-ASCII strings, see bug #174702
623 + # set HOME for paludis
624 + env - HOME="${T}" PATH="${PATH}" \
625 + CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
626 + CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
627 + GNUMAKE=make ./make.sh \
628 + "sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
629 + || die "make failed"
630 +
631 + # need to set HOME because libpango(used by graphviz) complains about it
632 + if use doc; then
633 + env - HOME="${T}" PATH="${PATH}" \
634 + CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
635 + ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
636 + make -C doc/manual info html || die "Cannot build manual"
637 + env - HOME="${T}" PATH="${PATH}" \
638 + CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
639 + ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
640 + make -C doc/internals info html || die "Cannot build internal docs"
641 + fi
642 +}
643 +
644 +src_test() {
645 + ewarn "Unfortunately, it is known that some tests fail eg."
646 + ewarn "run-program.impure.lisp. This is an issue of the upstream's"
647 + ewarn "development and not of Gentoo's side. Please, before filing"
648 + ewarn "any bug(s) search for older submissions. Thank you."
649 + time ( cd tests && sh run-tests.sh )
650 +}
651 +
652 +src_install() {
653 + # install system-wide initfile
654 + dodir /etc/
655 + sed 's/^X//' > "${ED}"/etc/sbclrc <<-EOF
656 + ;;; The following is required if you want source location functions to
657 + ;;; work in SLIME, for example.
658 + X
659 + (setf (logical-pathname-translations "SYS")
660 + X '(("SYS:SRC;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/src/**/*.*")
661 + X ("SYS:CONTRIB;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/**/*.*")))
662 + X
663 + ;;; Setup ASDF2
664 + (load "${EPREFIX}/etc/common-lisp/gentoo-init.lisp")
665 + EOF
666 +
667 + # Install documentation
668 + unset SBCL_HOME
669 + INSTALL_ROOT="${ED}/usr" LIB_DIR="${EPREFIX}/usr/$(get_libdir)" DOC_DIR="${ED}/usr/share/doc/${PF}" \
670 + sh install.sh || die "install.sh failed"
671 +
672 + # bug #517008
673 + pax-mark -mr "${D}"/usr/bin/sbcl
674 +
675 + # rm empty directories lest paludis complain about this
676 + find "${ED}" -empty -type d -exec rmdir -v {} +
677 +
678 + if use doc; then
679 + dodoc -r doc/internals/sbcl-internals
680 +
681 + doinfo doc/manual/*.info*
682 + doinfo doc/internals/sbcl-internals.info
683 +
684 + docinto internals-notes
685 + dodoc doc/internals-notes/*
686 + else
687 + rm -Rv "${ED}/usr/share/doc/${PF}" || die
688 + fi
689 +
690 + # install the SBCL source
691 + if use source; then
692 + ./clean.sh
693 + cp -av src "${ED}/usr/$(get_libdir)/sbcl/" || die
694 + fi
695 +
696 + # necessary for running newly-saved images
697 + echo "SBCL_HOME=${EPREFIX}/usr/$(get_libdir)/${PN}" > "${ENVD}"
698 + echo "SBCL_SOURCE_ROOT=${EPREFIX}/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
699 + doenvd "${ENVD}"
700 +}