# $Id$ PNAME="boost" PVER="1.47.0" PBUILD="r1" PCATEGORIE="dev-libs" DESCRIPTION="Boost provides free peer-reviewed portable C++ source libraries." HOMEPAGE="http://www.boost.org/" DEPEND=">= dev-lang/python-2.7" SRCFILE="${PNAME}_$(echo ${PVER} | sed "s:\.:_:g").tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}_$(echo ${PVER} | sed "s:\.:_:g")" sminclude python mbuild mtools SRC_URI=( sourceforge://${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) UP2DATE="updatecmd_sourceforge ${PNAME}" src_compile() { # bjam builded with gcc-4.2 segfaults without '-fno-strict-aliasing' # see: http://svn.boost.org/trac/boost/ticket/977 export CFLAGS="${CFLAGS} -fno-strict-aliasing" export CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" # first build bjam (must use cc not gcc to use our modified cflags) cd ${SRCDIR}/tools/jam/src ./build.sh cc || die # find bjam exec local bjam=$(find ${SRCDIR}/tools/jam/src/ -name bjam -a -type f) # build bcp cd ${SRCDIR}/tools/bcp ${bjam} || die # build boost libraries # --layout=tagged will add the "-mt" suffix for multithreaded libraries # and installs includes in /usr/include/boost. # --layout=system no longer adds the -mt suffix for multi-threaded libs. cd ${SRCDIR} ${bjam} \ release \ debug-symbols=off \ runtime-link=shared \ link=shared,static \ threading=single,multi \ -sPYTHON_ROOT=/usr \ -sPYTHON_VERSION=$(get_python_version) \ -sTOOLS=gcc \ --prefix=${BINDIR}/usr \ --layout=tagged \ || die # build pyste cd ${SRCDIR}/libs/python/pyste/install python setup.py build || die } src_install () { cd ${SRCDIR} # find bjam exec local bjam=$(find ${SRCDIR}/tools/jam/src/ -name bjam -a -type f) # install boost ${bjam} \ release \ debug-symbols=off \ runtime-link=shared \ link=shared,static \ threading=single,multi \ -sPYTHON_ROOT=/usr \ -sPYTHON_VERSION=$(get_python_version) \ -sTOOLS=gcc \ --prefix=${BINDIR}/usr \ --libdir=${BINDIR}/usr/$(mlibdir) \ --layout=tagged \ install \ || die # install bjam and bcp executables minstallexec ${bjam} || die minstallexec ${SRCDIR}/dist/bin/bcp || die # install pyste cd ${SRCDIR}/libs/python/pyste/install python setup.py install --no-compile --root ${BINDIR} || die # install docs cd ${SRCDIR} minstalldocs LICENSE_1_0.txt README || die minstalldir /usr/share/boost-build || die cd ${SRCDIR}/tools/build cp -pPR boost.css index.html v2/ ${BINDIR}/usr/share/boost-build || die # # fix libdir on 64bit arches # if [[ $(mlibdir) != lib ]] # then # mv ${BINDIR}/usr/lib ${BINDIR}/usr/$(mlibdir) || die # fi }