summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Savchenko <bircoph@gentoo.org>2020-05-09 16:03:04 +0300
committerAndrew Savchenko <bircoph@gentoo.org>2020-05-09 16:10:28 +0300
commitbe246890dcb968ff90c903b9a2a63ac4c175cc02 (patch)
tree8dec6fa8912926f6f14092df7744b5677b0ae88f /games-engines
parentdev-python/pygame_sdl2: version bump (diff)
downloadgentoo-be246890dcb968ff90c903b9a2a63ac4c175cc02.tar.gz
gentoo-be246890dcb968ff90c903b9a2a63ac4c175cc02.tar.bz2
gentoo-be246890dcb968ff90c903b9a2a63ac4c175cc02.zip
games-engines/renpy: Update to version 7.3.5
- This is a major update to version 7.3.5. - Multislot support is dropped since upstream provides backward compatibility for older games. - renpy-7.3.5-use-system-fribidi.patch is based on fribidi patch from bug 671008 by Alex <barracuda72@bk.ru>, though it was improved further. Closes: https://bugs.gentoo.org/671008 Closes: https://bugs.gentoo.org/710884 Package-Manager: Portage-2.3.82, Repoman-2.3.20 Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'games-engines')
-rw-r--r--games-engines/renpy/Manifest1
-rw-r--r--games-engines/renpy/files/renpy-7.3.5-system-path.patch19
-rw-r--r--games-engines/renpy/files/renpy-7.3.5-use-system-fribidi.patch42
-rw-r--r--games-engines/renpy/renpy-7.3.5.ebuild108
4 files changed, 170 insertions, 0 deletions
diff --git a/games-engines/renpy/Manifest b/games-engines/renpy/Manifest
index 6a38ea82a5c..2a93fb3d8cc 100644
--- a/games-engines/renpy/Manifest
+++ b/games-engines/renpy/Manifest
@@ -1 +1,2 @@
DIST renpy-6.99.12.4-source.tar.bz2 18192453 BLAKE2B eb00db04fc6ed0aafa0428c3ba0ffe986634f8b536a7cd6c88c6082789554f6d9631f433baa3e34ab91d19509ccef5617e3fe8ec410b96f4b87d489656cc893b SHA512 375b67e15630fc21915136e70bc93db6da7c2da192d39b1256822513ae44974124522c85f1976f2af62df27b5fa11493af488b02abcf0081eeae03e1a69dfca5
+DIST renpy-7.3.5-source.tar.bz2 68211972 BLAKE2B 46d8e1c788398515005eba9b668020aa2c9527e4f9207c95661d8fe86f4bbb6bc1832fc3e6808023355e2ff67666bc6d3b03f89ef58afa77d5a3abc965192175 SHA512 5a34412379682628d0be9cbbca0dfc95d5e52f8ffa871cdab0c20d028c532233b0d94a7dfdec67fec5294a789e9ca16b61dc30ef138e303d476007eaffff0d2f
diff --git a/games-engines/renpy/files/renpy-7.3.5-system-path.patch b/games-engines/renpy/files/renpy-7.3.5-system-path.patch
new file mode 100644
index 00000000000..fc5d54aceea
--- /dev/null
+++ b/games-engines/renpy/files/renpy-7.3.5-system-path.patch
@@ -0,0 +1,19 @@
+--- renpy-7.3.5-source/renpy.py.orig 2019-10-18 02:35:19.000000000 +0300
++++ renpy-7.3.5-source/renpy.py 2020-05-09 13:38:24.989131947 +0300
+@@ -32,6 +32,7 @@
+ import warnings
+
+ # Functions to be customized by distributors. ################################
++from distutils.sysconfig import get_python_lib
+
+ # Given the Ren'Py base directory (usually the directory containing
+ # this file), this is expected to return the path to the common directory.
+@@ -140,7 +141,7 @@
+ # Returns the path to the Ren'Py base directory (containing common and
+ # the launcher, usually.)
+ def path_to_renpy_base():
+- renpy_base = os.path.dirname(os.path.realpath(sys.argv[0]))
++ renpy_base = get_python_lib()
+ renpy_base = os.path.abspath(renpy_base)
+
+ return renpy_base
diff --git a/games-engines/renpy/files/renpy-7.3.5-use-system-fribidi.patch b/games-engines/renpy/files/renpy-7.3.5-use-system-fribidi.patch
new file mode 100644
index 00000000000..e4b0258f984
--- /dev/null
+++ b/games-engines/renpy/files/renpy-7.3.5-use-system-fribidi.patch
@@ -0,0 +1,42 @@
+diff '--color=auto' -Naurd renpy-7.3.5-source.orig/module/renpybidicore.c renpy-7.3.5-source/module/renpybidicore.c
+--- renpy-7.3.5-source.orig/module/renpybidicore.c 2018-10-12 08:37:06.000000000 +0300
++++ renpy-7.3.5-source/module/renpybidicore.c 2020-05-09 12:46:30.811881811 +0300
+@@ -1,5 +1,5 @@
+ #include <Python.h>
+-#include <fribidi-src/lib/fribidi.h>
++#include <fribidi.h>
+ #include <stdlib.h>
+
+ #ifndef alloca
+--- renpy-7.3.5-source.orig/module/setup.py 2019-08-09 05:11:58.000000000 +0300
++++ renpy-7.3.5-source/module/setup.py 2020-05-09 12:46:46.463942266 +0300
+@@ -119,28 +119,13 @@
+ sdl + [ png, 'z', 'm' ])
+
+ FRIBIDI_SOURCES = """
+-fribidi-src/lib/fribidi.c
+-fribidi-src/lib/fribidi-arabic.c
+-fribidi-src/lib/fribidi-bidi.c
+-fribidi-src/lib/fribidi-bidi-types.c
+-fribidi-src/lib/fribidi-deprecated.c
+-fribidi-src/lib/fribidi-joining.c
+-fribidi-src/lib/fribidi-joining-types.c
+-fribidi-src/lib/fribidi-mem.c
+-fribidi-src/lib/fribidi-mirroring.c
+-fribidi-src/lib/fribidi-run.c
+-fribidi-src/lib/fribidi-shape.c
+ renpybidicore.c
+ """.split()
+ cython(
+ "_renpybidi",
+ FRIBIDI_SOURCES,
+- includes=[
+- BASE + "/fribidi-src/",
+- BASE + "/fribidi-src/lib/",
+- ],
++ libs=["fribidi"],
+ define_macros=[
+- ("FRIBIDI_ENTRY", ""),
+ ("HAVE_CONFIG_H", "1"),
+ ])
+
diff --git a/games-engines/renpy/renpy-7.3.5.ebuild b/games-engines/renpy/renpy-7.3.5.ebuild
new file mode 100644
index 00000000000..f408ea63475
--- /dev/null
+++ b/games-engines/renpy/renpy-7.3.5.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_IN_SOURCE_BUILD=1
+DISTUTILS_USE_SETUPTOOLS=no
+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"
+
+LICENSE="MIT"
+SLOT=0
+KEYWORDS="~amd64 ~x86"
+IUSE="development doc examples"
+REQUIRED_USE="examples? ( development )"
+
+BDEPEND="
+ dev-python/cython[${PYTHON_USEDEP}]
+ virtual/pkgconfig"
+DEPEND="
+ 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
+ media-video/ffmpeg"
+RDEPEND="${DEPEND}
+ !app-eselect/eselect-renpy"
+
+S=${WORKDIR}/${P}-source
+
+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/{gen,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
+}