1 # Maintainer: Peter Simons <simons@cryp.to>
3 pkgname=${_pkgname}-devel
5 _boostver=${pkgver//./_}
7 pkgdesc="Boost provides free peer-reviewed portable C++ source libraries."
9 url="http://www.boost.org/"
10 depends=('bzip2' 'zlib' 'expat' 'gcc-libs')
11 optdepends=( 'python2: to enable building of Boost.Python2'
12 'python: to enable building of Boost.Python3' )
13 source=("http://downloads.sourceforge.net/sourceforge/${_pkgname}/${_pkgname}_${_boostver}.tar.bz2")
15 provides=('boost=1.46.0')
16 md5sums=('37b12f1702319b73876b0097982087e0')
20 # All source paths below are relative from here.
21 cd "${srcdir}/${_pkgname}_${_boostver}"
23 # Determine architecture-relevant settings for bjam.
25 local _arch _jam_arch _address_model _instruction_set
30 _instruction_set="i686"
36 _instruction_set="nocona"
40 echo "*** unknown architecture $CARCH"
45 # Determine version of installed Python.
46 local _python2_version _python3_version
47 _python2_version=$(python2 --version 2>&1 | sed -r 's/Python ([0-9]+)\.([0-9]+).*/\1.\2/')
48 _python3_version=$(python3 --version 2>&1 | sed -r 's/Python ([0-9]+)\.([0-9]+).*/\1.\2/')
49 echo >user-config.jam "# auto-generated user-config.jam file"
50 case "${_python2_version}" in
51 2.[0-9]*) echo >>user-config.jam "using python : ${_python2_version} ;" ;;
54 case "${_python3_version}" in
55 3.[0-9]*) echo >>user-config.jam "using python : ${_python3_version} ;" ;;
59 # Ensure that bjam has been built.
60 local _bjam_root="tools/build/v2/engine/src"
61 local _bjam="${_bjam_root}/bin.${_os}${_jam_arch}/bjam"
62 [ -x "${_bjam}" ] || ( cd "${_bjam_root}" && ./build.sh )
64 # If MAKEFLAGS enables a parallel build, use it. Unfortunately, we
65 # cannot pass all make flags, so some imperfect guessing is necessary.
67 case "${MAKEFLAGS}" in
68 -j[0-9]|-j[0-9][0-9]|-j[0-9][0-9][0-9]) _bjam_j_flag="${MAKEFLAGS}";;
72 # Build and install Boost.
74 echo "The build is about to start. Please note that the initial dependency"
75 echo "scanning phase may take a long time, even on fast machines. Please"
78 "${_bjam}" ${_bjam_j_flag} -d2 \
79 "architecture=${_arch}" \
80 "address-model=${_address_model}" \
81 "instruction-set=${_instruction_set}" \
82 ${CXXFLAGS:+"cxxflags=${CXXFLAGS}"} \
84 --build-type=complete \
86 "--prefix=${pkgdir}/usr" \
87 --user-config=user-config.jam \
88 -sEXPAT_INCLUDE=/usr \
89 -sEXPAT_LIBPATH=/usr \
95 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE_1_0.txt" \
98 # We don't build and install pyste: the code doesn't work with Python
99 # 2.6, because it doesn't manage to import the elementtree library
102 # cd libs/python/pyste/install || return 1
103 # python setup.py install --root="${pkgdir}" || return 1
105 # Use a symlink to install the version-specific set of includes from
106 # Boost 1.46.0 in the system for inclusion as <boost/header.hpp>.
107 cd "${pkgdir}/usr/include" || return 1
108 ln -sf boost-1_46/boost/ boost || return 1