summaryrefslogtreecommitdiff
path: root/games-action/nighthawk/nighthawk-4.0.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'games-action/nighthawk/nighthawk-4.0.ebuild')
-rw-r--r--games-action/nighthawk/nighthawk-4.0.ebuild56
1 files changed, 56 insertions, 0 deletions
diff --git a/games-action/nighthawk/nighthawk-4.0.ebuild b/games-action/nighthawk/nighthawk-4.0.ebuild
new file mode 100644
index 000000000000..7eb832117342
--- /dev/null
+++ b/games-action/nighthawk/nighthawk-4.0.ebuild
@@ -0,0 +1,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^}
+}