void-packages/srcpkgs/python3-pivy/template
Đoàn Trần Công Danh d089f95c4e python3-pivy: cross-compile
2020-02-25 13:52:37 +01:00

42 lines
1.1 KiB
Bash

# Template file for 'python3-pivy'
pkgname=python3-pivy
version=0.6.4
revision=2
wrksrc="Coin3D-pivy-a84100beff22"
build_style=python3-module
hostmakedepends="python3-devel swig"
makedepends="python3-devel coin3-devel qt5-devel"
short_desc="Python3 bindings for the high-level 3D graphics library Coin"
maintainer="yopito <pierre.bourgin@free.fr>"
license="0BSD"
homepage="https://bitbucket.org/Coin3D/pivy"
distfiles="https://bitbucket.org/Coin3D/pivy/get/${version}.tar.gz"
checksum=2ee684dbf0f52c05b491c5423013fd82e679614bffee23641485248c8a790c4e
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
}