diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-11-08 03:28:05 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-11-08 03:28:05 +0000 |
commit | ad50c9ede86d3da92215456c0782936aab6b9d2a (patch) | |
tree | 77d1f7347235291522bbfb81002614b24d147865 /dev-libs | |
parent | Bump to avoid using versioned names. (diff) | |
download | gentoo-2-ad50c9ede86d3da92215456c0782936aab6b9d2a.tar.gz gentoo-2-ad50c9ede86d3da92215456c0782936aab6b9d2a.tar.bz2 gentoo-2-ad50c9ede86d3da92215456c0782936aab6b9d2a.zip |
Simplify bjam handling; use the unversioned commands from boost-build-1.52.0-r1; force-disabled C++11 support; add threads USE flag and only build either single- or multi-threaded libraries so that there is no doubt on what's being linked in (a deptree check shows that they can cross and collide); use the system layout, designed for Unix installs (closes bug #442116 together with part of Arfrever's patch); drop old code (bug #442114 by Arfrever); use proper GNU stack markings (bug #440284); fix boost.mpi python module (bug #441806) and optimize the module (sneaked in the same bug).
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 1CD13C8AD4301342)
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/boost/ChangeLog | 15 | ||||
-rw-r--r-- | dev-libs/boost/boost-1.52.0-r1.ebuild (renamed from dev-libs/boost/boost-1.52.0.ebuild) | 173 | ||||
-rw-r--r-- | dev-libs/boost/metadata.xml | 4 |
3 files changed, 74 insertions, 118 deletions
diff --git a/dev-libs/boost/ChangeLog b/dev-libs/boost/ChangeLog index cbd09c41e91b..76c80378fc56 100644 --- a/dev-libs/boost/ChangeLog +++ b/dev-libs/boost/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for dev-libs/boost # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v 1.275 2012/11/05 18:23:56 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/ChangeLog,v 1.276 2012/11/08 03:28:05 flameeyes Exp $ + +*boost-1.52.0-r1 (08 Nov 2012) + + 08 Nov 2012; Diego E. Pettenò <flameeyes@gentoo.org> +boost-1.52.0-r1.ebuild, + -boost-1.52.0.ebuild, metadata.xml: + Simplify bjam handling; use the unversioned commands from boost- + build-1.52.0-r1; force-disabled C++11 support; add threads USE flag and only + build either single- or multi-threaded libraries so that there is no doubt on + what's being linked in (a deptree check shows that they can cross and + collide); use the system layout, designed for Unix installs (closes bug + #442116 together with part of Arfrever's patch); drop old code (bug #442114 by + Arfrever); use proper GNU stack markings (bug #440284); fix boost.mpi python + module (bug #441806) and optimize the module (sneaked in the same bug). *boost-1.52.0 (05 Nov 2012) diff --git a/dev-libs/boost/boost-1.52.0.ebuild b/dev-libs/boost/boost-1.52.0-r1.ebuild index 2cd7a8306294..a7df3b37587b 100644 --- a/dev-libs/boost/boost-1.52.0.ebuild +++ b/dev-libs/boost/boost-1.52.0-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.52.0.ebuild,v 1.1 2012/11/05 18:23:56 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/boost/boost-1.52.0-r1.ebuild,v 1.1 2012/11/08 03:28:05 flameeyes Exp $ EAPI="5" PYTHON_DEPEND="python? *" @@ -19,7 +19,7 @@ LICENSE="Boost-1.0" SLOT=0 MAJOR_V="$(get_version_component_range 1-2)" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" -IUSE="debug doc icu mpi python static-libs tools" +IUSE="debug doc icu mpi python static-libs +threads tools" RDEPEND="icu? ( >=dev-libs/icu-3.6:= ) !icu? ( virtual/libiconv ) @@ -31,9 +31,6 @@ DEPEND="${RDEPEND} S=${WORKDIR}/${MY_P} -MAJOR_PV=$(replace_all_version_separators _ ${MAJOR_V}) -BJAM="b2-${MAJOR_PV}" - create_user-config.jam() { local compiler compiler_version compiler_executable @@ -79,6 +76,23 @@ src_prepare() { "${FILESDIR}/${PN}-1.48.0-python_linking.patch" \ "${FILESDIR}/${PN}-1.48.0-disable_icu_rpath.patch" \ "${FILESDIR}/remove-toolset-1.48.0.patch" + + # Avoid a patch for now + for file in libs/context/src/asm/*.S; do + cat - >> $file <<EOF + +#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits +#endif +EOF + done +} + +ejam() { + local NUMJOBS="-j$(makeopts_jobs)" + + echo b2 ${NUMJOBS} -q -d+2 "$@" + b2 ${NUMJOBS} -q -d+2 "$@" } src_configure() { @@ -95,17 +109,15 @@ src_configure() { [[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec fi + # Do _not_ use C++11 yet, make sure to force GNU C++ 98 standard. + append-cxxflags -std=gnu++98 + use icu && OPTIONS+=" -sICU_PATH=/usr" use icu || OPTIONS+=" --disable-icu boost.locale.icu=off" use mpi || OPTIONS+=" --without-mpi" use python || OPTIONS+=" --without-python" - # https://svn.boost.org/trac/boost/attachment/ticket/2597/add-disable-long-double.patch - if use sparc || { use mips && [[ ${ABI} = "o32" ]]; } || use hppa || use arm || use x86-fbsd || use sh; then - OPTIONS+=" --disable-long-double" - fi - - OPTIONS+=" pch=off --boost-build=/usr/share/boost-build-${MAJOR_PV} --prefix=\"${D}usr\" --layout=versioned" + OPTIONS+=" pch=off --boost-build=/usr/share/boost-build --prefix=\"${D}usr\" --layout=system" if use static-libs; then LINK_OPTS="link=shared,static" @@ -121,30 +133,21 @@ src_compile() { export BOOST_ROOT="${S}" PYTHON_DIRS="" MPI_PYTHON_MODULE="" - NUMJOBS="-j$(makeopts_jobs)" building() { create_user-config.jam - einfo "Using the following command to build:" - 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})" - - ${BJAM} ${NUMJOBS} -q -d+2 \ - gentoorelease \ + ejam gentoorelease \ --user-config=user-config.jam \ - ${OPTIONS} threading=single,multi ${LINK_OPTS} \ + ${OPTIONS} threading=$(usex threads multi single) ${LINK_OPTS} \ $(use python && echo --python-buildid=${PYTHON_ABI}) \ || die "Building of Boost libraries failed" # ... and do the whole thing one more time to get the debug libs if use debug; then - einfo "Using the following command to build:" - 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})" - - ${BJAM} ${NUMJOBS} -q -d+2 \ - gentoodebug \ + ejam gentoodebug \ --user-config=user-config.jam \ - ${OPTIONS} threading=single,multi ${LINK_OPTS} \ + ${OPTIONS} threading=$(usex threads multi single) ${LINK_OPTS} \ --buildid=debug \ $(use python && echo --python-buildid=${PYTHON_ABI}) \ || die "Building of Boost debug libraries failed" @@ -188,11 +191,8 @@ src_compile() { if use tools; then pushd tools > /dev/null || die - einfo "Using the following command to build the tools:" - einfo "${BJAM} ${NUMJOBS} -q -d+2 gentoorelease --user-config=../user-config.jam ${OPTIONS}" - ${BJAM} ${NUMJOBS} -q -d+2\ - gentoorelease \ + ejam gentoorelease \ --user-config=../user-config.jam \ ${OPTIONS} \ || die "Building of Boost tools failed" @@ -217,12 +217,9 @@ src_install () { fi einfo "Using the following command to install:" - 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" - - ${BJAM} -q -d+2 \ - gentoorelease \ + ejam gentoorelease \ --user-config=user-config.jam \ - ${OPTIONS} threading=single,multi ${LINK_OPTS} \ + ${OPTIONS} threading=$(usex threads multi single) ${LINK_OPTS} \ --includedir="${D}usr/include" \ --libdir="${D}usr/$(get_libdir)" \ $(use python && echo --python-buildid=${PYTHON_ABI}) \ @@ -230,12 +227,10 @@ src_install () { if use debug; then einfo "Using the following command to install:" - 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})" - ${BJAM} -q -d+2 \ - gentoodebug \ + ejam gentoodebug \ --user-config=user-config.jam \ - ${OPTIONS} threading=single,multi ${LINK_OPTS} \ + ${OPTIONS} threading=$(usex threads multi single) ${LINK_OPTS} \ --includedir="${D}usr/include" \ --libdir="${D}usr/$(get_libdir)" \ --buildid=debug \ @@ -246,11 +241,12 @@ src_install () { if use python; then rm -r ${PYTHON_DIRS} || die - # Move mpi.so Python module to Python site-packages directory and make sure it is slotted. + # Move mpi.so Python module to Python site-packages directory. + # https://svn.boost.org/trac/boost/ticket/2838 if use mpi; then - mkdir -p "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die - mv "${D}usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost_${MAJOR_PV}" || die - cat << EOF > "${D}$(python_get_sitedir)/boost_${MAJOR_PV}/__init__.py" || die + dodir $(python_get_sitedir)/boost + mv "${D}usr/$(get_libdir)/mpi.so" "${D}$(python_get_sitedir)/boost" || die + cat << EOF > "${D}$(python_get_sitedir)/boost/__init__.py" || die import sys if sys.platform.startswith('linux'): import DLFCN @@ -272,7 +268,7 @@ EOF installation fi - use python || rm -rf "${D}usr/include/boost-${MAJOR_PV}/boost"/python* || die + use python || rm -rf "${D}usr/include/boost/python"* || die if use doc; then find libs/*/* -iname "test" -or -iname "src" | xargs rm -rf @@ -294,102 +290,33 @@ EOF dosym /usr/include/boost /usr/share/doc/${PF}/html/boost fi - dosym boost-${MAJOR_PV}/boost /usr/include/boost - pushd "${D}usr/$(get_libdir)" > /dev/null || die - # The threading libs obviously always gets the "-mt" (multithreading) tag - # some packages seem to have a problem with it. Creating symlinks... - - if use static-libs; then - THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}.a libboost_thread-mt-${MAJOR_PV}$(get_libname)" - else - THREAD_LIBS="libboost_thread-mt-${MAJOR_PV}$(get_libname)" - fi - local lib - for lib in ${THREAD_LIBS}; do - dosym ${lib} "/usr/$(get_libdir)/${lib/-mt/}" - done - - # The same goes for the mpi libs - if use mpi; then - if use static-libs; then - MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}.a libboost_mpi-mt-${MAJOR_PV}$(get_libname)" - else - MPI_LIBS="libboost_mpi-mt-${MAJOR_PV}$(get_libname)" - fi - local lib - for lib in ${MPI_LIBS}; do - dosym ${lib} "/usr/$(get_libdir)/${lib/-mt/}" - done - fi - - if use debug; then - if use static-libs; then - THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname) libboost_thread-mt-${MAJOR_PV}-debug.a" - else - THREAD_DEBUG_LIBS="libboost_thread-mt-${MAJOR_PV}-debug$(get_libname)" - fi - - local lib - for lib in ${THREAD_DEBUG_LIBS}; do - dosym ${lib} "/usr/$(get_libdir)/${lib/-mt/}" - done - - if use mpi; then - if use static-libs; then - MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug.a libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)" - else - MPI_DEBUG_LIBS="libboost_mpi-mt-${MAJOR_PV}-debug$(get_libname)" - fi - - local lib - for lib in ${MPI_DEBUG_LIBS}; do - dosym ${lib} "/usr/$(get_libdir)/${lib/-mt/}" - done - fi - fi - + local ext=$(get_libname) local f - for f in $(ls -1 ${LIBRARY_TARGETS} | grep -v debug); do - dosym ${f} /usr/$(get_libdir)/${f/-${MAJOR_PV}} + for f in $(ls -1 *${ext}); do + dosym ${f} /usr/$(get_libdir)/${f/${ext}/-mt${ext}} done if use debug; then dodir /usr/$(get_libdir)/boost-debug local f - for f in $(ls -1 ${LIBRARY_TARGETS} | grep debug); do - dosym ../${f} /usr/$(get_libdir)/boost-debug/${f/-${MAJOR_PV}-debug} + for f in $(ls -1 *-debug*.a *debug*${ext}); do + dosym ../${f} /usr/$(get_libdir)/boost-debug/${f/-debug} done fi popd > /dev/null || die if use tools; then - pushd dist/bin > /dev/null || die - # Append version postfix to binaries for slotting - local b - for b in *; do - newbin "${b}" "${b}-${MAJOR_PV}" - done - popd > /dev/null || die + dobin dist/bin/* pushd dist > /dev/null || die insinto /usr/share doins -r share/boostbook - # Append version postfix for slotting - mv "${D}usr/share/boostbook" "${D}usr/share/boostbook-${MAJOR_PV}" || die popd > /dev/null || die fi - pushd status > /dev/null || die - if [[ -f regress.log ]]; then - docinto status - dohtml *.html ../boost.png - dodoc regress.log - fi - popd > /dev/null || die - # boost's build system truely sucks for not having a destdir. Because for # this reason we are forced to build with a prefix that includes the # DESTROOT, dynamic libraries on Darwin end messed up, referencing the @@ -423,6 +350,18 @@ EOF fi } +pkg_postinst() { + if use mpi && use python; then + python_mod_optimize boost + fi +} + +pkg_postrm() { + if use mpi && use python; then + python_mod_cleanup boost + fi +} + # the tests will never fail because these are not intended as sanity # tests at all. They are more a way for upstream to check their own code # on new compilers. Since they would either be completely unreliable diff --git a/dev-libs/boost/metadata.xml b/dev-libs/boost/metadata.xml index 237060cb082a..b85d4bf23d57 100644 --- a/dev-libs/boost/metadata.xml +++ b/dev-libs/boost/metadata.xml @@ -15,5 +15,9 @@ libraries are not used by default, and should not be used unless you're developing against Boost. </flag> + <flag name='threads'> + Build multi-thread-compatible libraries instead of + single-threaded only. + </flag> </use> </pkgmetadata> |