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

EAPI=8

inherit cmake desktop xdg

DESCRIPTION="Hardcore 3D space scroll-shooter with spaceship upgrade possibilities"
HOMEPAGE="https://viewizard.com"
SRC_URI="https://github.com/viewizard/astromenace/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-3 GPL-3+ CC-BY-SA-4.0 OFL-1.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"

DEPEND="
	media-libs/freealut
	media-libs/freetype:2
	media-libs/libogg
	media-libs/libsdl2[joystick,video]
	media-libs/libvorbis
	media-libs/openal
	virtual/glu
	virtual/opengl
	x11-libs/libXinerama
"
RDEPEND="${DEPEND}"

PATCHES=(
	"${FILESDIR}"/${P}-gcc13.patch
	"${FILESDIR}"/${P}-odr.patch
)

src_prepare() {
	cmake_src_prepare

	# no messing with CXXFLAGS please.
	sed -i -e '/-Os/d' CMakeLists.txt || die
}

src_configure() {
	local mycmakeargs=( -DDATADIR="${EPREFIX}/usr/share/${PN}" )

	cmake_src_configure
}

src_install() {
	# As of 1.4.2, the CMake install target is better, but still needs porting
	# to GNUInstallDirs.
	dobin "${BUILD_DIR}"/astromenace

	insinto /usr/share/${PN}
	doins "${BUILD_DIR}"/gamedata.vfs

	newicon -s 128 share/astromenace_128.png ${PN}.png
	newicon -s 64 share/astromenace_64.png ${PN}.png

	einstalldocs

	make_desktop_entry "${PN}" AstroMenace
}