c84742898e0d3fc71121c2f936e6cd63371c647d
[gentoo.git] / games-util / lutris / lutris-0.5.3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{5,6,7} )
7 PYTHON_REQ_USE="sqlite,threads(+)"
8
9 inherit distutils-r1 virtualx xdg
10
11 DESCRIPTION="An open source gaming platform for GNU/Linux"
12 HOMEPAGE="https://lutris.net/"
13
14 if [[ ${PV} == *9999* ]] ; then
15         EGIT_REPO_URI="https://github.com/lutris/lutris.git"
16         inherit git-r3
17 else
18         SRC_URI="https://lutris.net/releases/${P/-/_}.tar.xz"
19         KEYWORDS="~amd64 ~x86"
20         S="${WORKDIR}/${PN}"
21 fi
22
23 LICENSE="GPL-3"
24 SLOT="0"
25
26 RESTRICT="!test? ( test )"
27
28 BDEPEND="
29         test? ( dev-python/nose[${PYTHON_USEDEP}] )
30 "
31 RDEPEND="
32         app-arch/cabextract
33         app-arch/p7zip
34         app-arch/unrar
35         app-arch/unzip
36         dev-python/pillow[${PYTHON_USEDEP}]
37         dev-python/pygobject:3[${PYTHON_USEDEP}]
38         dev-python/python-evdev[${PYTHON_USEDEP}]
39         dev-python/pyyaml[${PYTHON_USEDEP}]
40         dev-python/requests[${PYTHON_USEDEP}]
41         gnome-base/gnome-desktop:3[introspection]
42         media-sound/fluid-soundfont
43         net-libs/libsoup
44         net-libs/webkit-gtk:4[introspection]
45         x11-apps/mesa-progs
46         x11-apps/xgamma
47         x11-apps/xrandr
48         x11-libs/gtk+:3[introspection]
49         x11-libs/libnotify
50 "
51
52 python_install_all() {
53         local DOCS=( AUTHORS README.rst docs/installers.rst )
54         distutils-r1_python_install_all
55 }
56
57 python_test() {
58         virtx nosetests -v
59 }
60
61 pkg_preinst() {
62         xdg_pkg_preinst
63 }
64
65 pkg_postinst() {
66         xdg_pkg_postinst
67
68         # Quote README.rst
69         elog "Lutris installations are fully automated through scripts, which can"
70         elog "be written in either JSON or YAML. The scripting syntax is described"
71         elog "in ${EROOT}/usr/share/doc/${PF}/installers.rst.bz2, and is also"
72         elog "available online at lutris.net."
73 }
74
75 pkg_postrm() {
76         xdg_pkg_postrm
77 }