# Template file for 'm4ri'
pkgname=m4ri
version=20260122
revision=1
build_style=gnu-configure
# use defaults for cache sizes instead of build machine
configure_args="--enable-openmp --with-cachesize=0:0:0"
hostmakedepends="pkg-config"
makedepends="libgomp-devel libpng-devel"
short_desc="Library for fast arithmetic with dense matrices over GF(2)"
maintainer="Eloi Torrents <eloitor@duck.com>"
license="GPL-2.0-or-later"
homepage="https://github.com/malb/m4ri"
changelog="https://github.com/malb/m4ri/releases"
distfiles="https://github.com/malb/m4ri/releases/download/${version}/m4ri-${version}.tar.gz"
checksum=7e033ca1fd36be8861e2f67d9d124c398fc0d830209bb0226462485876346404

pre_check() {
	# the testsuite is very slow when run in parallel!
	unset makejobs
}

m4ri-devel_package() {
	short_desc+=" - development files"
	depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
	pkg_install() {
		vmove usr/include
		vmove "usr/lib/*.a"
		vmove usr/lib/libm4ri.so
		vmove usr/lib/pkgconfig
	}
}
