void-packages/srcpkgs/stockfish/template
Leah Neukirchen 886a54a45a stockfish: increase stack size for musl.
With the default musl stack, stockfish can only search 10 moves deep.

Fixes #23156.
2020-06-23 20:29:28 +02:00

36 lines
1 KiB
Bash

# Template file for 'stockfish'
pkgname=stockfish
version=11
revision=2
wrksrc="Stockfish-sf_${version}"
build_wrksrc=src
build_style=gnu-makefile
make_build_target=build
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"
checksum=802261cc601b67bed00c0ef7d21e2125959630f0852a06db9fc9bd74f440b199
LDFLAGS+="-lpthread -Wl,-z,stack-size=2097152"
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=general-64" ;;
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" ;;
esac
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
LDFLAGS+=" -latomic"
fi
do_install() {
vbin stockfish
}