1 |
commit: b90278cb754debe173cea88bff0d96e869b15068 |
2 |
Author: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Apr 3 12:34:05 2019 +0000 |
4 |
Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 3 12:34:57 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b90278cb |
7 |
|
8 |
games-board/pysolfc: bump to 2.6.2, compatibility with pillow-6 |
9 |
|
10 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
11 |
Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org> |
12 |
|
13 |
games-board/pysolfc/Manifest | 1 + |
14 |
games-board/pysolfc/files/pysolfc-pillow-6.patch | 20 +++++++ |
15 |
games-board/pysolfc/pysolfc-2.6.2.ebuild | 70 ++++++++++++++++++++++++ |
16 |
3 files changed, 91 insertions(+) |
17 |
|
18 |
diff --git a/games-board/pysolfc/Manifest b/games-board/pysolfc/Manifest |
19 |
index 4c7bd734786..953309506ad 100644 |
20 |
--- a/games-board/pysolfc/Manifest |
21 |
+++ b/games-board/pysolfc/Manifest |
22 |
@@ -2,3 +2,4 @@ DIST PySolFC-2.0.tar.bz2 4208776 BLAKE2B 0675de0923c6ee381f58f8abbaef5e27bd6fc85 |
23 |
DIST PySolFC-Cardsets-2.0.tar.bz2 30687905 BLAKE2B f17f5095a05cf42ea9eb3e7a3a7fefe055cc3452882bf96db82bb4d1bebb2307ffc2d0fd8836f7414bfcd93b1d8de52adb43ef22701a0806f2c6c036d9306501 SHA512 24275cd3656024e268a49487ac75e1e67e61ec20e0a9f88e2d1c287f91314a1a9343856d1202ce468f8863f4e9a9bf27526fbb1979a7d765718b38e64ca0cfc8 |
24 |
DIST pysolfc-2.2.0.tar.gz 4504375 BLAKE2B ea48910d36b704667654292cd4fc2e62bcf259d9a3677369371ab7aadd387505d5ae658496ad8982e08ca0405b44971bc1e2375e91cd90f84c569f8f26249ff3 SHA512 c6d09803eab8fe7fc2c4203537d75b8db3216dfcbd5cc60be5b89f23544c871a37f7b16d20df7be4b70c6f014d47b8c361e1557ab04cb1008451f41b456d0ad2 |
25 |
DIST pysolfc-2.4.0.tar.gz 6788273 BLAKE2B c852ec9912aabc37317f92941fea2c0fb7230467d188ac3a0a8a78b4a4e243bfac8b3d1ddbb03dde136d7518d03cf3fb02b48386e35218ce5891b54049e9c981 SHA512 177edf60797346b763c9da9daf73feae5fb3ef88529227a60e98b68eb6120289cd0cd76b8ca5925b0452cf43298b12acbb16a53872c892d56b71cbcf0fe93e03 |
26 |
+DIST pysolfc-2.6.2.tar.gz 6791741 BLAKE2B 473105f04bfb2fb174d3b50de5a7a55d586756a75e37eb36a9ff688a5a4b148ee940467b18fa4710f828d461d9156163c8fc9cd323b1562da18f0eb02e096916 SHA512 37b4f5f5f53c8041e7b908719456ad3c26401744389ffd44f445402d653b515c44e02ba55950e24d6a3aa2fc2bf914f8575f630335fe1b52c698154b47fb5717 |
27 |
|
28 |
diff --git a/games-board/pysolfc/files/pysolfc-pillow-6.patch b/games-board/pysolfc/files/pysolfc-pillow-6.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..4682ed34683 |
31 |
--- /dev/null |
32 |
+++ b/games-board/pysolfc/files/pysolfc-pillow-6.patch |
33 |
@@ -0,0 +1,20 @@ |
34 |
+diff -U2 -r PySolFC-pysolfc-2.6.2.orig/pysollib/mfxutil.py PySolFC-pysolfc-2.6.2/pysollib/mfxutil.py |
35 |
+--- PySolFC-pysolfc-2.6.2.orig/pysollib/mfxutil.py 2019-02-27 21:52:26.000000000 +0100 |
36 |
++++ PySolFC-pysolfc-2.6.2/pysollib/mfxutil.py 2019-04-03 14:09:51.059349643 +0200 |
37 |
+@@ -52,5 +52,5 @@ |
38 |
+ Image._initialized = 2 |
39 |
+ USE_PIL = False |
40 |
+-if TOOLKIT == 'tk' and Image and Image.VERSION >= '1.1.7': |
41 |
++if TOOLKIT == 'tk' and Image: |
42 |
+ USE_PIL = True |
43 |
+ |
44 |
+diff -U2 -r PySolFC-pysolfc-2.6.2.orig/pysollib/ui/tktile/tkutil.py PySolFC-pysolfc-2.6.2/pysollib/ui/tktile/tkutil.py |
45 |
+--- PySolFC-pysolfc-2.6.2.orig/pysollib/ui/tktile/tkutil.py 2019-02-27 21:52:26.000000000 +0100 |
46 |
++++ PySolFC-pysolfc-2.6.2/pysollib/ui/tktile/tkutil.py 2019-04-03 14:19:22.450363811 +0200 |
47 |
+@@ -354,5 +354,5 @@ |
48 |
+ return None |
49 |
+ im = image._pil_image |
50 |
+- if Image.VERSION >= '1.1.7': |
51 |
++ if True: |
52 |
+ # use an alpha image |
53 |
+ sh = Image.new('RGBA', im.size, color) |
54 |
|
55 |
diff --git a/games-board/pysolfc/pysolfc-2.6.2.ebuild b/games-board/pysolfc/pysolfc-2.6.2.ebuild |
56 |
new file mode 100644 |
57 |
index 00000000000..04193353ffb |
58 |
--- /dev/null |
59 |
+++ b/games-board/pysolfc/pysolfc-2.6.2.ebuild |
60 |
@@ -0,0 +1,70 @@ |
61 |
+# Copyright 1999-2019 Gentoo Authors |
62 |
+# Distributed under the terms of the GNU General Public License v2 |
63 |
+ |
64 |
+EAPI=6 |
65 |
+ |
66 |
+PYTHON_COMPAT=( python{2_7,3_5,3_6} ) |
67 |
+PYTHON_REQ_USE="tk" |
68 |
+ |
69 |
+inherit eutils distutils-r1 |
70 |
+ |
71 |
+MY_PN=PySolFC |
72 |
+ |
73 |
+DESCRIPTION="An exciting collection of more than 1000 solitaire card games" |
74 |
+HOMEPAGE="http://pysolfc.sourceforge.net/" |
75 |
+SRC_URI="https://github.com/shlomif/${MY_PN}/archive/${P}.tar.gz |
76 |
+ extra-cardsets? ( mirror://sourceforge/${PN}/archive/${P}/${MY_PN}-Cardsets-2.0.tar.bz2 )" |
77 |
+ |
78 |
+LICENSE="GPL-3" |
79 |
+SLOT="0" |
80 |
+KEYWORDS="~amd64 ~x86" |
81 |
+IUSE="extra-cardsets minimal +sound" |
82 |
+ |
83 |
+S=${WORKDIR}/${MY_PN}-${P} |
84 |
+ |
85 |
+DEPEND="dev-python/six" |
86 |
+RDEPEND="${DEPEND} |
87 |
+ python_targets_python3_5? ( dev-python/random2[python_targets_python3_5] ) |
88 |
+ python_targets_python3_6? ( dev-python/random2[python_targets_python3_6] ) |
89 |
+ !minimal? ( dev-python/pillow[tk,${PYTHON_USEDEP}] |
90 |
+ dev-tcltk/tktable ) |
91 |
+ sound? ( dev-python/pygame[${PYTHON_USEDEP}] )" |
92 |
+ |
93 |
+PATCHES=( |
94 |
+ "${FILESDIR}/${PN}-gentoo.patch" #591904 |
95 |
+ "${FILESDIR}/${PN}-locales.patch" |
96 |
+ "${FILESDIR}/${PN}-pillow-6.patch" |
97 |
+) |
98 |
+ |
99 |
+python_prepare_all() { |
100 |
+ sed -i \ |
101 |
+ -e "/pysol.desktop/d" \ |
102 |
+ -e "s:share/icons:share/pixmaps:" \ |
103 |
+ -e "s:data_dir =.*:data_dir = \'/usr/share/${PN}\':" \ |
104 |
+ setup.py || die |
105 |
+ |
106 |
+ distutils-r1_python_prepare_all |
107 |
+} |
108 |
+ |
109 |
+python_compile_all() { |
110 |
+ pushd html-src > /dev/null || die "html-src not found" |
111 |
+ PYTHONPATH=.. "${EPYTHON}" gen-html.py || die "gen-html failed" |
112 |
+ mv images html/ || die "mv images failed" |
113 |
+ popd > /dev/null |
114 |
+} |
115 |
+ |
116 |
+python_install_all() { |
117 |
+ make_desktop_entry pysol.py "PySol Fan Club Edition" pysol02 |
118 |
+ |
119 |
+ if use extra-cardsets; then |
120 |
+ insinto /usr/share/${PN} |
121 |
+ doins -r "${WORKDIR}"/${MY_PN}-Cardsets-2.0/* |
122 |
+ fi |
123 |
+ |
124 |
+ dosym /usr/share/doc/${PF}/html /usr/share/${PN}/html |
125 |
+ |
126 |
+ doman docs/*.6 |
127 |
+ DOCS=( README.md AUTHORS docs/README docs/README.SOURCE ) |
128 |
+ HTML_DOCS=( html-src/html/. ) |
129 |
+ distutils-r1_python_install_all |
130 |
+} |