Gentoo Archives: gentoo-commits

From: "José María Alonso" <nimiux@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/lisp:master commit in: dev-lisp/sbcl/
Date: Sat, 29 Apr 2017 16:16:50
Message-Id: 1493482596.4361e41163388ef8934d7e737658a598f1ec44a3.nimiux@gentoo
1 commit: 4361e41163388ef8934d7e737658a598f1ec44a3
2 Author: Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 29 16:16:36 2017 +0000
4 Commit: José María Alonso <nimiux <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 29 16:16:36 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/lisp.git/commit/?id=4361e411
7
8 dev-lisp/sbcl: Bumps version to 1.3.17
9
10 dev-lisp/sbcl/sbcl-1.3.17.ebuild | 234 +++++++++++++++++++++++++++++++++++++++
11 1 file changed, 234 insertions(+)
12
13 diff --git a/dev-lisp/sbcl/sbcl-1.3.17.ebuild b/dev-lisp/sbcl/sbcl-1.3.17.ebuild
14 new file mode 100644
15 index 00000000..7ba0df37
16 --- /dev/null
17 +++ b/dev-lisp/sbcl/sbcl-1.3.17.ebuild
18 @@ -0,0 +1,234 @@
19 +# Copyright 1999-2017 Gentoo Foundation
20 +# Distributed under the terms of the GNU General Public License v2
21 +
22 +EAPI=6
23 +
24 +inherit multilib eutils flag-o-matic pax-utils
25 +
26 +#same order as http://www.sbcl.org/platform-table.html
27 +BV_X86=1.2.7
28 +BV_AMD64=1.3.17
29 +BV_PPC=1.2.7
30 +BV_SPARC=1.0.28
31 +BV_ALPHA=1.0.28
32 +BV_ARM=1.3.12
33 +BV_ARM64=1.3.16
34 +BV_PPC_MACOS=1.0.47
35 +BV_X86_MACOS=1.1.6
36 +BV_X64_MACOS=1.2.11
37 +BV_SPARC_SOLARIS=1.0.23
38 +BV_X86_SOLARIS=1.2.7
39 +BV_X64_SOLARIS=1.2.7
40 +
41 +DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
42 +HOMEPAGE="http://sbcl.sourceforge.net/"
43 +SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
44 + x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
45 + amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
46 + ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
47 + sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
48 + alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )
49 + arm? ( mirror://sourceforge/sbcl/${PN}-${BV_ARM}-armhf-linux-binary.tar.bz2 )
50 + ppc-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC_MACOS}-powerpc-darwin-binary.tar.bz2 )
51 + x86-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_MACOS}-x86-darwin-binary.tar.bz2 )
52 + x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
53 + sparc-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC_SOLARIS}-sparc-solaris-binary.tar.bz2 )
54 + x86-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X86_SOLARIS}-x86-solaris-binary.tar.bz2 )
55 + x64-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_SOLARIS}-x86-64-solaris-binary.tar.bz2 )"
56 +
57 +LICENSE="MIT"
58 +SLOT="0/${PV}"
59 +KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris"
60 +IUSE="debug doc source +threads +unicode pax_kernel zlib"
61 +
62 +CDEPEND=">=dev-lisp/asdf-3.1:="
63 +DEPEND="${CDEPEND}
64 + doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )
65 + pax_kernel? ( sys-apps/elfix )"
66 +RDEPEND="${CDEPEND}
67 + !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.6 ) )"
68 +
69 +# Disable warnings about executable stacks, as this won't be fixed soon by upstream
70 +QA_EXECSTACK="usr/bin/sbcl"
71 +
72 +CONFIG="${S}/customize-target-features.lisp"
73 +ENVD="${T}/50sbcl"
74 +
75 +# Prevent ASDF from using the system libraries
76 +CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)"
77 +ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)"
78 +
79 +usep() {
80 + use ${1} && echo "true" || echo "false"
81 +}
82 +
83 +sbcl_feature() {
84 + echo "$( [[ ${1} == "true" ]] && echo "(enable ${2})" || echo "(disable ${2})")" >> "${CONFIG}"
85 +}
86 +
87 +sbcl_apply_features() {
88 + sed 's/^X//' > "${CONFIG}" <<-'EOF'
89 + (lambda (list)
90 + X (flet ((enable (x) (pushnew x list))
91 + X (disable (x) (setf list (remove x list))))
92 + EOF
93 + if use x86 || use amd64; then
94 + sbcl_feature "$(usep threads)" ":sb-thread"
95 + fi
96 + sbcl_feature "true" ":sb-ldb"
97 + sbcl_feature "false" ":sb-test"
98 + sbcl_feature "$(usep unicode)" ":sb-unicode"
99 + sbcl_feature "$(usep zlib)" ":sb-core-compression"
100 + sbcl_feature "$(usep debug)" ":sb-xref-for-internals"
101 + sed 's/^X//' >> "${CONFIG}" <<-'EOF'
102 + X )
103 + X list)
104 + EOF
105 + cat "${CONFIG}"
106 +}
107 +
108 +src_unpack() {
109 + unpack ${A}
110 + mv sbcl-*-* sbcl-binary || die
111 + cd "${S}"
112 +}
113 +
114 +src_prepare() {
115 + # bug #468482
116 + eapply "${FILESDIR}"/concurrency-test-1.3.15.patch
117 + # bugs #486552, #527666, #517004
118 + eapply "${FILESDIR}"/bsd-sockets-test-1.3.12.patch
119 + # bugs #560276, #561018
120 + eapply "${FILESDIR}"/sb-posix-test-1.2.15.patch
121 +
122 + eapply "${FILESDIR}"/${PN}-1.2.11-solaris.patch
123 + eapply "${FILESDIR}"/${PN}-1.2.13-verbose-build.patch
124 +
125 + eapply_user
126 +
127 + # bug #526194
128 + sed -e "s@CFLAGS =.*\$@CFLAGS = ${CFLAGS} -g -Wall -Wsign-compare@" \
129 + -e "s@LINKFLAGS =.*\$@LINKFLAGS = ${LDFLAGS} -g@" \
130 + -i src/runtime/GNUmakefile || die
131 +
132 + sed -e "s@SBCL_PREFIX=\"/usr/local\"@SBCL_PREFIX=\"${EPREFIX}/usr\"@" \
133 + -i make-config.sh || die
134 +
135 + cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
136 +
137 + use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
138 +
139 + # Some shells(such as dash) don't have "time" as builtin
140 + # and we don't want to DEPEND on sys-process/time
141 + sed "s,^time ,," -i make.sh || die
142 + sed "s,/lib,/$(get_libdir),g" -i install.sh || die
143 + # #define SBCL_HOME ...
144 + sed "s,/usr/local/lib,${EPREFIX}/usr/$(get_libdir),g" -i src/runtime/runtime.c || die
145 + # change location of /etc/sbclrc ...
146 + sed "s,/etc/sbclrc,${EPREFIX}/etc/sbclrc,g" -i src/code/toplevel.lisp || die
147 +
148 + find . -type f -name .cvsignore -delete
149 +}
150 +
151 +src_configure() {
152 + # customizing SBCL version as per
153 + # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
154 + echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
155 +
156 + # applying customizations
157 + sbcl_apply_features
158 +}
159 +
160 +src_compile() {
161 + local bindir="${WORKDIR}"/sbcl-binary
162 +
163 + strip-unsupported-flags ; filter-flags -fomit-frame-pointer
164 +
165 + if use pax_kernel ; then
166 + # To disable PaX on hardened systems
167 + pax-mark -mr "${bindir}"/src/runtime/sbcl
168 +
169 + # Hack to disable PaX on second GENESIS stage
170 + sed -i -e '/^[ \t]*echo \/\/doing warm init - compilation phase$/a\ paxmark.sh -mr \.\/src\/runtime\/sbcl' \
171 + "${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime"
172 + fi
173 +
174 + # clear the environment to get rid of non-ASCII strings, see bug 174702
175 + # set HOME for paludis
176 + env - HOME="${T}" PATH="${PATH}" \
177 + CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
178 + CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
179 + GNUMAKE=make ./make.sh \
180 + "sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
181 + || die "make failed"
182 +
183 + # need to set HOME because libpango(used by graphviz) complains about it
184 + if use doc; then
185 + env - HOME="${T}" PATH="${PATH}" \
186 + CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
187 + ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
188 + make -C doc/manual info html || die "Cannot build manual"
189 + env - HOME="${T}" PATH="${PATH}" \
190 + CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
191 + ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
192 + make -C doc/internals info html || die "Cannot build internal docs"
193 + fi
194 +}
195 +
196 +src_test() {
197 + ewarn "Unfortunately, it is known that some tests fail eg."
198 + ewarn "run-program.impure.lisp. This is an issue of the upstream's"
199 + ewarn "development and not of Gentoo's side. Please, before filing"
200 + ewarn "any bug(s) search for older submissions. Thank you."
201 + time ( cd tests && sh run-tests.sh )
202 +}
203 +
204 +src_install() {
205 + # install system-wide initfile
206 + dodir /etc/
207 + sed 's/^X//' > "${ED}"/etc/sbclrc <<-EOF
208 + ;;; The following is required if you want source location functions to
209 + ;;; work in SLIME, for example.
210 + X
211 + (setf (logical-pathname-translations "SYS")
212 + X '(("SYS:SRC;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/src/**/*.*")
213 + X ("SYS:CONTRIB;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/**/*.*")))
214 + X
215 + ;;; Setup ASDF2
216 + (load "${EPREFIX}/etc/common-lisp/gentoo-init.lisp")
217 + EOF
218 +
219 + # Install documentation
220 + unset SBCL_HOME
221 + INSTALL_ROOT="${ED}/usr" LIB_DIR="${EPREFIX}/usr/$(get_libdir)" DOC_DIR="${ED}/usr/share/doc/${PF}" \
222 + sh install.sh || die "install.sh failed"
223 +
224 + # bug #517008
225 + pax-mark -mr "${D}"/usr/bin/sbcl
226 +
227 + # rm empty directories lest paludis complain about this
228 + find "${ED}" -empty -type d -exec rmdir -v {} +
229 +
230 + if use doc; then
231 + dodoc -r doc/internals/sbcl-internals
232 +
233 + doinfo doc/manual/*.info*
234 + doinfo doc/internals/sbcl-internals.info
235 +
236 + docinto internals-notes
237 + dodoc doc/internals-notes/*
238 + else
239 + rm -Rv "${ED}/usr/share/doc/${PF}" || die
240 + fi
241 +
242 + # install the SBCL source
243 + if use source; then
244 + ./clean.sh
245 + cp -av src "${ED}/usr/$(get_libdir)/sbcl/" || die
246 + fi
247 +
248 + # necessary for running newly-saved images
249 + echo "SBCL_HOME=${EPREFIX}/usr/$(get_libdir)/${PN}" > "${ENVD}"
250 + echo "SBCL_SOURCE_ROOT=${EPREFIX}/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
251 + doenvd "${ENVD}"
252 +}