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.15.2-multiple-abi.patch renpy-6.15.0-multiple-abi.patch
Date: Fri, 29 Mar 2013 23:49:38
Message-Id: 20130329234934.937BC2171E@flycatcher.gentoo.org
1 hasufell 13/03/29 23:49:34
2
3 Added: renpy-6.15.2-multiple-abi.patch
4 Removed: renpy-6.15.0-multiple-abi.patch
5 Log:
6 version bump
7
8 (Portage version: 2.2.0_alpha170/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
9
10 Revision Changes Path
11 1.1 games-engines/renpy/files/renpy-6.15.2-multiple-abi.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/renpy/files/renpy-6.15.2-multiple-abi.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-engines/renpy/files/renpy-6.15.2-multiple-abi.patch?rev=1.1&content-type=text/plain
15
16 Index: renpy-6.15.2-multiple-abi.patch
17 ===================================================================
18 From: Julian Ospald <hasufell@g.o>
19 Date: Mon Feb 25 21:35:31 UTC 2013
20 Subject: fix multiple abi support
21
22 --- /dev/null
23 +++ renpy-6.15.2-source/renpy/common.py
24 @@ -0,0 +1,79 @@
25 +# (the "Software"), to deal in the Software without restriction,
26 +# including without limitation the rights to use, copy, modify, merge,
27 +# publish, distribute, sublicense, and/or sell copies of the Software,
28 +# and to permit persons to whom the Software is furnished to do so,
29 +# subject to the following conditions:
30 +#
31 +# The above copyright notice and this permission notice shall be
32 +# included in all copies or substantial portions of the Software.
33 +#
34 +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35 +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36 +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37 +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
38 +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
39 +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
40 +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41 +
42 +import os
43 +import sys
44 +import warnings
45 +from distutils.sysconfig import get_python_lib
46 +
47 +# Functions to be customized by distributors. ################################
48 +
49 +# Given the Ren'Py base directory (usually the directory containing
50 +# this file), this is expected to return the path to the common directory.
51 +def path_to_common(renpy_base):
52 + return renpy_base + "/renpy/common"
53 +
54 +# Given a directory holding a Ren'Py game, this is expected to return
55 +# the path to a directory that will hold save files.
56 +def path_to_saves(gamedir):
57 + import renpy #@UnresolvedImport
58 +
59 + if not renpy.config.save_directory:
60 + return gamedir + "/saves"
61 +
62 + # Search the path above Ren'Py for a directory named "Ren'Py Data".
63 + # If it exists, then use that for our save directory.
64 + path = renpy.config.renpy_base
65 +
66 + while True:
67 + if os.path.isdir(path + "/Ren'Py Data"):
68 + return path + "/Ren'Py Data/" + renpy.config.save_directory
69 +
70 + newpath = os.path.dirname(path)
71 + if path == newpath:
72 + break
73 + path = newpath
74 +
75 + # Otherwise, put the saves in a platform-specific location.
76 + if renpy.android:
77 + return gamedir + "/saves"
78 +
79 + elif renpy.macintosh:
80 + rv = "~/Library/RenPy/" + renpy.config.save_directory
81 + return os.path.expanduser(rv)
82 +
83 + elif renpy.windows:
84 + if 'APPDATA' in os.environ:
85 + return os.environ['APPDATA'] + "/RenPy/" + renpy.config.save_directory
86 + else:
87 + rv = "~/RenPy/" + renpy.config.save_directory
88 + return os.path.expanduser(rv)
89 +
90 + else:
91 + rv = "~/.renpy/" + renpy.config.save_directory
92 + return os.path.expanduser(rv)
93 +
94 +
95 +# Returns the path to the Ren'Py base directory (containing common and
96 +# the launcher, usually.)
97 +def path_to_renpy_base():
98 + renpy_base = os.path.dirname(os.path.realpath(sys.argv[0]))
99 + renpy_base = get_python_lib() + "/renpy@SLOT@"
100 + renpy_base = os.environ.get('RENPY_BASE', renpy_base)
101 + renpy_base = os.path.abspath(renpy_base)
102 +
103 + return renpy_base
104 --- renpy-6.15.2-source/renpy.py
105 +++ renpy-6.15.2-source/renpy.py
106 @@ -25,64 +25,9 @@
107 import sys
108 import warnings
109
110 -# Functions to be customized by distributors. ################################
111 -
112 -# Given the Ren'Py base directory (usually the directory containing
113 -# this file), this is expected to return the path to the common directory.
114 -def path_to_common(renpy_base):
115 - return renpy_base + "/renpy/common"
116 -
117 -# Given a directory holding a Ren'Py game, this is expected to return
118 -# the path to a directory that will hold save files.
119 -def path_to_saves(gamedir):
120 - import renpy #@UnresolvedImport
121 -
122 - if not renpy.config.save_directory:
123 - return gamedir + "/saves"
124 -
125 - # Search the path above Ren'Py for a directory named "Ren'Py Data".
126 - # If it exists, then use that for our save directory.
127 - path = renpy.config.renpy_base
128 -
129 - while True:
130 - if os.path.isdir(path + "/Ren'Py Data"):
131 - return path + "/Ren'Py Data/" + renpy.config.save_directory
132 -
133 - newpath = os.path.dirname(path)
134 - if path == newpath:
135 - break
136 - path = newpath
137 -
138 - # Otherwise, put the saves in a platform-specific location.
139 - if renpy.android:
140 - return gamedir + "/saves"
141 -
142 - elif renpy.macintosh:
143 - rv = "~/Library/RenPy/" + renpy.config.save_directory
144 - return os.path.expanduser(rv)
145 -
146 - elif renpy.windows:
147 - if 'APPDATA' in os.environ:
148 - return os.environ['APPDATA'] + "/RenPy/" + renpy.config.save_directory
149 - else:
150 - rv = "~/RenPy/" + renpy.config.save_directory
151 - return os.path.expanduser(rv)
152 -
153 - else:
154 - rv = "~/.renpy/" + renpy.config.save_directory
155 - return os.path.expanduser(rv)
156 -
157 -
158 -# Returns the path to the Ren'Py base directory (containing common and
159 -# the launcher, usually.)
160 -def path_to_renpy_base():
161 - renpy_base = os.path.dirname(os.path.realpath(sys.argv[0]))
162 - renpy_base = os.environ.get('RENPY_BASE', renpy_base)
163 - renpy_base = os.path.abspath(renpy_base)
164 -
165 - return renpy_base
166 -
167 -##############################################################################
168 +from distutils.sysconfig import get_python_lib
169 +sys.path.append(get_python_lib() + "/renpy@SLOT@")
170 +import renpy.common as common
171
172 # The version of the Mac Launcher and py4renpy that we require.
173 macos_version = (6, 14, 0)
174 @@ -97,21 +42,10 @@
175 print "Ren'Py requires at least python 2.6."
176 sys.exit(0)
177
178 -android = ("ANDROID_PRIVATE" in os.environ)
179
180 -# Android requires us to add code to the main module, and to command some
181 -# renderers.
182 -if android:
183 - __main__ = sys.modules["__main__"]
184 - __main__.path_to_renpy_base = path_to_renpy_base
185 - __main__.path_to_common = path_to_common
186 - __main__.path_to_saves = path_to_saves
187 - os.environ["RENPY_RENDERER"] = "gl"
188 - os.environ["RENPY_GL_ENVIRON"] = "limited"
189 -
190 def main():
191
192 - renpy_base = path_to_renpy_base()
193 + renpy_base = common.path_to_renpy_base()
194
195 # Add paths.
196 if os.path.exists(renpy_base + "/module"):
197 @@ -134,10 +68,6 @@
198 print >>sys.stderr, "correctly, preserving the directory structure."
199 raise
200
201 - if android:
202 - renpy.linux = False
203 - renpy.android = True
204 -
205 renpy.bootstrap.bootstrap(renpy_base)
206
207 if __name__ == "__main__":
208 --- renpy-6.15.2-source/renpy/main.py
209 +++ renpy-6.15.2-source/renpy/main.py
210 @@ -27,7 +27,7 @@
211 import zipfile
212 import subprocess
213 from cPickle import loads, dumps
214 -import __main__
215 +import renpy.common as common
216
217
218 def save_persistent():
219 @@ -147,7 +147,7 @@
220 renpy.config.searchpath = [ renpy.config.gamedir ]
221
222 # Find the common directory.
223 - commondir = __main__.path_to_common(renpy.config.renpy_base) # E1101 @UndefinedVariable
224 + commondir = common.path_to_common(renpy.config.renpy_base) # E1101 @UndefinedVariable
225
226 if os.path.isdir(commondir):
227 renpy.config.searchpath.append(commondir)
228 @@ -206,7 +206,7 @@
229
230 # Find the save directory.
231 if renpy.config.savedir is None:
232 - renpy.config.savedir = __main__.path_to_saves(renpy.config.gamedir) # E1101 @UndefinedVariable
233 + renpy.config.savedir = common.path_to_saves(renpy.config.gamedir) # E1101 @UndefinedVariable
234
235 if renpy.game.args.savedir: #@UndefinedVariable
236 renpy.config.savedir = renpy.game.args.savedir #@UndefinedVariable