1 |
commit: d070bae157154fab4a035fc7d9d069ee60c10ee0 |
2 |
Author: Stelian Ionescu <sionescu <AT> cddr <DOT> org> |
3 |
AuthorDate: Mon Apr 29 23:41:36 2013 +0000 |
4 |
Commit: Stelian Ionescu <sionescu <AT> cddr <DOT> org> |
5 |
CommitDate: Mon Apr 29 23:41:43 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/lisp.git;a=commit;h=d070bae1 |
7 |
|
8 |
dev-lisp/sbcl: bump to version 1.1.7 |
9 |
|
10 |
--- |
11 |
dev-lisp/sbcl/sbcl-1.1.7.ebuild | 204 +++++++++++++++++++++++++++++++++++++++ |
12 |
1 files changed, 204 insertions(+), 0 deletions(-) |
13 |
|
14 |
diff --git a/dev-lisp/sbcl/sbcl-1.1.7.ebuild b/dev-lisp/sbcl/sbcl-1.1.7.ebuild |
15 |
new file mode 100644 |
16 |
index 0000000..0b7d092 |
17 |
--- /dev/null |
18 |
+++ b/dev-lisp/sbcl/sbcl-1.1.7.ebuild |
19 |
@@ -0,0 +1,204 @@ |
20 |
+# Copyright 1999-2013 Gentoo Foundation |
21 |
+# Distributed under the terms of the GNU General Public License v2 |
22 |
+# $Header: $ |
23 |
+ |
24 |
+EAPI=5 |
25 |
+inherit multilib eutils flag-o-matic pax-utils |
26 |
+ |
27 |
+#same order as http://www.sbcl.org/platform-table.html |
28 |
+BV_X86=1.0.58 |
29 |
+BV_AMD64=1.1.5 |
30 |
+BV_PPC=1.0.28 |
31 |
+BV_SPARC=1.0.28 |
32 |
+BV_ALPHA=1.0.28 |
33 |
+ |
34 |
+DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp." |
35 |
+HOMEPAGE="http://sbcl.sourceforge.net/" |
36 |
+SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2 |
37 |
+ x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 ) |
38 |
+ amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 ) |
39 |
+ ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 ) |
40 |
+ sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 ) |
41 |
+ alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )" |
42 |
+ |
43 |
+RESTRICT="mirror" |
44 |
+LICENSE="MIT" |
45 |
+SLOT="0" |
46 |
+KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
47 |
+IUSE="debug doc source +threads +unicode zlib" |
48 |
+ |
49 |
+CDEPEND=">=dev-lisp/asdf-2.33-r3:=" |
50 |
+DEPEND="${CDEPEND} |
51 |
+ doc? ( <sys-apps/texinfo-5.0 >=media-gfx/graphviz-2.26.0 )" |
52 |
+RDEPEND="${CDEPEND} |
53 |
+ elibc_glibc? ( >=sys-libs/glibc-2.3 || ( <sys-libs/glibc-2.6[nptl] >=sys-libs/glibc-2.6 ) )" |
54 |
+ |
55 |
+# Disable warnings about executable stacks, as this won't be fixed soon by upstream |
56 |
+QA_EXECSTACK="usr/bin/sbcl" |
57 |
+ |
58 |
+CONFIG="${S}/customize-target-features.lisp" |
59 |
+ENVD="${T}/50sbcl" |
60 |
+ |
61 |
+# Prevent ASDF from using the system libraries |
62 |
+CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" |
63 |
+ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" |
64 |
+ |
65 |
+usep() { |
66 |
+ use ${1} && echo "true" || echo "false" |
67 |
+} |
68 |
+ |
69 |
+sbcl_feature() { |
70 |
+ echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}" |
71 |
+} |
72 |
+ |
73 |
+sbcl_apply_features() { |
74 |
+ cat > "${CONFIG}" <<'EOF' |
75 |
+(lambda (list) |
76 |
+ (flet ((enable (x) (pushnew x list)) |
77 |
+ (disable (x) (setf list (remove x list)))) |
78 |
+EOF |
79 |
+ if use x86 || use amd64; then |
80 |
+ sbcl_feature "$(usep threads)" ":sb-thread" |
81 |
+ fi |
82 |
+ sbcl_feature "true" ":sb-ldb" |
83 |
+ sbcl_feature "false" ":sb-test" |
84 |
+ sbcl_feature "$(usep unicode)" ":sb-unicode" |
85 |
+ sbcl_feature "$(usep zlib)" ":sb-core-compression" |
86 |
+ sbcl_feature "$(usep debug)" ":sb-xref-for-internals" |
87 |
+ cat >> "${CONFIG}" <<'EOF' |
88 |
+ ) |
89 |
+ list) |
90 |
+EOF |
91 |
+ cat "${CONFIG}" |
92 |
+} |
93 |
+ |
94 |
+src_unpack() { |
95 |
+ unpack ${A} |
96 |
+ mv sbcl-*-linux sbcl-binary || die |
97 |
+ cd "${S}" |
98 |
+} |
99 |
+ |
100 |
+src_prepare() { |
101 |
+ epatch "${FILESDIR}"/gentoo-fix_install_man.patch |
102 |
+ epatch "${FILESDIR}"/gentoo-fix_linux-os-c.patch |
103 |
+ |
104 |
+ # To make the hardened compiler NOT compile with -fPIE -pie |
105 |
+ if gcc-specs-pie ; then |
106 |
+ einfo "Disabling PIE..." |
107 |
+ epatch "${FILESDIR}"/gentoo-fix_nopie_for_hardened_toolchain.patch |
108 |
+ fi |
109 |
+ |
110 |
+ cp /usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die |
111 |
+ |
112 |
+ use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk |
113 |
+ |
114 |
+ # Some shells(such as dash) don't have "time" as builtin |
115 |
+ # and we don't want to DEPEND on sys-process/time |
116 |
+ sed "s,^time ,," -i make.sh || die |
117 |
+ sed "s,/lib,/$(get_libdir),g" -i install.sh || die |
118 |
+ # #define SBCL_HOME ... |
119 |
+ sed "s,/usr/local/lib,/usr/$(get_libdir),g" -i src/runtime/runtime.c || die |
120 |
+ |
121 |
+ find . -type f -name .cvsignore -delete |
122 |
+} |
123 |
+ |
124 |
+src_configure() { |
125 |
+ # customizing SBCL version as per |
126 |
+ # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup |
127 |
+ echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr |
128 |
+ |
129 |
+ # applying customizations |
130 |
+ sbcl_apply_features |
131 |
+} |
132 |
+ |
133 |
+src_compile() { |
134 |
+ local bindir="${WORKDIR}"/sbcl-binary |
135 |
+ |
136 |
+ strip-unsupported-flags ; filter-flags -fomit-frame-pointer |
137 |
+ |
138 |
+ if host-is-pax ; then |
139 |
+ # To disable PaX on hardened systems |
140 |
+ pax-mark -C "${bindir}"/src/runtime/sbcl |
141 |
+ pax-mark -mr "${bindir}"/src/runtime/sbcl |
142 |
+ |
143 |
+ # Hack to disable PaX on second GENESIS stage |
144 |
+ sed -i -e '/load/!s/^echo \/\/doing warm.*$/&\npaxctl -C \.\/src\/runtime\/sbcl\npaxctl -mprexs \.\/src\/runtime\/sbcl/' \ |
145 |
+ "${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime" |
146 |
+ fi |
147 |
+ |
148 |
+ # clear the environment to get rid of non-ASCII strings, see bug 174702 |
149 |
+ # set HOME for paludis |
150 |
+ env - HOME="${T}" \ |
151 |
+ CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \ |
152 |
+ CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \ |
153 |
+ GNUMAKE=make ./make.sh \ |
154 |
+ "sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \ |
155 |
+ || die "make failed" |
156 |
+ |
157 |
+ # need to set HOME because libpango(used by graphviz) complains about it |
158 |
+ if use doc; then |
159 |
+ env - HOME="${T}" \ |
160 |
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \ |
161 |
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \ |
162 |
+ make -C doc/manual info html || die "Cannot build manual" |
163 |
+ env - HOME="${T}" \ |
164 |
+ CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \ |
165 |
+ ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \ |
166 |
+ make -C doc/internals info html || die "Cannot build internal docs" |
167 |
+ fi |
168 |
+} |
169 |
+ |
170 |
+src_test() { |
171 |
+ ewarn "Unfortunately, it is known that some tests fail eg." |
172 |
+ ewarn "run-program.impure.lisp. This is an issue of the upstream's" |
173 |
+ ewarn "development and not of Gentoo's side. Please, before filing" |
174 |
+ ewarn "any bug(s) search for older submissions. Thank you." |
175 |
+ time ( cd tests && sh run-tests.sh ) |
176 |
+} |
177 |
+ |
178 |
+src_install() { |
179 |
+ # install system-wide initfile |
180 |
+ dodir /etc/ |
181 |
+ cat > "${D}"/etc/sbclrc <<EOF |
182 |
+;;; The following is required if you want source location functions to |
183 |
+;;; work in SLIME, for example. |
184 |
+ |
185 |
+(setf (logical-pathname-translations "SYS") |
186 |
+ '(("SYS:SRC;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/src/**/*.*") |
187 |
+ ("SYS:CONTRIB;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/**/*.*"))) |
188 |
+ |
189 |
+;;; Setup ASDF2 |
190 |
+(load "/etc/common-lisp/gentoo-init.lisp") |
191 |
+EOF |
192 |
+ |
193 |
+ # Install documentation |
194 |
+ unset SBCL_HOME |
195 |
+ INSTALL_ROOT="${D}/usr" LIB_DIR="/usr/$(get_libdir)" DOC_DIR="${D}/usr/share/doc/${PF}" \ |
196 |
+ sh install.sh || die "install.sh failed" |
197 |
+ |
198 |
+ # rm empty directories lest paludis complain about this |
199 |
+ find "${D}" -empty -type d -exec rmdir -v {} + |
200 |
+ |
201 |
+ if use doc; then |
202 |
+ dohtml -r doc/manual/ |
203 |
+ doinfo doc/manual/*.info* |
204 |
+ dohtml -r doc/internals/sbcl-internals |
205 |
+ doinfo doc/internals/sbcl-internals.info |
206 |
+ docinto internals-notes && dodoc doc/internals-notes/* |
207 |
+ else |
208 |
+ rm -Rv "${D}/usr/share/doc/${PF}" || die |
209 |
+ fi |
210 |
+ |
211 |
+ dodoc BUGS CREDITS INSTALL NEWS OPTIMIZATIONS PRINCIPLES README TLA TODO |
212 |
+ |
213 |
+ # install the SBCL source |
214 |
+ if use source; then |
215 |
+ ./clean.sh |
216 |
+ cp -av src "${D}/usr/$(get_libdir)/sbcl/" || die |
217 |
+ fi |
218 |
+ |
219 |
+ # necessary for running newly-saved images |
220 |
+ echo "SBCL_HOME=/usr/$(get_libdir)/${PN}" > "${ENVD}" |
221 |
+ echo "SBCL_SOURCE_ROOT=/usr/$(get_libdir)/${PN}/src" >> "${ENVD}" |
222 |
+ doenvd "${ENVD}" |
223 |
+} |