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