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, 19 Jul 2021 03:12:11
Message-Id: 1626664314.e3af7945c205af23d4c7db7ca49a084bfc61711d.grozin@gentoo
1 commit: e3af7945c205af23d4c7db7ca49a084bfc61711d
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 19 03:11:54 2021 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 19 03:11:54 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3af7945
7
8 dev-lisp/sbcl: bump to 2.1.6
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
11 Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org>
12
13 dev-lisp/sbcl/Manifest | 2 +
14 dev-lisp/sbcl/sbcl-2.1.6.ebuild | 238 ++++++++++++++++++++++++++++++++++++++++
15 2 files changed, 240 insertions(+)
16
17 diff --git a/dev-lisp/sbcl/Manifest b/dev-lisp/sbcl/Manifest
18 index 3a5c23496df..2d81e364ae8 100644
19 --- a/dev-lisp/sbcl/Manifest
20 +++ b/dev-lisp/sbcl/Manifest
21 @@ -18,3 +18,5 @@ DIST sbcl-1.4.8-x86-64-linux-binary.tar.bz2 10353701 BLAKE2B 5b56f46fbdb87f015ed
22 DIST sbcl-1.4.9-source.tar.bz2 6051607 BLAKE2B 8abcaf73233ea1a23d47987b16554636dcf94acfbc7ab731f0730fdb4a8176593fb3ab52d9b25b3dd56753cd984f7e0eddb1585a142eb7ad1aa5e3e03d7b0ca9 SHA512 e0248f460f9737d47653dd520732062d2637813b550df356ecc90aa6d21fbdd74f03182d1e890c09c1da742f7d57b4fbd04a4e6dc36999aca51bb6c2952ac236
23 DIST sbcl-2.1.5-source.tar.bz2 6566902 BLAKE2B 3e98a3d996120baf7cbddbe595aacc07615cd8471e9bb87fc73e8cf0621988e5dd549a58425f7c569588833f9a4b1bbe43af40472fa9a287a3780e40e86536bd SHA512 5e208b3a1b3ff1a589c9ae0398e40086d979342c11fa7bb251797d0266618801b525dddb6998cebae3fc2a88547f7a71bdc43c5418f5edc2cf9bf699ed725334
24 DIST sbcl-2.1.5-x86-64-linux-binary.tar.bz2 10155269 BLAKE2B 8456fbe477d6afc4becf4ec2fadb296e40532f02ea0ad5de61891cf68384450028e85e52d44164323c1a40b5f67c591114cd1a077de305b3f1b20484310bf5a6 SHA512 cb90c2bc6bed5f5f3af9831cd520580d4e8207ee45ae3572a17cf0da21563ce8e03d1c0e22099d05b750e0f76b2a0701918c80e25e2b7a9846d8cc5169f82f7c
25 +DIST sbcl-2.1.6-source.tar.bz2 6579274 BLAKE2B bb3c915b1f3889575065d0737eaadb5a19b00748ab508d90bb30218c8ef09527ee2533271700b68fedb28030727cde86aaa7b7ed1d2e6b02cecc79b6e6ed0376 SHA512 fa8088e5275451863b9aa908c0718e03801340fc87c514caed8a67df6fd443a0cdc1eb90f90605c0de757c4be5e9e502a944c4856fea98d719f5135457ca41c7
26 +DIST sbcl-2.1.6-x86-64-linux-binary.tar.bz2 10106836 BLAKE2B d362f22402cfc183b6b8a9251e20d51672a4870bbc427e9f718bcfb02ae3e459f426b8f4bf4b568c864b56602e5d7b285ab5f1c5aece397385e17439934d23fa SHA512 3382829bfe6bd85b00eeaed04830de7e966d014dd626c7d5635c916a4fa9517f4404af4e5498cc6b4b8e00db9079e350db7cb6860c0c4a4921e99ba221f2ba6e
27
28 diff --git a/dev-lisp/sbcl/sbcl-2.1.6.ebuild b/dev-lisp/sbcl/sbcl-2.1.6.ebuild
29 new file mode 100644
30 index 00000000000..9d2f456fe5b
31 --- /dev/null
32 +++ b/dev-lisp/sbcl/sbcl-2.1.6.ebuild
33 @@ -0,0 +1,238 @@
34 +# Copyright 1999-2021 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=6
38 +
39 +inherit multilib flag-o-matic pax-utils toolchain-funcs
40 +
41 +#same order as http://www.sbcl.org/platform-table.html
42 +BV_X86=1.4.3
43 +BV_AMD64=2.1.6
44 +BV_PPC=1.2.7
45 +BV_SPARC=1.0.28
46 +BV_ALPHA=1.0.28
47 +BV_ARM=1.4.11
48 +BV_ARM64=1.4.2
49 +BV_X64_MACOS=1.2.11
50 +BV_PPC_MACOS=1.0.47
51 +BV_X86_SOLARIS=1.2.7
52 +BV_X64_SOLARIS=1.2.7
53 +BV_SPARC_SOLARIS=1.0.23
54 +
55 +DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp"
56 +HOMEPAGE="http://sbcl.sourceforge.net/"
57 +SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
58 + x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
59 + amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
60 + ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
61 + sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
62 + alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )
63 + arm? ( mirror://sourceforge/sbcl/${PN}-${BV_ARM}-armhf-linux-binary.tar.bz2 )
64 + arm64? ( mirror://sourceforge/sbcl/${PN}-${BV_ARM64}-arm64-linux-binary.tar.bz2 )
65 + x64-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_X64_MACOS}-x86-64-darwin-binary.tar.bz2 )
66 + ppc-macos? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC_MACOS}-powerpc-darwin-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 + sparc-solaris? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC_SOLARIS}-sparc-solaris-binary.tar.bz2 )"
70 +
71 +LICENSE="MIT"
72 +SLOT="0/${PV}"
73 +KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-solaris"
74 +IUSE="debug doc source +threads +unicode zlib"
75 +
76 +CDEPEND=">=dev-lisp/asdf-3.3:="
77 +DEPEND="${CDEPEND}
78 + doc? ( sys-apps/texinfo >=media-gfx/graphviz-2.26.0 )"
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 + # bug #468482
129 + eapply "${FILESDIR}"/concurrency-test-2.0.1.patch
130 + # bugs #486552, #527666, #517004
131 + eapply "${FILESDIR}"/bsd-sockets-test-2.0.5.patch
132 + # bugs #560276, #561018
133 + eapply "${FILESDIR}"/sb-posix-test-1.2.15.patch
134 + # bug #767742
135 + eapply "${FILESDIR}"/etags-2.1.0.patch
136 +
137 + eapply "${FILESDIR}"/verbose-build-2.0.3.patch
138 +
139 + eapply_user
140 +
141 + # Make sure the *FLAGS variables are sane.
142 + # sbcl needs symbols in resulting binaries, so building with the -s linker flag will fail.
143 + strip-unsupported-flags
144 + filter-flags -fomit-frame-pointer -Wl,-s
145 + filter-ldflags -s
146 +
147 + # original bugs #526194, #620532
148 + # this broke no-pie default builds, c.f. bug #632670
149 + # Pass CFLAGS down by appending our value, to let users override
150 + # the default values.
151 + # Keep passing LDFLAGS down via the LINKFLAGS variable.
152 + sed -e "s@\(CFLAGS += -g .*\)\$@\1 ${CFLAGS}@" \
153 + -e "s@LINKFLAGS += -g\$@LINKFLAGS += ${LDFLAGS}@" \
154 + -i src/runtime/GNUmakefile || die
155 +
156 + sed -e "s@SBCL_PREFIX=\"/usr/local\"@SBCL_PREFIX=\"${EPREFIX}/usr\"@" \
157 + -i make-config.sh || die
158 +
159 + # Use installed ASDF version
160 + cp "${EPREFIX}"/usr/share/common-lisp/source/asdf/build/asdf.lisp contrib/asdf/ || die
161 + # Avoid installation of ASDF info page. See bug #605752
162 + sed '/INFOFILES/s/asdf.info//' -i doc/manual/Makefile || die
163 +
164 + use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
165 +
166 + # Some shells(such as dash) don't have "time" as builtin
167 + # and we don't want to DEPEND on sys-process/time
168 + sed "s,^time ,," -i make.sh || die
169 + sed "s,/lib,/$(get_libdir),g" -i install.sh || die
170 + # #define SBCL_HOME ...
171 + sed "s,/usr/local/lib,${EPREFIX}/usr/$(get_libdir),g" -i src/runtime/runtime.c || die
172 + # change location of /etc/sbclrc ...
173 + sed "s,/etc/sbclrc,${EPREFIX}/etc/sbclrc,g" -i src/code/toplevel.lisp || die
174 +
175 + find . -type f -name .cvsignore -delete
176 +}
177 +
178 +src_configure() {
179 + # customizing SBCL version as per
180 + # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
181 + echo -e ";;; Auto-generated by Gentoo\n\"gentoo-${PR}\"" > branch-version.lisp-expr
182 +
183 + # applying customizations
184 + sbcl_apply_features
185 +}
186 +
187 +src_compile() {
188 + local bindir="${WORKDIR}"/sbcl-binary
189 +
190 + # clear the environment to get rid of non-ASCII strings, see bug #174702
191 + # set HOME for paludis
192 + env - HOME="${T}" PATH="${PATH}" \
193 + CC="$(tc-getCC)" AS="$(tc-getAS)" LD="$(tc-getLD)" \
194 + CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" ASFLAGS="${ASFLAGS}" LDFLAGS="${LDFLAGS}" \
195 + GNUMAKE=make ./make.sh \
196 + "sh ${bindir}/run-sbcl.sh --no-sysinit --no-userinit --disable-debugger" \
197 + || die "make failed"
198 +
199 + # need to set HOME because libpango(used by graphviz) complains about it
200 + if use doc; then
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/manual info html || die "Cannot build manual"
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/internals info html || die "Cannot build internal docs"
209 + fi
210 +}
211 +
212 +src_test() {
213 + ewarn "Unfortunately, it is known that some tests fail eg."
214 + ewarn "run-program.impure.lisp. This is an issue of the upstream's"
215 + ewarn "development and not of Gentoo's side. Please, before filing"
216 + ewarn "any bug(s) search for older submissions. Thank you."
217 + time ( cd tests && sh run-tests.sh )
218 +}
219 +
220 +src_install() {
221 + # install system-wide initfile
222 + dodir /etc/
223 + sed 's/^X//' > "${ED}"/etc/sbclrc <<-EOF
224 + ;;; The following is required if you want source location functions to
225 + ;;; work in SLIME, for example.
226 + X
227 + (setf (logical-pathname-translations "SYS")
228 + X '(("SYS:SRC;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/src/**/*.*")
229 + X ("SYS:CONTRIB;**;*.*.*" #p"${EPREFIX}/usr/$(get_libdir)/sbcl/**/*.*")))
230 + X
231 + ;;; Setup ASDF2
232 + (load "${EPREFIX}/etc/common-lisp/gentoo-init.lisp")
233 + EOF
234 +
235 + # Install documentation
236 + unset SBCL_HOME
237 + INSTALL_ROOT="${ED}/usr" LIB_DIR="${EPREFIX}/usr/$(get_libdir)" DOC_DIR="${ED}/usr/share/doc/${PF}" \
238 + sh install.sh || die "install.sh failed"
239 +
240 + # bug #517008
241 + pax-mark -mr "${D}"/usr/bin/sbcl
242 +
243 + # rm empty directories lest paludis complain about this
244 + find "${ED}" -empty -type d -exec rmdir -v {} +
245 +
246 + if use doc; then
247 + dodoc -r doc/internals/sbcl-internals
248 +
249 + doinfo doc/manual/*.info*
250 + doinfo doc/internals/sbcl-internals.info
251 +
252 + docinto internals-notes
253 + dodoc doc/internals-notes/*
254 + else
255 + rm -Rv "${ED}/usr/share/doc/${PF}" || die
256 + fi
257 +
258 + # install the SBCL source
259 + if use source; then
260 + ./clean.sh
261 + cp -av src "${ED}/usr/$(get_libdir)/sbcl/" || die
262 + for d in contrib/*/; do
263 + cp -av "$d" "${ED}/usr/$(get_libdir)/sbcl/" || die
264 + done
265 + fi
266 +
267 + # necessary for running newly-saved images
268 + echo "SBCL_HOME=${EPREFIX}/usr/$(get_libdir)/${PN}" > "${ENVD}"
269 + echo "SBCL_SOURCE_ROOT=${EPREFIX}/usr/$(get_libdir)/${PN}/src" >> "${ENVD}"
270 + doenvd "${ENVD}"
271 +}