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: Wed, 31 Jan 2018 22:01:17
Message-Id: 1517436069.ef3a725a34377f89b8613e34a3a889cb6462bceb.nimiux@gentoo
1 commit: ef3a725a34377f89b8613e34a3a889cb6462bceb
2 Author: Chema Alonso Josa <nimiux <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 31 22:01:09 2018 +0000
4 Commit: José María Alonso <nimiux <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 31 22:01:09 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/lisp.git/commit/?id=ef3a725a
7
8 dev-lisp/sbcl: BUmps version to 1.4.4
9
10 dev-lisp/sbcl/sbcl-1.4.4.ebuild | 246 ++++++++++++++++++++++++++++++++++++++++
11 1 file changed, 246 insertions(+)
12
13 diff --git a/dev-lisp/sbcl/sbcl-1.4.4.ebuild b/dev-lisp/sbcl/sbcl-1.4.4.ebuild
14 new file mode 100644
15 index 00000000..f5215d91
16 --- /dev/null
17 +++ b/dev-lisp/sbcl/sbcl-1.4.4.ebuild
18 @@ -0,0 +1,246 @@
19 +# Copyright 1999-2018 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.4.3
28 +BV_AMD64=1.4.4
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.4.2
34 +BV_X86_MACOS=1.1.6
35 +BV_X64_MACOS=1.2.11
36 +BV_PPC_MACOS=1.0.47
37 +BV_X86_SOLARIS=1.2.7
38 +BV_X64_SOLARIS=1.2.7
39 +BV_SPARC_SOLARIS=1.0.23
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 + 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 + ppc-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC_MACOS}-powerpc-darwin-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 + sparc-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC_SOLARIS}-sparc-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.4.0-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.4.0-verbose-build.patch
125 +
126 + eapply_user
127 +
128 + # Make sure the *FLAGS variables are sane.
129 + # sbcl needs symbols in resulting binaries, so building with the -s linker flag will fail.
130 + strip-unsupported-flags
131 + filter-flags -fomit-frame-pointer -Wl,-s
132 + filter-ldflags -s
133 +
134 + # original bugs #526194, #620532
135 + # this broke no-pie default builds, c.f. bug #632670
136 + # Pass CFLAGS down by appending our value, to let users override
137 + # the default values.
138 + # Keep passing LDFLAGS down via the LINKFLAGS variable.
139 + sed -e "s@\(CFLAGS += -g .*\)\$@\1 ${CFLAGS}@" \
140 + -e "s@LINKFLAGS += -g\$@LINKFLAGS += ${LDFLAGS}@" \
141 + -i src/runtime/GNUmakefile || die
142 +
143 + sed -e "s@SBCL_PREFIX=\"/usr/local\"@SBCL_PREFIX=\"${EPREFIX}/usr\"@" \
144 + -i make-config.sh || die
145 +
146 + # Use installed ASDF version
147 + cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
148 + # Avoid installation of ASDF info page. See bug #605752
149 + sed '/INFOFILES/s/asdf.info//' -i doc/manual/Makefile || die
150 +
151 + use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
152 +
153 + # Some shells(such as dash) don't have "time" as builtin
154 + # and we don't want to DEPEND on sys-process/time
155 + sed "s,^time ,," -i make.sh || die
156 + sed "s,/lib,/$(get_libdir),g" -i install.sh || die
157 + # #define SBCL_HOME ...
158 + sed "s,/usr/local/lib,${EPREFIX}/usr/$(get_libdir),g" -i src/runtime/runtime.c || die
159 + # change location of /etc/sbclrc ...
160 + sed "s,/etc/sbclrc,${EPREFIX}/etc/sbclrc,g" -i src/code/toplevel.lisp || die
161 +
162 + find . -type f -name .cvsignore -delete
163 +}
164 +
165 +src_configure() {
166 + # customizing SBCL version as per
167 + # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
168 + echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
169 +
170 + # applying customizations
171 + sbcl_apply_features
172 +}
173 +
174 +src_compile() {
175 + local bindir="${WORKDIR}"/sbcl-binary
176 +
177 + if use pax_kernel ; then
178 + # To disable PaX on hardened systems
179 + pax-mark -mr "${bindir}"/src/runtime/sbcl
180 +
181 + # Hack to disable PaX on second GENESIS stage
182 + sed -i -e '/^[ \t]*echo \/\/doing warm init - compilation phase$/a\ paxmark.sh -mr \.\/src\/runtime\/sbcl' \
183 + "${S}"/make-target-2.sh || die "Cannot disable PaX on second GENESIS runtime"
184 + fi
185 +
186 + # clear the environment to get rid of non-ASCII strings, see bug #174702
187 + # set HOME for paludis
188 + env - HOME="${T}" PATH="${PATH}" \
189 + CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
190 + CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
191 + GNUMAKE=make ./make.sh \
192 + "sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
193 + || die "make failed"
194 +
195 + # need to set HOME because libpango(used by graphviz) complains about it
196 + if use doc; then
197 + env - HOME="${T}" PATH="${PATH}" \
198 + CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
199 + ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
200 + make -C doc/manual info html || die "Cannot build manual"
201 + env - HOME="${T}" PATH="${PATH}" \
202 + CL_SOURCE_REGISTRY="(:source-registry :ignore-inherited-configuration)" \
203 + ASDF_OUTPUT_TRANSLATIONS="(:output-translations :ignore-inherited-configuration)" \
204 + make -C doc/internals info html || die "Cannot build internal docs"
205 + fi
206 +}
207 +
208 +src_test() {
209 + ewarn "Unfortunately, it is known that some tests fail eg."
210 + ewarn "run-program.impure.lisp. This is an issue of the upstream's"
211 + ewarn "development and not of Gentoo's side. Please, before filing"
212 + ewarn "any bug(s) search for older submissions. Thank you."
213 + time ( cd tests && sh run-tests.sh )
214 +}
215 +
216 +src_install() {
217 + # install system-wide initfile
218 + dodir /etc/
219 + sed 's/^X//' > "${ED}"/etc/sbclrc <<-EOF
220 + ;;; The following is required if you want source location functions to
221 + ;;; work in SLIME, for example.
222 + X
223 + (setf (logical-pathname-translations "SYS")
224 + X '(("SYS:SRC;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/src/**/*.*")
225 + X ("SYS:CONTRIB;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/**/*.*")))
226 + X
227 + ;;; Setup ASDF2
228 + (load "${EPREFIX}/etc/common-lisp/gentoo-init.lisp")
229 + EOF
230 +
231 + # Install documentation
232 + unset SBCL_HOME
233 + INSTALL_ROOT="${ED}/usr" LIB_DIR="${EPREFIX}/usr/$(get_libdir)" DOC_DIR="${ED}/usr/share/doc/${PF}" \
234 + sh install.sh || die "install.sh failed"
235 +
236 + # bug #517008
237 + pax-mark -mr "${D}"/usr/bin/sbcl
238 +
239 + # rm empty directories lest paludis complain about this
240 + find "${ED}" -empty -type d -exec rmdir -v {} +
241 +
242 + if use doc; then
243 + dodoc -r doc/internals/sbcl-internals
244 +
245 + doinfo doc/manual/*.info*
246 + doinfo doc/internals/sbcl-internals.info
247 +
248 + docinto internals-notes
249 + dodoc doc/internals-notes/*
250 + else
251 + rm -Rv "${ED}/usr/share/doc/${PF}" || die
252 + fi
253 +
254 + # install the SBCL source
255 + if use source; then
256 + ./clean.sh
257 + cp -av src "${ED}/usr/$(get_libdir)/sbcl/" || die
258 + fi
259 +
260 + # necessary for running newly-saved images
261 + echo "SBCL_HOME=${EPREFIX}/usr/$(get_libdir)/${PN}" > "${ENVD}"
262 + echo "SBCL_SOURCE_ROOT=${EPREFIX}/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
263 + doenvd "${ENVD}"
264 +}