# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DISTUTILS_EXT=1 DISTUTILS_SINGLE_IMPL=1 DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{13..14} ) inherit distutils-r1 xdg 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/${PVR}" KEYWORDS="~amd64 ~x86" RESTRICT="test" DEPEND=" dev-libs/fribidi media-libs/assimp:= media-libs/freetype:2 media-libs/harfbuzz:= media-libs/libpng:0= media-libs/libsdl3:= media-libs/sdl3-image:=[jpeg,png] media-video/ffmpeg:= $(python_gen_cond_dep ' dev-python/ecdsa[${PYTHON_USEDEP}] dev-python/numpy[${PYTHON_USEDEP}] >=dev-python/requests-2.34.2[${PYTHON_USEDEP}] >=dev-python/six-1.17.0[${PYTHON_USEDEP}] ') " RDEPEND="${DEPEND}" BDEPEND=" $(python_gen_cond_dep 'dev-python/cython[${PYTHON_USEDEP}]') virtual/pkgconfig " PATCHES=( "${FILESDIR}/renpy-8.1.0-ignore_rpyc_errors.patch" ) python_prepare_all() { einfo "Deleting precompiled python files" find . -name '*.py[co]' -print -delete || die cp "${FILESDIR}/renpy.py" . || die distutils-r1_python_prepare_all } python_compile() { addpredict /usr/bin/steam_appid.txt distutils-r1_python_compile } python_install() { distutils-r1_python_install python_newscript renpy.py ${PN} python_domodule renpy local -x RENPY_BASE="${D}/$(python_get_sitedir)" "${EPYTHON}" renpy.py renpy/common compile || die "renpy compile failed" } python_install_all() { distutils-r1_python_install_all newman "${FILESDIR}/${PN}.1" "${P}.1" }