From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9D4B1139694 for ; Sun, 16 Jul 2017 16:35:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AFB5FE0E2C; Sun, 16 Jul 2017 16:35:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 829E4E0E2C for ; Sun, 16 Jul 2017 16:35:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 57B52341A37 for ; Sun, 16 Jul 2017 16:35:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 948C82601 for ; Sun, 16 Jul 2017 16:35:46 +0000 (UTC) From: "Andrew Savchenko" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Savchenko" Message-ID: <1500222786.7976e453eea2bb1c0fb2a404a5b70b976594bb97.bircoph@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-engines/renpy/files/, games-engines/renpy/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-engines/renpy/files/renpy-6.99.12.4-compat-style.patch games-engines/renpy/files/renpy-6.99.12.4-compat-window.patch games-engines/renpy/renpy-6.99.12.4-r1.ebuild X-VCS-Directories: games-engines/renpy/ games-engines/renpy/files/ X-VCS-Committer: bircoph X-VCS-Committer-Name: Andrew Savchenko X-VCS-Revision: 7976e453eea2bb1c0fb2a404a5b70b976594bb97 X-VCS-Branch: master Date: Sun, 16 Jul 2017 16:35:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b35696b3-8bf7-4808-8474-650554c44769 X-Archives-Hash: 8331ad580c4073e4e8fb09581383c0d6 commit: 7976e453eea2bb1c0fb2a404a5b70b976594bb97 Author: Andrew Savchenko gentoo org> AuthorDate: Sun Jul 16 16:33:06 2017 +0000 Commit: Andrew Savchenko gentoo org> CommitDate: Sun Jul 16 16:33:06 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7976e453 games-engines/renpy: fix compat support for old games - Katawa Shoujo, see bug 601200: check for window to be on list before removal - Elven Relations: do not create removed style elements Package-Manager: Portage-2.3.6, Repoman-2.3.2 Signed-off-by: Andrew Savchenko gentoo.org> .../renpy/files/renpy-6.99.12.4-compat-style.patch | 43 ++++++++ .../files/renpy-6.99.12.4-compat-window.patch | 51 +++++++++ games-engines/renpy/renpy-6.99.12.4-r1.ebuild | 116 +++++++++++++++++++++ 3 files changed, 210 insertions(+) diff --git a/games-engines/renpy/files/renpy-6.99.12.4-compat-style.patch b/games-engines/renpy/files/renpy-6.99.12.4-compat-style.patch new file mode 100644 index 00000000000..122ebf1e43e --- /dev/null +++ b/games-engines/renpy/files/renpy-6.99.12.4-compat-style.patch @@ -0,0 +1,43 @@ +commit 1d350d993d2b51df7880e92b48ed103e059ec385 +Author: Andrew Savchenko +Date: Sun Jul 16 17:07:27 2017 +0300 + + Fix compatibility problem With ElvenRelations-1.2: + + When starting game: + + Full traceback: + File "/home/andrew/src/_compat/styles.rpymc", line 22, in script + File "/usr/lib64/python2.7/site-packages/renpy699/renpy/ast.py", line 814, in execute + renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store) + File "/usr/lib64/python2.7/site-packages/renpy699/renpy/python.py", line 1719, in py_exec_bytecode + exec bytecode in globals, locals + File "renpy/common/_compat/styles.rpym", line 374, in + style.selected_button = _SelectedCompat('button') + File "renpy/common/_compat/styles.rpym", line 347, in __init__ + self.target = target + File "renpy/style.pyx", line 378, in renpy.style.StyleCore.__setattr__ (gen/renpy.style.c:6236) + raise Exception("Style property {} is not known.".format(name)) + Exception: Style property target is not known. + + "button*" properties are no longer present in RenPy, so relevant + code is removed. + +diff --git a/renpy/common/_compat/styles.rpym b/renpy/common/_compat/styles.rpym +index d83eeb0..174f0b6 100644 +--- a/renpy/common/_compat/styles.rpym ++++ b/renpy/common/_compat/styles.rpym +@@ -371,13 +371,6 @@ init python: + self.property_updates = [ ] + + +- style.selected_button = _SelectedCompat('button') +- style.selected_button_text = _SelectedCompat('button_text') +- style.gm_nav_selected_button = _SelectedCompat('gm_nav_button') +- style.gm_nav_selected_button_text = _SelectedCompat('gm_nav_button_text') +- style.prefs_selected_button = _SelectedCompat('prefs_button') +- style.prefs_selected_button_text = _SelectedCompat('prefs_button_text') +- + def _apply_selected_compat(): + for scs in _selected_compat: + scs.apply() diff --git a/games-engines/renpy/files/renpy-6.99.12.4-compat-window.patch b/games-engines/renpy/files/renpy-6.99.12.4-compat-window.patch new file mode 100644 index 00000000000..8c8bd21b4f6 --- /dev/null +++ b/games-engines/renpy/files/renpy-6.99.12.4-compat-window.patch @@ -0,0 +1,51 @@ +commit cf3f7fd4cb69c154f43a5e00c7501463a6d63ff5 +Author: Andrew Savchenko +Date: Sun Jul 16 16:59:14 2017 +0300 + + Fix compatibility problem with Katawa Shoujo 1.3.1 + + The game fails to start with renpy-6.99.12.4: + + I'm sorry, but an uncaught exception occurred. + + While running game code: + File "game/ui_settings.rpy", line 21, in + File "renpy/common/00compat.rpy", line 134, in _set_script_version + config.window_auto_hide.remove("call screen") + ValueError: list.remove(x): x not in list + + -- Full Traceback ------------------------------------------------------------ + + Full traceback: + File "/home/rondo/ui_settings.rpyc", line 2, in script + File "/usr/lib64/python2.7/site-packages/renpy699/renpy/ast.py", line 814, in execute + renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store) + File "/usr/lib64/python2.7/site-packages/renpy699/renpy/python.py", line 1695, in py_exec_bytecode + exec bytecode in globals, locals + File "game/ui_settings.rpy", line 21, in + File "/usr/lib64/python2.7/site-packages/renpy699/renpy/defaultstore.py", line 92, in __setattr__ + renpy.store._set_script_version(value) # E1101 @UndefinedVariable + File "renpy/common/00compat.rpy", line 134, in _set_script_version + config.window_auto_hide.remove("call screen") + File "/usr/lib64/python2.7/site-packages/renpy699/renpy/python.py", line 610, in do_mutation + return method(self, *args, **kwargs) + ValueError: list.remove(x): x not in list + + This happens because "call screen" element is being unconditionally + removed from config.window_auto_hide list, though it is not always + present there. A simple if check fixes this. + +diff --git a/renpy/common/00compat.rpy b/renpy/common/00compat.rpy +index c16ad1d..eefb8e0 100644 +--- a/renpy/common/00compat.rpy ++++ b/renpy/common/00compat.rpy +@@ -131,7 +131,8 @@ init -1900 python: + if version <= (6, 99, 10): + config.new_translate_order = False + config.old_say_args = True +- config.window_auto_hide.remove("call screen") ++ if "call screen" in config.window_auto_hide: ++ config.window_auto_hide.remove("call screen") + config.quit_action = ui.gamemenus("_quit_prompt") + config.enforce_window_max_size = False + config.splashscreen_suppress_overlay = False diff --git a/games-engines/renpy/renpy-6.99.12.4-r1.ebuild b/games-engines/renpy/renpy-6.99.12.4-r1.ebuild new file mode 100644 index 00000000000..8049f87073f --- /dev/null +++ b/games-engines/renpy/renpy-6.99.12.4-r1.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) +DISTUTILS_IN_SOURCE_BUILD=1 +inherit eutils games 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.6 + 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 +) + +pkg_setup() { + games_pkg_setup + export CFLAGS="${CFLAGS} $($(tc-getPKG_CONFIG) --cflags fribidi)" +} + +python_prepare_all() { + 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_scriptinto "${GAMES_BINDIR}" + 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 html + doins -r doc + fi + newman "${FILESDIR}/${PN}.1" "${P}.1" + + prepgamesdirs +} + +pkg_preinst() { + games_pkg_preinst + use development && gnome2_icon_savelist +} + +pkg_postinst() { + games_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 +}