49 lines
1.4 KiB
Bash
49 lines
1.4 KiB
Bash
# Template file for 'stockfish'
|
|
pkgname=stockfish
|
|
version=14.1
|
|
revision=1
|
|
_net_file=nn-13406b1dcbe0.nnue
|
|
wrksrc="Stockfish-sf_${version}"
|
|
build_wrksrc=src
|
|
build_style=gnu-makefile
|
|
make_build_target=build
|
|
make_use_env=yes
|
|
hostmakedepends="tar"
|
|
short_desc="Free UCI chess engine derived from Glaurung"
|
|
maintainer="cipr3s <cipr3s@gmx.com>"
|
|
license="GPL-3.0-or-later"
|
|
homepage="http://stockfishchess.org/"
|
|
distfiles="https://github.com/official-stockfish/Stockfish/archive/sf_${version}.tar.gz
|
|
https://tests.stockfishchess.org/api/nn/${_net_file}"
|
|
checksum="11d71018af47ba047175f846be72d8d9878df698e9b5d708ab158cf530633600
|
|
13406b1dcbe0a36dfc5e07da51d8db38b7a45d7da43078ec25a7624c2b83236f"
|
|
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
|
|
|
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
|
makedepends+=" libatomic-devel"
|
|
LDFLAGS+=" -latomic"
|
|
fi
|
|
|
|
post_extract() {
|
|
cp $XBPS_SRCDISTDIR/${pkgname}-${version}/${_net_file} ./src
|
|
}
|
|
|
|
do_install() {
|
|
vbin stockfish
|
|
}
|