Gentoo Archives: gentoo-commits

From: "Dirkjan Ochtman (djc)" <djc@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/boost: ChangeLog boost-1.41.0.ebuild metadata.xml
Date: Wed, 02 Dec 2009 15:42:02
Message-Id: E1NFqFf-0004bp-T6@stork.gentoo.org
1 djc 09/12/02 14:32:19
2
3 Modified: ChangeLog metadata.xml
4 Added: boost-1.41.0.ebuild
5 Log:
6 Version bump dev-libs/boost to 1.41.0.
7 (Portage version: 2.1.6.13/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.177 dev-libs/boost/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/boost/ChangeLog?rev=1.177&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/boost/ChangeLog?rev=1.177&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/boost/ChangeLog?r1=1.176&r2=1.177
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v
19 retrieving revision 1.176
20 retrieving revision 1.177
21 diff -u -r1.176 -r1.177
22 --- ChangeLog 25 Nov 2009 17:59:16 -0000 1.176
23 +++ ChangeLog 2 Dec 2009 14:32:19 -0000 1.177
24 @@ -1,6 +1,14 @@
25 # ChangeLog for dev-libs/boost
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v 1.176 2009/11/25 17:59:16 jer Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v 1.177 2009/12/02 14:32:19 djc Exp $
29 +
30 +*boost-1.41.0 (02 Dec 2009)
31 +
32 + 02 Dec 2009; Dirkjan Ochtman <djc@g.o> +boost-1.41.0.ebuild,
33 + +files/boost-1.41.0-mpi_process_group-missing-include.patch,
34 + +files/boost-1.41.0-parameter-needs-python.patch,
35 + +files/remove-toolset-1.41.0.patch, metadata.xml:
36 + Version bump to 1.41.0. Add maintainer-by-proxy.
37
38 25 Nov 2009; Jeroen Roovers <jer@g.o> boost-1.36.0-r1.ebuild,
39 boost-1.37.0-r1.ebuild, boost-1.39.0.ebuild, boost-1.40.0.ebuild:
40
41
42
43 1.10 dev-libs/boost/metadata.xml
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/boost/metadata.xml?rev=1.10&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/boost/metadata.xml?rev=1.10&content-type=text/plain
47 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/boost/metadata.xml?r1=1.9&r2=1.10
48
49 Index: metadata.xml
50 ===================================================================
51 RCS file: /var/cvsroot/gentoo-x86/dev-libs/boost/metadata.xml,v
52 retrieving revision 1.9
53 retrieving revision 1.10
54 diff -u -r1.9 -r1.10
55 --- metadata.xml 21 Oct 2009 13:00:18 -0000 1.9
56 +++ metadata.xml 2 Dec 2009 14:32:19 -0000 1.10
57 @@ -10,6 +10,10 @@
58 <email>djc@g.o</email>
59 <name>Dirkjan Ochtman</name>
60 </maintainer>
61 + <maintainer>
62 + <email>s.mingramm@×××.de</email>
63 + <name>Sebastian Mingramm</name>
64 + </maintainer>
65 <longdescription>
66 Boost is a free peer-reviewed portable C++ source libraries.
67 </longdescription>
68
69
70
71 1.1 dev-libs/boost/boost-1.41.0.ebuild
72
73 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/boost/boost-1.41.0.ebuild?rev=1.1&view=markup
74 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-libs/boost/boost-1.41.0.ebuild?rev=1.1&content-type=text/plain
75
76 Index: boost-1.41.0.ebuild
77 ===================================================================
78 # Copyright 1999-2009 Gentoo Foundation
79 # Distributed under the terms of the GNU General Public License v2
80 # $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.41.0.ebuild,v 1.1 2009/12/02 14:32:19 djc Exp $
81
82 EAPI="2"
83
84 inherit python flag-o-matic multilib toolchain-funcs versionator check-reqs
85
86 MY_P=${PN}_$(replace_all_version_separators _)
87
88 DESCRIPTION="Boost Libraries for C++"
89 HOMEPAGE="http://www.boost.org/"
90 SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
91 LICENSE="Boost-1.0"
92 SLOT="$(get_version_component_range 1-2)"
93 IUSE="debug doc +eselect expat icu mpi python test tools"
94
95 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
96
97 RDEPEND="icu? ( >=dev-libs/icu-3.3 )
98 expat? ( dev-libs/expat )
99 mpi? ( || ( >=sys-cluster/openmpi-1.2.9[cxx] <sys-cluster/openmpi-1.2.9[-nocxx] sys-cluster/mpich2[cxx] sys-cluster/lam-mpi ) )
100 sys-libs/zlib
101 python? ( virtual/python )
102 !!<=dev-libs/boost-1.35.0-r2
103 >=app-admin/eselect-boost-0.3"
104 DEPEND="${RDEPEND}
105 dev-util/boost-build:${SLOT}"
106
107 S=${WORKDIR}/${MY_P}
108
109 MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
110 BJAM="bjam-${MAJOR_PV}"
111
112 # Usage:
113 # _add_line <line-to-add> <profile>
114 # ... to add to specific profile
115 # or
116 # _add_line <line-to-add>
117 # ... to add to all profiles for which the use flag set
118
119 _add_line() {
120 if [ -z "$2" ] ; then
121 echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/default"
122 use debug && echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug"
123 else
124 echo "${1}" >> "${D}/usr/share/boost-eselect/profiles/${SLOT}/${2}"
125 fi
126 }
127
128 pkg_setup() {
129 if use test ; then
130 CHECKREQS_DISK_BUILD="1024"
131 check_reqs
132
133 ewarn "The tests may take several hours on a recent machine"
134 ewarn "but they will not fail (unless something weird happens ;-)"
135 ewarn "This is because the tests depend on the used compiler/-version"
136 ewarn "and the platform and upstream says that this is normal."
137 ewarn "If you are interested in the results, please take a look at the"
138 ewarn "generated results page:"
139 ewarn " ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
140 ebeep 5
141
142 fi
143
144 if use debug ; then
145 ewarn "The debug USE-flag means that a second set of the boost libraries"
146 ewarn "will be built containing debug-symbols. You'll be able to select them"
147 ewarn "using the boost-eselect module. But even though the optimization flags"
148 ewarn "you might have set are not stripped, there will be a performance"
149 ewarn "penalty and linking other packages against the debug version"
150 ewarn "of boost is _not_ recommended."
151 fi
152 }
153
154 src_prepare() {
155 epatch "${FILESDIR}/remove-toolset-${PV}.patch"
156
157 # bug 291660
158 epatch "${FILESDIR}/boost-${PV}-parameter-needs-python.patch"
159
160 # http://thread.gmane.org/gmane.comp.lib.boost.devel/196471
161 epatch "${FILESDIR}/boost-${PV}-mpi_process_group-missing-include.patch"
162
163 # This enables building the boost.random library with /dev/urandom support
164 if [[ -e /dev/urandom ]] ; then
165 mkdir -p libs/random/build
166 cp "${FILESDIR}/random-Jamfile" libs/random/build/Jamfile.v2
167 # yeah, we WANT it to work on non-Linux too
168 sed -i -e 's/#ifdef __linux__/#if 1/' libs/random/random_device.cpp || die
169 fi
170 }
171
172 src_configure() {
173 einfo "Writing new user-config.jam"
174
175 local compiler compilerVersion compilerExecutable mpi
176 if [[ ${CHOST} == *-darwin* ]] ; then
177 compiler=darwin
178 compilerVersion=$(gcc-fullversion)
179 compilerExecutable=$(tc-getCXX)
180 # we need to add the prefix, and in two cases this exceeds, so prepare
181 # for the largest possible space allocation
182 append-ldflags -Wl,-headerpad_max_install_names
183 else
184 compiler=gcc
185 compilerVersion=$(gcc-version)
186 compilerExecutable=$(tc-getCXX)
187 fi
188
189 # Using -fno-strict-aliasing to prevent possible creation of invalid code.
190 append-flags -fno-strict-aliasing
191
192 use mpi && mpi="using mpi ;"
193
194 if use python ; then
195 python_version
196 pystring="using python : ${PYVER} : /usr : /usr/include/python${PYVER} : /usr/lib/python${PYVER} ;"
197 fi
198
199 cat > "${S}/user-config.jam" << __EOF__
200
201 variant gentoorelease : release : <optimization>none <debug-symbols>none ;
202 variant gentoodebug : debug : <optimization>none ;
203
204 using ${compiler} : ${compilerVersion} : ${compilerExecutable} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
205
206 ${pystring}
207
208 ${mpi}
209
210 __EOF__
211
212 # Maintainer information:
213 # The debug-symbols=none and optimization=none
214 # are not official upstream flags but a Gentoo
215 # specific patch to make sure that all our
216 # CXXFLAGS/LDFLAGS are being respected.
217 # Using optimization=off would for example add
218 # "-O0" and override "-O2" set by the user.
219 # Please take a look at the boost-build ebuild
220 # for more infomration.
221
222 use icu && OPTIONS="-sICU_PATH=/usr"
223 use expat && OPTIONS="${OPTIONS} -sEXPAT_INCLUDE=/usr/include -sEXPAT_LIBPATH=/usr/$(get_libdir)"
224 use mpi || OPTIONS="${OPTIONS} --without-mpi"
225 use python || OPTIONS="${OPTIONS} --without-python"
226
227 # https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch
228 if use sparc || use mips || use hppa || use arm || use x86-fbsd; then
229 OPTIONS="${OPTIONS} --disable-long-double"
230 fi
231
232 OPTIONS="${OPTIONS} --user-config=\"${S}/user-config.jam\" --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}/usr\" --layout=versioned"
233
234 }
235
236 src_compile() {
237
238 NUMJOBS=$(sed -r -e 's/--jobs=?/-j/; s/.*(-j ?[0-9]+).*/\1/' <<< ${MAKEOPTS})
239
240 einfo "Using the following options to build: "
241 einfo " ${OPTIONS}"
242
243 export BOOST_ROOT="${S}"
244
245 ${BJAM} ${NUMJOBS} -q \
246 gentoorelease \
247 ${OPTIONS} \
248 threading=single,multi link=shared,static runtime-link=shared \
249 || die "building boost failed"
250
251 # ... and do the whole thing one more time to get the debug libs
252 if use debug ; then
253 ${BJAM} ${NUMJOBS} -q \
254 gentoodebug \
255 ${OPTIONS} \
256 threading=single,multi link=shared,static runtime-link=shared \
257 --buildid=debug \
258 || die "building boost failed"
259 fi
260
261 if use tools; then
262 cd "${S}/tools/"
263 ${BJAM} ${NUMJOBS} -q \
264 gentoorelease \
265 ${OPTIONS} \
266 || die "building tools failed"
267 fi
268
269 }
270
271 src_install () {
272 einfo "Using the following options to install: "
273 einfo " ${OPTIONS}"
274
275 export BOOST_ROOT="${S}"
276
277 ${BJAM} -q \
278 gentoorelease \
279 ${OPTIONS} \
280 threading=single,multi link=shared,static runtime-link=shared \
281 --includedir="${D}/usr/include" \
282 --libdir="${D}/usr/$(get_libdir)" \
283 install || die "install failed for options '${OPTIONS}'"
284
285 if use debug ; then
286 ${BJAM} -q \
287 gentoodebug \
288 ${OPTIONS} \
289 threading=single,multi link=shared,static runtime-link=shared \
290 --includedir="${D}/usr/include" \
291 --libdir="${D}/usr/$(get_libdir)" \
292 --buildid=debug \
293 install || die "install failed for options '${OPTIONS}'"
294 fi
295
296 use python || rm -rf "${D}/usr/include/boost-${MAJOR_PV}/boost"/python*
297
298 dodir /usr/share/boost-eselect/profiles/${SLOT}
299 touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/default"
300 use debug && touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug"
301
302 # Move the mpi.so to the right place and make sure it's slotted
303 if use mpi && use python; then
304 mkdir -p "${D}/usr/$(get_libdir)/python${PYVER}/site-packages/boost_${MAJOR_PV}"
305 mv "${D}/usr/$(get_libdir)/mpi.so" "${D}/usr/$(get_libdir)/python${PYVER}/site-packages/boost_${MAJOR_PV}/"
306 touch "${D}/usr/$(get_libdir)/python${PYVER}/site-packages/boost_${MAJOR_PV}/__init__.py"
307 _add_line "python=\"/usr/$(get_libdir)/python${PYVER}/site-packages/boost_${MAJOR_PV}/mpi.so\""
308 fi
309
310 if use doc ; then
311 find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
312 dohtml \
313 -A pdf,txt,cpp,hpp \
314 *.{htm,html,png,css} \
315 -r doc more people wiki
316 dohtml \
317 -A pdf,txt \
318 -r tools
319 insinto /usr/share/doc/${PF}/html
320 doins -r libs
321
322 # To avoid broken links
323 insinto /usr/share/doc/${PF}/html
324 doins LICENSE_1_0.txt
325
326 dosym /usr/include/boost-${MAJOR_PV}/boost /usr/share/doc/${PF}/html/boost
327 fi
328
329 cd "${D}/usr/$(get_libdir)"
330
331 # Remove (unversioned) symlinks
332 # And check for what we remove to catch bugs
333 # got a better idea how to do it? tell me!
334 for f in $(ls -1 *{.a,$(get_libname)} | grep -v "${MAJOR_PV}") ; do
335 if [ ! -h "${f}" ] ; then
336 eerror "Ups, tried to remove '${f}' which is a a real file instead of a symlink"
337 die "slotting/naming of the libs broken!"
338 fi
339 rm "${f}"
340 done
341
342 # The threading libs obviously always gets the "-mt" (multithreading) tag
343 # some packages seem to have a problem with it. Creating symlinks...
344 for lib in libboost_thread-mt-${MAJOR_PV}{.a,$(get_libname)} ; do
345 dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
346 done
347
348 # The same goes for the mpi libs
349 if use mpi ; then
350 for lib in libboost_mpi-mt-${MAJOR_PV}{.a,$(get_libname)} ; do
351 dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
352 done
353 fi
354
355 if use debug ; then
356 for lib in libboost_thread-mt-${MAJOR_PV}-debug{.a,$(get_libname)} ; do
357 dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
358 done
359
360 if use mpi ; then
361 for lib in libboost_mpi-mt-${MAJOR_PV}-debug{.a,$(get_libname)} ; do
362 dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
363 done
364 fi
365 fi
366
367 # Create a subdirectory with completely unversioned symlinks
368 # and store the names in the profiles-file for eselect
369 dodir /usr/$(get_libdir)/boost-${MAJOR_PV}
370
371 _add_line "libs=\"" default
372 for f in $(ls -1 *{.a,$(get_libname)} | grep -v debug) ; do
373 dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}}
374 _add_line "/usr/$(get_libdir)/${f}" default
375 done
376 _add_line "\"" default
377
378 if use debug ; then
379 _add_line "libs=\"" debug
380 dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug
381 for f in $(ls -1 *{.a,$(get_libname)} | grep debug) ; do
382 dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug}
383 _add_line "/usr/$(get_libdir)/${f}" debug
384 done
385 _add_line "\"" debug
386
387 _add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" debug
388 _add_line "suffix=\"-debug\"" debug
389 fi
390
391 _add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
392
393 if use tools; then
394 cd "${S}/dist/bin"
395 # Append version postfix to binaries for slotting
396 _add_line "bins=\""
397 for b in * ; do
398 newbin "${b}" "${b}-${MAJOR_PV}"
399 _add_line "/usr/bin/${b}-${MAJOR_PV}"
400 done
401 _add_line "\""
402
403 cd "${S}/dist"
404 insinto /usr/share
405 doins -r share/boostbook
406 # Append version postfix for slotting
407 mv "${D}/usr/share/boostbook" "${D}/usr/share/boostbook-${MAJOR_PV}"
408 _add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
409 fi
410
411 cd "${S}/status"
412 if [ -f regress.log ] ; then
413 docinto status
414 dohtml *.{html,gif} ../boost.png
415 dodoc regress.log
416 fi
417
418 use python && python_need_rebuild
419
420 # boost's build system truely sucks for not having a destdir. Because for
421 # this reason we are forced to build with a prefix that includes the
422 # DESTROOT, dynamic libraries on Darwin end messed up, referencing the
423 # DESTROOT instread of the actual EPREFIX. There is no way out of here
424 # but to do it the dirty way of manually setting the right install_names.
425 [[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
426 if [[ ${CHOST} == *-darwin* ]] ; then
427 einfo "Working around completely broken build-system(tm)"
428 for d in "${ED}"usr/lib/*.dylib ; do
429 if [[ -f ${d} ]] ; then
430 # fix the "soname"
431 ebegin " correcting install_name of ${d#${ED}}"
432 install_name_tool -id "/${d#${D}}" "${d}"
433 eend $?
434 # fix references to other libs
435 refs=$(otool -XL "${d}" | \
436 sed -e '1d' -e 's/^\t//' | \
437 grep "^libboost_" | \
438 cut -f1 -d' ')
439 for r in ${refs} ; do
440 ebegin " correcting reference to ${r}"
441 install_name_tool -change \
442 "${r}" \
443 "${EPREFIX}/usr/lib/${r}" \
444 "${d}"
445 eend $?
446 done
447 fi
448 done
449 fi
450 }
451
452 src_test() {
453 export BOOST_ROOT=${S}
454
455 cd "${S}/tools/regression/build"
456 ${BJAM} -q \
457 gentoorelease \
458 ${OPTIONS} \
459 process_jam_log compiler_status \
460 || die "building regression test helpers failed"
461
462 cd "${S}/status"
463
464 # Some of the test-checks seem to rely on regexps
465 export LC_ALL="C"
466
467 # The following is largely taken from tools/regression/run_tests.sh,
468 # but adapted to our needs.
469
470 # Run the tests & write them into a file for postprocessing
471 ${BJAM} \
472 ${OPTIONS} \
473 --dump-tests 2>&1 | tee regress.log
474
475 # Postprocessing
476 cat regress.log | "${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/process_jam_log" --v2
477 if test $? != 0 ; then
478 die "Postprocessing the build log failed"
479 fi
480
481 cat > "${S}/status/comment.html" <<- __EOF__
482 <p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
483 __EOF__
484
485 # Generate the build log html summary page
486 "${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/compiler_status" --v2 \
487 --comment "${S}/status/comment.html" "${S}" \
488 cs-$(uname).html cs-$(uname)-links.html
489 if test $? != 0 ; then
490 die "Generating the build log html summary page failed"
491 fi
492
493 # And do some cosmetic fixes :)
494 sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html
495 }
496
497 pkg_postinst() {
498 use eselect && eselect boost update
499 if [ ! -h "${ROOT}/etc/eselect/boost/active" ] ; then
500 elog "No active boost version found. Calling eselect to select one..."
501 eselect boost update
502 fi
503 }