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