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

EAPI=7

inherit autotools prefix

MY_PV=$(ver_cut 1-2)
# 11.2_p8_p1 -> 11.2-8.1
MY_DEB_PV="${MY_PV}-$(ver_cut 4).$(ver_cut 6)"

DESCRIPTION="Console based chess interface"
HOMEPAGE="http://sjeng.sourceforge.net/"
SRC_URI="
	mirror://sourceforge/sjeng/Sjeng-Free-${MY_PV}.tar.gz
	mirror://debian/pool/main/s/sjeng/sjeng_${MY_DEB_PV}.diff.gz
"

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

RDEPEND="sys-libs/gdbm:0="
DEPEND="${RDEPEND}"
BDEPEND="dev-util/quilt"

S="${WORKDIR}/Sjeng-Free-${MY_PV}"

src_prepare() {
	default

	eapply "${WORKDIR}/sjeng_${MY_DEB_PV}.diff"
	QUILT_PATCHES="debian/patches" QUILT_SERIES="debian/patches/series" quilt push -a || die
	hprefixify book.c rcfile.c

	# Files generated with ancient autotools, regenerate to respect CC.
	mv configure.{in,ac} || die
	eautoreconf
}

src_install() {
	default

	insinto /etc
	doins sjeng.rc
	insinto /usr/share/games/sjeng
	doins books/*.opn || die
}