1 |
commit: 1febb5c0d09f2d76381b345391f60b5f95b68ea5 |
2 |
Author: Chema Alonso Josa <nimiux <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 2 21:22:56 2018 +0000 |
4 |
Commit: José María Alonso <nimiux <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 2 21:22:56 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/lisp.git/commit/?id=1febb5c0 |
7 |
|
8 |
dev-lisp/cmucl: Bumps version to 21c |
9 |
|
10 |
dev-lisp/cmucl/cmucl-21c.ebuild | 109 +++++++++++++++++++ |
11 |
dev-lisp/cmucl/files/21c-build.patch | 22 ++++ |
12 |
...21c-customize-lisp-implementation-version.patch | 16 +++ |
13 |
dev-lisp/cmucl/files/21c-execstack-fixes.patch | 118 +++++++++++++++++++++ |
14 |
4 files changed, 265 insertions(+) |
15 |
|
16 |
diff --git a/dev-lisp/cmucl/cmucl-21c.ebuild b/dev-lisp/cmucl/cmucl-21c.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000..15054747 |
19 |
--- /dev/null |
20 |
+++ b/dev-lisp/cmucl/cmucl-21c.ebuild |
21 |
@@ -0,0 +1,109 @@ |
22 |
+# Copyright 1999-2017 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=6 |
26 |
+inherit eutils toolchain-funcs multilib |
27 |
+ |
28 |
+MY_PV=${PV:0:3} |
29 |
+ |
30 |
+DESCRIPTION="CMU Common Lisp is an implementation of ANSI Common Lisp" |
31 |
+HOMEPAGE="http://www.cons.org/cmucl/" |
32 |
+SRC_URI="http://common-lisp.net/project/cmucl/downloads/release/${MY_PV}/cmucl-src-${MY_PV}.tar.bz2 |
33 |
+ http://common-lisp.net/project/cmucl/downloads/release/${MY_PV}/cmucl-${MY_PV}-x86-linux.tar.bz2" |
34 |
+ |
35 |
+LICENSE="public-domain" |
36 |
+SLOT="0" |
37 |
+KEYWORDS="~x86" |
38 |
+IUSE="X doc source" |
39 |
+ |
40 |
+CDEPEND=">=dev-lisp/asdf-2.33-r3:= |
41 |
+ x11-libs/motif:0" |
42 |
+DEPEND="${CDEPEND} |
43 |
+ sys-devel/bc |
44 |
+ doc? ( virtual/latex-base )" |
45 |
+RDEPEND="${CDEPEND}" |
46 |
+ |
47 |
+S="${WORKDIR}" |
48 |
+ |
49 |
+TARGET=linux-4 |
50 |
+ |
51 |
+src_prepare() { |
52 |
+ eapply "${FILESDIR}"/${MY_PV}-execstack-fixes.patch |
53 |
+ eapply "${FILESDIR}"/${MY_PV}-customize-lisp-implementation-version.patch |
54 |
+ eapply "${FILESDIR}"/${MY_PV}-build.patch |
55 |
+ eapply_user |
56 |
+ #cp "${FILESDIR}"/os-common.h src/lisp/ || die |
57 |
+ cp /usr/share/common-lisp/source/asdf/build/asdf.lisp src/contrib/asdf/ || die |
58 |
+} |
59 |
+ |
60 |
+src_compile() { |
61 |
+ local cmuopts buildimage |
62 |
+ |
63 |
+ if use X; then |
64 |
+ cmuopts="" |
65 |
+ else |
66 |
+ cmuopts="-u" |
67 |
+ fi |
68 |
+ |
69 |
+ buildimage="bin/lisp -batch" |
70 |
+ |
71 |
+ env CC="$(tc-getCC)" bin/build.sh -v "-gentoo-${PR}" -C "" -o "${buildimage}" ${cmuopts} || die "Cannot build the compiler" |
72 |
+ |
73 |
+ # Compile up the asdf and defsystem modules |
74 |
+ ${TARGET}/lisp/lisp -noinit -nositeinit -batch << EOF || die |
75 |
+(in-package :cl-user) |
76 |
+(setf (ext:search-list "target:") |
77 |
+ '("$TARGET/" "src/")) |
78 |
+(setf (ext:search-list "modules:") |
79 |
+ '("target:contrib/")) |
80 |
+ |
81 |
+(compile-file "modules:asdf/asdf") |
82 |
+(compile-file "modules:defsystem/defsystem") |
83 |
+EOF |
84 |
+ |
85 |
+ # documentation |
86 |
+ if use doc; then |
87 |
+ pushd src/docs/cmu-user > /dev/null || die "directory src/docs/cmu-user does not exist" |
88 |
+ emake |
89 |
+ cd ../internals || die "directory src/docs/internals does not exist" |
90 |
+ emake |
91 |
+ popd > /dev/null |
92 |
+ fi |
93 |
+} |
94 |
+ |
95 |
+src_install() { |
96 |
+ bin/make-dist.sh -S -g -G root -O root -M share/man/man1 -V ${MY_PV} -A x86 -o linux ${TARGET} \ |
97 |
+ || die "Cannot build installation archive" |
98 |
+ # Necessary otherwise tar will fail |
99 |
+ dodir /usr |
100 |
+ pushd "${D}"/usr > /dev/null |
101 |
+ tar xzpf "${WORKDIR}"/cmucl-${MY_PV}-x86-linux.tar.gz \ |
102 |
+ || die "Cannot install main system" |
103 |
+ if use X ; then |
104 |
+ tar xzpf "${WORKDIR}"/cmucl-${MY_PV}-x86-linux.extra.tar.gz \ |
105 |
+ || die "Cannot install extra files" |
106 |
+ fi |
107 |
+ if use source; then |
108 |
+ # Necessary otherwise tar will fail |
109 |
+ dodir /usr/share/common-lisp/source/${PN} |
110 |
+ cd "${D}"/usr/share/common-lisp/source/${PN} |
111 |
+ tar --strip-components 1 -xzpf "${WORKDIR}"/cmucl-src-${MY_PV}.tar.gz \ |
112 |
+ || die "Cannot install sources" |
113 |
+ fi |
114 |
+ popd > /dev/null |
115 |
+ |
116 |
+ # Install site config file |
117 |
+ sed "s,@PF@,${PF},g ; s,@VERSION@,$(date +%F),g" \ |
118 |
+ < "${FILESDIR}"/site-init.lisp.in \ |
119 |
+ > "${D}"/usr/$(get_libdir)/cmucl/site-init.lisp \ |
120 |
+ || die "Cannot fix site-init.lisp" |
121 |
+ insinto /etc/common-lisp |
122 |
+ doins "${FILESDIR}"/cmuclrc || die "Failed to install cmuclrc" |
123 |
+ |
124 |
+ # documentation |
125 |
+ dodoc doc/cmucl/README |
126 |
+ if use doc; then |
127 |
+ insinto /usr/share/doc/${PF} |
128 |
+ doins src/docs/cmu-user/cmu-user.pdf src/docs/internals/design.pdf |
129 |
+ fi |
130 |
+} |
131 |
|
132 |
diff --git a/dev-lisp/cmucl/files/21c-build.patch b/dev-lisp/cmucl/files/21c-build.patch |
133 |
new file mode 100644 |
134 |
index 00000000..4d7e4061 |
135 |
--- /dev/null |
136 |
+++ b/dev-lisp/cmucl/files/21c-build.patch |
137 |
@@ -0,0 +1,22 @@ |
138 |
+diff -r -U2 21a.orig/bin/build.sh 21a/bin/build.sh |
139 |
+--- 21a.orig/bin/build.sh 2015-05-19 07:42:40.000000000 +0600 |
140 |
++++ 21a/bin/build.sh 2016-04-03 20:54:08.597016537 +0600 |
141 |
+@@ -40,5 +40,5 @@ |
142 |
+ ENABLE4="yes" |
143 |
+ |
144 |
+-version=21b |
145 |
++version=21c |
146 |
+ SRCDIR=src |
147 |
+ BINDIR=bin |
148 |
+@@ -145,10 +145,9 @@ |
149 |
+ $TOOLDIR/load-world.sh $TARGET "$VERSION" || { echo "Failed: $TOOLDIR/load-world.sh"; exit 1; } |
150 |
+ |
151 |
+- $TARGET/lisp/lisp -batch -noinit -nositeinit $FPU_MODE < /dev/null || { echo "Failed: $TARGET/lisp/lisp -batch -noinit $FPU_MODE"; exit 1; } |
152 |
++ $TARGET/lisp/lisp -batch -noinit -nositeinit < /dev/null || { echo "Failed: $TARGET/lisp/lisp -batch -noinit"; exit 1; } |
153 |
+ return 0; |
154 |
+ fi |
155 |
+ } |
156 |
+ |
157 |
+-FPU_MODE= |
158 |
+ BUILDWORLD="$TOOLDIR/build-world.sh" |
159 |
+ BUILD_POT="yes" |
160 |
|
161 |
diff --git a/dev-lisp/cmucl/files/21c-customize-lisp-implementation-version.patch b/dev-lisp/cmucl/files/21c-customize-lisp-implementation-version.patch |
162 |
new file mode 100644 |
163 |
index 00000000..8fc9278a |
164 |
--- /dev/null |
165 |
+++ b/dev-lisp/cmucl/files/21c-customize-lisp-implementation-version.patch |
166 |
@@ -0,0 +1,16 @@ |
167 |
+diff -ur cmucl.orig/src/code/misc.lisp cmucl/src/code/misc.lisp |
168 |
+--- cmucl.orig/src/code/misc.lisp 2011-10-25 05:31:39.000000000 +0200 |
169 |
++++ cmucl/src/code/misc.lisp 2012-01-31 21:46:49.441273068 +0100 |
170 |
+@@ -187,8 +187,10 @@ |
171 |
+ |
172 |
+ (defun lisp-implementation-version () |
173 |
+ "Returns a string describing the implementation version." |
174 |
+- (format nil "~A (~X~A)" *lisp-implementation-version* c:byte-fasl-file-version |
175 |
+- #+unicode _" Unicode" #-unicode "")) |
176 |
++ (format nil "~X~A~A" |
177 |
++ c:byte-fasl-file-version |
178 |
++ #+unicode "-unicode" #-unicode "" |
179 |
++ *lisp-implementation-version*)) |
180 |
+ |
181 |
+ (defun machine-instance () |
182 |
+ "Returns a string giving the name of the local machine." |
183 |
|
184 |
diff --git a/dev-lisp/cmucl/files/21c-execstack-fixes.patch b/dev-lisp/cmucl/files/21c-execstack-fixes.patch |
185 |
new file mode 100644 |
186 |
index 00000000..034848d6 |
187 |
--- /dev/null |
188 |
+++ b/dev-lisp/cmucl/files/21c-execstack-fixes.patch |
189 |
@@ -0,0 +1,118 @@ |
190 |
+diff -Naur work.old/src/lisp/alpha-assem.S work/src/lisp/alpha-assem.S |
191 |
+--- work.old/src/lisp/alpha-assem.S 2003-03-06 11:13:09.000000000 -0300 |
192 |
++++ work/src/lisp/alpha-assem.S 2010-05-10 00:06:34.000000000 -0300 |
193 |
+@@ -297,3 +297,7 @@ |
194 |
+ function_end_breakpoint_end: |
195 |
+ |
196 |
+ |
197 |
++ |
198 |
++#if defined(__linux__) && defined(__ELF__) |
199 |
++.section .note.GNU-stack,"",%progbits |
200 |
++#endif |
201 |
+diff -Naur work.old/src/lisp/amd64-assem.S work/src/lisp/amd64-assem.S |
202 |
+--- work.old/src/lisp/amd64-assem.S 2004-07-27 19:03:53.000000000 -0300 |
203 |
++++ work/src/lisp/amd64-assem.S 2010-05-10 00:06:34.000000000 -0300 |
204 |
+@@ -1051,3 +1051,7 @@ |
205 |
+ .end |
206 |
+ |
207 |
+ #endif /* LINKAGE_TABLE */ |
208 |
++ |
209 |
++#if defined(__linux__) && defined(__ELF__) |
210 |
++.section .note.GNU-stack,"",%progbits |
211 |
++#endif |
212 |
+diff -Naur work.old/src/lisp/backtrace.c work/src/lisp/backtrace.c |
213 |
+--- work.old/src/lisp/backtrace.c 2009-06-11 13:04:01.000000000 -0300 |
214 |
++++ work/src/lisp/backtrace.c 2010-05-10 00:06:22.000000000 -0300 |
215 |
+@@ -3,6 +3,8 @@ |
216 |
+ * Simple backtrace facility. More or less from Rob's lisp version. |
217 |
+ */ |
218 |
+ |
219 |
++#include "os-common.h" |
220 |
++ |
221 |
+ #include <stdio.h> |
222 |
+ #include <signal.h> |
223 |
+ #include "lisp.h" |
224 |
+diff -Naur work.old/src/lisp/hppa-assem.S work/src/lisp/hppa-assem.S |
225 |
+--- work.old/src/lisp/hppa-assem.S 2002-08-23 14:05:35.000000000 -0300 |
226 |
++++ work/src/lisp/hppa-assem.S 2010-05-10 00:06:34.000000000 -0300 |
227 |
+@@ -460,3 +460,7 @@ |
228 |
+ |
229 |
+ .export function_end_breakpoint_end |
230 |
+ function_end_breakpoint_end |
231 |
++ |
232 |
++#if defined(__linux__) && defined(__ELF__) |
233 |
++.section .note.GNU-stack,"",%progbits |
234 |
++#endif |
235 |
+diff -Naur work.old/src/lisp/linux-stubs.S work/src/lisp/linux-stubs.S |
236 |
+--- work.old/src/lisp/linux-stubs.S 2005-08-17 00:40:16.000000000 -0300 |
237 |
++++ work/src/lisp/linux-stubs.S 2010-05-10 00:06:34.000000000 -0300 |
238 |
+@@ -995,3 +995,7 @@ |
239 |
+ /* doe(yperr_string) */ |
240 |
+ /* doe(ypprot_err) */ |
241 |
+ #endif /* defined(LINKAGE_TABLE) && !defined(__FreeBSD__) */ |
242 |
++ |
243 |
++#if defined(__linux__) && defined(__ELF__) |
244 |
++.section .note.GNU-stack,"",%progbits |
245 |
++#endif |
246 |
+diff -Naur work.old/src/lisp/lisp.c work/src/lisp/lisp.c |
247 |
+--- work.old/src/lisp/lisp.c 2009-07-13 16:41:54.000000000 -0300 |
248 |
++++ work/src/lisp/lisp.c 2010-05-10 00:05:55.000000000 -0300 |
249 |
+@@ -5,6 +5,9 @@ |
250 |
+ * |
251 |
+ */ |
252 |
+ |
253 |
++#include "os-common.h" |
254 |
++#include <time.h> |
255 |
++ |
256 |
+ #include <stdio.h> |
257 |
+ #include <stdlib.h> |
258 |
+ #include <limits.h> |
259 |
+diff -Naur work.old/src/lisp/mips-assem.S work/src/lisp/mips-assem.S |
260 |
+--- work.old/src/lisp/mips-assem.S 2002-08-23 14:01:02.000000000 -0300 |
261 |
++++ work/src/lisp/mips-assem.S 2010-05-10 00:06:34.000000000 -0300 |
262 |
+@@ -402,3 +402,7 @@ |
263 |
+ move v0, a1 |
264 |
+ j _restore_state |
265 |
+ .end save_state |
266 |
++ |
267 |
++#if defined(__linux__) && defined(__ELF__) |
268 |
++.section .note.GNU-stack,"",%progbits |
269 |
++#endif |
270 |
+diff -Naur work.old/src/lisp/os-common.h work/src/lisp/os-common.h |
271 |
+--- work.old/src/lisp/os-common.h 1969-12-31 21:00:00.000000000 -0300 |
272 |
++++ work/src/lisp/os-common.h 2010-05-10 00:06:22.000000000 -0300 |
273 |
+@@ -0,0 +1 @@ |
274 |
++char* convert_lisp_string(char *c_string, void *lisp_string, int len); |
275 |
+diff -Naur work.old/src/lisp/ppc-assem.S work/src/lisp/ppc-assem.S |
276 |
+--- work.old/src/lisp/ppc-assem.S 2006-02-25 01:35:58.000000000 -0300 |
277 |
++++ work/src/lisp/ppc-assem.S 2010-05-10 00:06:34.000000000 -0300 |
278 |
+@@ -721,3 +721,7 @@ |
279 |
+ SET_SIZE(fpu_restore) |
280 |
+ |
281 |
+ #endif |
282 |
++ |
283 |
++#if defined(__linux__) && defined(__ELF__) |
284 |
++.section .note.GNU-stack,"",%progbits |
285 |
++#endif |
286 |
+diff -Naur work.old/src/lisp/sparc-assem.S work/src/lisp/sparc-assem.S |
287 |
+--- work.old/src/lisp/sparc-assem.S 2003-10-23 23:57:00.000000000 -0300 |
288 |
++++ work/src/lisp/sparc-assem.S 2010-05-10 00:06:34.000000000 -0300 |
289 |
+@@ -837,3 +837,7 @@ |
290 |
+ * End: |
291 |
+ */ |
292 |
+ |
293 |
++ |
294 |
++#if defined(__linux__) && defined(__ELF__) |
295 |
++.section .note.GNU-stack,"",%progbits |
296 |
++#endif |
297 |
+diff -Naur work.old/src/lisp/x86-assem.S work/src/lisp/x86-assem.S |
298 |
+--- work.old/src/lisp/x86-assem.S 2008-12-24 02:36:40.000000000 -0200 |
299 |
++++ work/src/lisp/x86-assem.S 2010-05-10 00:06:34.000000000 -0300 |
300 |
+@@ -798,3 +798,7 @@ |
301 |
+ ENDFUNC(undefined_foreign_symbol_trap) |
302 |
+ |
303 |
+ #endif /* LINKAGE_TABLE */ |
304 |
++ |
305 |
++#if defined(__linux__) && defined(__ELF__) |
306 |
++.section .note.GNU-stack,"",%progbits |
307 |
++#endif |