From d856b54eacc253ec5f565f43c6a639db137d1d2f Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 2 Nov 2021 21:50:55 +0100 Subject: [PATCH] fairy-stockfish: properly enable largeboards, ship Stockfish release NNUE --- srcpkgs/fairy-stockfish/template | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/srcpkgs/fairy-stockfish/template b/srcpkgs/fairy-stockfish/template index ad091a69bc..ea50fd08dd 100644 --- a/srcpkgs/fairy-stockfish/template +++ b/srcpkgs/fairy-stockfish/template @@ -1,8 +1,8 @@ # Template file for 'fairy-stockfish' pkgname=fairy-stockfish version=14 -revision=1 -#_net_file= No redistributable NNUE available. +revision=2 +_net_file=nn-3475407dc199.nnue # Only Chess, but redistributable. wrksrc="Fairy-Stockfish-fairy_sf_${version}" build_wrksrc=src build_style=gnu-makefile @@ -14,13 +14,16 @@ short_desc="Free UCI chess variant engine (supporting Xiangqi, Shogi, ...)" maintainer="Leah Neukirchen " license="GPL-3.0-or-later" homepage="https://github.com/ianfab/Fairy-Stockfish" -distfiles="https://github.com/ianfab/Fairy-Stockfish/archive/fairy_sf_${version}.tar.gz" -checksum=db5e96cf47faf4bfd4a500f58ae86e46fee92c2f5544e78750fc01ad098cbad2 +distfiles="https://github.com/ianfab/Fairy-Stockfish/archive/fairy_sf_${version}.tar.gz + https://tests.stockfishchess.org/api/nn/${_net_file}" +checksum="db5e96cf47faf4bfd4a500f58ae86e46fee92c2f5544e78750fc01ad098cbad2 + 3475407dc19973ea44467678634cce023d620e419770c111cc8937fe6689ec87" +skip_extraction="${_net_file}" LDFLAGS+="-lpthread -Wl,-z,stack-size=2097152" # We know how to optimize ourselves -make_build_args="optimize=no " +make_build_args+=" optimize=no " case $XBPS_TARGET_MACHINE in x86_64*) make_build_args+="ARCH=x86-64" ;; @@ -38,6 +41,10 @@ if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then LDFLAGS+=" -latomic" fi +post_extract() { + cp $XBPS_SRCDISTDIR/${pkgname}-${version}/${_net_file} ./src +} + do_install() { vbin stockfish fairy-stockfish }