1 |
commit: e0ddf5996f6305d30cb8535637ee97f313ea6428 |
2 |
Author: Stelian Ionescu <sionescu <AT> cddr <DOT> org> |
3 |
AuthorDate: Tue Jan 31 21:13:31 2012 +0000 |
4 |
Commit: Stelian Ionescu <sionescu <AT> cddr <DOT> org> |
5 |
CommitDate: Tue Jan 31 21:13:31 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/lisp.git;a=commit;h=e0ddf599 |
7 |
|
8 |
dev-lisp/cmucl: bump to version 20c |
9 |
|
10 |
--- |
11 |
dev-lisp/cmucl/cmucl-20c.ebuild | 77 +++++++++++++ |
12 |
...20c-customize-lisp-implementation-version.patch | 16 +++ |
13 |
dev-lisp/cmucl/files/20c-execstack-fixes.patch | 118 ++++++++++++++++++++ |
14 |
3 files changed, 211 insertions(+), 0 deletions(-) |
15 |
|
16 |
diff --git a/dev-lisp/cmucl/cmucl-20c.ebuild b/dev-lisp/cmucl/cmucl-20c.ebuild |
17 |
new file mode 100644 |
18 |
index 0000000..84f5de6 |
19 |
--- /dev/null |
20 |
+++ b/dev-lisp/cmucl/cmucl-20c.ebuild |
21 |
@@ -0,0 +1,77 @@ |
22 |
+# Copyright 1999-2012 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+# $Header: $ |
25 |
+ |
26 |
+EAPI=3 |
27 |
+inherit eutils glo-utils toolchain-funcs |
28 |
+ |
29 |
+MY_PV=${PV:0:3} |
30 |
+ |
31 |
+DESCRIPTION="CMU Common Lisp is an implementation of ANSI Common Lisp" |
32 |
+HOMEPAGE="http://www.cons.org/cmucl/" |
33 |
+SRC_URI="http://common-lisp.net/project/cmucl/downloads/release/${MY_PV}/cmucl-src-${MY_PV}.tar.bz2 |
34 |
+ http://common-lisp.net/project/cmucl/downloads/release/${MY_PV}/cmucl-${MY_PV}-x86-linux.tar.bz2" |
35 |
+RESTRICT="mirror" |
36 |
+ |
37 |
+LICENSE="public-domain" |
38 |
+SLOT="0" |
39 |
+KEYWORDS="~x86" |
40 |
+IUSE="+asdf X source sse2" |
41 |
+ |
42 |
+DEPEND="x11-libs/openmotif |
43 |
+ sys-devel/bc" |
44 |
+ |
45 |
+RDEPEND="x11-libs/openmotif |
46 |
+ asdf? ( >=dev-lisp/gentoo-init-1.0 )" |
47 |
+ |
48 |
+S="${WORKDIR}" |
49 |
+ |
50 |
+src_prepare() { |
51 |
+ epatch "${FILESDIR}"/${MY_PV}-execstack-fixes.patch |
52 |
+ epatch "${FILESDIR}"/${MY_PV}-customize-lisp-implementation-version.patch |
53 |
+} |
54 |
+ |
55 |
+src_compile() { |
56 |
+ local cmufpu=$(glo_usev sse2 sse2 x87) |
57 |
+ local cmuopts="$(glo_usev !X -u) -f ${cmufpu}" |
58 |
+ local buildimage="bin/lisp -core lib/cmucl/lib/lisp-${cmufpu}.core -noinit -nositeinit -batch" |
59 |
+ env CC="$(tc-getCC)" src/tools/build.sh -v "-gentoo-${PR}" -C "" -o "${buildimage}" ${cmuopts} || die "Cannot build the compiler" |
60 |
+} |
61 |
+ |
62 |
+src_install() { |
63 |
+ env MANDIR=share/man/man1 DOCDIR=share/doc/${PF} \ |
64 |
+ src/tools/make-dist.sh -S -g -G root -O root build-4 ${MY_PV} x86 linux \ |
65 |
+ || die "Cannot build installation archive" |
66 |
+ # Necessary otherwise tar will fail |
67 |
+ dodir /usr |
68 |
+ pushd "${D}"/usr |
69 |
+ tar xzpf "${WORKDIR}"/cmucl-${MY_PV}-x86-linux.tar.gz \ |
70 |
+ || die "Cannot install main system" |
71 |
+ if use X ; then |
72 |
+ tar xzpf "${WORKDIR}"/cmucl-${MY_PV}-x86-linux.extra.tar.gz \ |
73 |
+ || die "Cannot install extra files" |
74 |
+ fi |
75 |
+ if use source; then |
76 |
+ # Necessary otherwise tar will fail |
77 |
+ dodir /usr/share/common-lisp/source/${PN} |
78 |
+ cd "${D}"/usr/share/common-lisp/source/${PN} |
79 |
+ tar --strip-components 1 -xzpf "${WORKDIR}"/cmucl-src-${MY_PV}.tar.gz \ |
80 |
+ || die "Cannot install sources" |
81 |
+ fi |
82 |
+ popd |
83 |
+ |
84 |
+ # Install site config file |
85 |
+ sed "s,@PF@,${PF},g ; s,@VERSION@,$(date +%F),g" \ |
86 |
+ < "${FILESDIR}"/site-init.lisp.in \ |
87 |
+ > "${D}"/usr/$(get_libdir)/cmucl/site-init.lisp \ |
88 |
+ || die "Cannot fix site-init.lisp" |
89 |
+ cp "${FILESDIR}"/cmuclrc . |
90 |
+ if use asdf; then |
91 |
+ cat >> cmuclrc <<EOF |
92 |
+;;; Setup ASDF2 |
93 |
+(load "/etc/common-lisp/gentoo-init.lisp") |
94 |
+EOF |
95 |
+ fi |
96 |
+ insinto /etc/common-lisp |
97 |
+ doins cmuclrc || die "Failed to install cmuclrc" |
98 |
+} |
99 |
|
100 |
diff --git a/dev-lisp/cmucl/files/20c-customize-lisp-implementation-version.patch b/dev-lisp/cmucl/files/20c-customize-lisp-implementation-version.patch |
101 |
new file mode 100644 |
102 |
index 0000000..8fc9278 |
103 |
--- /dev/null |
104 |
+++ b/dev-lisp/cmucl/files/20c-customize-lisp-implementation-version.patch |
105 |
@@ -0,0 +1,16 @@ |
106 |
+diff -ur cmucl.orig/src/code/misc.lisp cmucl/src/code/misc.lisp |
107 |
+--- cmucl.orig/src/code/misc.lisp 2011-10-25 05:31:39.000000000 +0200 |
108 |
++++ cmucl/src/code/misc.lisp 2012-01-31 21:46:49.441273068 +0100 |
109 |
+@@ -187,8 +187,10 @@ |
110 |
+ |
111 |
+ (defun lisp-implementation-version () |
112 |
+ "Returns a string describing the implementation version." |
113 |
+- (format nil "~A (~X~A)" *lisp-implementation-version* c:byte-fasl-file-version |
114 |
+- #+unicode _" Unicode" #-unicode "")) |
115 |
++ (format nil "~X~A~A" |
116 |
++ c:byte-fasl-file-version |
117 |
++ #+unicode "-unicode" #-unicode "" |
118 |
++ *lisp-implementation-version*)) |
119 |
+ |
120 |
+ (defun machine-instance () |
121 |
+ "Returns a string giving the name of the local machine." |
122 |
|
123 |
diff --git a/dev-lisp/cmucl/files/20c-execstack-fixes.patch b/dev-lisp/cmucl/files/20c-execstack-fixes.patch |
124 |
new file mode 100644 |
125 |
index 0000000..034848d |
126 |
--- /dev/null |
127 |
+++ b/dev-lisp/cmucl/files/20c-execstack-fixes.patch |
128 |
@@ -0,0 +1,118 @@ |
129 |
+diff -Naur work.old/src/lisp/alpha-assem.S work/src/lisp/alpha-assem.S |
130 |
+--- work.old/src/lisp/alpha-assem.S 2003-03-06 11:13:09.000000000 -0300 |
131 |
++++ work/src/lisp/alpha-assem.S 2010-05-10 00:06:34.000000000 -0300 |
132 |
+@@ -297,3 +297,7 @@ |
133 |
+ function_end_breakpoint_end: |
134 |
+ |
135 |
+ |
136 |
++ |
137 |
++#if defined(__linux__) && defined(__ELF__) |
138 |
++.section .note.GNU-stack,"",%progbits |
139 |
++#endif |
140 |
+diff -Naur work.old/src/lisp/amd64-assem.S work/src/lisp/amd64-assem.S |
141 |
+--- work.old/src/lisp/amd64-assem.S 2004-07-27 19:03:53.000000000 -0300 |
142 |
++++ work/src/lisp/amd64-assem.S 2010-05-10 00:06:34.000000000 -0300 |
143 |
+@@ -1051,3 +1051,7 @@ |
144 |
+ .end |
145 |
+ |
146 |
+ #endif /* LINKAGE_TABLE */ |
147 |
++ |
148 |
++#if defined(__linux__) && defined(__ELF__) |
149 |
++.section .note.GNU-stack,"",%progbits |
150 |
++#endif |
151 |
+diff -Naur work.old/src/lisp/backtrace.c work/src/lisp/backtrace.c |
152 |
+--- work.old/src/lisp/backtrace.c 2009-06-11 13:04:01.000000000 -0300 |
153 |
++++ work/src/lisp/backtrace.c 2010-05-10 00:06:22.000000000 -0300 |
154 |
+@@ -3,6 +3,8 @@ |
155 |
+ * Simple backtrace facility. More or less from Rob's lisp version. |
156 |
+ */ |
157 |
+ |
158 |
++#include "os-common.h" |
159 |
++ |
160 |
+ #include <stdio.h> |
161 |
+ #include <signal.h> |
162 |
+ #include "lisp.h" |
163 |
+diff -Naur work.old/src/lisp/hppa-assem.S work/src/lisp/hppa-assem.S |
164 |
+--- work.old/src/lisp/hppa-assem.S 2002-08-23 14:05:35.000000000 -0300 |
165 |
++++ work/src/lisp/hppa-assem.S 2010-05-10 00:06:34.000000000 -0300 |
166 |
+@@ -460,3 +460,7 @@ |
167 |
+ |
168 |
+ .export function_end_breakpoint_end |
169 |
+ function_end_breakpoint_end |
170 |
++ |
171 |
++#if defined(__linux__) && defined(__ELF__) |
172 |
++.section .note.GNU-stack,"",%progbits |
173 |
++#endif |
174 |
+diff -Naur work.old/src/lisp/linux-stubs.S work/src/lisp/linux-stubs.S |
175 |
+--- work.old/src/lisp/linux-stubs.S 2005-08-17 00:40:16.000000000 -0300 |
176 |
++++ work/src/lisp/linux-stubs.S 2010-05-10 00:06:34.000000000 -0300 |
177 |
+@@ -995,3 +995,7 @@ |
178 |
+ /* doe(yperr_string) */ |
179 |
+ /* doe(ypprot_err) */ |
180 |
+ #endif /* defined(LINKAGE_TABLE) && !defined(__FreeBSD__) */ |
181 |
++ |
182 |
++#if defined(__linux__) && defined(__ELF__) |
183 |
++.section .note.GNU-stack,"",%progbits |
184 |
++#endif |
185 |
+diff -Naur work.old/src/lisp/lisp.c work/src/lisp/lisp.c |
186 |
+--- work.old/src/lisp/lisp.c 2009-07-13 16:41:54.000000000 -0300 |
187 |
++++ work/src/lisp/lisp.c 2010-05-10 00:05:55.000000000 -0300 |
188 |
+@@ -5,6 +5,9 @@ |
189 |
+ * |
190 |
+ */ |
191 |
+ |
192 |
++#include "os-common.h" |
193 |
++#include <time.h> |
194 |
++ |
195 |
+ #include <stdio.h> |
196 |
+ #include <stdlib.h> |
197 |
+ #include <limits.h> |
198 |
+diff -Naur work.old/src/lisp/mips-assem.S work/src/lisp/mips-assem.S |
199 |
+--- work.old/src/lisp/mips-assem.S 2002-08-23 14:01:02.000000000 -0300 |
200 |
++++ work/src/lisp/mips-assem.S 2010-05-10 00:06:34.000000000 -0300 |
201 |
+@@ -402,3 +402,7 @@ |
202 |
+ move v0, a1 |
203 |
+ j _restore_state |
204 |
+ .end save_state |
205 |
++ |
206 |
++#if defined(__linux__) && defined(__ELF__) |
207 |
++.section .note.GNU-stack,"",%progbits |
208 |
++#endif |
209 |
+diff -Naur work.old/src/lisp/os-common.h work/src/lisp/os-common.h |
210 |
+--- work.old/src/lisp/os-common.h 1969-12-31 21:00:00.000000000 -0300 |
211 |
++++ work/src/lisp/os-common.h 2010-05-10 00:06:22.000000000 -0300 |
212 |
+@@ -0,0 +1 @@ |
213 |
++char* convert_lisp_string(char *c_string, void *lisp_string, int len); |
214 |
+diff -Naur work.old/src/lisp/ppc-assem.S work/src/lisp/ppc-assem.S |
215 |
+--- work.old/src/lisp/ppc-assem.S 2006-02-25 01:35:58.000000000 -0300 |
216 |
++++ work/src/lisp/ppc-assem.S 2010-05-10 00:06:34.000000000 -0300 |
217 |
+@@ -721,3 +721,7 @@ |
218 |
+ SET_SIZE(fpu_restore) |
219 |
+ |
220 |
+ #endif |
221 |
++ |
222 |
++#if defined(__linux__) && defined(__ELF__) |
223 |
++.section .note.GNU-stack,"",%progbits |
224 |
++#endif |
225 |
+diff -Naur work.old/src/lisp/sparc-assem.S work/src/lisp/sparc-assem.S |
226 |
+--- work.old/src/lisp/sparc-assem.S 2003-10-23 23:57:00.000000000 -0300 |
227 |
++++ work/src/lisp/sparc-assem.S 2010-05-10 00:06:34.000000000 -0300 |
228 |
+@@ -837,3 +837,7 @@ |
229 |
+ * End: |
230 |
+ */ |
231 |
+ |
232 |
++ |
233 |
++#if defined(__linux__) && defined(__ELF__) |
234 |
++.section .note.GNU-stack,"",%progbits |
235 |
++#endif |
236 |
+diff -Naur work.old/src/lisp/x86-assem.S work/src/lisp/x86-assem.S |
237 |
+--- work.old/src/lisp/x86-assem.S 2008-12-24 02:36:40.000000000 -0200 |
238 |
++++ work/src/lisp/x86-assem.S 2010-05-10 00:06:34.000000000 -0300 |
239 |
+@@ -798,3 +798,7 @@ |
240 |
+ ENDFUNC(undefined_foreign_symbol_trap) |
241 |
+ |
242 |
+ #endif /* LINKAGE_TABLE */ |
243 |
++ |
244 |
++#if defined(__linux__) && defined(__ELF__) |
245 |
++.section .note.GNU-stack,"",%progbits |
246 |
++#endif |