games-board/pysolfc: fix USE=extra-cardsets not showing extra cardsets
authorAustin English <wizardedit@gentoo.org>
Tue, 6 Sep 2016 03:04:09 +0000 (22:04 -0500)
committerAustin English <wizardedit@gentoo.org>
Tue, 6 Sep 2016 04:05:54 +0000 (23:05 -0500)
Gentoo-Bug: https://bugs.gentoo.org/591904

Package-Manager: portage-2.3.0

games-board/pysolfc/files/pysolfc-gentoo.patch [new file with mode: 0644]
games-board/pysolfc/pysolfc-2.0-r5.ebuild [new file with mode: 0644]

diff --git a/games-board/pysolfc/files/pysolfc-gentoo.patch b/games-board/pysolfc/files/pysolfc-gentoo.patch
new file mode 100644 (file)
index 0000000..07a7b66
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/pysollib/settings.py     2014-04-07 20:05:02.335276008 +0200
++++ b/pysollib/settings.py     2014-04-07 20:05:33.099062670 +0200
+@@ -63,6 +63,7 @@
+         '/usr/local/share/PySolFC',
+         '/usr/games/PySolFC',
+         '/usr/local/games/PySolFC',
++        '/usr/share/pysolfc',
+         ]
+ if os.name == 'nt':
+     pass
diff --git a/games-board/pysolfc/pysolfc-2.0-r5.ebuild b/games-board/pysolfc/pysolfc-2.0-r5.ebuild
new file mode 100644 (file)
index 0000000..6b7b752
--- /dev/null
@@ -0,0 +1,82 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="tk"
+DISTUTILS_SINGLE_IMPL="1"
+
+inherit eutils python-single-r1 distutils-r1
+
+MY_PN=PySolFC
+SOL_URI="mirror://sourceforge/${PN}"
+
+DESCRIPTION="An exciting collection of more than 1000 solitaire card games"
+HOMEPAGE="http://pysolfc.sourceforge.net/"
+SRC_URI="${SOL_URI}/${MY_PN}-${PV}.tar.bz2
+       extra-cardsets? ( ${SOL_URI}/${MY_PN}-Cardsets-${PV}.tar.bz2 )"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="extra-cardsets minimal +sound"
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+DEPEND=""
+RDEPEND="${RDEPEND}
+       !minimal? ( dev-python/pillow[tk,${PYTHON_USEDEP}]
+               dev-tcltk/tktable )
+       sound? ( dev-python/pygame[${PYTHON_USEDEP}] )"
+
+python_prepare_all() {
+       local PATCHES=(
+               "${FILESDIR}/${PN}-PIL-imports.patch" #471514
+               "${FILESDIR}/${PN}-gentoo.patch" #591904
+       )
+
+       distutils-r1_python_prepare_all
+}
+
+pkg_setup() {
+       python-single-r1_pkg_setup
+}
+
+src_prepare() {
+       default
+       distutils-r1_src_prepare
+
+       sed -i \
+               -e "/pysol.desktop/d" \
+               -e "s:share/icons:share/pixmaps:" \
+               -e "s:data_dir =.*:data_dir = \'/usr/share/${PN}\':" \
+               setup.py || die
+
+       mv docs/README{,.txt} || die
+}
+
+src_compile() {
+       distutils-r1_src_compile
+}
+
+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-${PV}/*
+       fi
+
+       doman docs/*.6
+
+       DOCS=( README AUTHORS docs/README.txt docs/README.SOURCE )
+       HTML_DOCS=( docs/*html )
+
+       distutils-r1_python_install_all
+}
+
+src_install() {
+       distutils-r1_src_install
+}