aboutsummaryrefslogtreecommitdiffstats
path: root/games-emulation/simple64-gui/simple64-gui-9999.ebuild
blob: c18d794441a3f5c21dce5e7aaa90349ecfec4049 (plain) (blame)
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
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

DESCRIPTION="Accurate Nintendo 64 Emulator, GUI frontend"
HOMEPAGE="https://simple64.github.io/"

if [[ ${PV} == 9999 ]] ; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/simple64/mupen64plus-gui.git"
else
	_git_commit="5e2995912bf712deac247b1cd7d768f6d7f0ceb3"
	SRC_URI="https://github.com/simple64/mupen64plus-gui/archive/${_git_commit}.tar.gz -> ${PN}-${_git_commit}.tar.gz"
	KEYWORDS="~amd64 ~x86"
fi

LICENSE="GPL-2 Apache-2.0 BSD-2 LGPL-2.1+ ZLIB BitstreamVera"
SLOT="0/${PV}"
IUSE="discord"

DEPEND="
	games-emulation/simple64-core:=
	dev-qt/qtbase:6=[widgets]
	dev-qt/qtwebsockets:6=
	discord? ( dev-libs/discord-game-sdk )
"
RDEPEND="${DEPEND}"

PATCHES=(
	"${FILESDIR}/fix-paths.patch"
)

src_prepare() {
	local commit="${_git_commit}"
	if [[ ${PV} == 9999 ]]; then
		commit="$(git rev-parse HEAD)"
	fi
	echo "#define GUI_VERSION \"${_git_commit}\"" >version.h
	sed -i 's|include_directories(../mupen64plus-core/src/api)|include_directories(/usr/include/mupen64plus)|' CMakeLists.txt
	cmake_src_prepare
}

src_configure() {
	local mycmakeargs=(
		-DCORE_LIBRARY_PATH="/usr/$(get_libdir)"
		-DPLUGIN_DIR_PATH="/usr/$(get_libdir)/mupen64plus"
	)
	cmake_src_configure
}

src_install() {
	dobin "${BUILD_DIR}/simple64-gui"
}