Skip to content

Commit

Permalink
games-action/geki3-KXL: EAPI6->8, fix clang/fonts, cleanup patches
Browse files Browse the repository at this point in the history
Removed paths patch that was mostly for /usr/games, and instead
require a smaller workaround to install-data and remove .score.

Also fix description, this is a different game than geki2 (horizontal).

Add media-fonts/font-bitstream-100dpi as it'd crash (later) without.

Closes: https://bugs.gentoo.org/730854
Signed-off-by: Ionen Wolkens <[email protected]>
  • Loading branch information
ionenwks committed Sep 15, 2021
1 parent eac91b7 commit 2fc2e16
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 91 deletions.
9 changes: 9 additions & 0 deletions games-action/geki3-KXL/files/geki3-KXL-1.0.3-cflags.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
https://bugs.gentoo.org/426890
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,4 +5,4 @@
ranking.c ranking.h your.c your.h

-CFLAGS = @X_CFLAGS@ @KXL_CFLAGS@
+AM_CFLAGS = @X_CFLAGS@ @KXL_CFLAGS@
LIBS = @X_LIBS@ -lX11 @KXL_LIBS@ -lKXL
20 changes: 20 additions & 0 deletions games-action/geki3-KXL/files/geki3-KXL-1.0.3-clang.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Use void so that clang does not complain about missing (unused)
return value, and also add missing string.h.
https://bugs.gentoo.org/730854
--- a/src/ranking.c
+++ b/src/ranking.c
@@ -1,2 +1,3 @@
#include <pwd.h>
+#include <string.h>
#include "geki3.h"
@@ -7,3 +8,3 @@
**********************/
-int ScoreRanking(void)
+void ScoreRanking(void)
{
--- a/src/ranking.h
+++ b/src/ranking.h
@@ -3,2 +3,3 @@

+void ScoreRanking(void);
void RankingScore(void);
41 changes: 0 additions & 41 deletions games-action/geki3-KXL/files/geki3-KXL-1.0.3-paths.patch

This file was deleted.

50 changes: 0 additions & 50 deletions games-action/geki3-KXL/geki3-KXL-1.0.3-r3.ebuild

This file was deleted.

53 changes: 53 additions & 0 deletions games-action/geki3-KXL/geki3-KXL-1.0.3-r4.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools desktop

DESCRIPTION="2D horizontal scroll shooting game"
HOMEPAGE="http://triring.net/ps2linux/games/kxl/kxlgames.html"
SRC_URI="
mirror://gentoo/${P}.tar.gz
mirror://gentoo/${PN}.png"

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

DEPEND="
acct-group/gamestat
dev-games/KXL"
RDEPEND="
${DEPEND}
media-fonts/font-adobe-100dpi
media-fonts/font-bitstream-100dpi"

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

src_prepare() {
default

sed -i "s|DATA_PATH \"/.score\"|\"${EPREFIX}/var/games/${PN}.hs\"|" src/ranking.c || die

eautoreconf
}

src_install() {
emake -C data DESTDIR="${D}" install-dataDATA
default

rm "${ED}"/usr/share/geki3/data/.score
insinto /var/games
newins data/.score ${PN}.hs

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

doicon "${DISTDIR}"/${PN}.png
make_desktop_entry geki3 Geki3
}

0 comments on commit 2fc2e16

Please sign in to comment.