Gentoo Archives: gentoo-commits

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-engines/renpy/
Date: Sun, 16 Jul 2017 18:01:38
Message-Id: 1500227412.f4787d5b384c142363f8acc2f027305f7f2bb3df.bircoph@gentoo
1 commit: f4787d5b384c142363f8acc2f027305f7f2bb3df
2 Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 16 17:50:12 2017 +0000
4 Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 16 17:50:12 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4787d5b
7
8 games-engines/renpy: migrate from the games eclass
9
10 and update to EAPI 6
11
12 Package-Manager: Portage-2.3.6, Repoman-2.3.2
13 Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>
14
15 games-engines/renpy/renpy-6.99.12.4-r2.ebuild | 108 ++++++++++++++++++++++++++
16 1 file changed, 108 insertions(+)
17
18 diff --git a/games-engines/renpy/renpy-6.99.12.4-r2.ebuild b/games-engines/renpy/renpy-6.99.12.4-r2.ebuild
19 new file mode 100644
20 index 00000000000..6c4f3fcb6b2
21 --- /dev/null
22 +++ b/games-engines/renpy/renpy-6.99.12.4-r2.ebuild
23 @@ -0,0 +1,108 @@
24 +# Copyright 1999-2017 Gentoo Foundation
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=6
28 +PYTHON_COMPAT=( python2_7 )
29 +DISTUTILS_IN_SOURCE_BUILD=1
30 +inherit eutils gnome2-utils toolchain-funcs versionator distutils-r1
31 +
32 +DESCRIPTION="Visual novel engine written in python"
33 +HOMEPAGE="http://www.renpy.org"
34 +SRC_URI="http://www.renpy.org/dl/${PV}/${P}-source.tar.bz2"
35 +
36 +LICENSE="MIT"
37 +SLOT="$(get_version_component_range 1-2)"
38 +MYSLOT=$(delete_all_version_separators ${SLOT})
39 +KEYWORDS="~amd64 ~x86"
40 +IUSE="development doc examples"
41 +REQUIRED_USE="examples? ( development )"
42 +
43 +RDEPEND="
44 + >=app-eselect/eselect-renpy-0.7
45 + dev-libs/fribidi
46 + ~dev-python/pygame_sdl2-${PV}[${PYTHON_USEDEP}]
47 + >=dev-lang/python-exec-0.3[${PYTHON_USEDEP}]
48 + !<games-engines/renpy-6.99.12-r2
49 + media-libs/glew:0
50 + media-libs/libpng:0
51 + media-libs/libsdl2[video]
52 + media-libs/freetype:2
53 + sys-libs/zlib
54 + virtual/ffmpeg"
55 +DEPEND="${RDEPEND}
56 + dev-python/cython[${PYTHON_USEDEP}]
57 + virtual/pkgconfig"
58 +
59 +S=${WORKDIR}/${P}-source
60 +
61 +PATCHES=(
62 + "${FILESDIR}"/${P}-multiple-abi.patch
63 + "${FILESDIR}"/${P}-compat-window.patch #601200
64 + "${FILESDIR}"/${P}-compat-style.patch
65 +)
66 +
67 +python_prepare_all() {
68 + export CFLAGS="${CFLAGS} $($(tc-getPKG_CONFIG) --cflags fribidi)"
69 + distutils-r1_python_prepare_all
70 +
71 + einfo "Deleting precompiled python files"
72 + find . -name '*.py[co]' -print -delete || die
73 +
74 + sed -i \
75 + -e "s/@SLOT@/${MYSLOT}/" \
76 + renpy.py renpy/common.py || die "setting slot failed!"
77 +}
78 +
79 +python_compile() {
80 + cd "${S}"/module || die
81 + distutils-r1_python_compile
82 +}
83 +
84 +python_install() {
85 + cd "${S}"/module || die
86 + distutils-r1_python_install --install-lib="$(python_get_sitedir)/renpy${MYSLOT}"
87 +
88 + cd "${S}" || die
89 + python_newscript renpy.py ${PN}-${SLOT}
90 +
91 + python_moduleinto renpy${MYSLOT}
92 + python_domodule renpy
93 + if use development ; then
94 + python_domodule launcher templates
95 + fi
96 + if use examples ; then
97 + python_domodule the_question tutorial
98 + fi
99 +}
100 +
101 +python_install_all() {
102 + distutils-r1_python_install_all
103 + if use development; then
104 + newicon -s 32 launcher/game/images/logo32.png ${P}.png
105 + make_desktop_entry ${PN}-${SLOT} "Ren'Py ${PV}" ${P}
106 + fi
107 +
108 + if use doc; then
109 + insinto html
110 + doins -r doc
111 + fi
112 + newman "${FILESDIR}/${PN}.1" "${P}.1"
113 +}
114 +
115 +pkg_preinst() {
116 + use development && gnome2_icon_savelist
117 +}
118 +
119 +pkg_postinst() {
120 + use development && gnome2_icon_cache_update
121 +
122 + einfo "running: eselect renpy update --if-unset"
123 + eselect renpy update --if-unset
124 +}
125 +
126 +pkg_postrm() {
127 + use development && gnome2_icon_cache_update
128 +
129 + einfo "running: eselect renpy update --if-unset"
130 + eselect renpy update --if-unset
131 +}