# Template file for 'highway'
pkgname=highway
version=1.3.0
revision=1
build_style=cmake
configure_args="-DHWY_SYSTEM_GTEST=ON -DHWY_ENABLE_EXAMPLES=OFF -DBUILD_SHARED_LIBS=ON"
checkdepends="gtest-devel"
short_desc="C++ library providing portable SIMD/vector intrinsics"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="https://github.com/google/highway"
changelog="https://raw.githubusercontent.com/google/highway/master/debian/changelog"
distfiles="https://github.com/google/highway/archive/${version}.tar.gz"
checksum=07b3c1ba2c1096878a85a31a5b9b3757427af963b1141ca904db2f9f4afe0bc2

if [ -z "$XBPS_CHECK_PKGS" ]; then
	configure_args+=" -DBUILD_TESTING=OFF"
fi

case "$XBPS_TARGET_MACHINE" in
	i686*) configure_args+=" -DHWY_CMAKE_SSE2=ON";;
esac

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