void-packages/srcpkgs/lc0/template

39 lines
1.3 KiB
Bash

# Template file for 'lc0'
pkgname=lc0
version=0.31.0
revision=1
archs="x86_64* i686* aarch64* armv[67]l* ppc64le*"
create_wrksrc=yes
build_style=meson
configure_args="-Dgtest=false"
_lczero_commit=55e1b382efadd57903e37f2a2e29caef3ea85799
hostmakedepends="pkg-config"
makedepends="protobuf-devel zlib-devel eigen $(vopt_if openblas openblas-devel)
$(vopt_if opencl ocl-icd-devel)"
short_desc="UCI chess engine designed to play via neural network"
maintainer="shtayerc <david.murko@mailbox.org>"
license="GPL-3.0-only"
homepage="https://lczero.org"
distfiles="https://github.com/LeelaChessZero/lc0/archive/v${version}.tar.gz
https://github.com/LeelaChessZero/lczero-common/archive/${_lczero_commit}.tar.gz"
checksum="c4ed3f967066f272038ab8f4786680bd8e96287840020fb226f6591b8ed49572
96d82279d1c65ba41ed136977cdbb5c2fab2a30212982f65ab679b425056e9e7"
build_options="openblas opencl"
build_options_default="openblas"
vopt_conflict openblas opencl
if [ "$CROSS_BUILD" ] && [ "$build_option_openblas" ]; then
configure_args+=" -Dopenblas_include=${XBPS_CROSS_BASE}/usr/include/openblas/"
fi
case "$XBPS_TARGET_MACHINE" in
ppc*) export CXXFLAGS+=" -DNO_WARN_X86_INTRINSICS";;
esac
post_extract() {
mv lc0-$version/* .
rmdir libs/lczero-common
mv lczero-common-${_lczero_commit} libs/lczero-common
}