Gentoo Archives: gentoo-commits

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