Gentoo Archives: gentoo-commits

From: "Tiziano Mueller (dev-zero)" <dev-zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/boost: ChangeLog boost-1.35.0-r2.ebuild
Date: Mon, 01 Sep 2008 18:37:25
Message-Id: E1KaEHB-0001vy-Ei@stork.gentoo.org
1 dev-zero 08/09/01 18:37:21
2
3 Modified: ChangeLog
4 Added: boost-1.35.0-r2.ebuild
5 Log:
6 Added patch to fix compilation errors for other packages on arm, hppa and sparc (bug #230529).
7 (Portage version: 2.2_rc8/cvs/Linux 2.6.27-rc4 x86_64)
8
9 Revision Changes Path
10 1.140 dev-libs/boost/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/boost/ChangeLog?rev=1.140&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/boost/ChangeLog?rev=1.140&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/boost/ChangeLog?r1=1.139&r2=1.140
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v
19 retrieving revision 1.139
20 retrieving revision 1.140
21 diff -u -r1.139 -r1.140
22 --- ChangeLog 6 Aug 2008 06:38:38 -0000 1.139
23 +++ ChangeLog 1 Sep 2008 18:37:20 -0000 1.140
24 @@ -1,6 +1,13 @@
25 # ChangeLog for dev-libs/boost
26 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v 1.139 2008/08/06 06:38:38 ulm Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v 1.140 2008/09/01 18:37:20 dev-zero Exp $
29 +
30 +*boost-1.35.0-r2 (01 Sep 2008)
31 +
32 + 01 Sep 2008; Tiziano Müller <dev-zero@g.o>
33 + +boost-1.35.0-r2.ebuild:
34 + Added patch to fix compilation errors for other packages on arm, hppa and
35 + sparc (bug #230529).
36
37 06 Aug 2008; Ulrich Mueller <ulm@g.o> metadata.xml:
38 Add USE flag description to metadata wrt GLEP 56.
39
40
41
42 1.1 dev-libs/boost/boost-1.35.0-r2.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/boost/boost-1.35.0-r2.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/boost/boost-1.35.0-r2.ebuild?rev=1.1&content-type=text/plain
46
47 Index: boost-1.35.0-r2.ebuild
48 ===================================================================
49 # Copyright 1999-2008 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.35.0-r2.ebuild,v 1.1 2008/09/01 18:37:20 dev-zero Exp $
52
53 inherit python flag-o-matic multilib toolchain-funcs versionator check-reqs
54
55 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
56
57 MY_P=${PN}_$(replace_all_version_separators _)
58 PATCHSET_VERSION="${PV}-3"
59
60 DESCRIPTION="Boost Libraries for C++"
61 HOMEPAGE="http://www.boost.org/"
62 SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2
63 mirror://gentoo/boost-patches-${PATCHSET_VERSION}.tbz2"
64 LICENSE="freedist Boost-1.0"
65 SLOT="0"
66 IUSE="debug doc expat icu mpi tools"
67
68 RDEPEND="icu? ( >=dev-libs/icu-3.3 )
69 expat? ( dev-libs/expat )
70 mpi? ( || ( sys-cluster/openmpi sys-cluster/mpich2 ) )
71 sys-libs/zlib
72 virtual/python"
73 DEPEND="${RDEPEND}
74 >=dev-util/boost-build-${PV}-r1"
75
76 S=${WORKDIR}/${MY_P}
77
78 # Maintainer Information
79 # ToDo:
80 # - write a patch to support /dev/urandom on FreeBSD and OSX (see below)
81
82 pkg_setup() {
83 if has test ${FEATURES} ; then
84 CHECKREQS_DISK_BUILD="1024"
85 check_reqs
86
87 ewarn "The tests may take several hours on a recent machine"
88 ewarn "but they will not fail (unless something weird happens ;-)"
89 ewarn "This is because the tests depend on the used compiler/-version"
90 ewarn "and the platform and upstream says that this is normal."
91 ewarn "If you are interested in the results, please take a look at the"
92 ewarn "generated results page:"
93 ewarn " ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
94 ebeep 5
95
96 fi
97 }
98
99 src_unpack() {
100 unpack ${A}
101
102 cd "${S}"
103
104 EPATCH_SOURCE="${WORKDIR}/patches"
105 EPATCH_SUFFIX="patch"
106 epatch
107
108 # This enables building the boost.random library with /dev/urandom support
109 if ! use userland_Darwin ; then
110 mkdir -p libs/random/build
111 cp "${FILESDIR}/random-Jamfile" libs/random/build/Jamfile.v2
112 fi
113 }
114
115 generate_options() {
116 # Maintainer information:
117 # The debug-symbols=none and optimization=none
118 # are not official upstream flags but a Gentoo
119 # specific patch to make sure that all our
120 # CXXFLAGS/LDFLAGS are being respected.
121 # Using optimization=off would for example add
122 # "-O0" and override "-O2" set by the user.
123 # Please take a look at the boost-build ebuild
124 # for more infomration.
125
126 OPTIONS="gentoorelease"
127 use debug && OPTIONS="gentoodebug"
128
129 use icu && OPTIONS="${OPTIONS} -sICU_PATH=/usr"
130 if use expat ; then
131 OPTIONS="${OPTIONS} -sEXPAT_INCLUDE=/usr/include -sEXPAT_LIBPATH=/usr/$(get_libdir)"
132 fi
133
134 if ! use mpi ; then
135 OPTIONS="${OPTIONS} --without-mpi"
136 fi
137
138 OPTIONS="${OPTIONS} --user-config=${S}/user-config.jam --boost-build=/usr/share/boost-build"
139 }
140
141 generate_userconfig() {
142 einfo "Writing new user-config.jam"
143 python_version
144
145 local compiler compilerVersion compilerExecutable
146 if [[ ${CHOST} == *-darwin* ]] ; then
147 compiler=darwin
148 compilerVersion=$(gcc-version)
149 compilerExecutable=$(tc-getCXX)
150 append-ldflags -ldl
151 else
152 compiler=gcc
153 compilerVersion=$(gcc-version)
154 compilerExecutable=$(tc-getCXX)
155 fi
156
157 cat > "${S}/user-config.jam" << __EOF__
158
159 variant gentoorelease : release : <optimization>none <debug-symbols>none ;
160 variant gentoodebug : debug : <optimization>none <debug-symbols>none ;
161
162 using ${compiler} : ${compilerVersion} : ${compilerExecutable} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
163 using python : ${PYVER} : /usr : /usr/include/python${PYVER} : /usr/lib/python${PYVER} ;
164
165 __EOF__
166
167 if use mpi ; then
168 echo "using mpi ;" >> "${S}/user-config.jam"
169 fi
170 }
171
172 src_compile() {
173
174 NUMJOBS=$(sed -e 's/.*\(\-j[ 0-9]\+\) .*/\1/' <<< ${MAKEOPTS})
175
176 generate_userconfig
177 generate_options
178
179 elog "Using the following options to build: "
180 elog " ${OPTIONS}"
181
182 export BOOST_ROOT=${S}
183
184 bjam ${NUMJOBS} -q \
185 ${OPTIONS} \
186 threading=single,multi link=shared,static runtime-link=shared,static \
187 --prefix="${D}/usr" \
188 --layout=system \
189 || die "building boost failed"
190
191 if use tools; then
192 cd "${S}/tools/"
193 # We have to set optimization to -O0 or -O1 to work around a gcc-bug
194 # optimization=off adds -O0 to the compiler call and overwrites our settings.
195 bjam ${NUMJOBS} -q \
196 ${OPTIONS} \
197 --prefix="${D}/usr" \
198 --layout=system \
199 || die "building tools failed"
200 fi
201
202 if has test ${FEATURES} ; then
203 cd "${S}/tools/regression/build"
204 bjam -q \
205 ${OPTIONS} \
206 --prefix="${D}/usr" \
207 --layout=system \
208 || die "building regression test helpers failed"
209 fi
210
211 }
212
213 src_install () {
214
215 generate_options
216
217 export BOOST_ROOT=${S}
218
219 bjam -q \
220 ${OPTIONS} \
221 threading=single,multi link=shared,static runtime-link=shared,static \
222 --prefix="${D}/usr" \
223 --includedir="${D}/usr/include" \
224 --libdir="${D}/usr/$(get_libdir)" \
225 --layout=system \
226 install || die "install failed for options '${OPTIONS}'"
227
228 # Move the mpi.so to the right place
229 if use mpi; then
230 mkdir -p "${D}/usr/$(get_libdir)/python${PYVER}/site-packages"
231 mv "${D}/usr/$(get_libdir)/mpi.so" "${D}/usr/$(get_libdir)/python${PYVER}/site-packages"
232 fi
233
234 if use doc ; then
235 find libs -iname "test" -or -iname "src" | xargs rm -rf
236 dohtml \
237 -A pdf,txt,cpp \
238 *.{htm,html,png,css} \
239 -r doc more people wiki
240 insinto /usr/share/doc/${PF}/html
241 doins -r libs
242
243 # To avoid broken links
244 insinto /usr/share/doc/${PF}/html
245 doins LICENSE_1_0.txt
246
247 dosym /usr/include/boost /usr/share/doc/${PF}/html/boost
248 fi
249
250 cd "${D}/usr/$(get_libdir)"
251
252 # If built with debug enabled, all libraries get a 'd' postfix,
253 # this breaks linking other apps against boost (bug #181972)
254 if use debug ; then
255 for lib in $(ls -1 libboost_*) ; do
256 dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-d\././' -e 's/d\././' <<< ${lib})"
257 done
258 fi
259
260 for lib in $(ls -1 libboost_thread-mt.*) ; do
261 dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
262 done
263
264 if use tools; then
265 cd "${S}/dist"
266 dobin bin/*
267 insinto /usr
268 doins -r share
269 fi
270
271 if has test ${FEATURES} ; then
272 cd "${S}/status"
273 docinto status
274 dohtml *.{html,gif} ../boost.png
275 dodoc regress.log
276 fi
277 }
278
279 src_test() {
280 generate_options
281
282 export BOOST_ROOT=${S}
283
284 cd "${S}/status"
285
286 # Some of the test-checks seem to rely on regexps
287 export LC_ALL="C"
288
289 # The following is largely taken from tools/regression/run_tests.sh,
290 # but adapted to our needs.
291
292 # Run the tests & write them into a file for postprocessing
293 bjam \
294 ${OPTIONS} \
295 --dump-tests 2>&1 | tee regress.log
296
297 # Postprocessing
298 cat regress.log | "${S}/dist/bin/process_jam_log" --v2
299 if test $? != 0 ; then
300 die "Postprocessing the build log failed"
301 fi
302
303 cat > "${S}/status/comment.html" <<- __EOF__
304 <p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
305 __EOF__
306
307 # Generate the build log html summary page
308 "${S}/dist/bin/compiler_status" --v2 \
309 --comment "${S}/status/comment.html" "${S}" \
310 cs-$(uname).html cs-$(uname)-links.html
311 if test $? != 0 ; then
312 die "Generating the build log html summary page failed"
313 fi
314
315 # And do some cosmetic fixes :)
316 sed -i -e 's|../boost.png|boost.png|' *.html
317 }