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