void-packages/srcpkgs/cgal/template

44 lines
1.3 KiB
Bash

# Template file for 'cgal'
pkgname=cgal
version=4.14
revision=7
build_style=cmake
build_helper="qemu"
makedepends="boost-devel eigen mpfr-devel"
short_desc="Computational Geometry Algorithms Library"
maintainer="Pierre Allegraud <pierre.allegraud@crans.org>"
license="GPL-3.0-or-later, LGPL-3.0-or-later"
homepage="https://www.cgal.org"
distfiles="https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-${version}/CGAL-${version}.tar.xz"
checksum=59464b1eaee892f2223ba570a7642892c999e29524ab102a6efd7c29c94a29f7
post_install() {
local _xusr="${XBPS_CROSS_BASE%%/}/usr"
if [ -z "$CROSS_BUILD" ]; then
return 0
fi
sed -i -e "
s,-I$_xusr/include\\([ \"]\\),\\1,g
s,-L$_xusr/lib\\([ \"]\\),\\1,g
s,\"\\($_xusr/include;\\)*$_xusr/include,\"/usr/include,
s,$_xusr/lib/lib\\([^[:space:];]*\\)[.]so,-l\\1,g
" "$DESTDIR/usr/lib/cmake/CGAL/"*.cmake
if grep -q "$XBPS_CROSS_BASE" "$DESTDIR/usr/lib/cmake/CGAL/"*.cmake
then
msg_error "CMake scripts has cross reference\n"
fi
}
cgal-devel_package() {
short_desc+=" - development files"
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/bin/cgal_create_cmake_script
vmove usr/share/man/man1/cgal_create_cmake_script.1
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/cmake
}
}