Gentoo Archives: gentoo-commits

From: "Marijn Schouten (hkbst)" <hkbst@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lisp/sbcl: sbcl-1.0.11-r1.ebuild sbcl-1.0.11.ebuild
Date: Sun, 28 Oct 2007 11:09:03
Message-Id: E1Im60e-0001TB-Bb@stork.gentoo.org
1 hkbst 07/10/28 11:08:48
2
3 Added: sbcl-1.0.11-r1.ebuild
4 Removed: sbcl-1.0.11.ebuild
5 Log:
6 fix blunder in creation of env vars file, thanks to grobian for bringing this to my attention
7 (Portage version: 2.1.3.16)
8
9 Revision Changes Path
10 1.1 dev-lisp/sbcl/sbcl-1.0.11-r1.ebuild
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lisp/sbcl/sbcl-1.0.11-r1.ebuild?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lisp/sbcl/sbcl-1.0.11-r1.ebuild?rev=1.1&content-type=text/plain
14
15 Index: sbcl-1.0.11-r1.ebuild
16 ===================================================================
17 # Copyright 1999-2007 Gentoo Foundation
18 # Distributed under the terms of the GNU General Public License v2
19 # $Header: /var/cvsroot/gentoo-x86/dev-lisp/sbcl/sbcl-1.0.11-r1.ebuild,v 1.1 2007/10/28 11:08:47 hkbst Exp $
20
21 inherit common-lisp-common-3 eutils flag-o-matic
22
23 #same order as http://www.sbcl.org/platform-table.html
24 BV_X86=1.0.10
25 BV_AMD64=1.0.10
26 BV_PPC=1.0
27 BV_SPARC=0.9.17
28 BV_ALPHA=0.9.12
29 BV_MIPS=0.9.12
30 BV_MIPSEL=0.9.12
31
32 DESCRIPTION="Steel Bank Common Lisp (SBCL) is an implementation of ANSI Common Lisp."
33 HOMEPAGE="http://sbcl.sourceforge.net/"
34 SRC_URI="mirror://sourceforge/sbcl/${P}-source.tar.bz2
35 x86? ( mirror://sourceforge/sbcl/${PN}-${BV_X86}-x86-linux-binary.tar.bz2 )
36 amd64? ( mirror://sourceforge/sbcl/${PN}-${BV_AMD64}-x86-64-linux-binary.tar.bz2 )
37 ppc? ( mirror://sourceforge/sbcl/${PN}-${BV_PPC}-powerpc-linux-binary.tar.bz2 )
38 sparc? ( mirror://sourceforge/sbcl/${PN}-${BV_SPARC}-sparc-linux-binary.tar.bz2 )
39 alpha? ( mirror://sourceforge/sbcl/${PN}-${BV_ALPHA}-alpha-linux-binary.tar.bz2 )
40 mips? ( !cobalt? ( mirror://sourceforge/sbcl/${PN}-${BV_MIPS}-mips-linux-binary.tar.bz2 ) )
41 mips? ( cobalt? ( mirror://sourceforge/sbcl/${PN}-${BV_MIPSEL}-mipsel-linux-binary.tar.bz2 ) )"
42
43 # SRC_URI is part of the metadata cache; it's evaluated contents must be independent of the system that creates the metadata cache.
44 # ILLEGAL: mips? ( mirror://sourceforge/sbcl/${PN}-${BV_MIPS}-$([[$(tc-endian) = big]] && echo mips || echo mipsel)-linux-binary.tar.bz2 )
45
46
47 LICENSE="MIT"
48 SLOT="0"
49
50 KEYWORDS="-* ~amd64 ~ppc ~sparc ~x86"
51
52 IUSE="ldb source threads unicode doc"
53
54 DEPEND="doc? ( sys-apps/texinfo media-gfx/graphviz )"
55
56 PROVIDE="virtual/commonlisp"
57
58 pkg_setup() {
59 if built_with_use sys-devel/gcc hardened && gcc-config -c | grep -qv vanilla; then
60 eerror "So-called \"hardened\" compiler features are incompatible with SBCL. You"
61 eerror "must use gcc-config to select a profile with non-hardened features"
62 eerror "(the \"vanilla\" profile) and \"source /etc/profile\" before continuing."
63 die
64 fi
65 if (use x86 || use amd64) && has_version "<sys-libs/glibc-2.6" \
66 && ! built_with_use sys-libs/glibc nptl; then
67 eerror "Building SBCL without NPTL support on at least x86 and amd64"
68 eerror "architectures is not a supported configuration in Gentoo. Please"
69 eerror "refer to Bug #119016 for more information."
70 die
71 fi
72 }
73
74 CONFIG="${S}/customize-target-features.lisp"
75
76 usep() {
77 use $1 && echo "true" || echo "false"
78 }
79
80 sbcl_feature() {
81 echo "$( [[ $1 == "true" ]] && echo "(enable $2)" || echo "(disable $2)")" >> "${CONFIG}"
82 # if [[ $1 == "true" ]]; then echo "(enable $2)" >> "${CONFIG}"; fi
83 # if [[ $1 == "false" ]]; then echo "(disable $2)" >> "${CONFIG}"; fi
84 }
85
86 sbcl_apply_features() {
87 cat > "${CONFIG}" <<'EOF'
88 (lambda (list)
89 (flet ((enable (x) (pushnew x list))
90 (disable (x) (setf list (remove x list))))
91 EOF
92 if use x86 || use amd64; then
93 sbcl_feature "$(usep threads)" ":sb-thread"
94 fi
95 sbcl_feature "$(usep ldb)" ":sb-ldb"
96 sbcl_feature "false" ":sb-test"
97 sbcl_feature "$(usep unicode)" ":sb-unicode"
98 cat >> "${CONFIG}" <<'EOF'
99 )
100 list)
101 EOF
102 cat "${CONFIG}"
103 }
104
105 src_unpack() {
106 unpack ${A}
107 mv sbcl-*-linux sbcl-binary
108 cd "${S}"
109
110 # epatch "${FILESDIR}/disable-tests-gentoo-${PV}.patch"
111 use source && sed 's%"$(BUILD_ROOT)%$(MODULE).lisp "$(BUILD_ROOT)%' -i contrib/vanilla-module.mk
112
113 sed "s,/lib,/$(get_libdir),g" -i "${S}/install.sh"
114 sed "s,/usr/local/lib,/usr/$(get_libdir),g" -i "${S}/src/runtime/runtime.c" # #define SBCL_HOME ...
115
116 # customizing SBCL version as per
117 # http://sbcl.cvs.sourceforge.net/sbcl/sbcl/doc/PACKAGING-SBCL.txt?view=markup
118 echo -e ";;; Auto-generated by Gentoo\n\"${PVR}-gentoo\"" > "${S}/version.lisp-expr"
119
120 # applying customizations
121 sbcl_apply_features
122
123 find "${S}" -type f -name .cvsignore -print0 | xargs -0 rm -f
124 find "${S}" -depth -type d -name CVS -print0 | xargs -0 rm -rf
125 find "${S}" -type f -name \*.c -print0 | xargs -0 chmod 644
126 }
127
128 src_compile() {
129 local bindir="${WORKDIR}/sbcl-binary"
130
131 filter-ldflags -Wl,--as-needed --as-needed # see Bug #132992
132
133 # clear the environment to get rid of non-ASCII strings, see bug 174702
134 # set HOME for paludis
135 env - HOME="${T}" \
136 PATH="${bindir}/src/runtime:${PATH}" SBCL_HOME="${bindir}/output" GNUMAKE=make ./make.sh \
137 "sbcl --sysinit /dev/null --userinit /dev/null --disable-debugger --core ${bindir}/output/sbcl.core" \
138 || die "make failed"
139
140 if use doc; then
141 cd "${S}/doc/manual"
142 make info html || die "make info html failed"
143 cd "${S}/doc/internals"
144 make html || die "make html failed"
145 fi
146 }
147
148 src_test() {
149 # FILES="exhaust.impure.lisp"
150 cd tests
151 sh run-tests.sh
152 # sh run-tests.sh ${FILES}
153 # sh run-tests.sh --break-on-failure ${FILES}
154 }
155
156 src_install() {
157 unset SBCL_HOME
158 dodir /etc/
159 cat > "${D}/etc/sbclrc" <<EOF
160 ;;; The following is required if you want source location functions to
161 ;;; work in SLIME, for example.
162
163 (setf (logical-pathname-translations "SYS")
164 '(("SYS:SRC;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/src/**/*.*")
165 ("SYS:CONTRIB;**;*.*.*" #p"/usr/$(get_libdir)/sbcl/**/*.*")))
166 EOF
167 dodir /usr/share/man
168 dodir /usr/share/doc/${PF}
169 INSTALL_ROOT="${D}/usr" DOC_DIR="${D}/usr/share/doc/${PF}" sh install.sh || die "install.sh failed"
170
171 doman doc/sbcl-asdf-install.1
172
173 dodoc BUGS CREDITS INSTALL NEWS OPTIMIZATIONS PRINCIPLES README STYLE SUPPORT TLA TODO
174
175 if use doc; then
176 dohtml doc/html/*
177 doinfo "${S}/doc/manual/"*.info*
178 dohtml -r "${S}/doc/internals/sbcl-internals"
179 fi
180
181 if use source; then
182 # install the SBCL source
183 cp -pPR "${S}/src" "${D}/usr/$(get_libdir)/sbcl"
184 find "${D}/usr/$(get_libdir)/sbcl/src" -type f -name \*.fasl -print0 | xargs -0 rm -f
185 fi
186
187 # necessary for running newly-saved images
188 echo "SBCL_HOME=/usr/$(get_libdir)/sbcl" > "${T}/50sbcl"
189 echo "SBCL_SOURCE_ROOT=/usr/$(get_libdir)/${PN}/src" >> "${T}/50sbcl"
190 doenvd "${T}/50sbcl"
191
192 impl-save-timestamp-hack sbcl
193 }
194
195 pkg_postinst() {
196 standard-impl-postinst sbcl
197 }
198
199 pkg_postrm() {
200 standard-impl-postrm sbcl /usr/bin/sbcl
201 }
202
203
204
205 --
206 gentoo-commits@g.o mailing list