lib32/lib32-boost-libs/PKGBUILD
2015-03-08 22:14:35 +01:00

86 lines
2.5 KiB
Bash

# Maintainer : Jan Was < janek.jan@gmail.com >
# Contributor : Dan Vratil <dan@progdan.cz>
# Contributor : andy123 < ajs AT online DOT de >
pkgname=lib32-boost-libs
pkgver=1.55.0
_boostver=${pkgver//./_}
pkgrel=1
url="http://www.boost.org"
arch=('x86_64')
pkgdesc="Free peer-reviewed portable C++ source libraries - Runtime (32 bit)"
license=('custom')
groups=('lib32')
depends=('lib32-bzip2' 'lib32-zlib' 'lib32-icu' 'lib32-gcc-libs')
makedepends=('lib32-icu>=51.1' 'lib32-bzip2' 'lib32-zlib' 'gcc-multilib' 'python3' 'python2')
source=(http://downloads.sourceforge.net/sourceforge/boost/boost_${_boostver}.tar.gz
# upstream patches
log_fix_dump_avx2.patch)
sha1sums=('61ed0e57d3c7c8985805bb0682de3f4c65f4b6e5'
'817a1573249e912dc20624f5883bb2d3b84bd278')
prepare() {
cd "${srcdir}/boost_${_boostver}"
patch -Np0 < ${srcdir}/log_fix_dump_avx2.patch
}
build() {
export CC="gcc"
export CFLAGS="-m32"
export CXX="g++"
export CXXFLAGS="-m32"
export LDFLAGS="-m32"
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
export _stagedir="${srcdir}/stagedir"
local JOBS="$(sed -e 's/.*\(-j *[0-9]\+\).*/\1/' <<< ${MAKEFLAGS})"
cd "${srcdir}/boost_${_boostver}"
./bootstrap.sh --with-toolset=gcc --with-icu --with-python=
_bindir="bin.linuxx86_64"
install -d -m 755 "${_stagedir}"/bin
install "${srcdir}"/boost_${_boostver}/tools/build/v2/engine/${_bindir}/b2 "${_stagedir}"/bin/b2
#boostbook is needed by quickbook
install -d -m 755 "${_stagedir}"/share/boostbook
cp -a tools/boostbook/{xsl,dtd} "${_stagedir}"/share/boostbook/
# default "minimal" install: "release link=shared,static
# runtime-link=shared threading=single,multi"
# --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.
# install to ${_stagedir} in preparation for split packaging
"${_stagedir}"/bin/b2 \
variant=release \
debug-symbols=off \
threading=multi \
runtime-link=shared \
link=shared \
toolset=gcc \
address-model=32 \
cflags="${CPPFLAGS} ${CFLAGS} -O3" linkflags="${LDFLAGS}" \
--without-python \
--without-mpi \
--layout=system \
--prefix="${_stagedir}" \
${JOBS} \
install
}
package() {
_stagedir="${srcdir}/stagedir"
install -d -m 755 "${pkgdir}/usr/lib32"
cp -a "${_stagedir}"/lib/*.so{,.*} "${pkgdir}/usr/lib32/"
install -D -m 644 "${srcdir}/boost_${_boostver}/LICENSE_1_0.txt" \
"${pkgdir}"/usr/share/licenses/lib32-boost-libs/LICENSE_1_0.txt
}