mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
python3-pivy: rebuild against coin3-4.0.0
* fix license * fix update detection * setup.py: switch to cmake that is needed for coin3 4.0
This commit is contained in:
parent
4fa3cd554b
commit
00dbc37f39
2 changed files with 43 additions and 21 deletions
|
@ -1,39 +1,64 @@
|
||||||
# Template file for 'python3-pivy'
|
# Template file for 'python3-pivy'
|
||||||
pkgname=python3-pivy
|
pkgname=python3-pivy
|
||||||
version=0.6.5
|
version=0.6.5
|
||||||
revision=1
|
revision=2
|
||||||
wrksrc="pivy-${version}"
|
wrksrc="pivy-${version}"
|
||||||
build_style=python3-module
|
build_style=python3-module
|
||||||
hostmakedepends="python3-devel swig"
|
hostmakedepends="python3-devel swig cmake"
|
||||||
makedepends="python3-devel coin3-devel qt5-devel"
|
makedepends="python3-devel coin3-devel"
|
||||||
short_desc="Python3 bindings for the high-level 3D graphics library Coin"
|
short_desc="Python3 bindings for the high-level 3D graphics library Coin"
|
||||||
maintainer="yopito <pierre.bourgin@free.fr>"
|
maintainer="yopito <pierre.bourgin@free.fr>"
|
||||||
license="0BSD"
|
license="ISC"
|
||||||
homepage="https://github.com/coin3d/pivy"
|
homepage="https://github.com/coin3d/pivy"
|
||||||
distfiles="${homepage}/archive/${version}.tar.gz"
|
distfiles="${homepage}/archive/${version}.tar.gz"
|
||||||
checksum=16f2e339e5c59a6438266abe491013a20f53267e596850efad1559564a2c1719
|
checksum=16f2e339e5c59a6438266abe491013a20f53267e596850efad1559564a2c1719
|
||||||
|
|
||||||
|
# still relevant with pivy 0.6.5 ?
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
ppc64*);;
|
ppc64*);;
|
||||||
ppc*) broken="{standard input}:3376761: Error: operand out of range";;
|
ppc*) broken="{standard input}:3376761: Error: operand out of range";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
# setup.py calls cmake directly, so can't rely on xbps's cmake crossbuild support:
|
||||||
CFLAGS+=" -I$XBPS_CROSS_BASE/usr/include/Coin3"
|
# let's recreate here. Upstream should switch to cmake on next release (0.6.6).
|
||||||
fi
|
|
||||||
|
|
||||||
post_extract() (
|
pre_configure() {
|
||||||
# use setup_old.py until have Coin with cmake support
|
[ -z "$CROSS_BUILD" ] && return 0
|
||||||
mv -f setup_old.py setup.py
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
)
|
x86_64*) _CMAKE_SYSTEM_PROCESSOR=x86_64 ;;
|
||||||
|
i686*) _CMAKE_SYSTEM_PROCESSOR=x86 ;;
|
||||||
|
aarch64*) _CMAKE_SYSTEM_PROCESSOR=aarch64 ;;
|
||||||
|
arm*) _CMAKE_SYSTEM_PROCESSOR=arm ;;
|
||||||
|
mips*) _CMAKE_SYSTEM_PROCESSOR=mips ;;
|
||||||
|
ppc64le*) _CMAKE_SYSTEM_PROCESSOR=ppc64le ;;
|
||||||
|
ppc64*) _CMAKE_SYSTEM_PROCESSOR=ppc64 ;;
|
||||||
|
ppcle*) _CMAKE_SYSTEM_PROCESSOR=ppcle ;;
|
||||||
|
ppc*) _CMAKE_SYSTEM_PROCESSOR=ppc ;;
|
||||||
|
*) _CMAKE_SYSTEM_PROCESSOR=generic ;;
|
||||||
|
esac
|
||||||
|
cat >cross_${XBPS_CROSS_TRIPLET}.cmake <<_EOF
|
||||||
|
SET(CMAKE_SYSTEM_NAME Linux)
|
||||||
|
SET(CMAKE_SYSTEM_VERSION 1)
|
||||||
|
|
||||||
post_patch() {
|
SET(CMAKE_C_COMPILER ${CC})
|
||||||
if [ "$CROSS_BUILD" ]; then
|
SET(CMAKE_CXX_COMPILER ${CXX})
|
||||||
vsed -i setup.py \
|
SET(CMAKE_CROSSCOMPILING TRUE)
|
||||||
-e '/if not self[.]check_cmd_exists.*coin-config/,+1d' \
|
|
||||||
-e "s!coin-config!$XBPS_CROSS_BASE/usr/bin/coin-config!" \
|
SET(CMAKE_SYSTEM_PROCESSOR ${_CMAKE_SYSTEM_PROCESSOR})
|
||||||
-e "/INCLUDE_DIR.*coin-config/s!=!= \"$XBPS_CROSS_BASE\" +!"
|
|
||||||
fi
|
SET(CMAKE_FIND_ROOT_PATH "${XBPS_CROSS_BASE}/usr;${XBPS_CROSS_BASE}")
|
||||||
|
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
|
||||||
|
SET(wxWidgets_CONFIG_EXECUTABLE ${XBPS_WRAPPERDIR}/${wx_config:=wx-config})
|
||||||
|
_EOF
|
||||||
|
cat >$XBPS_WRAPPERDIR/cmake <<_EOF
|
||||||
|
#!/bin/sh
|
||||||
|
/usr/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$wrksrc/cross_${XBPS_CROSS_TRIPLET}.cmake "$@"
|
||||||
|
_EOF
|
||||||
|
chmod +x $XBPS_WRAPPERDIR/cmake
|
||||||
}
|
}
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
site=https://bitbucket.org/Coin3D/pivy/downloads/?tab=tags
|
|
||||||
pkgname=
|
|
||||||
ignore="20101207"
|
|
Loading…
Add table
Reference in a new issue