summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-board')
-rw-r--r--games-board/pysolfc/Manifest1
-rw-r--r--games-board/pysolfc/files/pysolfc-locales.patch11
-rw-r--r--games-board/pysolfc/pysolfc-2.2.0.ebuild69
3 files changed, 81 insertions, 0 deletions
diff --git a/games-board/pysolfc/Manifest b/games-board/pysolfc/Manifest
index 940b7b496994..66cfc9f48826 100644
--- a/games-board/pysolfc/Manifest
+++ b/games-board/pysolfc/Manifest
@@ -1,2 +1,3 @@
DIST PySolFC-2.0.tar.bz2 4208776 BLAKE2B 0675de0923c6ee381f58f8abbaef5e27bd6fc85bbee9dcd182026ba7259c25c38282623e0cd35b582e8999754d21b092d6a824499bc890a2c0c89c53679182fd SHA512 ec5a11565bd43e097cf1854fe246b8f92acd74077c0b3b158c999f9dc45966e8f805c60a2cfbd815137d970e0e6409d0ae437b9807bac9c39353657cf596b6fc
DIST PySolFC-Cardsets-2.0.tar.bz2 30687905 BLAKE2B f17f5095a05cf42ea9eb3e7a3a7fefe055cc3452882bf96db82bb4d1bebb2307ffc2d0fd8836f7414bfcd93b1d8de52adb43ef22701a0806f2c6c036d9306501 SHA512 24275cd3656024e268a49487ac75e1e67e61ec20e0a9f88e2d1c287f91314a1a9343856d1202ce468f8863f4e9a9bf27526fbb1979a7d765718b38e64ca0cfc8
+DIST pysolfc-2.2.0.tar.gz 4504375 BLAKE2B ea48910d36b704667654292cd4fc2e62bcf259d9a3677369371ab7aadd387505d5ae658496ad8982e08ca0405b44971bc1e2375e91cd90f84c569f8f26249ff3 SHA512 c6d09803eab8fe7fc2c4203537d75b8db3216dfcbd5cc60be5b89f23544c871a37f7b16d20df7be4b70c6f014d47b8c361e1557ab04cb1008451f41b456d0ad2
diff --git a/games-board/pysolfc/files/pysolfc-locales.patch b/games-board/pysolfc/files/pysolfc-locales.patch
new file mode 100644
index 000000000000..defac9bfba87
--- /dev/null
+++ b/games-board/pysolfc/files/pysolfc-locales.patch
@@ -0,0 +1,11 @@
+diff -r -U2 PySolFC-pysolfc-2.2.0.orig/setup.py PySolFC-pysolfc-2.2.0/setup.py
+--- PySolFC-pysolfc-2.2.0.orig/setup.py 2018-04-16 15:05:24.000000000 +0200
++++ PySolFC-pysolfc-2.2.0/setup.py 2018-05-19 17:52:08.434768430 +0200
+@@ -45,7 +45,4 @@
+ ['data/images/misc/pysol01.png',
+ 'data/images/misc/pysol02.png', ]))
+- for l in ('ru', 'ru_RU'):
+- data_files.append(('share/locale/%s/LC_MESSAGES' % l,
+- ['locale/%s/LC_MESSAGES/pysol.mo' % l]))
+ data_files.append((data_dir, ['data/pysolfc.glade']))
+ data_files.append(('share/applications', ['data/pysol.desktop']))
diff --git a/games-board/pysolfc/pysolfc-2.2.0.ebuild b/games-board/pysolfc/pysolfc-2.2.0.ebuild
new file mode 100644
index 000000000000..774ae85ef5ba
--- /dev/null
+++ b/games-board/pysolfc/pysolfc-2.2.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_5,3_6} )
+PYTHON_REQ_USE="tk"
+
+inherit eutils distutils-r1
+
+MY_PN=PySolFC
+
+DESCRIPTION="An exciting collection of more than 1000 solitaire card games"
+HOMEPAGE="http://pysolfc.sourceforge.net/"
+SRC_URI="https://github.com/shlomif/${MY_PN}/archive/${P}.tar.gz
+ extra-cardsets? ( mirror://sourceforge/${PN}/archive/${P}/${MY_PN}-Cardsets-2.0.tar.bz2 )"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="extra-cardsets minimal +sound"
+
+S=${WORKDIR}/${MY_PN}-${P}
+
+DEPEND=""
+RDEPEND="${RDEPEND}
+ python_targets_python3_5? ( dev-python/random2[python_targets_python3_5] )
+ python_targets_python3_6? ( dev-python/random2[python_targets_python3_6] )
+ !minimal? ( dev-python/pillow[tk,${PYTHON_USEDEP}]
+ dev-tcltk/tktable )
+ sound? ( dev-python/pygame[${PYTHON_USEDEP}] )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-gentoo.patch" #591904
+ "${FILESDIR}/${PN}-locales.patch"
+)
+
+python_prepare_all() {
+ sed -i \
+ -e "/pysol.desktop/d" \
+ -e "s:share/icons:share/pixmaps:" \
+ -e "s:data_dir =.*:data_dir = \'/usr/share/${PN}\':" \
+ setup.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ pushd html-src > /dev/null || die "html-src not found"
+ PYTHONPATH=../pysollib "${EPYTHON}" gen-html.py || die "gen-html failed"
+ mv images html/ || die "mv images failed"
+ popd > /dev/null
+}
+
+python_install_all() {
+ make_desktop_entry pysol.py "PySol Fan Club Edition" pysol02
+
+ if use extra-cardsets; then
+ insinto /usr/share/${PN}
+ doins -r "${WORKDIR}"/${MY_PN}-Cardsets-2.0/*
+ fi
+
+ dosym /usr/share/doc/${PF}/html /usr/share/${PN}/html
+
+ doman docs/*.6
+ DOCS=( README.md AUTHORS docs/README docs/README.SOURCE )
+ HTML_DOCS=( html-src/html/. )
+ distutils-r1_python_install_all
+}