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