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

EAPI=8

LUA_COMPAT=( lua5-3 )
PYTHON_COMPAT=( python3_{8..11} )
inherit lua-single python-any-r1 xdg

MY_PV=$(ver_rs 2 '')

DESCRIPTION="Modification of the classical Freedroid engine into an RPG"
HOMEPAGE="https://www.freedroid.org/"
SRC_URI="https://ftp.osuosl.org/pub/freedroid/freedroidRPG-$(ver_cut 1-2)/freedroidRPG-${MY_PV}.tar.gz"
S="${WORKDIR}/${PN}-${MY_PV^^}"

LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="debug devtools opengl profile +sound"
REQUIRED_USE="${LUA_REQUIRED_USE}"

RDEPEND="
	${LUA_DEPS}
	media-libs/libjpeg-turbo
	media-libs/libpng:=
	media-libs/libsdl[opengl?,sound?,video]
	media-libs/sdl-gfx:=
	media-libs/sdl-image[jpeg,png]
	sys-libs/zlib:=
	virtual/libintl
	devtools? ( media-libs/sdl-ttf )
	opengl? (
		media-libs/glew:0=
		virtual/opengl
	)
	sound? (
		media-libs/libogg
		media-libs/libvorbis
		media-libs/sdl-mixer[vorbis]
	)"
DEPEND="${RDEPEND}"
BDEPEND="
	${PYTHON_DEPS}
	sys-devel/gettext
	app-alternatives/awk
	virtual/pkgconfig"

pkg_setup() {
	lua-single_pkg_setup
	python-any-r1_pkg_setup
}

src_prepare() {
	default

	python_fix_shebang src/gen_savestruct.py # build only
	rm data/sound/speak.py || die # unused, skip install / python rdep
}

src_configure() {
	local econfargs=(
		$(use_enable debug backtrace)
		$(use_enable debug)
		$(use_enable devtools dev-tools)
		$(use_enable opengl)
		$(use_enable profile rtprof)
		$(use_enable sound)
		$(use_with debug extra-warnings)
	)

	econf "${econfargs[@]}"
}