forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
games-engines/renpy: increase infinite loop hardcoded values
On many old hardware, e.g on my Atom netbook games hit this limit, but otherwise work fine. Increasing the limit helps. People are also reporting this issue in many cases (old laptops, stow tablets, etc where games fail due to this issue and work otherwise): https://translationprojectvisualnovels.blogspot.ru/2016/09/monster-girl-quest-android-15092016.html https://lemmasoft.renai.us/forums/viewtopic.php?f=8&t=30521&start=90 https://steamcommunity.com/app/356530/discussions/0/365163686036650662/ (and many more, just google) Package-Manager: Portage-2.3.6, Repoman-2.3.2 Signed-off-by: Andrew Savchenko <[email protected]>
- Loading branch information
Showing
2 changed files
with
150 additions
and
0 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
games-engines/renpy/files/renpy-6.99.12.4-compat-infinite-loop.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Adapted from git HEAD: | ||
commit ff308191a190bf7c5c2118a31f3d8569a0904c04 | ||
Author: Andrew Savchenko <[email protected]> | ||
Date: Mon Jul 17 08:00:07 2017 +0300 | ||
|
||
Increase infinite loop hardcoded values | ||
|
||
On many old hardware, e.g on my Atom netbook games hit this limit, | ||
but otherwise work fine. Increasing the limit helps. People are | ||
also reporting this issue in many cases (old laptops, stow tablets, | ||
etc where games fail due to this issue and work otherwise): | ||
|
||
https://translationprojectvisualnovels.blogspot.ru/2016/09/monster-girl-quest-android-15092016.html | ||
https://lemmasoft.renai.us/forums/viewtopic.php?f=8&t=30521&start=90 | ||
https://steamcommunity.com/app/356530/discussions/0/365163686036650662/ | ||
(and many more, just google) | ||
|
||
index 00c7562..a7e361c 100644 | ||
--- a/renpy/display/core.py | ||
+++ b/renpy/display/core.py | ||
@@ -2845,7 +2845,7 @@ class Interface(object): | ||
|
||
while rv is None: | ||
|
||
- renpy.execution.not_infinite_loop(10) | ||
+ renpy.execution.not_infinite_loop(50) | ||
|
||
# Check for a change in fullscreen preference. | ||
if ((self.fullscreen != renpy.game.preferences.fullscreen) or | ||
diff --git a/renpy/main.py b/renpy/main.py | ||
index 6f14d77..960d2fd 100644 | ||
--- a/renpy/main.py | ||
+++ b/renpy/main.py | ||
@@ -318,7 +318,7 @@ def main(): | ||
game.contexts = [ renpy.execution.Context(False) ] | ||
game.contexts[0].init_phase = True | ||
|
||
- renpy.execution.not_infinite_loop(60) | ||
+ renpy.execution.not_infinite_loop(300) | ||
|
||
# Load the script. | ||
renpy.game.exception_info = 'While loading the script.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=6 | ||
PYTHON_COMPAT=( python2_7 ) | ||
DISTUTILS_IN_SOURCE_BUILD=1 | ||
inherit eutils gnome2-utils toolchain-funcs versionator distutils-r1 | ||
|
||
DESCRIPTION="Visual novel engine written in python" | ||
HOMEPAGE="http://www.renpy.org" | ||
SRC_URI="http://www.renpy.org/dl/${PV}/${P}-source.tar.bz2" | ||
|
||
LICENSE="MIT" | ||
SLOT="$(get_version_component_range 1-2)" | ||
MYSLOT=$(delete_all_version_separators ${SLOT}) | ||
KEYWORDS="~amd64 ~x86" | ||
IUSE="development doc examples" | ||
REQUIRED_USE="examples? ( development )" | ||
|
||
RDEPEND=" | ||
>=app-eselect/eselect-renpy-0.7 | ||
dev-libs/fribidi | ||
~dev-python/pygame_sdl2-${PV}[${PYTHON_USEDEP}] | ||
>=dev-lang/python-exec-0.3[${PYTHON_USEDEP}] | ||
media-libs/glew:0 | ||
media-libs/libpng:0 | ||
media-libs/libsdl2[video] | ||
media-libs/freetype:2 | ||
sys-libs/zlib | ||
virtual/ffmpeg" | ||
DEPEND="${RDEPEND} | ||
dev-python/cython[${PYTHON_USEDEP}] | ||
virtual/pkgconfig" | ||
|
||
S=${WORKDIR}/${P}-source | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${P}-multiple-abi.patch | ||
"${FILESDIR}"/${P}-compat-window.patch #601200 | ||
"${FILESDIR}"/${P}-compat-style.patch | ||
"${FILESDIR}"/${P}-compat-infinite-loop.patch | ||
) | ||
|
||
python_prepare_all() { | ||
export CFLAGS="${CFLAGS} $($(tc-getPKG_CONFIG) --cflags fribidi)" | ||
distutils-r1_python_prepare_all | ||
|
||
einfo "Deleting precompiled python files" | ||
find . -name '*.py[co]' -print -delete || die | ||
|
||
sed -i \ | ||
-e "s/@SLOT@/${MYSLOT}/" \ | ||
renpy.py renpy/common.py || die "setting slot failed!" | ||
} | ||
|
||
python_compile() { | ||
cd "${S}"/module || die | ||
distutils-r1_python_compile | ||
} | ||
|
||
python_install() { | ||
cd "${S}"/module || die | ||
distutils-r1_python_install --install-lib="$(python_get_sitedir)/renpy${MYSLOT}" | ||
|
||
cd "${S}" || die | ||
python_newscript renpy.py ${PN}-${SLOT} | ||
|
||
python_moduleinto renpy${MYSLOT} | ||
python_domodule renpy | ||
if use development ; then | ||
python_domodule launcher templates | ||
fi | ||
if use examples ; then | ||
python_domodule the_question tutorial | ||
fi | ||
} | ||
|
||
python_install_all() { | ||
distutils-r1_python_install_all | ||
if use development; then | ||
newicon -s 32 launcher/game/images/logo32.png ${P}.png | ||
make_desktop_entry ${PN}-${SLOT} "Ren'Py ${PV}" ${P} | ||
fi | ||
|
||
if use doc; then | ||
insinto "/usr/share/doc/${PF}/html" | ||
doins -r doc/* | ||
fi | ||
newman "${FILESDIR}/${PN}.1" "${P}.1" | ||
} | ||
|
||
pkg_preinst() { | ||
use development && gnome2_icon_savelist | ||
} | ||
|
||
pkg_postinst() { | ||
use development && gnome2_icon_cache_update | ||
|
||
einfo "running: eselect renpy update --if-unset" | ||
eselect renpy update --if-unset | ||
} | ||
|
||
pkg_postrm() { | ||
use development && gnome2_icon_cache_update | ||
|
||
einfo "running: eselect renpy update --if-unset" | ||
eselect renpy update --if-unset | ||
} |