Gentoo Archives: gentoo-commits

From: "Julian Ospald (hasufell)" <hasufell@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in games-engines/renpy/files: renpy-6.16.3-multiple-abi.patch renpy-6.16.0-multiple-abi.patch renpy-6.16.1-multiple-abi.patch
Date: Mon, 02 Dec 2013 19:13:09
Message-Id: 20131202191253.6C75C2004E@flycatcher.gentoo.org
1 hasufell 13/12/02 19:12:53
2
3 Added: renpy-6.16.3-multiple-abi.patch
4 Removed: renpy-6.16.0-multiple-abi.patch
5 renpy-6.16.1-multiple-abi.patch
6 Log:
7 version bump, remove old
8
9 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
10
11 Revision Changes Path
12 1.1 games-engines/renpy/files/renpy-6.16.3-multiple-abi.patch
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/renpy/files/renpy-6.16.3-multiple-abi.patch?rev=1.1&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/renpy/files/renpy-6.16.3-multiple-abi.patch?rev=1.1&content-type=text/plain
16
17 Index: renpy-6.16.3-multiple-abi.patch
18 ===================================================================
19 commit 23f67fe23d7b51e352a500a0e005ae3ef4dbc097
20 Author: hasufell <hasufell@g.o>
21 Date: Sat Oct 26 22:17:31 2013 +0200
22
23 fix multiple abi support
24
25 diff --git a/renpy.py b/renpy.py
26 index 9f2977f..394e4e1 100644
27 --- a/renpy.py
28 +++ b/renpy.py
29 @@ -28,82 +28,9 @@
30 import os
31 import sys
32 import warnings
33 -
34 -# Functions to be customized by distributors. ################################
35 -
36 -# Given the Ren'Py base directory (usually the directory containing
37 -# this file), this is expected to return the path to the common directory.
38 -def path_to_common(renpy_base):
39 - return renpy_base + "/renpy/common"
40 -
41 -# Given a directory holding a Ren'Py game, this is expected to return
42 -# the path to a directory that will hold save files.
43 -def path_to_saves(gamedir):
44 - import renpy #@UnresolvedImport
45 -
46 - # Android.
47 - if renpy.android:
48 - paths = [
49 - os.path.join(os.environ["ANDROID_OLD_PUBLIC"], "game/saves"),
50 - os.path.join(os.environ["ANDROID_PRIVATE"], "saves"),
51 - os.path.join(os.environ["ANDROID_PUBLIC"], "saves"),
52 - ]
53 -
54 - for rv in paths:
55 - if os.path.isdir(rv):
56 - break
57 -
58 - print "Using savedir", rv
59 -
60 - # We return the last path as the default.
61 -
62 - return rv
63 -
64 -
65 - # No save directory given.
66 - if not renpy.config.save_directory:
67 - return gamedir + "/saves"
68 -
69 - # Search the path above Ren'Py for a directory named "Ren'Py Data".
70 - # If it exists, then use that for our save directory.
71 - path = renpy.config.renpy_base
72 -
73 - while True:
74 - if os.path.isdir(path + "/Ren'Py Data"):
75 - return path + "/Ren'Py Data/" + renpy.config.save_directory
76 -
77 - newpath = os.path.dirname(path)
78 - if path == newpath:
79 - break
80 - path = newpath
81 -
82 - # Otherwise, put the saves in a platform-specific location.
83 - if renpy.macintosh:
84 - rv = "~/Library/RenPy/" + renpy.config.save_directory
85 - return os.path.expanduser(rv)
86 -
87 - elif renpy.windows:
88 - if 'APPDATA' in os.environ:
89 - return os.environ['APPDATA'] + "/RenPy/" + renpy.config.save_directory
90 - else:
91 - rv = "~/RenPy/" + renpy.config.save_directory
92 - return os.path.expanduser(rv)
93 -
94 - else:
95 - rv = "~/.renpy/" + renpy.config.save_directory
96 - return os.path.expanduser(rv)
97 -
98 -
99 -# Returns the path to the Ren'Py base directory (containing common and
100 -# the launcher, usually.)
101 -def path_to_renpy_base():
102 - renpy_base = os.path.dirname(os.path.realpath(sys.argv[0]))
103 - renpy_base = os.environ.get('RENPY_BASE', renpy_base)
104 - renpy_base = os.path.abspath(renpy_base)
105 -
106 - return renpy_base
107 -
108 -##############################################################################
109 +from distutils.sysconfig import get_python_lib
110 +sys.path.append(get_python_lib() + "/renpy@SLOT@")
111 +import renpy.common as common
112
113 # The version of the Mac Launcher and py4renpy that we require.
114 macos_version = (6, 14, 0)
115 @@ -131,7 +58,7 @@ if android:
116
117 def main():
118
119 - renpy_base = path_to_renpy_base()
120 + renpy_base = common.path_to_renpy_base()
121
122 # Add paths.
123 if os.path.exists(renpy_base + "/module"):
124 diff --git a/renpy/common.py b/renpy/common.py
125 new file mode 100644
126 index 0000000..1f15b3c
127 --- /dev/null
128 +++ b/renpy/common.py
129 @@ -0,0 +1,103 @@
130 +# This file is part of Ren'Py. The license below applies to Ren'Py only.
131 +# Games and other projects that use Ren'Py may use a different license.
132 +
133 +# Copyright 2004-2012 Tom Rothamel <pytom@××××××××.us>
134 +#
135 +# Permission is hereby granted, free of charge, to any person
136 +# obtaining a copy of this software and associated documentation files
137 +# (the "Software"), to deal in the Software without restriction,
138 +# including without limitation the rights to use, copy, modify, merge,
139 +# publish, distribute, sublicense, and/or sell copies of the Software,
140 +# and to permit persons to whom the Software is furnished to do so,
141 +# subject to the following conditions:
142 +#
143 +# The above copyright notice and this permission notice shall be
144 +# included in all copies or substantial portions of the Software.
145 +#
146 +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
147 +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
148 +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
149 +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
150 +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
151 +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
152 +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
153 +
154 +import os
155 +import sys
156 +import warnings
157 +from distutils.sysconfig import get_python_lib
158 +
159 +# Functions to be customized by distributors. ################################
160 +
161 +# Given the Ren'Py base directory (usually the directory containing
162 +# this file), this is expected to return the path to the common directory.
163 +def path_to_common(renpy_base):
164 + return renpy_base + "/renpy/common"
165 +
166 +# Given a directory holding a Ren'Py game, this is expected to return
167 +# the path to a directory that will hold save files.
168 +def path_to_saves(gamedir):
169 + import renpy #@UnresolvedImport
170 +
171 + # Android.
172 + if renpy.android:
173 + paths = [
174 + os.path.join(os.environ["ANDROID_OLD_PUBLIC"], "game/saves"),
175 + os.path.join(os.environ["ANDROID_PRIVATE"], "saves"),
176 + os.path.join(os.environ["ANDROID_PUBLIC"], "saves"),
177 + ]
178 +
179 + for rv in paths:
180 + if os.path.isdir(rv):
181 + break
182 +
183 + print "Using savedir", rv
184 +
185 + # We return the last path as the default.
186 +
187 + return rv
188 +
189 +
190 + # No save directory given.
191 + if not renpy.config.save_directory:
192 + return gamedir + "/saves"
193 +
194 + # Search the path above Ren'Py for a directory named "Ren'Py Data".
195 + # If it exists, then use that for our save directory.
196 + path = renpy.config.renpy_base
197 +
198 + while True:
199 + if os.path.isdir(path + "/Ren'Py Data"):
200 + return path + "/Ren'Py Data/" + renpy.config.save_directory
201 +
202 + newpath = os.path.dirname(path)
203 + if path == newpath:
204 + break
205 + path = newpath
206 +
207 + # Otherwise, put the saves in a platform-specific location.
208 + if renpy.macintosh:
209 + rv = "~/Library/RenPy/" + renpy.config.save_directory
210 + return os.path.expanduser(rv)
211 +
212 + elif renpy.windows:
213 + if 'APPDATA' in os.environ:
214 + return os.environ['APPDATA'] + "/RenPy/" + renpy.config.save_directory
215 + else:
216 + rv = "~/RenPy/" + renpy.config.save_directory
217 + return os.path.expanduser(rv)
218 +
219 + else:
220 + rv = "~/.renpy/" + renpy.config.save_directory
221 + return os.path.expanduser(rv)
222 +
223 +
224 +# Returns the path to the Ren'Py base directory (containing common and
225 +# the launcher, usually.)
226 +def path_to_renpy_base():
227 + renpy_base = os.path.dirname(os.path.realpath(sys.argv[0]))
228 + renpy_base = get_python_lib() + "/renpy@SLOT@"
229 + renpy_base = os.environ.get('RENPY_BASE', renpy_base)
230 + renpy_base = os.path.abspath(renpy_base)
231 +
232 + return renpy_base
233 diff --git a/renpy/main.py b/renpy/main.py
234 index d15eefc..b11bba9 100644
235 --- a/renpy/main.py
236 +++ b/renpy/main.py
237 @@ -26,7 +26,7 @@ import sys
238 import time
239 import zipfile
240 import subprocess
241 -import __main__
242 +import renpy.common as common
243
244
245 def run(restart):
246 @@ -166,7 +166,7 @@ def main():
247 renpy.config.searchpath = [ renpy.config.gamedir ]
248
249 # Find the common directory.
250 - commondir = __main__.path_to_common(renpy.config.renpy_base) # E1101 @UndefinedVariable
251 + commondir = common.path_to_common(renpy.config.renpy_base) # E1101 @UndefinedVariable
252
253 if os.path.isdir(commondir):
254 renpy.config.searchpath.append(commondir)
255 @@ -229,7 +229,7 @@ def main():
256
257 # Find the save directory.
258 if renpy.config.savedir is None:
259 - renpy.config.savedir = __main__.path_to_saves(renpy.config.gamedir) # E1101 @UndefinedVariable
260 + renpy.config.savedir = common.path_to_saves(renpy.config.gamedir) # E1101 @UndefinedVariable
261
262 if renpy.game.args.savedir: #@UndefinedVariable
263 renpy.config.savedir = renpy.game.args.savedir #@UndefinedVariable