2016-02-27 20:51:28 +00:00
|
|
|
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
require alternatives
|
|
|
|
require setup-py [ import=distutils multibuild=false blacklist=3 ]
|
2016-05-26 12:27:49 +00:00
|
|
|
require desktop-utils gtk-icon-cache
|
2016-02-27 20:51:28 +00:00
|
|
|
|
2016-05-13 20:41:29 +00:00
|
|
|
export_exlib_phases src_prepare src_install
|
2016-02-27 20:51:28 +00:00
|
|
|
|
|
|
|
SUMMARY="Visual novel engine written in python"
|
|
|
|
DESCRIPTION="
|
|
|
|
Ren'Py is a free and cross-platform visual novel engine that
|
|
|
|
helps you use words,
|
|
|
|
pictures, and sounds to tell stories with the computer.
|
|
|
|
It's easy and efficient script language makes it possible for
|
|
|
|
non-programmers to make visual novels,
|
|
|
|
while its Python support allows for complex simulation games.
|
|
|
|
"
|
|
|
|
HOMEPAGE="http://www.renpy.org"
|
|
|
|
DOWNLOADS="http://www.renpy.org/dl/${PV}/${PNV}-source.tar.bz2"
|
|
|
|
|
|
|
|
LICENCES="MIT"
|
2016-05-21 16:48:15 +00:00
|
|
|
MYOPTIONS="
|
|
|
|
( providers: ffmpeg libav ) [[ number-selected = exactly-one ]]
|
|
|
|
"
|
2016-02-27 20:51:28 +00:00
|
|
|
|
|
|
|
DEPENDENCIES="
|
|
|
|
build:
|
|
|
|
dev-python/Cython[python_abis:*(-)?]
|
|
|
|
virtual/pkg-config
|
|
|
|
build+run:
|
|
|
|
dev-libs/fribidi
|
2016-09-07 11:23:32 +00:00
|
|
|
dev-python/pygame_sdl2[~${PV}][python_abis:*(-)?]
|
|
|
|
media-libs/SDL:2[X]
|
2016-02-27 20:51:28 +00:00
|
|
|
media-libs/freetype:2
|
|
|
|
media-libs/glew
|
|
|
|
media-libs/libpng:=
|
|
|
|
sys-libs/zlib
|
2016-05-21 16:48:15 +00:00
|
|
|
providers:ffmpeg? ( media/ffmpeg )
|
|
|
|
providers:libav? ( media/libav )
|
2016-02-27 20:51:28 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
WORK=${WORKBASE}/${PNV}-source/module
|
|
|
|
|
|
|
|
renpy_src_prepare() {
|
|
|
|
export CFLAGS="${CFLAGS} $(${PKG_CONFIG} --cflags fribidi)"
|
|
|
|
|
|
|
|
edo find "${WORK}" -name '*.py[co]' -print -delete
|
|
|
|
edo sed -i -e 's:usr/bin/env python$:usr/bin/env python2:' \
|
|
|
|
"${WORKBASE}"/${PNV}-source/renpy.py \
|
|
|
|
"${WORKBASE}"/${PNV}-source/launcher/game/tkaskdir.py
|
|
|
|
|
|
|
|
setup-py_src_prepare
|
|
|
|
}
|
|
|
|
|
|
|
|
renpy_src_install() {
|
|
|
|
local renpydir="$(python_get_sitedir)/renpy-${SLOT}"
|
|
|
|
|
|
|
|
edo cd "${WORKBASE}"/${PNV}-source
|
|
|
|
insinto /usr/share/icons/hicolor/32x32/apps
|
|
|
|
newins launcher/game/images/logo32.png ${PN}-${SLOT}.png
|
|
|
|
|
|
|
|
# slightly weird directory structure
|
|
|
|
insinto "${renpydir}"
|
|
|
|
doins -r launcher templates the_question tutorial
|
|
|
|
doins -r renpy renpy.py
|
|
|
|
|
|
|
|
herebin ${PN}-${SLOT} << EOF
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
exec python2 ${renpydir}/renpy.py "\$@"
|
|
|
|
EOF
|
|
|
|
|
2016-05-26 12:27:49 +00:00
|
|
|
install_desktop_entry "Name=Ren'Py (${SLOT})" \
|
|
|
|
"Exec=${PN}-${SLOT}" "Icon=${PN}-${SLOT}"
|
2016-02-27 20:51:28 +00:00
|
|
|
|
|
|
|
edo cd "${WORK}"
|
|
|
|
SETUP_PY_SRC_INSTALL_PARAMS=( --install-lib="${renpydir}" )
|
|
|
|
setup-py_src_install
|
|
|
|
|
|
|
|
local host=$(exhost --target)
|
|
|
|
local binaries=( renpy renpy-${SLOT} )
|
|
|
|
|
|
|
|
for (( i = 0; i < ${#binaries[@]}; i++ )); do
|
|
|
|
alternatives_for _${host}_renpy ${SLOT} ${SLOT} /usr/${host}/bin/${binaries[i]} /usr/${host}/bin/${binaries[++i]}
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|