blob: 3b4c6bc6fcf3bbb1dba14dc5d7cdf0533b0537fc (
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
58
59
60
61
62
63
64
65
66
67
68
|
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_SINGLE_IMPL=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..10} )
PYTHON_REQ_USE="tk"
inherit distutils-r1 xdg
MY_PN="PySolFC"
MY_P="${MY_PN}-${PV}"
PS_CARD_P="${MY_PN}-Cardsets-2.1"
PS_CARD_MIN_P="${MY_PN}-Cardsets--Minimal-2.1.0"
DESCRIPTION="Exciting collection of more than 1000 solitaire card games"
HOMEPAGE="https://pysolfc.sourceforge.io/"
SRC_URI="mirror://sourceforge/pysolfc/${MY_P}.tar.xz
extra-cardsets? ( mirror://sourceforge/pysolfc/${PS_CARD_P}.tar.bz2 )
!extra-cardsets? ( mirror://sourceforge/pysolfc/${PS_CARD_MIN_P}.tar.xz )"
S="${WORKDIR}/${MY_P}"
LICENSE="GPL-3+ GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="extra-cardsets minimal +sound"
RDEPEND="
$(python_gen_cond_dep '
dev-python/attrs[${PYTHON_USEDEP}]
dev-python/configobj[${PYTHON_USEDEP}]
dev-python/pysol_cards[${PYTHON_USEDEP}]
dev-python/random2[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
sound? ( dev-python/pygame[${PYTHON_USEDEP}] )
!minimal? ( dev-python/pillow[jpeg,tk,${PYTHON_USEDEP}] )')
!minimal? ( dev-tcltk/tktable )"
distutils_enable_tests unittest
src_prepare() {
distutils-r1_src_prepare
# make pip check happier, pycotap is not needed
sed -i "/'pycotap'/d" setup.py || die
if use extra-cardsets; then
find ../${PS_CARD_P} -type d -name .thumbnails -exec rm -r {} + || die
fi
}
python_install_all() {
local DOCS=( AUTHORS.md NEWS.asciidoc README.md )
distutils-r1_python_install_all
doman docs/pysol{,fc}.6
insinto /usr/share/${MY_PN}
doins -r ../$(usex extra-cardsets ${PS_CARD_P} ${PS_CARD_MIN_P})/.
# html files are used at runtime, keep at default location
dosym -r /usr/share/{${MY_PN},doc/${PF}}/html
# russian translation is not currently displaying right
# https://forums.gentoo.org/viewtopic-t-1142910.html
rm "${ED}"/usr/share/locale/ru/LC_MESSAGES/pysol.mo || die
}
|