summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2021-09-14 22:22:36 -0400
committerIonen Wolkens <ionen@gentoo.org>2021-09-14 22:42:00 -0400
commit851b2c3c1af187d6b3621dacb7fa0fcf54e3c780 (patch)
tree9ceaf291f04e1a0ad14767d29085b723a22bfa36 /games-action/spacearyarya-kxl
parentgames-arcade/grande-KXL: EAPI6->8, use gamestat, add font dep (diff)
downloadgentoo-851b2c3c1af187d6b3621dacb7fa0fcf54e3c780.tar.gz
gentoo-851b2c3c1af187d6b3621dacb7fa0fcf54e3c780.tar.bz2
gentoo-851b2c3c1af187d6b3621dacb7fa0fcf54e3c780.zip
games-action/spacearyarya-kxl: EAPI6->8, use gamestat, add font dep
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 <ionen@gentoo.org>
Diffstat (limited to 'games-action/spacearyarya-kxl')
-rw-r--r--games-action/spacearyarya-kxl/Manifest1
-rw-r--r--games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-cflags.patch (renamed from games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-flags.patch)10
-rw-r--r--games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-clang.patch22
-rw-r--r--games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-gentoo-paths.patch74
-rw-r--r--games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r2.ebuild43
-rw-r--r--games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r3.ebuild56
6 files changed, 76 insertions, 130 deletions
diff --git a/games-action/spacearyarya-kxl/Manifest b/games-action/spacearyarya-kxl/Manifest
index 8ad31c7ac1a0..7486f9d6158a 100644
--- a/games-action/spacearyarya-kxl/Manifest
+++ b/games-action/spacearyarya-kxl/Manifest
@@ -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
diff --git a/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-flags.patch b/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-cflags.patch
index 2239858be998..66cd0b7fe1bc 100644
--- a/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-flags.patch
+++ b/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-cflags.patch
@@ -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
diff --git a/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-clang.patch b/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-clang.patch
index 3b9b68b745c0..7115b4a2382f 100644
--- a/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-clang.patch
+++ b/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-clang.patch
@@ -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);
diff --git a/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-gentoo-paths.patch b/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-gentoo-paths.patch
deleted file mode 100644
index 81321b76857a..000000000000
--- a/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-gentoo-paths.patch
+++ /dev/null
@@ -1,74 +0,0 @@
---- a/bmp/Makefile.am
-+++ b/bmp/Makefile.am
-@@ -1,4 +1,4 @@
--bmpdir = $(prefix)/share/SpaceAryarya/bmp
-+bmpdir = $(BMP_PATH)
- bmp_DATA = my.bmp enemy1.bmp shot.bmp bomb.bmp\
- enemy2.bmp kage.bmp wall.bmp wall2.bmp eshot.bmp\
- boss1_b.bmp boss1_do.bmp boss1_f.bmp\
---- a/configure.in
-+++ b/configure.in
-@@ -25,17 +25,20 @@
- BMP_PATH=/usr/local/share/SpaceAryarya/bmp
- WAV_PATH=/usr/local/share/SpaceAryarya/wav
- else
-- DATA_PATH=$prefix/share/SpaceAryarya/data
-- BMP_PATH=$prefix/share/SpaceAryarya/bmp
-- WAV_PATH=$prefix/share/SpaceAryarya/wav
-+ DATA_PATH=$datadir/SpaceAryarya/data
-+ BMP_PATH=$datadir/SpaceAryarya/bmp
-+ WAV_PATH=$datadir/SpaceAryarya/wav
-+ SCORE_PATH=$localstatedir/SpaceAryarya
- fi
- AC_DEFINE_UNQUOTED(DATA_PATH,"$DATA_PATH")
- AC_DEFINE_UNQUOTED(BMP_PATH,"$BMP_PATH")
- AC_DEFINE_UNQUOTED(WAV_PATH,"$WAV_PATH")
-+AC_DEFINE_UNQUOTED(SCORE_PATH,"$SCORE_PATH")
- AC_DEFINE_UNQUOTED(TITLE,"$PACKAGE $VERSION")
- AC_SUBST(DATA_PATH)
- AC_SUBST(BMP_PATH)
- AC_SUBST(WAV_PATH)
-+AC_SUBST(SCORE_PATH)
-
- AC_OUTPUT([data/Makefile wav/Makefile bmp/Makefile src/Makefile
- spacearyarya.spec Makefile])
---- a/data/Makefile.am
-+++ b/data/Makefile.am
-@@ -1,6 +1,7 @@
--datadir = $(prefix)/share/SpaceAryarya/data
-+datadir = $(DATA_PATH)
- data_DATA = stage1.dat stage2.dat
- EXTRA_DIST = stage1.dat stage2.dat .score
-
--install:
-- $(INSTALL) -c -m 666 ./.score $(DESTDIR)$(DATA_PATH)
-+install-data-local:
-+ $(mkinstalldirs) $(DESTDIR)$(SCORE_PATH)
-+ $(INSTALL) -m 660 .score $(DESTDIR)$(SCORE_PATH)
---- a/src/ranking.c
-+++ b/src/ranking.c
-@@ -36,7 +36,7 @@
- FILE *fp;
- Uint16 i;
-
-- if ((fp = fopen(DATA_PATH "/.score", "r"))) {
-+ if ((fp = fopen(SCORE_PATH "/.score", "r"))) {
- fscanf(fp, "%d", &(Root->HiScore));
- for (i = 0; i < 5; i ++)
- fscanf(fp, "%d %d %s",
-@@ -65,7 +65,7 @@
- FILE *fp;
- Uint16 i;
-
-- if ((fp = fopen(DATA_PATH "/.score", "w"))) {
-+ if ((fp = fopen(SCORE_PATH "/.score", "w"))) {
- fprintf(fp, "%d\n", Root->HiScore);
- for (i = 0; i < 5; i ++)
- fprintf(fp, "%d %d %s\n",
---- a/wav/Makefile.am
-+++ b/wav/Makefile.am
-@@ -1,3 +1,3 @@
--wavdir = $(prefix)/share/SpaceAryarya/wav
-+wavdir = $(WAV_PATH)
- wav_DATA = bgm1.wav bomb.wav hit.wav fire.wav die.wav boss.wav
- EXTRA_DIST = bgm1.wav bomb.wav hit.wav fire.wav die.wav boss.wav
diff --git a/games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r2.ebuild b/games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r2.ebuild
deleted file mode 100644
index 5e97b2431a5e..000000000000
--- a/games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r2.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools desktop
-
-MY_P=SpaceAryarya-KXL-${PV}
-DESCRIPTION="A 2D/3D shooting game"
-HOMEPAGE="http://triring.net/ps2linux/games/kxl/kxlgames.html"
-SRC_URI="mirror://gentoo/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="dev-games/KXL"
-RDEPEND="${DEPEND}
- media-fonts/font-adobe-100dpi
- media-fonts/font-bitstream-100dpi"
-
-S=${WORKDIR}/${MY_P}
-
-PATCHES=(
- "${FILESDIR}"/${P}-gentoo-paths.patch
- "${FILESDIR}"/${P}-flags.patch
- "${FILESDIR}"/${P}-clang.patch
-)
-
-src_prepare() {
- default
-
- mv configure.{in,ac}
- rm aclocal.m4
- eautoreconf
-}
-
-src_install() {
- default
- newicon bmp/enemy1.bmp ${PN}.bmp
- make_desktop_entry spacearyarya SpaceAryarya /usr/share/pixmaps/${PN}.bmp
-}
diff --git a/games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r3.ebuild b/games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r3.ebuild
new file mode 100644
index 000000000000..935cf953f9f6
--- /dev/null
+++ b/games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r3.ebuild
@@ -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
+}