Skip to content

Commit

Permalink
games-action/spacearyarya-kxl: EAPI6->8, use gamestat, add font dep
Browse files Browse the repository at this point in the history
Removed paths patch that was mostly for /usr/games, and instead
require use install-data target and remove .score (replaced by
a score file in /var/games that can now be written to).

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

Also fix .desktop icon, bmp is not valid for XDG icons.

This brings the ebuild/patch layout more identical to geki2/3
given this game is actually geki4.

Signed-off-by: Ionen Wolkens <[email protected]>
  • Loading branch information
ionenwks committed Sep 15, 2021
1 parent 8452ad7 commit 851b2c3
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 130 deletions.
1 change: 1 addition & 0 deletions games-action/spacearyarya-kxl/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST SpaceAryarya-KXL-1.0.2.tar.gz 279894 BLAKE2B 1e7d24107d21396d4463924c7e5665271c14c6ba84f600f126128195ac9d6a08bd112cb6730b1931cf113700d7cae18367359639c8c8a10073a2395bcdc87948 SHA512 1109606741bab6c290395cdfd8d19cf12e68cfef41f50164586c316fc425a32232e0f8dd822207d969c27c3f7a8478d1a65f36fe5468f3cfa8932c99ab3cb125
DIST spacearyarya-kxl.png 4853 BLAKE2B e8dcaf2e75f18900d67c68f75939ba030dc8207d4a2df1b465ce516527d846c4b44d105f85afcb0750dbfc6b33c9030da34c863b6e8f09f120d855d7361cce67 SHA512 f47c497f28c4cb22a518c8bc593a443aa0f52a600db04b6a3d33006b40aa57c11bdedd97a272587d6751bee04a593965c4f348ad5e7dff4deb276b7d89243e2e
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
respect CFLAGS

https://bugs.gentoo.org/429422
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,5 +5,5 @@ spacearyarya_SOURCES = extern.h \
your.c your.h ranking.c ranking.h \
boss.c boss.h

@@ -6,4 +6,4 @@
boss.c boss.h

-CFLAGS = @X_CFLAGS@ @KXL_CFLAGS@
+AM_CFLAGS = @X_CFLAGS@ @KXL_CFLAGS@
LIBS = @X_LIBS@ -lX11 @KXL_LIBS@ -lKXL
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
--- a/src/ranking.c.bak 2016-07-27 16:42:34.367945713 -0500
+++ b/src/ranking.c 2016-07-27 16:43:34.679949783 -0500
@@ -5,7 +5,7 @@
/**********************
¥¹¥³¥¢¥é¥ó¥­¥ó¥°
Use void so that clang does not complain about missing (unused)
return value, and also add missing string.h.
--- a/src/ranking.c
+++ b/src/ranking.c
@@ -1,2 +1,3 @@
#include <pwd.h>
+#include <string.h>
#include "geki4.h"
@@ -7,3 +8,3 @@
**********************/
-int ScoreRanking(void)
+void ScoreRanking(void)
{
Uint16 i, j, k;
struct passwd *pw;
--- a/src/ranking.h
+++ b/src/ranking.h
@@ -3,2 +3,3 @@

+void ScoreRanking(void);
void RankingScore(void);

This file was deleted.

43 changes: 0 additions & 43 deletions games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r2.ebuild

This file was deleted.

56 changes: 56 additions & 0 deletions games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r3.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools desktop

MY_P="SpaceAryarya-KXL-${PV}"

DESCRIPTION="2D/3D shooting game"
HOMEPAGE="http://triring.net/ps2linux/games/kxl/kxlgames.html"
SRC_URI="
mirror://gentoo/${MY_P}.tar.gz
https://dev.gentoo.org/~ionen/distfiles/${PN}.png"
S="${WORKDIR}/${MY_P}"

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/SpaceAryarya/data/.score
insinto /var/games
newins data/.score ${PN}.hs

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

doicon "${DISTDIR}"/${PN}.png
make_desktop_entry spacearyarya SpaceAryarya
}

0 comments on commit 851b2c3

Please sign in to comment.