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

EAPI=8

inherit cmake desktop

DESCRIPTION="Tribute to Paradroid by Andrew Braybrook"
HOMEPAGE="https://night-hawk.sourceforge.io/"
SRC_URI="mirror://sourceforge/night-hawk/${P}.tar.xz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND="
	acct-group/gamestat
	media-libs/freeglut
	media-libs/libglvnd
	media-libs/libpng:=
	media-libs/libvorbis
	media-libs/openal
	virtual/glu"
DEPEND="${RDEPEND}"

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

src_prepare() {
	cmake_src_prepare

	sed -i '/SCORES_PATH/s|/var/tmp|${EPREFIX}/var/games|' CMakeLists.txt || die
}

src_configure() {
	local mycmakeargs=( -DBUILD_NED=yes )

	cmake_src_configure
}

src_install() {
	cmake_src_install

	dodoc WHATS_NEW

	dodir /var/games
	> ${ED}/var/games/${PN}.scores || die

	fowners :gamestat /usr/bin/${PN} /var/games/${PN}.scores
	fperms g+s /usr/bin/${PN}
	fperms 660 /var/games/${PN}.scores

	newicon data/xpm/v4/nighthawk_desktop_icon.png ${PN}.png
	make_desktop_entry ${PN} ${PN^}
}