Gentoo Archives: gentoo-commits

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