summaryrefslogtreecommitdiff
blob: ed25f0c0943862be9fef621d6bd83f7a3aab51f4 (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
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

LUA_COMPAT=( lua5-1 luajit )

inherit cmake lua-single

DESCRIPTION="A graphical user interface to create and modify quests for the Solarus engine"
HOMEPAGE="https://www.solarus-games.org"

if [[ ${PV} == 9999 ]]; then
	EGIT_REPO_URI="https://gitlab.com/solarus-games/solarus-quest-editor.git"
	EGIT_BRANCH="dev"
	inherit git-r3
else
	SRC_URI="https://gitlab.com/solarus-games/solarus-quest-editor/-/archive/v${PV}/solarus-quest-editor-v${PV}.tar.gz"
	KEYWORDS="~amd64"
	S="${WORKDIR}/solarus-quest-editor-v${PV}"
fi

LICENSE="GPL-3+"
SLOT="0"

REQUIRED_USE="${LUA_REQUIRED_USE}"

# Upstream (and their CMake) claim that all of these are required deps
RDEPEND="
	${LUA_DEPS}
	dev-games/physfs
	dev-qt/qtcore:5
	dev-qt/qtgui:5
	dev-qt/qtwidgets:5
	media-libs/libmodplug
	>=media-libs/libsdl2-2.0.1[X,joystick,video]
	media-libs/libvorbis
	media-libs/openal
	media-libs/sdl2-image[png]
	>=media-libs/sdl2-ttf-2.0.12
"

DEPEND="
	${RDEPEND}
	~games-engines/solarus-${PV}
"

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

src_configure() {
	local mycmakeargs=( -DSOLARUS_USE_LUAJIT="$(usex lua_single_target_luajit)" )
	cmake_src_configure
}