Skip to content

Commit

Permalink
stockfish: use upstream's cxxflags, fix ftbfs
Browse files Browse the repository at this point in the history
  • Loading branch information
sgn committed Jan 14, 2021
1 parent 887d0e0 commit a9bdc81
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion srcpkgs/stockfish/template
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Template file for 'stockfish'
pkgname=stockfish
version=12
revision=1
revision=2
_net_file=nn-82215d0fd0df.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>"
Expand All @@ -20,6 +21,9 @@ 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" ;;
Expand All @@ -28,6 +32,7 @@ case $XBPS_TARGET_MACHINE in
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
Expand All @@ -39,6 +44,10 @@ post_extract() {
cp $XBPS_SRCDISTDIR/${pkgname}-${version}/${_net_file} ./src
}

post_patch() {
vsed -i -e '/CXX=/d' Makefile
}

do_install() {
vbin stockfish
}

0 comments on commit a9bdc81

Please sign in to comment.