1 |
commit: be246890dcb968ff90c903b9a2a63ac4c175cc02 |
2 |
Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 9 13:03:04 2020 +0000 |
4 |
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 9 13:10:28 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be246890 |
7 |
|
8 |
games-engines/renpy: Update to version 7.3.5 |
9 |
|
10 |
- This is a major update to version 7.3.5. |
11 |
- Multislot support is dropped since upstream provides backward |
12 |
compatibility for older games. |
13 |
- renpy-7.3.5-use-system-fribidi.patch is based on fribidi patch |
14 |
from bug 671008 by Alex <barracuda72 <AT> bk.ru>, though it was |
15 |
improved further. |
16 |
|
17 |
Closes: https://bugs.gentoo.org/671008 |
18 |
Closes: https://bugs.gentoo.org/710884 |
19 |
Package-Manager: Portage-2.3.82, Repoman-2.3.20 |
20 |
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org> |
21 |
|
22 |
games-engines/renpy/Manifest | 1 + |
23 |
.../renpy/files/renpy-7.3.5-system-path.patch | 19 ++++ |
24 |
.../files/renpy-7.3.5-use-system-fribidi.patch | 42 ++++++++ |
25 |
games-engines/renpy/renpy-7.3.5.ebuild | 108 +++++++++++++++++++++ |
26 |
4 files changed, 170 insertions(+) |
27 |
|
28 |
diff --git a/games-engines/renpy/Manifest b/games-engines/renpy/Manifest |
29 |
index 6a38ea82a5c..2a93fb3d8cc 100644 |
30 |
--- a/games-engines/renpy/Manifest |
31 |
+++ b/games-engines/renpy/Manifest |
32 |
@@ -1 +1,2 @@ |
33 |
DIST renpy-6.99.12.4-source.tar.bz2 18192453 BLAKE2B eb00db04fc6ed0aafa0428c3ba0ffe986634f8b536a7cd6c88c6082789554f6d9631f433baa3e34ab91d19509ccef5617e3fe8ec410b96f4b87d489656cc893b SHA512 375b67e15630fc21915136e70bc93db6da7c2da192d39b1256822513ae44974124522c85f1976f2af62df27b5fa11493af488b02abcf0081eeae03e1a69dfca5 |
34 |
+DIST renpy-7.3.5-source.tar.bz2 68211972 BLAKE2B 46d8e1c788398515005eba9b668020aa2c9527e4f9207c95661d8fe86f4bbb6bc1832fc3e6808023355e2ff67666bc6d3b03f89ef58afa77d5a3abc965192175 SHA512 5a34412379682628d0be9cbbca0dfc95d5e52f8ffa871cdab0c20d028c532233b0d94a7dfdec67fec5294a789e9ca16b61dc30ef138e303d476007eaffff0d2f |
35 |
|
36 |
diff --git a/games-engines/renpy/files/renpy-7.3.5-system-path.patch b/games-engines/renpy/files/renpy-7.3.5-system-path.patch |
37 |
new file mode 100644 |
38 |
index 00000000000..fc5d54aceea |
39 |
--- /dev/null |
40 |
+++ b/games-engines/renpy/files/renpy-7.3.5-system-path.patch |
41 |
@@ -0,0 +1,19 @@ |
42 |
+--- renpy-7.3.5-source/renpy.py.orig 2019-10-18 02:35:19.000000000 +0300 |
43 |
++++ renpy-7.3.5-source/renpy.py 2020-05-09 13:38:24.989131947 +0300 |
44 |
+@@ -32,6 +32,7 @@ |
45 |
+ import warnings |
46 |
+ |
47 |
+ # Functions to be customized by distributors. ################################ |
48 |
++from distutils.sysconfig import get_python_lib |
49 |
+ |
50 |
+ # Given the Ren'Py base directory (usually the directory containing |
51 |
+ # this file), this is expected to return the path to the common directory. |
52 |
+@@ -140,7 +141,7 @@ |
53 |
+ # Returns the path to the Ren'Py base directory (containing common and |
54 |
+ # the launcher, usually.) |
55 |
+ def path_to_renpy_base(): |
56 |
+- renpy_base = os.path.dirname(os.path.realpath(sys.argv[0])) |
57 |
++ renpy_base = get_python_lib() |
58 |
+ renpy_base = os.path.abspath(renpy_base) |
59 |
+ |
60 |
+ return renpy_base |
61 |
|
62 |
diff --git a/games-engines/renpy/files/renpy-7.3.5-use-system-fribidi.patch b/games-engines/renpy/files/renpy-7.3.5-use-system-fribidi.patch |
63 |
new file mode 100644 |
64 |
index 00000000000..e4b0258f984 |
65 |
--- /dev/null |
66 |
+++ b/games-engines/renpy/files/renpy-7.3.5-use-system-fribidi.patch |
67 |
@@ -0,0 +1,42 @@ |
68 |
+diff '--color=auto' -Naurd renpy-7.3.5-source.orig/module/renpybidicore.c renpy-7.3.5-source/module/renpybidicore.c |
69 |
+--- renpy-7.3.5-source.orig/module/renpybidicore.c 2018-10-12 08:37:06.000000000 +0300 |
70 |
++++ renpy-7.3.5-source/module/renpybidicore.c 2020-05-09 12:46:30.811881811 +0300 |
71 |
+@@ -1,5 +1,5 @@ |
72 |
+ #include <Python.h> |
73 |
+-#include <fribidi-src/lib/fribidi.h> |
74 |
++#include <fribidi.h> |
75 |
+ #include <stdlib.h> |
76 |
+ |
77 |
+ #ifndef alloca |
78 |
+--- renpy-7.3.5-source.orig/module/setup.py 2019-08-09 05:11:58.000000000 +0300 |
79 |
++++ renpy-7.3.5-source/module/setup.py 2020-05-09 12:46:46.463942266 +0300 |
80 |
+@@ -119,28 +119,13 @@ |
81 |
+ sdl + [ png, 'z', 'm' ]) |
82 |
+ |
83 |
+ FRIBIDI_SOURCES = """ |
84 |
+-fribidi-src/lib/fribidi.c |
85 |
+-fribidi-src/lib/fribidi-arabic.c |
86 |
+-fribidi-src/lib/fribidi-bidi.c |
87 |
+-fribidi-src/lib/fribidi-bidi-types.c |
88 |
+-fribidi-src/lib/fribidi-deprecated.c |
89 |
+-fribidi-src/lib/fribidi-joining.c |
90 |
+-fribidi-src/lib/fribidi-joining-types.c |
91 |
+-fribidi-src/lib/fribidi-mem.c |
92 |
+-fribidi-src/lib/fribidi-mirroring.c |
93 |
+-fribidi-src/lib/fribidi-run.c |
94 |
+-fribidi-src/lib/fribidi-shape.c |
95 |
+ renpybidicore.c |
96 |
+ """.split() |
97 |
+ cython( |
98 |
+ "_renpybidi", |
99 |
+ FRIBIDI_SOURCES, |
100 |
+- includes=[ |
101 |
+- BASE + "/fribidi-src/", |
102 |
+- BASE + "/fribidi-src/lib/", |
103 |
+- ], |
104 |
++ libs=["fribidi"], |
105 |
+ define_macros=[ |
106 |
+- ("FRIBIDI_ENTRY", ""), |
107 |
+ ("HAVE_CONFIG_H", "1"), |
108 |
+ ]) |
109 |
+ |
110 |
|
111 |
diff --git a/games-engines/renpy/renpy-7.3.5.ebuild b/games-engines/renpy/renpy-7.3.5.ebuild |
112 |
new file mode 100644 |
113 |
index 00000000000..f408ea63475 |
114 |
--- /dev/null |
115 |
+++ b/games-engines/renpy/renpy-7.3.5.ebuild |
116 |
@@ -0,0 +1,108 @@ |
117 |
+# Copyright 1999-2020 Gentoo Authors |
118 |
+# Distributed under the terms of the GNU General Public License v2 |
119 |
+ |
120 |
+EAPI=7 |
121 |
+PYTHON_COMPAT=( python2_7 ) |
122 |
+DISTUTILS_IN_SOURCE_BUILD=1 |
123 |
+DISTUTILS_USE_SETUPTOOLS=no |
124 |
+inherit gnome2-utils distutils-r1 |
125 |
+ |
126 |
+DESCRIPTION="Visual novel engine written in python" |
127 |
+HOMEPAGE="https://www.renpy.org" |
128 |
+SRC_URI="https://www.renpy.org/dl/${PV}/${P}-source.tar.bz2" |
129 |
+ |
130 |
+LICENSE="MIT" |
131 |
+SLOT=0 |
132 |
+KEYWORDS="~amd64 ~x86" |
133 |
+IUSE="development doc examples" |
134 |
+REQUIRED_USE="examples? ( development )" |
135 |
+ |
136 |
+BDEPEND=" |
137 |
+ dev-python/cython[${PYTHON_USEDEP}] |
138 |
+ virtual/pkgconfig" |
139 |
+DEPEND=" |
140 |
+ dev-libs/fribidi |
141 |
+ ~dev-python/pygame_sdl2-${PV}[${PYTHON_USEDEP}] |
142 |
+ >=dev-lang/python-exec-0.3[${PYTHON_USEDEP}] |
143 |
+ media-libs/glew:0 |
144 |
+ media-libs/libpng:0 |
145 |
+ media-libs/libsdl2[video] |
146 |
+ media-libs/freetype:2 |
147 |
+ sys-libs/zlib |
148 |
+ media-video/ffmpeg" |
149 |
+RDEPEND="${DEPEND} |
150 |
+ !app-eselect/eselect-renpy" |
151 |
+ |
152 |
+S=${WORKDIR}/${P}-source |
153 |
+ |
154 |
+PATCHES=( |
155 |
+ "${FILESDIR}"/${P}-system-path.patch |
156 |
+ "${FILESDIR}"/${PN}-6.99.12.4-compat-style.patch |
157 |
+ "${FILESDIR}"/${PN}-6.99.12.4-compat-infinite-loop.patch |
158 |
+ "${FILESDIR}"/${P}-use-system-fribidi.patch |
159 |
+) |
160 |
+ |
161 |
+python_prepare_all() { |
162 |
+ einfo "Deleting precompiled python files" |
163 |
+ find . -name '*.py[co]' -print -delete || die |
164 |
+ rm -r module/{gen,fribidi-src} || die |
165 |
+ |
166 |
+ export CFLAGS="${CFLAGS} $($(tc-getPKG_CONFIG) --cflags fribidi)" |
167 |
+ distutils-r1_python_prepare_all |
168 |
+} |
169 |
+ |
170 |
+python_compile() { |
171 |
+ cd "${S}"/module || die |
172 |
+ distutils-r1_python_compile |
173 |
+} |
174 |
+ |
175 |
+python_install() { |
176 |
+ cd "${S}"/module || die |
177 |
+ distutils-r1_python_install |
178 |
+ |
179 |
+ cd "${S}" || die |
180 |
+ python_newscript renpy.py ${PN} |
181 |
+ |
182 |
+ python_domodule renpy |
183 |
+ if use development ; then |
184 |
+ python_domodule launcher |
185 |
+ fi |
186 |
+ if use examples ; then |
187 |
+ python_domodule the_question tutorial |
188 |
+ fi |
189 |
+} |
190 |
+ |
191 |
+python_install_all() { |
192 |
+ distutils-r1_python_install_all |
193 |
+ if use development; then |
194 |
+ newicon -s 32 launcher/game/images/logo32.png ${P}.png |
195 |
+ make_desktop_entry ${PN} "Ren'Py ${PV}" ${P} |
196 |
+ fi |
197 |
+ |
198 |
+ if use doc; then |
199 |
+ insinto "/usr/share/doc/${PF}/html" |
200 |
+ doins -r doc/* |
201 |
+ fi |
202 |
+ newman "${FILESDIR}/${PN}.1" "${P}.1" |
203 |
+} |
204 |
+ |
205 |
+pkg_preinst() { |
206 |
+ use development && gnome2_icon_savelist |
207 |
+} |
208 |
+ |
209 |
+pkg_postinst() { |
210 |
+ use development && gnome2_icon_cache_update |
211 |
+ |
212 |
+ local v |
213 |
+ for v in ${REPLACING_VERSIONS}; do |
214 |
+ ver_test "${v}" -ge 7 && continue |
215 |
+ einfo "Starting from ${PN}-7 slots are dropped." |
216 |
+ einfo "RenPy natively supports compatibility with games made for older versions." |
217 |
+ einfo "Report bugs upstream on such problems, usually they are easy to fix." |
218 |
+ break |
219 |
+ done |
220 |
+} |
221 |
+ |
222 |
+pkg_postrm() { |
223 |
+ use development && gnome2_icon_cache_update |
224 |
+} |