void-packages/srcpkgs/coin3/template
yopito 1fb9018dcb coin3: fix cmake support for crossbuild
CMAKE_INSTALL_INCLUDEDIR must be a relative path. This way, generated
coin-export.cmake will compute include path at runtime against installed path,
that is fine for crossbuild.
If full path is provided, generated coin-export.cmake use directly this full
path, that is wrong with of crossbuild usage.

Fine to crossbuild python3-pivy 0.6.6
2021-04-28 18:08:53 -03:00

49 lines
1.3 KiB
Bash

# Template file for 'coin3'
pkgname=coin3
version=4.0.0
revision=2
wrksrc="coin-Coin-${version}"
build_style=cmake
configure_args="-DCMAKE_INSTALL_INCLUDEDIR=include/Coin3
-DCOIN_BUILD_TESTS=OFF -DCOIN_BUILD_DOCUMENTATION=ON"
hostmakedepends="doxygen graphviz"
makedepends="boost-devel glu-devel"
short_desc="High-level 3D graphics toolkit"
maintainer="yopito <pierre.bourgin@free.fr>"
license="BSD-3-Clause"
homepage="https://coin3d.github.io/"
distfiles="https://github.com/coin3d/coin/archive/Coin-${version}.tar.gz"
checksum=b00d2a8e9d962397cf9bf0d9baa81bcecfbd16eef675a98c792f5cf49eb6e805
CFLAGS=-DNDEBUG
CXXFLAGS=-DNDEBUG
if [ "$CROSS_BUILD" ]; then
# bypass runtime test (quote hashing is fine with gcc 9.3)
configure_args+=" -DHAVE_HASH_QUOTING_EXITCODE=0"
configure_args+=" -DHAVE_HASH_QUOTING_EXITCODE__TRYRUN_OUTPUT=''"
fi
post_install() {
# coin-config is superseeded by cmake support
rm $DESTDIR/usr/bin/coin-config
vlicense COPYING
}
coin3-devel_package() {
short_desc+=" - development files"
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/cmake
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}
coin3-doc_package() {
short_desc+=" - documentation"
pkg_install() {
vmove usr/share/doc
}
}