python3-pivy: cross-compile

This commit is contained in:
Đoàn Trần Công Danh 2020-02-25 18:53:34 +07:00 committed by Juan RP
parent e8bb71dbbd
commit d089f95c4e

View file

@ -2,9 +2,8 @@
pkgname=python3-pivy
version=0.6.4
revision=2
wrksrc="Coin3D-${pkgname#python3-}-a84100beff22"
wrksrc="Coin3D-pivy-a84100beff22"
build_style=python3-module
pycompile_module="pivy"
hostmakedepends="python3-devel swig"
makedepends="python3-devel coin3-devel qt5-devel"
short_desc="Python3 bindings for the high-level 3D graphics library Coin"
@ -13,18 +12,30 @@ license="0BSD"
homepage="https://bitbucket.org/Coin3D/pivy"
distfiles="https://bitbucket.org/Coin3D/pivy/get/${version}.tar.gz"
checksum=2ee684dbf0f52c05b491c5423013fd82e679614bffee23641485248c8a790c4e
nocross="require coin-config script"
case "$XBPS_TARGET_MACHINE" in
ppc64*);;
ppc*) broken="{standard input}:3376761: Error: operand out of range";;
esac
if [ "$CROSS_BUILD" ]; then
CFLAGS+=" -I$XBPS_CROSS_BASE/usr/include/Coin3"
fi
post_extract() (
# use setup_old.py until have Coin with cmake support
mv -f setup_old.py setup.py
)
post_patch() {
if [ "$CROSS_BUILD" ]; then
vsed -i setup.py \
-e '/if not self[.]check_cmd_exists.*coin-config/,+1d' \
-e "s!coin-config!$XBPS_CROSS_BASE/usr/bin/coin-config!" \
-e "/INCLUDE_DIR.*coin-config/s!=!= \"$XBPS_CROSS_BASE\" +!"
fi
}
post_install() {
vlicense LICENSE
}