summaryrefslogtreecommitdiff
blob: 4794f6bf817f725c33aa0be6924a148830fc9d23 (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit toolchain-funcs

MY_P="${PN}_$(ver_rs 1- '')_linux"

DESCRIPTION="UCI-only chess engine"
HOMEPAGE="https://arctrix.com/nas/fruit/"
SRC_URI="https://arctrix.com/nas/${PN}/${MY_P}.zip"
S="${WORKDIR}/${MY_P}/src"

LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"

BDEPEND="app-arch/unzip"

src_prepare() {
	default

	sed -i "s|book_small|${EPREFIX}/usr/share/${PN}/book_small|" option.cpp || die
}

src_compile() {
	emake CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS} ${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
}

src_install() {
	dobin ${PN}

	insinto /usr/share/${PN}
	doins ../book_small.bin

	dodoc ../{readme,technical_10}.txt
}