logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: 12ca1895cd5db05433bc6dc3bf596478fca31335
parent 874ab155c9df39dbd7f4848b5562684baaebf7dc
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat,  7 Jan 2023 16:05:10 +0100

games-engines/renpy: Fix system path, ignore rpyc errors

Diffstat:

Agames-engines/renpy/files/renpy-8.0.3-ignore_rpyc_errors.patch23+++++++++++++++++++++++
Mgames-engines/renpy/files/renpy-8.0.3-system-path.patch2+-
Agames-engines/renpy/renpy-8.0.3-r1.ebuild110+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dgames-engines/renpy/renpy-8.0.3.ebuild109-------------------------------------------------------------------------------
4 files changed, 134 insertions(+), 110 deletions(-)

diff --git a/games-engines/renpy/files/renpy-8.0.3-ignore_rpyc_errors.patch b/games-engines/renpy/files/renpy-8.0.3-ignore_rpyc_errors.patch @@ -0,0 +1,23 @@ +Better way would probably be to have renpy not even try to write to system paths in the first place. + +13: EACCES (no write permission) +30: EROFS (read-only filesystem) + +diff --git a/renpy/script.py b/renpy/script.py +index 3e5dae8..8f103c1 100644 +--- a/renpy/script.py ++++ b/renpy/script.py +@@ -656,6 +656,10 @@ class Script(object): + rpydigest = hashlib.md5(fullf.read()).digest() + + self.write_rpyc_md5(f, rpydigest) ++ except OSError as e: ++ if e.errno not in [13, 30]: ++ import traceback ++ traceback.print_exc() + except Exception: + import traceback + traceback.print_exc() +-- +2.37.1 + diff --git a/games-engines/renpy/files/renpy-8.0.3-system-path.patch b/games-engines/renpy/files/renpy-8.0.3-system-path.patch @@ -7,7 +7,7 @@ index c00d46456f..29046c5335 100755 """ - renpy_base = os.path.dirname(os.path.realpath(sys.argv[0])) -+ renpy_base = get_python_lib() ++ renpy_base = sysconfig.get_path('platlib') renpy_base = os.path.abspath(renpy_base) return renpy_base diff --git a/games-engines/renpy/renpy-8.0.3-r1.ebuild b/games-engines/renpy/renpy-8.0.3-r1.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{8,9,10} ) +DISTUTILS_SINGLE_IMPL=1 +DISTUTILS_USE_PEP517=setuptools +inherit gnome2-utils distutils-r1 + +DESCRIPTION="Visual novel engine written in python" +HOMEPAGE="https://www.renpy.org" +SRC_URI="https://www.renpy.org/dl/${PV}/${P}-source.tar.bz2" +S="${WORKDIR}/${P}-source" + +LICENSE="MIT" +SLOT=0 +KEYWORDS="~amd64" +IUSE="development doc examples" +REQUIRED_USE="examples? ( development )" + +BDEPEND=" + $(python_gen_cond_dep 'dev-python/cython[${PYTHON_USEDEP}]') + virtual/pkgconfig" +DEPEND=" + dev-libs/fribidi + $(python_gen_cond_dep ' + '~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 + media-video/ffmpeg" +RDEPEND="${DEPEND} + !app-eselect/eselect-renpy" + +PATCHES=( + "${FILESDIR}/${P}-system-path.patch" + "${FILESDIR}/renpy-6.99.12.4-compat-style.patch" + "${FILESDIR}/renpy-6.99.12.4-compat-infinite-loop.patch" + "${FILESDIR}/${P}-use-system-fribidi.patch" + "${FILESDIR}/renpy-8.0.3-ignore_rpyc_errors.patch" +) + +python_prepare_all() { + einfo "Deleting precompiled python files" + find . -name '*.py[co]' -print -delete || die + rm -r module/fribidi-src || die + + export CFLAGS="${CFLAGS} $($(tc-getPKG_CONFIG) --cflags fribidi)" + distutils-r1_python_prepare_all +} + +python_compile() { + cd "${S}"/module || die + distutils-r1_python_compile +} + +python_install() { + cd "${S}"/module || die + distutils-r1_python_install + + cd "${S}" || die + python_newscript renpy.py ${PN} + + python_domodule renpy + if use development ; then + python_domodule launcher + 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} "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 + + local v + for v in ${REPLACING_VERSIONS}; do + ver_test "${v}" -ge 7 && continue + einfo "Starting from ${PN}-7 slots are dropped." + einfo "RenPy natively supports compatibility with games made for older versions." + einfo "Report bugs upstream on such problems, usually they are easy to fix." + break + done +} + +pkg_postrm() { + use development && gnome2_icon_cache_update +} diff --git a/games-engines/renpy/renpy-8.0.3.ebuild b/games-engines/renpy/renpy-8.0.3.ebuild @@ -1,109 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{8,9,10} ) -DISTUTILS_SINGLE_IMPL=1 -DISTUTILS_USE_PEP517=setuptools -inherit gnome2-utils distutils-r1 - -DESCRIPTION="Visual novel engine written in python" -HOMEPAGE="https://www.renpy.org" -SRC_URI="https://www.renpy.org/dl/${PV}/${P}-source.tar.bz2" -S="${WORKDIR}/${P}-source" - -LICENSE="MIT" -SLOT=0 -KEYWORDS="~amd64" -IUSE="development doc examples" -REQUIRED_USE="examples? ( development )" - -BDEPEND=" - $(python_gen_cond_dep 'dev-python/cython[${PYTHON_USEDEP}]') - virtual/pkgconfig" -DEPEND=" - dev-libs/fribidi - $(python_gen_cond_dep ' - '~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 - media-video/ffmpeg" -RDEPEND="${DEPEND} - !app-eselect/eselect-renpy" - -PATCHES=( - "${FILESDIR}"/${P}-system-path.patch - "${FILESDIR}"/${PN}-6.99.12.4-compat-style.patch - "${FILESDIR}"/${PN}-6.99.12.4-compat-infinite-loop.patch - "${FILESDIR}"/${P}-use-system-fribidi.patch -) - -python_prepare_all() { - einfo "Deleting precompiled python files" - find . -name '*.py[co]' -print -delete || die - rm -r module/fribidi-src || die - - export CFLAGS="${CFLAGS} $($(tc-getPKG_CONFIG) --cflags fribidi)" - distutils-r1_python_prepare_all -} - -python_compile() { - cd "${S}"/module || die - distutils-r1_python_compile -} - -python_install() { - cd "${S}"/module || die - distutils-r1_python_install - - cd "${S}" || die - python_newscript renpy.py ${PN} - - python_domodule renpy - if use development ; then - python_domodule launcher - 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} "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 - - local v - for v in ${REPLACING_VERSIONS}; do - ver_test "${v}" -ge 7 && continue - einfo "Starting from ${PN}-7 slots are dropped." - einfo "RenPy natively supports compatibility with games made for older versions." - einfo "Report bugs upstream on such problems, usually they are easy to fix." - break - done -} - -pkg_postrm() { - use development && gnome2_icon_cache_update -}