1 |
|
# Copyright 1999-2022 Gentoo Authors
|
|
1 |
# Copyright 1999-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
4 |
EAPI=7
|
... | ... | |
8 |
8 |
DESCRIPTION="Free UCI chess engine, claimed to be the strongest in the world"
|
9 |
9 |
HOMEPAGE="https://stockfishchess.org/"
|
10 |
10 |
|
11 |
|
NNUE_FILE="nn-13406b1dcbe0.nnue"
|
|
11 |
NNUE_FILE="nn-6877cd24400e.nnue"
|
12 |
12 |
|
13 |
13 |
SRC_URI="https://github.com/official-stockfish/Stockfish/archive/sf_${PV}.tar.gz -> ${P}.tar.gz
|
14 |
14 |
https://tests.stockfishchess.org/api/nn/${NNUE_FILE} -> ${P}-${NNUE_FILE}"
|
15 |
15 |
LICENSE="GPL-3"
|
16 |
16 |
SLOT="0"
|
17 |
|
KEYWORDS="~amd64 ~riscv ~x86"
|
|
17 |
KEYWORDS="amd64 ~loong ~riscv x86"
|
18 |
18 |
IUSE="cpu_flags_arm_v7 cpu_flags_x86_avx2 cpu_flags_x86_popcnt cpu_flags_x86_sse debug
|
19 |
19 |
general-32 general-64 +optimize"
|
20 |
20 |
|
... | ... | |
26 |
26 |
src_prepare() {
|
27 |
27 |
default
|
28 |
28 |
|
|
29 |
# remove config sanity check that doesn't like our COMPILER settings
|
|
30 |
sed -i -e 's/ config-sanity//g' Makefile || die
|
|
31 |
|
29 |
32 |
cp "${DISTDIR}"/${P}-${NNUE_FILE} ${NNUE_FILE} || die "copying the nnue file failed"
|
30 |
33 |
|
31 |
34 |
# prevent pre-stripping
|
... | ... | |
56 |
59 |
use ppc && my_arch=ppc
|
57 |
60 |
use ppc64 && my_arch=ppc64
|
58 |
61 |
|
59 |
|
# Skip the "build" target and use "all" instead to avoid the config
|
60 |
|
# sanity check (which would throw a fit about our compiler). There's
|
61 |
|
# a nice hack in the Makefile that overrides the value of CXX with
|
|
62 |
# There's a nice hack in the Makefile that overrides the value of CXX with
|
62 |
63 |
# COMPILER to support Travis CI and we abuse it to make sure that we
|
63 |
64 |
# build with our compiler of choice.
|
64 |
|
emake all ARCH="${my_arch}" \
|
|
65 |
emake profile-build ARCH="${my_arch}" \
|
65 |
66 |
COMP="$(tc-getCXX)" \
|
66 |
67 |
COMPILER="$(tc-getCXX)" \
|
67 |
68 |
debug=$(usex debug "yes" "no") \
|