blob: 21195bba51844c0c63ca49fcb040c258e8407d2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit meson
DESCRIPTION="Neural-network chess engine"
HOMEPAGE="https://github.com/LeelaChessZero/lc0/"
SRC_URI="https://github.com/LeelaChessZero/${PN}/archive/refs/tags/v${PV/_/-}.tar.gz -> ${P}.tar.gz
https://raw.githubusercontent.com/KhronosGroup/OpenCL-CLHPP/refs/tags/v2025.07.22/include/CL/opencl.hpp -> ${P}-opencl.hpp"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE="blas dnnl ispc onnx opencl test"
RDEPEND="dev-cpp/eigen
dev-cpp/gtest
dev-cpp/abseil-cpp
blas? ( sci-libs/openblas )
ispc? ( dev-lang/ispc )
dnnl? ( sci-ml/oneDNN )
onnx? ( sci-libs/onnxruntime )
opencl? ( virtual/opencl )"
DEPEND="${RDEPEND}"
RESTRICT="!test? ( test )"
S="${WORKDIR}/${P/_/-}"
src_prepare() {
cp "${DISTDIR}/${P}-opencl.hpp" "third_party/opencl.hpp" || die
eapply_user
default
}
src_configure() {
local emesonargs=(
$(meson_use ispc ispc)
$(meson_use dnnl dnnl)
$(meson_use opencl opencl)
'-Donnx_libdir=/usr/lib64'
'-Donnx_include=/usr/include/onnxruntime'
'-Dcpp_args=-I/usr/include/eigen3'
)
meson_src_configure
}
src_install() {
mkdir -p "${D}/usr/bin"
cp "${WORKDIR}/${P}-build/lc0" "${D}/usr/bin" || die
default
}
|