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