mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-28 16:32:57 +02:00
boost-python: cross compilation support
This commit is contained in:
parent
4dc6b5733e
commit
5c0a8a21bb
1 changed files with 16 additions and 17 deletions
|
@ -1,10 +1,10 @@
|
||||||
# Template file for 'boost'
|
# Template file for 'boost'
|
||||||
pkgname=boost
|
pkgname=boost
|
||||||
version=1.58.0
|
version=1.58.0
|
||||||
revision=9
|
revision=10
|
||||||
wrksrc="${pkgname}_${version//\./_}"
|
wrksrc="${pkgname}_${version//\./_}"
|
||||||
hostmakedepends="bzip2-devel"
|
hostmakedepends="bzip2-devel icu-devel python-devel"
|
||||||
makedepends="zlib-devel bzip2-devel icu-devel"
|
makedepends="zlib-devel bzip2-devel icu-devel python-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/"
|
||||||
|
@ -12,14 +12,6 @@ license="Boost Software License 1.0"
|
||||||
distfiles="${SOURCEFORGE_SITE}/$pkgname/${pkgname}_${version//\./_}.tar.bz2"
|
distfiles="${SOURCEFORGE_SITE}/$pkgname/${pkgname}_${version//\./_}.tar.bz2"
|
||||||
checksum=fdfc204fc33ec79c99b9a74944c3e54bd78be4f7f15e260c0e2700a36dc7d3e5
|
checksum=fdfc204fc33ec79c99b9a74944c3e54bd78be4f7f15e260c0e2700a36dc7d3e5
|
||||||
|
|
||||||
subpackages="boost-build boost-devel boost-jam"
|
|
||||||
|
|
||||||
if [ -z "$CROSS_BUILD" ]; then
|
|
||||||
# XXX boost-python subpkg.
|
|
||||||
makedepends+=" python-devel"
|
|
||||||
subpackages+=" boost-python"
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
i686*) _arch=x86; _toolset="gcc-i386"; _abi=sysv ;;
|
i686*) _arch=x86; _toolset="gcc-i386"; _abi=sysv ;;
|
||||||
x86_64*) _arch=x86; _toolset="gcc-x86_64"; _abi=sysv ;;
|
x86_64*) _arch=x86; _toolset="gcc-x86_64"; _abi=sysv ;;
|
||||||
|
@ -30,7 +22,13 @@ esac
|
||||||
|
|
||||||
do_build() {
|
do_build() {
|
||||||
echo "using gcc : ${_toolset#gcc-} : ${CXX} ${CXXFLAGS} ;" >user-config.jam
|
echo "using gcc : ${_toolset#gcc-} : ${CXX} ${CXXFLAGS} ;" >user-config.jam
|
||||||
./bootstrap.sh --prefix=${DESTDIR}/usr
|
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 \
|
||||||
|
--prefix=${DESTDIR}/usr --with-python=${XBPS_CROSS_BASE}/usr/bin/python2 \
|
||||||
|
--with-python-root=${XBPS_CROSS_BASE}/usr
|
||||||
(
|
(
|
||||||
# Rebuild bjam for target
|
# Rebuild bjam for target
|
||||||
cd tools/build/src/engine
|
cd tools/build/src/engine
|
||||||
|
@ -41,7 +39,6 @@ do_build() {
|
||||||
--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
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
# Install bjam
|
# Install bjam
|
||||||
for _b in tools/build/src/engine/bin.*/*; do
|
for _b in tools/build/src/engine/bin.*/*; do
|
||||||
|
@ -57,6 +54,8 @@ do_install() {
|
||||||
cd ${wrksrc}/tools/build && cp -a . ${DESTDIR}/usr/share/boost-build
|
cd ${wrksrc}/tools/build && cp -a . ${DESTDIR}/usr/share/boost-build
|
||||||
find ${DESTDIR}/usr/share/boost-build \
|
find ${DESTDIR}/usr/share/boost-build \
|
||||||
-type f -name \*.orig -exec rm -f {} \;
|
-type f -name \*.orig -exec rm -f {} \;
|
||||||
|
rm -rf ${DESTDIR}/usr/share/boost-build/src/engine/bootstrap
|
||||||
|
rm -rf ${DESTDIR}/usr/share/boost-build/src/engine/bin.*
|
||||||
( echo '# System wide configuration file for Boost.Build.' ; \
|
( echo '# System wide configuration file for Boost.Build.' ; \
|
||||||
echo ; \
|
echo ; \
|
||||||
echo 'using gcc ;' ; ) >${wrksrc}/site-config.jam
|
echo 'using gcc ;' ; ) >${wrksrc}/site-config.jam
|
||||||
|
@ -77,9 +76,9 @@ boost-jam_package() {
|
||||||
}
|
}
|
||||||
boost-python_package() {
|
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_python*
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
boost-build_package() {
|
boost-build_package() {
|
||||||
|
@ -97,7 +96,7 @@ boost-devel_package() {
|
||||||
short_desc+=" - development files"
|
short_desc+=" - development files"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove usr/include
|
vmove usr/include
|
||||||
vmove "usr/lib/*.a"
|
vmove usr/lib/*.a
|
||||||
vmove "usr/lib/*.so"
|
vmove usr/lib/*.so
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue