Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8464 - (show annotations) (download)
Tue Jul 19 07:14:02 2011 UTC (12 years, 9 months ago) by niro
File size: 2593 byte(s)
auto added: ver bump to 1.47.0-r1
1 # $Id$
2
3 PNAME="boost"
4 PVER="1.47.0"
5 PBUILD="r1"
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
14 SRCFILE="${PNAME}_$(echo ${PVER} | sed "s:\.:_:g").tar.bz2"
15 SRCDIR="${BUILDDIR}/${PNAME}_$(echo ${PVER} | sed "s:\.:_:g")"
16
17 sminclude python mbuild mtools
18
19 SRC_URI=(
20 sourceforge://${PNAME}/${SRCFILE}
21 mirror://${PNAME}/${SRCFILE}
22 )
23
24 UP2DATE="updatecmd_sourceforge ${PNAME}"
25
26 src_compile()
27 {
28 # bjam builded with gcc-4.2 segfaults without '-fno-strict-aliasing'
29 # see: http://svn.boost.org/trac/boost/ticket/977
30 export CFLAGS="${CFLAGS} -fno-strict-aliasing"
31 export CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
32
33 # first build bjam (must use cc not gcc to use our modified cflags)
34 cd ${SRCDIR}/tools/jam/src
35 ./build.sh cc || die
36
37 # find bjam exec
38 local bjam=$(find ${SRCDIR}/tools/jam/src/ -name bjam -a -type f)
39
40 # build bcp
41 cd ${SRCDIR}/tools/bcp
42 ${bjam} || die
43
44 # build boost libraries
45 # --layout=tagged will add the "-mt" suffix for multithreaded libraries
46 # and installs includes in /usr/include/boost.
47 # --layout=system no longer adds the -mt suffix for multi-threaded libs.
48 cd ${SRCDIR}
49 ${bjam} \
50 release \
51 debug-symbols=off \
52 runtime-link=shared \
53 link=shared,static \
54 threading=single,multi \
55 -sPYTHON_ROOT=/usr \
56 -sPYTHON_VERSION=$(get_python_version) \
57 -sTOOLS=gcc \
58 --prefix=${BINDIR}/usr \
59 --layout=tagged \
60 || die
61
62 # build pyste
63 cd ${SRCDIR}/libs/python/pyste/install
64 python setup.py build || die
65 }
66
67 src_install ()
68 {
69 cd ${SRCDIR}
70
71 # find bjam exec
72 local bjam=$(find ${SRCDIR}/tools/jam/src/ -name bjam -a -type f)
73
74 # install boost
75 ${bjam} \
76 release \
77 debug-symbols=off \
78 runtime-link=shared \
79 link=shared,static \
80 threading=single,multi \
81 -sPYTHON_ROOT=/usr \
82 -sPYTHON_VERSION=$(get_python_version) \
83 -sTOOLS=gcc \
84 --prefix=${BINDIR}/usr \
85 --libdir=${BINDIR}/usr/$(mlibdir) \
86 --layout=tagged \
87 install \
88 || die
89
90 # install bjam and bcp executables
91 minstallexec ${bjam} || die
92 minstallexec ${SRCDIR}/dist/bin/bcp || die
93
94 # install pyste
95 cd ${SRCDIR}/libs/python/pyste/install
96 python setup.py install --no-compile --root ${BINDIR} || die
97
98 # install docs
99 cd ${SRCDIR}
100 minstalldocs LICENSE_1_0.txt README || die
101 minstalldir /usr/share/boost-build || die
102 cd ${SRCDIR}/tools/build
103 cp -pPR boost.css index.html v2/ ${BINDIR}/usr/share/boost-build || die
104
105 # # fix libdir on 64bit arches
106 # if [[ $(mlibdir) != lib ]]
107 # then
108 # mv ${BINDIR}/usr/lib ${BINDIR}/usr/$(mlibdir) || die
109 # fi
110 }