]> Pileus Git - ~andy/sunrise/blob - dev-games/renpy/renpy-6.11.2.ebuild
cb7dd46e66e406032a1e45473e320341d71f4064
[~andy/sunrise] / dev-games / renpy / renpy-6.11.2.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="3"
6 PYTHON_DEPEND="2:2.5"
7
8 inherit python versionator games
9
10 DESCRIPTION="Visual novel engine written in python"
11 HOMEPAGE="http://www.renpy.org"
12 SRC_URI="http://www.renpy.org/dl/${PV}/${P}-source.tar.bz2"
13
14 LICENSE="MIT"
15 SLOT="$(get_version_component_range 1-2)"
16 KEYWORDS="~amd64 ~x86"
17 IUSE=""
18
19 RDEPEND="dev-python/pygame[X]
20         >=dev-games/renpy-modules-${PV}
21         virtual/python-argparse"
22
23 pkg_setup() {
24         python_set_active_version 2
25         games_pkg_setup
26 }
27
28 src_prepare() {
29         find renpy -name '*.pyo' -exec rm -f {} + || die
30         python_convert_shebangs 2 renpy.py
31
32         sed -e "s:GAMES_DATADIR:${GAMES_DATADIR}:g" \
33                 -e "s:PACKAGE:${P}:g" \
34                 "${FILESDIR}"/${PN}.sh > "${T}"/${PN}.sh || die
35 }
36
37 src_install() {
38         insinto "${GAMES_DATADIR}"/${P}
39         exeinto "${GAMES_DATADIR}"/${P}
40
41         doexe renpy.py || die
42
43         newgamesbin "${T}"/${PN}.sh ${PN}-${SLOT}|| die
44
45         doins -r common renpy || die
46         dodoc CHANGELOG.txt || die
47
48         prepgamesdirs
49 }
50
51 pkg_postinst() {
52         python_mod_optimize "${GAMES_DATADIR}/${P}"
53         games_pkg_postinst
54 }
55
56 pkg_postrm() {
57         python_mod_cleanup "${GAMES_DATADIR}/${P}"
58 }