-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
44 lines (39 loc) · 1.38 KB
/
template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Template file for 'fairy-stockfish'
pkgname=fairy-stockfish
version=14
revision=2
_net_file=nn-3475407dc199.nnue # Only Chess, but redistributable.
build_wrksrc=src
build_style=gnu-makefile
make_build_target=build
make_build_args="nnue=yes largeboards=yes all=yes"
make_use_env=yes
hostmakedepends="tar"
short_desc="Free UCI chess variant engine (supporting Xiangqi, Shogi, ...)"
maintainer="Leah Neukirchen <leah@vuxu.org>"
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
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 "
case $XBPS_TARGET_MACHINE in
x86_64*) make_build_args+="ARCH=x86-64" ;;
i686*) make_build_args+="ARCH=x86-32" ;;
aarch64*) make_build_args+="ARCH=armv8" ;;
armv[56]*) make_build_args+="ARCH=general-32";;
armv7*) make_build_args+="ARCH=armv7" ;;
ppc64*) make_build_args+="ARCH=ppc-64" ;;
ppc*) make_build_args+="ARCH=ppc-32" ;;
*) broken="not supported" ;;
esac
post_extract() {
vsrccopy ${_net_file} src
}
do_install() {
vbin stockfish fairy-stockfish
}