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: ChangeLog boost-1.45.0.ebuild
Date: Thu, 06 Jan 2011 14:11:32
Message-Id: 20110106141122.5581820057@flycatcher.gentoo.org
1 hwoarang 11/01/06 14:11:22
2
3 Modified: ChangeLog
4 Added: boost-1.45.0.ebuild
5 Log:
6 Version bump. Thanks to Duncan Exon Smith, Simone Scanzoni and Sebastian Luther for the ebuild. Bug #320039
7
8 (Portage version: 2.1.9.29/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.205 dev-libs/boost/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/ChangeLog?rev=1.205&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/ChangeLog?rev=1.205&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/ChangeLog?r1=1.204&r2=1.205
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v
20 retrieving revision 1.204
21 retrieving revision 1.205
22 diff -u -r1.204 -r1.205
23 --- ChangeLog 1 Jan 2011 23:56:37 -0000 1.204
24 +++ ChangeLog 6 Jan 2011 14:11:22 -0000 1.205
25 @@ -1,6 +1,13 @@
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.204 2011/01/01 23:56:37 tomka Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v 1.205 2011/01/06 14:11:22 hwoarang Exp $
30 +
31 +*boost-1.45.0 (06 Jan 2011)
32 +
33 + 06 Jan 2011; Markos Chandras <hwoarang@g.o> +boost-1.45.0.ebuild,
34 + +files/remove-toolset-1.45.0.patch:
35 + Version bump. Thanks to Duncan Exon Smith, Simone Scanzoni and Sebastian
36 + Luther for the ebuild. Bug #320039
37
38 01 Jan 2011; Thomas Kahle <tomka@g.o> boost-1.42.0-r2.ebuild:
39 x86 stable per bug 344677
40
41
42
43 1.1 dev-libs/boost/boost-1.45.0.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/boost-1.45.0.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/boost/boost-1.45.0.ebuild?rev=1.1&content-type=text/plain
47
48 Index: boost-1.45.0.ebuild
49 ===================================================================
50 # Copyright 1999-2011 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.45.0.ebuild,v 1.1 2011/01/06 14:11:22 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-1.2.9[cxx] <sys-cluster/openmpi-1.2.9[-nocxx] sys-cluster/mpich2[cxx,threads] sys-cluster/lam-mpi ) )
71 sys-libs/zlib
72 python? ( virtual/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="bjam-${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="1024"
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
138 # bug 291660
139 #epatch "${FILESDIR}/boost-${PV}-parameter-needs-python.patch"
140 }
141
142 src_configure() {
143 einfo "Writing new user-config.jam"
144
145 local compiler compilerVersion compilerExecutable mpi
146 if [[ ${CHOST} == *-darwin* ]] ; then
147 compiler=darwin
148 compilerVersion=$(gcc-fullversion)
149 compilerExecutable=$(tc-getCXX)
150 # we need to add the prefix, and in two cases this exceeds, so prepare
151 # for the largest possible space allocation
152 append-ldflags -Wl,-headerpad_max_install_names
153 else
154 compiler=gcc
155 compilerVersion=$(gcc-version)
156 compilerExecutable=$(tc-getCXX)
157 fi
158
159 # Using -fno-strict-aliasing to prevent possible creation of invalid code.
160 append-flags -fno-strict-aliasing
161
162 # bug 298489
163 if use ppc || use ppc64 ; then
164 [[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
165 fi;
166
167 use mpi && mpi="using mpi ;"
168
169 if use python ; then
170 pystring="using python : $(python_get_version) : /usr : $(python_get_includedir) : $(python_get_libdir) ;"
171 fi
172
173 cat > "${S}/user-config.jam" << __EOF__
174
175 variant gentoorelease : release : <optimization>none <debug-symbols>none ;
176 variant gentoodebug : debug : <optimization>none ;
177
178 using ${compiler} : ${compilerVersion} : ${compilerExecutable} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
179
180 ${pystring}
181
182 ${mpi}
183
184 __EOF__
185
186 # Maintainer information:
187 # The debug-symbols=none and optimization=none
188 # are not official upstream flags but a Gentoo
189 # specific patch to make sure that all our
190 # CXXFLAGS/LDFLAGS are being respected.
191 # Using optimization=off would for example add
192 # "-O0" and override "-O2" set by the user.
193 # Please take a look at the boost-build ebuild
194 # for more infomration.
195
196 use icu && OPTIONS="-sICU_PATH=/usr"
197 use mpi || OPTIONS="${OPTIONS} --without-mpi"
198 use python || OPTIONS="${OPTIONS} --without-python"
199
200 # https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch
201 if use sparc || use mips || use hppa || use arm || use x86-fbsd || use sh; then
202 OPTIONS="${OPTIONS} --disable-long-double"
203 fi
204
205 OPTIONS="${OPTIONS} pch=off --user-config=\"${S}/user-config.jam\" --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}/usr\" --layout=versioned"
206
207 if use static-libs ; then
208 LINK_OPTS="link=shared,static"
209 LIBRARY_TARGETS="*.a *$(get_libname)"
210 else
211 LINK_OPTS="link=shared"
212 #there is no dynamicly linked version of libboost_test_exec_monitor
213 LIBRARY_TARGETS="libboost_test_exec_monitor*.a *$(get_libname)"
214 fi
215 }
216
217 src_compile() {
218 jobs=$( echo " ${MAKEOPTS} " | \
219 sed -e 's/ --jobs[= ]/ -j /g' \
220 -e 's/ -j \([1-9][0-9]*\)/ -j\1/g' \
221 -e 's/ -j\>/ -j1/g' | \
222 ( while read -d ' ' j ; do if [[ "${j#-j}" = "$j" ]]; then continue; fi; jobs="${j#-j}"; done; echo ${jobs} ) )
223 if [[ "${jobs}" != "" ]]; then NUMJOBS="-j"${jobs}; fi;
224
225 export BOOST_ROOT="${S}"
226
227 einfo "Using the following command to build: "
228 einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared"
229
230 ${BJAM} ${NUMJOBS} -q -d+2 \
231 gentoorelease \
232 ${OPTIONS} \
233 threading=single,multi ${LINK_OPTS} runtime-link=shared \
234 || die "building boost failed"
235
236 # ... and do the whole thing one more time to get the debug libs
237 if use debug ; then
238 einfo "Using the following command to build: "
239 einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoodebug ${OPTIONS} threading=single,multi ${LINK_OPTS} runtime-link=shared --buildid=debug"
240
241 ${BJAM} ${NUMJOBS} -q -d+2 \
242 gentoodebug \
243 ${OPTIONS} \
244 threading=single,multi ${LINK_OPTS} runtime-link=shared \
245 --buildid=debug \
246 || die "building boost failed"
247 fi
248
249 if use tools; then
250 cd "${S}/tools/"
251 einfo "Using the following command to build the tools: "
252 einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease ${OPTIONS}"
253
254 ${BJAM} ${NUMJOBS} -q -d+2\
255 gentoorelease \
256 ${OPTIONS} \
257 || die "building tools failed"
258 fi
259
260 }
261
262 src_install () {
263 export BOOST_ROOT="${S}"
264
265 einfo "Using the following command to install: "
266 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"
267
268 ${BJAM} -q -d+2 \
269 gentoorelease \
270 ${OPTIONS} \
271 threading=single,multi ${LINK_OPTS} runtime-link=shared \
272 --includedir="${D}/usr/include" \
273 --libdir="${D}/usr/$(get_libdir)" \
274 install || die "install failed for options '${OPTIONS}'"
275
276 if use debug ; then
277 einfo "Using the following command to install: "
278 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"
279
280 ${BJAM} -q -d+2 \
281 gentoodebug \
282 ${OPTIONS} \
283 threading=single,multi ${LINK_OPTS} runtime-link=shared \
284 --includedir="${D}/usr/include" \
285 --libdir="${D}/usr/$(get_libdir)" \
286 --buildid=debug \
287 install || die "install failed for options '${OPTIONS}'"
288 fi
289
290 use python || rm -rf "${D}/usr/include/boost-${MAJOR_PV}/boost"/python* || die
291
292 dodir /usr/share/boost-eselect/profiles/${SLOT} || die
293 touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/default" || die
294 if use debug ; then
295 touch "${D}/usr/share/boost-eselect/profiles/${SLOT}/debug" || die
296 fi
297
298 # Move the mpi.so to the right place and make sure it's slotted
299 if use mpi && use python; then
300 mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die
301 mv "${D}/usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/" || die
302 touch "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py" || die
303 _add_line "python=\"$(python_get_sitedir)/boost_${MAJOR_PV}/mpi.so\""
304 fi
305
306 if use doc ; then
307 find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf
308 dohtml \
309 -A pdf,txt,cpp,hpp \
310 *.{htm,html,png,css} \
311 -r doc more people wiki || die
312 dohtml \
313 -A pdf,txt \
314 -r tools || die
315 insinto /usr/share/doc/${PF}/html
316 doins -r libs || die
317
318 # To avoid broken links
319 insinto /usr/share/doc/${PF}/html
320 doins LICENSE_1_0.txt || die
321
322 dosym /usr/include/boost-${MAJOR_PV}/boost /usr/share/doc/${PF}/html/boost || die
323 fi
324
325 cd "${D}/usr/$(get_libdir)" || die
326
327 # Remove (unversioned) symlinks
328 # And check for what we remove to catch bugs
329 # got a better idea how to do it? tell me!
330 for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v "${MAJOR_PV}") ; do
331 if [ ! -h "${f}" ] ; then
332 eerror "Ups, tried to remove '${f}' which is a a real file instead of a symlink"
333 die "slotting/naming of the libs broken!"
334 fi
335 rm "${f}" || die
336 done
337
338 # The threading libs obviously always gets the "-mt" (multithreading) tag
339 # some packages seem to have a problem with it. Creating symlinks...
340
341 if use static-libs ; then
342 THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}.a libboost_thread-mt-${MAJOR_PV}$(get_libname)"
343 else
344 THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}$(get_libname)"
345 fi
346 for lib in ${THREAD_LIBS} ; do
347 dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
348 done
349
350 # The same goes for the mpi libs
351 if use mpi ; then
352 if use static-libs ; then
353 MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}.a libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
354 else
355 MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}$(get_libname)"
356 fi
357 for lib in ${MPI_LIBS} ; do
358 dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
359 done
360 fi
361
362 if use debug ; then
363 if use static-libs ; then
364 THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname) libboost_thread-mt-${MAJOR_PV}-debug.a"
365 else
366 THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname)"
367 fi
368
369 for lib in ${THREAD_DEBUG_LIBS} ; do
370 dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
371 done
372
373 if use mpi ; then
374 if use static-libs ; then
375 MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug.a libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
376 else
377 MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)"
378 fi
379
380 for lib in ${MPI_DEBUG_LIBS} ; do
381 dosym ${lib} "/usr/$(get_libdir)/$(sed -e 's/-mt//' <<< ${lib})" || die
382 done
383 fi
384 fi
385
386 # Create a subdirectory with completely unversioned symlinks
387 # and store the names in the profiles-file for eselect
388 dodir /usr/$(get_libdir)/boost-${MAJOR_PV} || die
389
390 _add_line "libs=\"" default
391 for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v debug) ; do
392 dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}/${f/-${MAJOR_PV}} || die
393 _add_line "/usr/$(get_libdir)/${f}" default
394 done
395 _add_line "\"" default
396
397 if use debug ; then
398 _add_line "libs=\"" debug
399 dodir /usr/$(get_libdir)/boost-${MAJOR_PV}-debug || die
400 for f in $(ls -1 ${LIBRARY_TARGETS} | grep debug) ; do
401 dosym ../${f} /usr/$(get_libdir)/boost-${MAJOR_PV}-debug/${f/-${MAJOR_PV}-debug} || die
402 _add_line "/usr/$(get_libdir)/${f}" debug
403 done
404 _add_line "\"" debug
405
406 _add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" debug
407 _add_line "suffix=\"-debug\"" debug
408 fi
409
410 _add_line "includes=\"/usr/include/boost-${MAJOR_PV}/boost\"" default
411
412 if use tools; then
413 cd "${S}/dist/bin" || die
414 # Append version postfix to binaries for slotting
415 _add_line "bins=\""
416 for b in * ; do
417 newbin "${b}" "${b}-${MAJOR_PV}" || die
418 _add_line "/usr/bin/${b}-${MAJOR_PV}"
419 done
420 _add_line "\""
421
422 cd "${S}/dist" || die
423 insinto /usr/share || die
424 doins -r share/boostbook || die
425 # Append version postfix for slotting
426 mv "${D}/usr/share/boostbook" "${D}/usr/share/boostbook-${MAJOR_PV}" || die
427 _add_line "dirs=\"/usr/share/boostbook-${MAJOR_PV}\""
428 fi
429
430 cd "${S}/status" || die
431 if [ -f regress.log ] ; then
432 docinto status || die
433 dohtml *.html ../boost.png || die
434 dodoc regress.log || die
435 fi
436
437 use python && python_need_rebuild
438
439 # boost's build system truely sucks for not having a destdir. Because for
440 # this reason we are forced to build with a prefix that includes the
441 # DESTROOT, dynamic libraries on Darwin end messed up, referencing the
442 # DESTROOT instread of the actual EPREFIX. There is no way out of here
443 # but to do it the dirty way of manually setting the right install_names.
444 [[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
445 if [[ ${CHOST} == *-darwin* ]] ; then
446 einfo "Working around completely broken build-system(tm)"
447 for d in "${ED}"usr/lib/*.dylib ; do
448 if [[ -f ${d} ]] ; then
449 # fix the "soname"
450 ebegin " correcting install_name of ${d#${ED}}"
451 install_name_tool -id "/${d#${D}}" "${d}"
452 eend $?
453 # fix references to other libs
454 refs=$(otool -XL "${d}" | \
455 sed -e '1d' -e 's/^\t//' | \
456 grep "^libboost_" | \
457 cut -f1 -d' ')
458 for r in ${refs} ; do
459 ebegin " correcting reference to ${r}"
460 install_name_tool -change \
461 "${r}" \
462 "${EPREFIX}/usr/lib/${r}" \
463 "${d}"
464 eend $?
465 done
466 fi
467 done
468 fi
469 }
470
471 src_test() {
472 export BOOST_ROOT=${S}
473
474 cd "${S}/tools/regression/build" || die
475 einfo "Using the following command to build test helpers: "
476 einfo "${BJAM} -q -d+2 gentoorelease ${OPTIONS} process_jam_log compiler_status"
477
478 ${BJAM} -q -d+2 \
479 gentoorelease \
480 ${OPTIONS} \
481 process_jam_log compiler_status \
482 || die "building regression test helpers failed"
483
484 cd "${S}/status" || die
485
486 # Some of the test-checks seem to rely on regexps
487 export LC_ALL="C"
488
489 # The following is largely taken from tools/regression/run_tests.sh,
490 # but adapted to our needs.
491
492 # Run the tests & write them into a file for postprocessing
493 einfo "Using the following command to test: "
494 einfo "${BJAM} ${OPTIONS} --dump-tests"
495
496 ${BJAM} \
497 ${OPTIONS} \
498 --dump-tests 2>&1 | tee regress.log || die
499
500 # Postprocessing
501 cat regress.log | "${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/process_jam_log" --v2
502 if test $? != 0 ; then
503 die "Postprocessing the build log failed"
504 fi
505
506 cat > "${S}/status/comment.html" <<- __EOF__
507 <p>Tests are run on a <a href="http://www.gentoo.org">Gentoo</a> system.</p>
508 __EOF__
509
510 # Generate the build log html summary page
511 "${S}/tools/regression/build/bin/gcc-$(gcc-version)/gentoorelease/pch-off/compiler_status" --v2 \
512 --comment "${S}/status/comment.html" "${S}" \
513 cs-$(uname).html cs-$(uname)-links.html
514 if test $? != 0 ; then
515 die "Generating the build log html summary page failed"
516 fi
517
518 # And do some cosmetic fixes :)
519 sed -i -e 's|http://www.boost.org/boost.png|boost.png|' *.html || die
520 }
521
522 pkg_postinst() {
523 if use eselect ; then
524 eselect boost update || ewarn "eselect boost update failed."
525 fi
526
527 if [ ! -h "${ROOT}/etc/eselect/boost/active" ] ; then
528 elog "No active boost version found. Calling eselect to select one..."
529 eselect boost update || ewarn "eselect boost update failed."
530 fi
531 }