void-packages/srcpkgs/boost/template

104 lines
2.5 KiB
Text
Raw Normal View History

# Template file for 'boost'
pkgname=boost
2013-10-29 10:38:13 +00:00
version=1.54.0
revision=4
wrksrc="${pkgname}_${version//\./_}"
makedepends="zlib-devel bzip2-devel icu-devel>=54"
short_desc="Free peer-reviewed portable C++ source libraries"
maintainer="Juan RP <xtraeme@gmail.com>"
2012-07-02 14:30:25 +00:00
homepage="http://www.boost.org/"
license="Boost Software License 1.0"
distfiles="${SOURCEFORGE_SITE}/$pkgname/${pkgname}_${version//\./_}.tar.bz2"
2013-10-29 10:38:13 +00:00
checksum=047e927de336af106a24bceba30069980c191529fd76b8dff8eb9a328b48ae1d
if [ -z "$CROSS_BUILD" ]; then
# XXX boost-jam and boost-python subpkgs.
makedepends+=" python-devel"
fi
2012-07-02 14:30:25 +00:00
do_build() {
if [ "$CROSS_BUILD" ]; then
case "$XBPS_TARGET_MACHINE" in
arm*) _arch=arm; _toolset="gcc-arm";;
mips*) _arch=mips; _toolset="gcc-mips";;
esac
echo "using gcc : ${_arch} : ${XBPS_CROSS_TRIPLET}-g++ ${CXXFLAGS} ;" > \
tools/build/v2/user-config.jam
else
_toolset=gcc
echo "using gcc : : g++ ${CXXFLAGS} ;" > tools/build/v2/user-config.jam
fi
2012-07-02 14:30:25 +00:00
./bootstrap.sh -prefix=${DESTDIR}/usr
./bjam --toolset=${_toolset} ${makejobs}
}
2012-07-02 14:30:25 +00:00
do_install() {
# Install bjam
case "$XBPS_TARGET_MACHINE" in
i686*) _bindir="bin.linuxx86";;
x86_64*) _bindir="bin.linuxx86_64";;
arm*) _bindir="bin.linuxarm";;
esac
if [ -z "$CROSS_BUILD" ]; then
vinstall bjam 755 usr/bin
fi
# Install headers/libs
2012-07-02 14:30:25 +00:00
./bjam --prefix=${DESTDIR}/usr install
# Install Boost.Build stuff.
vmkdir usr/share/boost-build
cd ${wrksrc}/tools/build/v2 && cp -a . ${DESTDIR}/usr/share/boost-build
find ${DESTDIR}/usr/share/boost-build \
-type f -name \*.orig -exec rm -f {} \;
( echo '# System wide configuration file for Boost.Build.' ; \
echo ; \
echo 'using gcc ;' ; ) >${wrksrc}/site-config.jam
2012-07-02 14:30:25 +00:00
cd $wrksrc
vinstall site-config.jam 644 etc
# license
2012-07-02 14:30:25 +00:00
vinstall LICENSE_1_0.txt 644 usr/share/licenses/boost
}
if [ -z "$CROSS_BUILD" ]; then
boost-jam_package() {
short_desc+=" - Boost.Jam utility"
pkg_install() {
vmove usr/bin/bjam
}
}
boost-python_package() {
depends="boost-${version}_${revision} python"
short_desc+=" - python bindings"
pkg_install() {
vmove "usr/lib/libboost_python*"
}
}
fi # !CROSS_BUILD
boost-build_package() {
noarch=yes
conf_files="/etc/site-config.jam"
depends="boost-jam>=$version boost-devel>=$version"
short_desc+=" - Boost.Build framework"
pkg_install() {
vmove usr/share/boost-build
vmove etc
}
}
boost-devel_package() {
2013-10-29 10:38:13 +00:00
noverifyrdeps=yes
depends="boost-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}