void-packages/srcpkgs/nauty/template
Gonzalo Tornaría c672730835 nauty: disable native code (illegal instructions)
The package currently shipped in void gives me illegal instructions in a
nehalem cpu.

This commit fixes the issue by disabling native compilation unless a build
option is given; also disable popcnt which, although available on nehalem, is
not available in baseline x86_64.
2022-02-03 13:56:28 +01:00

30 lines
885 B
Bash

# Template file for 'nauty'
pkgname=nauty
version=2.7r3
revision=2
wrksrc=${pkgname}${version/./}
build_style=gnu-configure
make_install_args="includedir=/usr/include/nauty
pkgconfigexecdir=/usr/lib/pkgconfig"
short_desc="Compute the automorphism groups of graphs and digraphs"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="Apache-2.0"
homepage="https://pallini.di.uniroma1.it/"
distfiles="https://pallini.di.uniroma1.it/nauty${version/./}.tar.gz"
checksum=4f0665b716a53f7a14ea2ae30059f23d064ce3fe4c12c013404ef6e1ee0b88c2
build_options="native_build"
if [ -z "$build_option_native_build" ]; then
configure_args="--enable-generic --disable-popcnt"
fi
nauty-devel_package() {
depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove usr/lib/pkgconfig
}
}