diff --git a/srcpkgs/stockfish/patches/makefile.patch b/srcpkgs/stockfish/patches/makefile.patch index 00b7ef3c84b..b5fc75e7a0a 100644 --- a/srcpkgs/stockfish/patches/makefile.patch +++ b/srcpkgs/stockfish/patches/makefile.patch @@ -1,12 +1,29 @@ ---- src/Makefile.orig -+++ src/Makefile -@@ -159,9 +159,6 @@ - CXXFLAGS += -m$(bits) - LDFLAGS += -m$(bits) - endif +--- src/Makefile.orig 2020-09-02 21:19:30.000000000 +0700 ++++ src/Makefile 2021-01-14 18:51:25.852600109 +0700 +@@ -306,26 +306,7 @@ + + ifeq ($(COMP),gcc) + comp=gcc +- CXX=g++ + CXXFLAGS += -pedantic -Wextra -Wshadow +- +- ifeq ($(arch),$(filter $(arch),armv7 armv8)) +- ifeq ($(OS),Android) +- CXXFLAGS += -m$(bits) +- LDFLAGS += -m$(bits) +- endif - else - CXXFLAGS += -m$(bits) - LDFLAGS += -m$(bits) - endif +- endif +- +- ifeq ($(arch),$(filter $(arch),armv7)) +- LDFLAGS += -latomic +- endif +- +- ifneq ($(KERNEL),Darwin) +- LDFLAGS += -Wl,--no-as-needed +- endif + endif - ifneq ($(KERNEL),Darwin) + ifeq ($(COMP),mingw) diff --git a/srcpkgs/stockfish/template b/srcpkgs/stockfish/template index 8e0225e0df7..99d3e95e6f5 100644 --- a/srcpkgs/stockfish/template +++ b/srcpkgs/stockfish/template @@ -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 " @@ -20,14 +21,18 @@ 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=general-64" ;; + 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