From 670b891301ee8eccbce7d5f3307b1bf7bf444911 Mon Sep 17 00:00:00 2001 From: Andrew Savchenko Date: Sun, 10 May 2020 14:04:16 +0300 Subject: [PATCH] dev-util/unrpyc: initial version This is a very effecient rpyc decompiler for RenPy games. Package-Manager: Portage-2.3.82, Repoman-2.3.20 Signed-off-by: Andrew Savchenko --- dev-util/unrpyc/Manifest | 1 + dev-util/unrpyc/metadata.xml | 22 +++++++++++++ dev-util/unrpyc/unrpyc-1.1.3.ebuild | 49 +++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 dev-util/unrpyc/Manifest create mode 100644 dev-util/unrpyc/metadata.xml create mode 100644 dev-util/unrpyc/unrpyc-1.1.3.ebuild diff --git a/dev-util/unrpyc/Manifest b/dev-util/unrpyc/Manifest new file mode 100644 index 000000000000..137c525b9114 --- /dev/null +++ b/dev-util/unrpyc/Manifest @@ -0,0 +1 @@ +DIST unrpyc-1.1.3.tar.gz 77662 BLAKE2B e2fdf9015e67ee389ff84c49bd89c64d65178a26aaa7b8600202f491291e03a568bec2d8d09e47c407a9bcd025dab3b84e5167f07c9673d19bdb5bf7846c1eed SHA512 5883d58e11b2f52cffdeae744e17bf6bf2039340e53365f8ce58f716b991011bbca71c6473395a9d70c32bc77529eea3e7a9e3b8da7dc3cc8362cc0fdcbe5cf0 diff --git a/dev-util/unrpyc/metadata.xml b/dev-util/unrpyc/metadata.xml new file mode 100644 index 000000000000..69df492b06ae --- /dev/null +++ b/dev-util/unrpyc/metadata.xml @@ -0,0 +1,22 @@ + + + + + bircoph@gentoo.org + Andrew Savchenko + + + Unrpyc is a script to decompile Ren'Py (http://www.renpy.org/) compiled + .rpyc script files. It will not extract files from .rpa archives. + For that, use app-arch/unrpa. + + + CensoredUsername/unrpyc + + + Build un.rpyc module for run-time decompiling + Use pickle protocol 0 for un-rpyc module. May be usefule for very old games + Use pickle protocol 1 for un-rpyc module. Default if no protocol is selected + Use pickle protocol 2 for un-rpyc module + + diff --git a/dev-util/unrpyc/unrpyc-1.1.3.ebuild b/dev-util/unrpyc/unrpyc-1.1.3.ebuild new file mode 100644 index 000000000000..e754cac60c4a --- /dev/null +++ b/dev-util/unrpyc/unrpyc-1.1.3.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 ) +inherit distutils-r1 + +SRC_URI="https://github.com/CensoredUsername/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64 ~x86" +DESCRIPTION="Ren'Py's rpyc scripts decompiler" +HOMEPAGE="https://github.com/CensoredUsername/unrpyc" +LICENSE="BSD-1 BSD" +SLOT="0" + +IUSE="+module proto0 proto1 proto2" + +DEPEND="module? ( dev-python/picklemagic[${PYTHON_USEDEP}] )" + +src_prepare() { + sed -i 's/unrpyc.py/unrpyc/g' README.md setup.py || die + mv unrpyc.py unrpyc || die + distutils-r1_src_prepare +} + +src_compile() { + distutils-r1_src_compile + + if use module; then + local proto=1 + use proto0 && proto=0 + use proto1 && proto=1 + use proto2 && proto=2 + + cd un.rpyc || die + python_setup 'python2*' + ./compile.py -p${proto} || die + fi +} + +src_install() { + distutils-r1_src_install + + if use module; then + install -Dpm 0644 -t "${ED}/usr/share/${PN}" un.rpyc/un.rpyc || die + einfo "For run-time rpyc decompiling copy ${EPREFIX}/usr/share/${PN}/un.rpyc to your game dir." + newdoc un.rpyc/README.md README-un.rpyc.md + fi +} -- 2.26.2