core/boost/PKGBUILD

135 lines
4.4 KiB
Bash
Raw Normal View History

2010-10-10 00:00:37 +08:00
#
# Core Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
# Contributor: Artyom Smirnov <smirnoffjr@gmail.com>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
# Note: you have to rebuild those pkgs
# Core: repo-clean
# Platform: akonadi (exempi uses boost just as makedep)
# Desktop: kdeedu (kdenetwork, kdepimlibs, kdepim, kdesdk and koffice using boost just as makedep)
2010-03-22 01:35:58 +08:00
2011-06-26 04:25:43 +08:00
pkgbase=boost
pkgname=('boost-libs' 'boost')
2011-06-26 02:52:01 +08:00
pkgver=1.46.1
2011-06-26 04:25:43 +08:00
_boostver=${pkgver//./_}
2011-11-10 10:31:56 +08:00
pkgrel=3
2010-03-22 01:35:58 +08:00
pkgdesc="Free peer-reviewed portable C++ source libraries"
arch=('i686' 'x86_64')
url="http://www.boost.org/"
2011-06-26 02:52:01 +08:00
license=('custom')
2010-03-22 01:35:58 +08:00
depends=('bzip2' 'zlib')
2011-06-26 02:52:01 +08:00
makedepends=('icu' 'python2' 'bzip2' 'zlib') # Add Python (3) whenever it is added to our repos.
2010-03-22 01:35:58 +08:00
optdepends=('python: for python bindings')
2010-10-10 00:00:37 +08:00
options=('!ccache')
2011-06-26 04:25:43 +08:00
source=(http://downloads.sourceforge.net/sourceforge/${pkgbase}/${pkgbase}_${_boostver}.tar.gz
boost-1.46.0-spirit.patch)
md5sums=('341e5d993b19d099bf1a548495ea91ec'
'9d6e2f13fef23bf27d7bdddc104e182a')
2010-03-22 01:35:58 +08:00
2011-06-26 04:25:43 +08:00
_stagedir="${srcdir}/stagedir"
2010-03-22 01:35:58 +08:00
2011-06-26 04:25:43 +08:00
build() {
# set python path for bjam
cd "${srcdir}/${pkgbase}_${_boostver}/tools"
2011-06-26 02:52:01 +08:00
echo "using python : 2.7 : /usr/bin/python2 ;" >> build/v2/user-config.jam
2011-06-26 04:25:43 +08:00
#echo "using python : 3.2 : /usr/bin/python : /usr/include/python3.2mu : /usr/lib ;" >> build/v2/user-config.jam
#echo "using mpi ;" >> build/v2/user-config.jam
2011-06-26 02:52:01 +08:00
2011-06-26 04:25:43 +08:00
# build bjam
cd "${srcdir}/${pkgbase}_${_boostver}/tools/build/v2/engine/src"
2011-06-26 02:52:01 +08:00
./build.sh cc
2010-03-22 01:35:58 +08:00
_bindir="bin.linuxx86"
[ "${CARCH}" = "x86_64" ] && _bindir="bin.linuxx86_64"
2011-06-26 04:25:43 +08:00
install -d "${_stagedir}"/usr/bin
install ${_bindir}/bjam "${_stagedir}"/usr/bin/bjam
2011-06-26 02:52:01 +08:00
2011-06-26 04:25:43 +08:00
# build tools
cd "${srcdir}/${pkgbase}_${_boostver}/tools/"
"${_stagedir}"/usr/bin/bjam --toolset=gcc
2011-06-26 02:52:01 +08:00
2011-06-26 04:25:43 +08:00
# copy the tools
cd "${srcdir}/${pkgbase}_${_boostver}/dist/bin"
for i in *;do
install -m755 "${i}" "${_stagedir}/usr/bin/${i}"
2011-06-26 02:52:01 +08:00
done
2010-03-22 01:35:58 +08:00
2011-06-26 04:25:43 +08:00
#boostbook needed by quickbook
cd "${srcdir}/${pkgbase}_${_boostver}/dist/"
cp -r share "${_stagedir}"
2010-03-22 01:35:58 +08:00
2011-06-26 04:25:43 +08:00
# build libs
cd "${srcdir}/${pkgbase}_${_boostver}"
2011-06-26 02:52:01 +08:00
2011-06-26 04:25:43 +08:00
#https://svn.boost.org/trac/boost/ticket/4994
patch -Np0 -i "${srcdir}/boost-1.46.0-spirit.patch"
2010-03-22 01:35:58 +08:00
# default "minimal" install: "release link=shared,static
2011-06-26 02:52:01 +08:00
# runtime-link=shared threading=single,multi"
2010-03-22 01:35:58 +08:00
# --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.
2011-06-26 02:52:01 +08:00
# install to ${_stagedir} in preparation for split packaging
2010-03-22 01:35:58 +08:00
2011-06-26 04:25:43 +08:00
"${_stagedir}"/usr/bin/bjam \
2011-06-26 02:52:01 +08:00
release debug-symbols=off threading=multi \
runtime-link=shared link=shared,static \
cflags=-fno-strict-aliasing \
toolset=gcc \
2011-06-26 04:25:43 +08:00
--prefix="${_stagedir}" \
2011-06-26 02:52:01 +08:00
-sTOOLS=gcc \
2011-06-26 05:51:34 +08:00
--without-mpi \
2011-06-26 02:52:01 +08:00
--layout=system \
2011-06-26 04:25:43 +08:00
${MAKEFLAGS} \
2011-06-26 02:52:01 +08:00
install
2010-03-22 01:35:58 +08:00
2011-06-26 04:25:43 +08:00
# pyste is unmaintained: http://www.boost.org/doc/libs/1_46_0/libs/python/doc/index.html
# build pyste
#cd "${srcdir}/${pkgbase}_${_boostver}/libs/python/pyste/install"
#python2 setup.py install --root=${_stagedir} --optimize=1
}
package_boost() {
pkgdesc="Free peer-reviewed portable C++ source libraries - Development"
depends=("boost-libs=${pkgver}")
optdepends=('python: for python bindings'
'python2: for python2 bindings')
install -d "${pkgdir}"/usr/{include,lib,share}
# headers/source files
cp -r "${_stagedir}"/include/ "${pkgdir}"/usr/
# static libs
cp -r "${_stagedir}"/lib/*.a "${pkgdir}"/usr/lib/
# utilities (bjam, bcp, pyste)
cp -r "${_stagedir}"/usr/* "${pkgdir}"/usr/
#boostbook
cp -r "${_stagedir}"/share/* "${pkgdir}"/usr/share
# license
install -D -m644 "${srcdir}/${pkgbase}_${_boostver}/LICENSE_1_0.txt" \
"${pkgdir}"/usr/share/licenses/boost/LICENSE_1_0.txt
}
package_boost-libs() {
pkgdesc="Free peer-reviewed portable C++ source libraries - Runtime"
depends=('gcc-libs' 'bzip2' 'zlib' 'icu')
optdepends=('openmpi: for mpi support')
install -d "${pkgdir}/usr/lib"
#shared libs
cp -r "${_stagedir}"/lib/*.so{,.*} "${pkgdir}/usr/lib/"
# license
install -D -m644 "${srcdir}/${pkgbase}_${_boostver}/LICENSE_1_0.txt" \
"${pkgdir}"/usr/share/licenses/boost-libs/LICENSE_1_0.txt
2010-03-22 01:35:58 +08:00
}