boost: add python3 support

[ci skip]
This commit is contained in:
John Zimmermann 2018-10-06 19:58:15 +02:00 committed by maxice8
parent 5c731f397e
commit fd2eaa3d85
2 changed files with 21 additions and 10 deletions

1
srcpkgs/boost-python3 Symbolic link
View file

@ -0,0 +1 @@
boost

View file

@ -3,8 +3,8 @@ pkgname=boost
version=1.68.0 version=1.68.0
revision=2 revision=2
wrksrc="${pkgname}_${version//\./_}" wrksrc="${pkgname}_${version//\./_}"
hostmakedepends="bzip2-devel icu-devel python-devel" hostmakedepends="bzip2-devel icu-devel python-devel python3-devel"
makedepends="zlib-devel bzip2-devel icu-devel python-devel" makedepends="zlib-devel bzip2-devel icu-devel python-devel python3-devel"
short_desc="Free peer-reviewed portable C++ source libraries" short_desc="Free peer-reviewed portable C++ source libraries"
maintainer="Juan RP <xtraeme@voidlinux.eu>" maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.boost.org/" homepage="http://www.boost.org/"
@ -23,11 +23,6 @@ case "$XBPS_TARGET_MACHINE" in
esac esac
do_build() { do_build() {
echo "using gcc : ${_toolset#gcc-} : ${CXX} ${CXXFLAGS} ;" >user-config.jam
if [ "$CROSS_BUILD" ]; then
echo "using python : 2.7 : : ${XBPS_CROSS_BASE}/usr/include/python2.7 : ${XBPS_CROSS_BASE}/usr/lib/python2.7 ;" \
>>user-config.jam
fi
./bootstrap.sh \ ./bootstrap.sh \
--prefix=${DESTDIR}/usr --with-python=${XBPS_CROSS_BASE}/usr/bin/python2 \ --prefix=${DESTDIR}/usr --with-python=${XBPS_CROSS_BASE}/usr/bin/python2 \
--with-python-root=${XBPS_CROSS_BASE}/usr --with-python-root=${XBPS_CROSS_BASE}/usr
@ -37,9 +32,17 @@ do_build() {
LIBS="$LDFLAGS" ${wrksrc}/bjam -f build.jam --toolset=cc --toolset-root= -d+2 clean LIBS="$LDFLAGS" ${wrksrc}/bjam -f build.jam --toolset=cc --toolset-root= -d+2 clean
LIBS="$LDFLAGS" ${wrksrc}/bjam -f build.jam --toolset=cc --toolset-root= -d+2 LIBS="$LDFLAGS" ${wrksrc}/bjam -f build.jam --toolset=cc --toolset-root= -d+2
) )
echo $py3_lib
cat > user-config.jam <<-__EOF
using gcc : ${_toolset#gcc-} : ${CXX} : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
using python : 2.7 : ${XBPS_CROSS_BASE}/usr/bin/python2 : ${XBPS_CROSS_BASE}/usr/include/python2.7 : ${XBPS_CROSS_BASE}/usr/lib/python2.7 ;
using python : ${py3_ver} : ${XBPS_CROSS_BASE}/usr/bin/python3 : ${XBPS_CROSS_BASE}${py3_inc} : ${XBPS_CROSS_BASE}${py3_lib} ;
__EOF
./bjam ${makejobs} \ ./bjam ${makejobs} \
--toolset=${_toolset} abi=${_abi} architecture=${_arch} \ --toolset=${_toolset} abi=${_abi} architecture=${_arch} \
--user-config=${wrksrc}/user-config.jam --debug-building --user-config=${wrksrc}/user-config.jam --debug-building \
python=2.7,${py3_ver}
} }
do_install() { do_install() {
# Install bjam # Install bjam
@ -49,7 +52,7 @@ do_install() {
# Install headers/libs # Install headers/libs
./bjam --prefix=${DESTDIR}/usr abi=${_abi} architecture=${_arch} \ ./bjam --prefix=${DESTDIR}/usr abi=${_abi} architecture=${_arch} \
--user-config=${wrksrc}/user-config.jam install --user-config=${wrksrc}/user-config.jam python=2.7,${py3_ver} install
# Install Boost.Build stuff. # Install Boost.Build stuff.
vmkdir usr/share/boost-build vmkdir usr/share/boost-build
@ -80,7 +83,14 @@ boost-python_package() {
depends="boost-${version}_${revision} python" depends="boost-${version}_${revision} python"
short_desc+=" - Python bindings" short_desc+=" - Python bindings"
pkg_install() { pkg_install() {
vmove "usr/lib/libboost_python*" vmove "usr/lib/libboost_python2*.so.*"
}
}
boost-python3_package() {
depends="boost-${version}_${revision} python3"
short_desc+=" - Python3 bindings"
pkg_install() {
vmove "usr/lib/libboost_python3*.so.*"
} }
} }
boost-build_package() { boost-build_package() {