summaryrefslogtreecommitdiff
blob: caad3fcc70d1b194109120ab45f97cb9b5cc91c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..11} )

inherit distutils-r1 qmake-utils xdg-utils

EGIT_COMMIT="e24679436a93e8aae0aa664dc4b2dea40d8236c1"
MY_P=mupen64plus-ui-python-${EGIT_COMMIT}

DESCRIPTION="A frontend for Mupen64Plus"
HOMEPAGE="
	https://m64py.sourceforge.net/
	https://github.com/mupen64plus/mupen64plus-ui-python/
"
SRC_URI="
	https://github.com/mupen64plus/mupen64plus-ui-python/archive/${EGIT_COMMIT}.tar.gz
		-> ${MY_P}.gh.tar.gz
"
S=${WORKDIR}/${MY_P}

LICENSE="GPL-3 LGPL-3 public-domain GPL-2 BSD CC-BY-SA-3.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="7z rar"

RDEPEND="
	dev-python/PyQt5[gui,opengl,widgets,${PYTHON_USEDEP}]
	dev-python/PySDL2[${PYTHON_USEDEP}]
	media-libs/libsdl2[joystick,video]
	>=games-emulation/mupen64plus-core-2.5:0/2-sdl2
	7z? (
		app-arch/p7zip
	)
	rar? (
		|| (
			dev-python/rarfile[${PYTHON_USEDEP}]
			app-arch/unrar
			app-arch/rar
		)
	)
"
BDEPEND="
	<dev-python/setuptools-69
	dev-qt/linguist-tools:5
"

python_prepare_all() {
	# set the correct search path
	cat >> src/m64py/platform.py <<-_EOF_ || die
		SEARCH_DIRS = ["/usr/$(get_libdir)/mupen64plus"]
	_EOF_

	distutils-r1_python_prepare_all
}

python_compile() {
	local -x PATH=$(qt5_get_bindir):${PATH}
	distutils-r1_python_compile
}

pkg_postinst() {
	xdg_desktop_database_update
}

pkg_postrm() {
	xdg_desktop_database_update
}