Magellan Linux

Contents of /branches/magellan-next/extras/boost/boost-1.47.0-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8694 - (show annotations) (download)
Wed Jul 27 19:27:42 2011 UTC (13 years, 3 months ago) by niro
File size: 2466 byte(s)
-rebuild against fixed python
1 # $Id$
2
3 PNAME="boost"
4 PVER="1.47.0"
5 PBUILD="r2"
6
7 PCATEGORIE="dev-libs"
8
9 DESCRIPTION="Boost provides free peer-reviewed portable C++ source libraries."
10 HOMEPAGE="http://www.boost.org/"
11
12 DEPEND=">= dev-lang/python-2.7
13 >= sys-libs/zlib-1.2"
14
15 SRCFILE="${PNAME}_$(echo ${PVER} | sed "s:\.:_:g").tar.bz2"
16 SRCDIR="${BUILDDIR}/${PNAME}_$(echo ${PVER} | sed "s:\.:_:g")"
17
18 sminclude python mbuild mtools
19
20 SRC_URI=(
21 sourceforge://${PNAME}/${SRCFILE}
22 mirror://${PNAME}/${SRCFILE}
23 )
24
25 UP2DATE="updatecmd_sourceforge ${PNAME}"
26
27 src_compile()
28 {
29 # bjam builded with gcc-4.2 segfaults without '-fno-strict-aliasing'
30 # see: http://svn.boost.org/trac/boost/ticket/977
31 export CFLAGS="${CFLAGS} -fno-strict-aliasing"
32 export CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
33
34 # first build bjam (must use cc not gcc to use our modified cflags)
35 cd ${SRCDIR}/tools/build/v2/engine
36 ./build.sh cc || die
37
38 # find bjam exec
39 local bjam=$(find ${SRCDIR}/tools/build/v2/engine -name bjam -a -type f)
40
41 # build bcp
42 cd ${SRCDIR}/tools/bcp
43 ${bjam} || die
44
45 # build boost libraries
46 # --layout=tagged will add the "-mt" suffix for multithreaded libraries
47 # and installs includes in /usr/include/boost.
48 # --layout=system no longer adds the -mt suffix for multi-threaded libs.
49 cd ${SRCDIR}
50 ${bjam} \
51 release \
52 debug-symbols=off \
53 runtime-link=shared \
54 link=shared,static \
55 threading=single,multi \
56 -sPYTHON_ROOT=/usr \
57 -sPYTHON_VERSION=$(get_python_version) \
58 -sTOOLS=gcc \
59 --prefix=${BINDIR}/usr \
60 --layout=tagged \
61 || die
62
63 # build pyste
64 cd ${SRCDIR}/libs/python/pyste/install
65 python_docompile || die
66 }
67
68 src_install ()
69 {
70 cd ${SRCDIR}
71
72 # find bjam exec
73 local bjam=$(find ${SRCDIR}/tools/build/v2/engine -name bjam -a -type f)
74
75 # install boost
76 ${bjam} \
77 release \
78 debug-symbols=off \
79 runtime-link=shared \
80 link=shared,static \
81 threading=single,multi \
82 -sPYTHON_ROOT=/usr \
83 -sPYTHON_VERSION=$(get_python_version) \
84 -sTOOLS=gcc \
85 --prefix=${BINDIR}/usr \
86 --libdir=${BINDIR}/usr/$(mlibdir) \
87 --layout=tagged \
88 install \
89 || die
90
91 # install bjam and bcp executables
92 minstallexec ${bjam} || die
93 minstallexec ${SRCDIR}/dist/bin/bcp || die
94
95 # install pyste
96 cd ${SRCDIR}/libs/python/pyste/install
97 python_doinstall || die
98
99 # install docs
100 cd ${SRCDIR}
101 minstalldocs LICENSE_1_0.txt README || die
102 minstalldir /usr/share/boost-build || die
103 cd ${SRCDIR}/tools/build
104 cp -pPR boost.css index.html v2/ ${BINDIR}/usr/share/boost-build || die
105 }