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: boost-1.50.0-r2.ebuild ChangeLog boost-1.50.0-r1.ebuild
Date: Fri, 24 Aug 2012 09:46:20
Message-Id: 20120824094608.5627120570@flycatcher.gentoo.org
1 dev-zero 12/08/24 09:46:08
2
3 Modified: ChangeLog
4 Added: boost-1.50.0-r2.ebuild
5 Removed: boost-1.50.0-r1.ebuild
6 Log:
7 Remove symlinks created by eselect-boost.
8
9 (Portage version: 2.1.11.9/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.257 dev-libs/boost/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/ChangeLog?rev=1.257&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/ChangeLog?rev=1.257&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/ChangeLog?r1=1.256&r2=1.257
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v
21 retrieving revision 1.256
22 retrieving revision 1.257
23 diff -u -r1.256 -r1.257
24 --- ChangeLog 20 Aug 2012 21:55:03 -0000 1.256
25 +++ ChangeLog 24 Aug 2012 09:46:08 -0000 1.257
26 @@ -1,6 +1,12 @@
27 # ChangeLog for dev-libs/boost
28 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v 1.256 2012/08/20 21:55:03 dev-zero Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v 1.257 2012/08/24 09:46:08 dev-zero Exp $
31 +
32 +*boost-1.50.0-r2 (24 Aug 2012)
33 +
34 + 24 Aug 2012; Tiziano Müller <dev-zero@g.o> +boost-1.50.0-r2.ebuild,
35 + -boost-1.50.0-r1.ebuild:
36 + Remove symlinks created by eselect-boost.
37
38 *boost-1.50.0-r1 (20 Aug 2012)
39
40
41
42
43 1.1 dev-libs/boost/boost-1.50.0-r2.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/boost-1.50.0-r2.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/boost-1.50.0-r2.ebuild?rev=1.1&content-type=text/plain
47
48 Index: boost-1.50.0-r2.ebuild
49 ===================================================================
50 # Copyright 1999-2012 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.50.0-r2.ebuild,v 1.1 2012/08/24 09:46:08 dev-zero Exp $
53
54 EAPI="4"
55 PYTHON_DEPEND="python? *"
56 SUPPORT_PYTHON_ABIS="1"
57 RESTRICT_PYTHON_ABIS="*-jython *-pypy-*"
58
59 inherit check-reqs flag-o-matic multilib multiprocessing python toolchain-funcs versionator
60
61 MY_P=${PN}_$(replace_all_version_separators _)
62
63 DESCRIPTION="Boost Libraries for C++"
64 HOMEPAGE="http://www.boost.org/"
65 SRC_URI="mirror://sourceforge/boost/${MY_P}.tar.bz2"
66
67 LICENSE="Boost-1.0"
68 SLOT="$(get_version_component_range 1-2)"
69 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
70 IUSE="debug doc icu mpi python static-libs test tools"
71
72 RDEPEND="icu? ( >=dev-libs/icu-3.6 )
73 !icu? ( virtual/libiconv )
74 mpi? ( || ( sys-cluster/openmpi[cxx] sys-cluster/mpich2[cxx,threads] ) )
75 sys-libs/zlib
76 !!<=dev-libs/boost-1.35.0-r2"
77 DEPEND="${RDEPEND}
78 >=dev-util/boost-build-1.50.0-r2:${SLOT}"
79
80 S=${WORKDIR}/${MY_P}
81
82 MAJOR_PV=$(replace_all_version_separators _ ${SLOT})
83 BJAM="b2-${MAJOR_PV}"
84
85 create_user-config.jam() {
86 local compiler compiler_version compiler_executable
87
88 if [[ ${CHOST} == *-darwin* ]]; then
89 compiler="darwin"
90 compiler_version="$(gcc-fullversion)"
91 compiler_executable="$(tc-getCXX)"
92 else
93 compiler="gcc"
94 compiler_version="$(gcc-version)"
95 compiler_executable="$(tc-getCXX)"
96 fi
97 local mpi_configuration python_configuration
98
99 if use mpi; then
100 mpi_configuration="using mpi ;"
101 fi
102
103 if use python; then
104 python_configuration="using python : $(python_get_version) : /usr : $(python_get_includedir) : /usr/$(get_libdir) ;"
105 fi
106
107 cat > user-config.jam << __EOF__
108 using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
109 ${mpi_configuration}
110 ${python_configuration}
111 __EOF__
112 }
113
114 pkg_pretend() {
115 if use test; then
116 CHECKREQS_DISK_BUILD="15G" check-reqs_pkg_pretend
117
118 ewarn "The tests may take several hours on a recent machine"
119 ewarn "but they will not fail (unless something weird happens ;-)"
120 ewarn "This is because the tests depend on the used compiler version"
121 ewarn "and the platform and upstream says that this is normal."
122 ewarn "If you are interested in the results, please take a look at the"
123 ewarn "generated results page:"
124 ewarn " ${ROOT}usr/share/doc/${PF}/status/cs-$(uname).html"
125 fi
126 }
127
128 pkg_setup() {
129 if use python; then
130 python_pkg_setup
131 fi
132
133 if use debug; then
134 ewarn "The debug USE flag means that a second set of the boost libraries"
135 ewarn "will be built containing debug symbols. But even though the optimization flags"
136 ewarn "you might have set are not stripped, there will be a performance"
137 ewarn "penalty and linking other packages against the debug version"
138 ewarn "of boost is _not_ recommended."
139 fi
140 }
141
142 src_prepare() {
143 epatch \
144 "${FILESDIR}/${PN}-1.48.0-mpi_python3.patch" \
145 "${FILESDIR}/${PN}-1.48.0-respect_python-buildid.patch" \
146 "${FILESDIR}/${PN}-1.48.0-support_dots_in_python-buildid.patch" \
147 "${FILESDIR}/${PN}-1.48.0-no_strict_aliasing_python2.patch" \
148 "${FILESDIR}/${PN}-1.48.0-disable_libboost_python3.patch" \
149 "${FILESDIR}/${PN}-1.48.0-python_linking.patch" \
150 "${FILESDIR}/${PN}-1.48.0-disable_icu_rpath.patch" \
151 "${FILESDIR}/remove-toolset-1.48.0.patch"
152 }
153
154 src_configure() {
155 OPTIONS=""
156
157 if [[ ${CHOST} == *-darwin* ]]; then
158 # We need to add the prefix, and in two cases this exceeds, so prepare
159 # for the largest possible space allocation.
160 append-ldflags -Wl,-headerpad_max_install_names
161 fi
162
163 # bug 298489
164 if use ppc || use ppc64; then
165 [[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
166 fi
167
168 use icu && OPTIONS+=" -sICU_PATH=/usr"
169 use icu || OPTIONS+=" --disable-icu boost.locale.icu=off"
170 use mpi || OPTIONS+=" --without-mpi"
171 use python || OPTIONS+=" --without-python"
172
173 # https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch
174 if use sparc || { use mips && [[ ${ABI} = "o32" ]]; } || use hppa || use arm || use x86-fbsd || use sh; then
175 OPTIONS+=" --disable-long-double"
176 fi
177
178 OPTIONS+=" pch=off --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}usr\" --layout=versioned"
179
180 if use static-libs; then
181 LINK_OPTS="link=shared,static"
182 LIBRARY_TARGETS="*.a *$(get_libname)"
183 else
184 LINK_OPTS="link=shared"
185 # There is no dynamically linked version of libboost_test_exec_monitor and libboost_exception.
186 LIBRARY_TARGETS="libboost_test_exec_monitor*.a libboost_exception*.a *$(get_libname)"
187 fi
188 }
189
190 src_compile() {
191 export BOOST_ROOT="${S}"
192 PYTHON_DIRS=""
193 MPI_PYTHON_MODULE=""
194 NUMJOBS="-j$(makeopts_jobs)"
195
196 building() {
197 create_user-config.jam
198
199 einfo "Using the following command to build:"
200 einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} $(use python && echo --python-buildid=${PYTHON_ABI})"
201
202 ${BJAM} ${NUMJOBS} -q -d+2 \
203 gentoorelease \
204 --user-config=user-config.jam \
205 ${OPTIONS} threading=single,multi ${LINK_OPTS} \
206 $(use python && echo --python-buildid=${PYTHON_ABI}) \
207 || die "Building of Boost libraries failed"
208
209 # ... and do the whole thing one more time to get the debug libs
210 if use debug; then
211 einfo "Using the following command to build:"
212 einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoodebug --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} --buildid=debug $(use python && echo --python-buildid=${PYTHON_ABI})"
213
214 ${BJAM} ${NUMJOBS} -q -d+2 \
215 gentoodebug \
216 --user-config=user-config.jam \
217 ${OPTIONS} threading=single,multi ${LINK_OPTS} \
218 --buildid=debug \
219 $(use python && echo --python-buildid=${PYTHON_ABI}) \
220 || die "Building of Boost debug libraries failed"
221 fi
222
223 if use python; then
224 if [[ -z "${PYTHON_DIRS}" ]]; then
225 PYTHON_DIRS="$(find bin.v2/libs -name python | sort)"
226 else
227 if [[ "${PYTHON_DIRS}" != "$(find bin.v2/libs -name python | sort)" ]]; then
228 die "Inconsistent structure of build directories"
229 fi
230 fi
231
232 local dir
233 for dir in ${PYTHON_DIRS}; do
234 mv ${dir} ${dir}-${PYTHON_ABI} || die "Renaming of '${dir}' to '${dir}-${PYTHON_ABI}' failed"
235 done
236
237 if use mpi; then
238 if [[ -z "${MPI_PYTHON_MODULE}" ]]; then
239 MPI_PYTHON_MODULE="$(find bin.v2/libs/mpi/build/*/gentoorelease -name mpi.so)"
240 if [[ "$(echo "${MPI_PYTHON_MODULE}" | wc -l)" -ne 1 ]]; then
241 die "Multiple mpi.so files found"
242 fi
243 else
244 if [[ "${MPI_PYTHON_MODULE}" != "$(find bin.v2/libs/mpi/build/*/gentoorelease -name mpi.so)" ]]; then
245 die "Inconsistent structure of build directories"
246 fi
247 fi
248
249 mv stage/lib/mpi.so stage/lib/mpi.so-${PYTHON_ABI} || die "Renaming of 'stage/lib/mpi.so' to 'stage/lib/mpi.so-${PYTHON_ABI}' failed"
250 fi
251 fi
252 }
253 if use python; then
254 python_execute_function building
255 else
256 building
257 fi
258
259 if use tools; then
260 pushd tools > /dev/null || die
261 einfo "Using the following command to build the tools:"
262 einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease --user-config=../user-config.jam ${OPTIONS}"
263
264 ${BJAM} ${NUMJOBS} -q -d+2\
265 gentoorelease \
266 --user-config=../user-config.jam \
267 ${OPTIONS} \
268 || die "Building of Boost tools failed"
269 popd > /dev/null || die
270 fi
271 }
272
273 src_install () {
274 installation() {
275 create_user-config.jam
276
277 if use python; then
278 local dir
279 for dir in ${PYTHON_DIRS}; do
280 cp -pr ${dir}-${PYTHON_ABI} ${dir} || die "Copying of '${dir}-${PYTHON_ABI}' to '${dir}' failed"
281 done
282
283 if use mpi; then
284 cp -p stage/lib/mpi.so-${PYTHON_ABI} "${MPI_PYTHON_MODULE}" || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to '${MPI_PYTHON_MODULE}' failed"
285 cp -p stage/lib/mpi.so-${PYTHON_ABI} stage/lib/mpi.so || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to 'stage/lib/mpi.so' failed"
286 fi
287 fi
288
289 einfo "Using the following command to install:"
290 einfo "${BJAM} -q -d+2 gentoorelease --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} --includedir=\"${D}usr/include\" --libdir=\"${D}usr/$(get_libdir)\" $(use python && echo --python-buildid=${PYTHON_ABI}) install"
291
292 ${BJAM} -q -d+2 \
293 gentoorelease \
294 --user-config=user-config.jam \
295 ${OPTIONS} threading=single,multi ${LINK_OPTS} \
296 --includedir="${D}usr/include" \
297 --libdir="${D}usr/$(get_libdir)" \
298 $(use python && echo --python-buildid=${PYTHON_ABI}) \
299 install || die "Installation of Boost libraries failed"
300
301 if use debug; then
302 einfo "Using the following command to install:"
303 einfo "${BJAM} -q -d+2 gentoodebug --user-config=user-config.jam ${OPTIONS} threading=single,multi ${LINK_OPTS} --includedir=\"${D}usr/include\" --libdir=\"${D}usr/$(get_libdir)\" --buildid=debug $(use python && echo --python-buildid=${PYTHON_ABI})"
304
305 ${BJAM} -q -d+2 \
306 gentoodebug \
307 --user-config=user-config.jam \
308 ${OPTIONS} threading=single,multi ${LINK_OPTS} \
309 --includedir="${D}usr/include" \
310 --libdir="${D}usr/$(get_libdir)" \
311 --buildid=debug \
312 $(use python && echo --python-buildid=${PYTHON_ABI}) \
313 install || die "Installation of Boost debug libraries failed"
314 fi
315
316 if use python; then
317 rm -r ${PYTHON_DIRS} || die
318
319 # Move mpi.so Python module to Python site-packages directory and make sure it is slotted.
320 if use mpi; then
321 mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
322 mv "${D}usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
323 cat << EOF > "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py" || die
324 import sys
325 if sys.platform.startswith('linux'):
326 import DLFCN
327 flags = sys.getdlopenflags()
328 sys.setdlopenflags(DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL)
329 from . import mpi
330 sys.setdlopenflags(flags)
331 del DLFCN, flags
332 else:
333 from . import mpi
334 del sys
335 EOF
336 fi
337 fi
338 }
339 if use python; then
340 python_execute_function installation
341 else
342 installation
343 fi
344
345 use python || rm -rf "${D}usr/include/boost-${MAJOR_PV}/boost"/python* || die
346
347 if use doc; then
348 find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
349 dohtml \
350 -A pdf,txt,cpp,hpp \
351 *.{htm,html,png,css} \
352 -r doc
353 dohtml \
354 -A pdf,txt \
355 -r tools
356 insinto /usr/share/doc/${PF}/html
357 doins -r libs
358 doins -r more
359
360 # To avoid broken links
361 insinto /usr/share/doc/${PF}/html
362 doins LICENSE_1_0.txt
363
364 dosym /usr/include/boost-${MAJOR_PV}/boost /usr/share/doc/${PF}/html/boost
365 fi
366
367 pushd "${D}usr/$(get_libdir)" > /dev/null || die
368
369 # Remove (unversioned) symlinks
370 # And check for what we remove to catch bugs
371 # got a better idea how to do it? tell me!
372 local f
373 for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v "${MAJOR_PV}"); do
374 if [[ ! -h "${f}" ]]; then
375 eerror "Tried to remove '${f}' which is a regular file instead of a symlink"
376 die "Slotting/naming of the libraries broken!"
377 fi
378 rm "${f}" || die
379 done
380
381 # The threading libs obviously always gets the "-mt" (multithreading) tag
382 # some packages seem to have a problem with it. Creating symlinks...
383
384 if use static-libs; then
385 THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}.a libboost_thread-mt-${MAJOR_PV}$(get_libname)"
386 else
387 THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}$(get_libname)"
388 fi
389 local lib
390 for lib in ${THREAD_LIBS}; do
391 dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
392 done
393
394 # The same goes for the mpi libs
395 if use mpi; then
396 if use static-libs; then
397 MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}.a libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
398 else
399 MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
400 fi
401 local lib
402 for lib in ${MPI_LIBS}; do
403 dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
404 done
405 fi
406
407 if use debug; then
408 if use static-libs; then
409 THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname) libboost_thread-mt-${MAJOR_PV}-debug.a"
410 else
411 THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname)"
412 fi
413
414 local lib
415 for lib in ${THREAD_DEBUG_LIBS}; do
416 dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
417 done
418
419 if use mpi; then
420 if use static-libs; then
421 MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug.a libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
422 else
423 MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
424 fi
425
426 local lib
427 for lib in ${MPI_DEBUG_LIBS}; do
428 dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})"
429 done
430 fi
431 fi
432
433 # Create a subdirectory with completely unversioned symlinks
434 dodir /usr/$(get_libdir)/boost-${MAJOR_PV}
435
436 local f
437 for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v debug); do
438 dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}}
439 done
440
441 if use debug; then
442 dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug
443 local f
444 for f in $(ls -1 ${LIBRARY_TARGETS} | grep debug); do
445 dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug}
446 done
447 fi
448
449 popd > /dev/null || die
450
451 if use tools; then
452 pushd dist/bin > /dev/null || die
453 # Append version postfix to binaries for slotting
454 local b
455 for b in *; do
456 newbin "${b}" "${b}-${MAJOR_PV}"
457 done
458 popd > /dev/null || die
459
460 pushd dist > /dev/null || die
461 insinto /usr/share
462 doins -r share/boostbook
463 # Append version postfix for slotting
464 mv "${D}usr/share/boostbook" "${D}usr/share/boostbook-${MAJOR_PV}" || die
465 popd > /dev/null || die
466 fi
467
468 pushd status > /dev/null || die
469 if [[ -f regress.log ]]; then
470 docinto status
471 dohtml *.html ../boost.png
472 dodoc regress.log
473 fi
474 popd > /dev/null || die
475
476 # boost's build system truely sucks for not having a destdir. Because for
477 # this reason we are forced to build with a prefix that includes the
478 # DESTROOT, dynamic libraries on Darwin end messed up, referencing the
479 # DESTROOT instread of the actual EPREFIX. There is no way out of here
480 # but to do it the dirty way of manually setting the right install_names.
481 if [[ ${CHOST} == *-darwin* ]]; then
482 einfo "Working around completely broken build-system(tm)"
483 local d
484 for d in "${ED}"usr/lib/*.dylib; do
485 if [[ -f ${d} ]]; then
486 # fix the "soname"
487 ebegin " correcting install_name of ${d#${ED}}"
488 install_name_tool -id "/${d#${D}}" "${d}"
489 eend $?
490 # fix references to other libs
491 refs=$(otool -XL "${d}" | \
492 sed -e '1d' -e 's/^\t//' | \
493 grep "^libboost_" | \
494 cut -f1 -d' ')
495 local r
496 for r in ${refs}; do
497 ebegin " correcting reference to ${r}"
498 install_name_tool -change \
499 "${r}" \
500 "${EPREFIX}/usr/lib/${r}" \
501 "${d}"
502 eend $?
503 done
504 fi
505 done
506 fi
507 }
508
509 src_test() {
510 testing() {
511 if use python; then
512 local dir
513 for dir in ${PYTHON_DIRS}; do
514 cp -pr ${dir}-${PYTHON_ABI} ${dir} || die "Copying of '${dir}-${PYTHON_ABI}' to '${dir}' failed"
515 done
516
517 if use mpi; then
518 cp -p stage/lib/mpi.so-${PYTHON_ABI} "${MPI_PYTHON_MODULE}" || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to '${MPI_PYTHON_MODULE}' failed"
519 cp -p stage/lib/mpi.so-${PYTHON_ABI} stage/lib/mpi.so || die "Copying of 'stage/lib/mpi.so-${PYTHON_ABI}' to 'stage/lib/mpi.so' failed"
520 fi
521 fi
522
523 pushd tools/regression/build > /dev/null || die
524 einfo "Using the following command to build test helpers:"
525 einfo "${BJAM} -q -d+2 gentoorelease --user-config=../../../user-config.jam ${OPTIONS} process_jam_log compiler_status"
526
527 ${BJAM} -q -d+2 \
528 gentoorelease \
529 --user-config=../../../user-config.jam \
530 ${OPTIONS} \
531 process_jam_log compiler_status \
532 || die "Building of regression test helpers failed"
533
534 popd > /dev/null || die
535 pushd status > /dev/null || die
536
537 # Some of the test-checks seem to rely on regexps
538 export LC_ALL="C"
539
540 # The following is largely taken from tools/regression/run_tests.sh,
541 # but adapted to our needs.
542
543 # Run the tests & write them into a file for postprocessing
544 einfo "Using the following command to test:"
545 einfo "${BJAM} --user-config=../user-config.jam ${OPTIONS} --dump-tests"
546
547 ${BJAM} \
548 --user-config=../user-config.jam \
549 ${OPTIONS} \
550 --dump-tests 2>&1 | tee regress.log || die
551
552 # Postprocessing
553 cat regress.log | "$(find ../tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease -name process_jam_log)" --v2
554 if test $? != 0; then
555 die "Postprocessing the build log failed"
556 fi
557
558 cat > comment.html <<- __EOF__
559 <p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
560 __EOF__
561
562 # Generate the build log html summary page
563 "$(find ../tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease -name compiler_status)" --v2 \
564 --comment comment.html "${S}" \
565 cs-$(uname).html cs-$(uname)-links.html
566 if test $? != 0; then
567 die "Generating the build log html summary page failed"
568 fi
569
570 # And do some cosmetic fixes :)
571 sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html || die
572
573 popd > /dev/null || die
574
575 if use python; then
576 rm -r ${PYTHON_DIRS} || die
577 fi
578 }
579 if use python; then
580 python_execute_function -f -q testing
581 else
582 testing
583 fi
584 }
585
586 pkg_postinst() {
587 # mostly copy/paste from eselect-boost
588
589 _boost_tools="bcp bjam compiler_status inspect library_status process_jam_log quickbook wave"
590
591 # ... meaning: <none> and -debug:
592 _suffices="|-debug"
593
594 einfo "Removing symlinks from old version"
595
596 local link
597 for link in "${ROOT}/usr/include/boost" "${ROOT}/usr/share/boostbook" ; do
598 if [[ -L "${link}" ]] ; then
599 rm "${link}" || die -q "Couldn't remove \"${link}\" symlink"
600 else
601 [[ -e "${link}" ]] && die -q "\"${link}\" exists and isn't a symlink"
602 fi
603 done
604
605 pushd "${ROOT}/usr/lib64" 1>/dev/null
606 local lib
607 for lib in libboost_*.{a,so} ; do
608 [[ -L "${lib}" && "${lib}" != libboost_*[[:digit:]]_[[:digit:]][[:digit:]]@(${_suffices}).@(a|so) ]] || continue
609 rm "${lib}" || die -q "Unable to remove \"/usr/lib64/${lib}\" symlink"
610 done
611 popd 1>/dev/null
612
613 pushd "${ROOT}"/usr/bin 1>/dev/null
614 local tool
615 for tool in ${_boost_tools} ; do
616 [[ -L "${tool}" ]] && ( rm "${tool}" || die -q "Unable to remove \"/usr/bin/${tool}\" symlink" )
617 done
618 popd 1>/dev/null
619
620 local python_module python_module_dir
621 for python_module in mpi.py mpi_debug.py ; do
622 for python_module_dir in "${ROOT}"usr/lib64/python*/site-packages ; do
623 if [[ -e "${python_module_dir}/${python_module}" ]] ; then
624 rm "${python_module_dir}/${python_module}" || die -q "Unable to remove \"${python_module_dir}/${python_module}\""
625 fi
626 done
627 done
628
629 # Deprecated code for older versions of Boost.
630 local mod="mpi.so"
631 for moddir in "${ROOT}"/usr/lib64/python*/site-packages ; do
632 if [ -L "${moddir}/${mod}" ] ; then
633 rm "${moddir}/${mod}" || die -q "Unable to remove \"${moddir}/${mod}\" symlink"
634 else
635 [[ -e "${moddir}/${mod}" ]] && die -q "\"${moddir}/${mod}\" exists and isn't a symlink"
636 fi
637 done
638
639 if [ -L "${ROOT}/etc/eselect/boost/active" ] ; then
640 rm "${ROOT}/etc/eselect/boost/active" || die -q "Unable to remove \"${ROOT}/etc/eselect/boost/active\" symlink"
641 else
642 [[ -e "${ROOT}/etc/eselect/boost/active" ]] && die -q "\"${ROOT}/etc/eselect/boost/active\" exists and isn't a symlink"
643 fi
644 }