aboutsummaryrefslogtreecommitdiffstats
path: root/games-fps/vkQuake/vkQuake-1.32.0.ebuild
blob: 86290efaccb04d560b49976291e266b8637813f7 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit meson

DESCRIPTION="Vulkan Quake port based on QuakeSpasm"
HOMEPAGE="https://github.com/Novum/vkQuake"

if [[ ${PV} == 9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/Novum/vkQuake.git"
else
	SRC_URI="https://github.com/Novum/vkQuake/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64"
fi

LICENSE="GPL-2"
SLOT="0"

IUSE="mp3 mad flac vorbis tremor opus"

RDEPEND="
	media-libs/libsdl2
	media-libs/vulkan-loader
	mp3? (
		mad? ( media-libs/libmad )
		!mad? ( media-sound/mpg123 )
	)
	flac? ( media-libs/flac )
	vorbis? (
		tremor? ( media-libs/tremor )
		!tremor? ( media-libs/libvorbis )
	)
	opus? (
		media-libs/opus
		media-libs/opusfile
	)
"

# Build-time dependencies that need to be binary compatible with the system
# being built (CHOST). These include libraries that we link against.
# The below is valid if the same run-time depends are required to compile.
DEPEND="
	${RDEPEND}
	dev-util/vulkan-headers
"

# Build-time dependencies that are executed during the emerge process, and
# only need to be present in the native build system (CBUILD). Example:
BDEPEND="
	dev-util/glslang
	dev-util/spirv-tools
"

src_configure() {
	local emesonargs=(
		-Dvorbis_lib=$(usex tremor tremor vorbis)
		-Dmp3_lib=$(usex mad mad libmpg123)
		$(meson_feature mp3 use_codec_mp3)
		$(meson_feature flac use_codec_flac)
		$(meson_feature vorbis use_codec_vorbis)
		$(meson_feature opus use_codec_opus)
	)
	meson_src_configure
}

src_install() {
	cd "${BUILD_DIR}" || die
	dobin vkquake
}