summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-04-07 08:36:40 +0000
committerSam James <sam@gentoo.org>2021-04-07 09:02:28 +0000
commite73a0e5dcf5f39f0ebc9ff9199d87e1aca5ad43e (patch)
tree8ca6abdd86dbf4d760e773864ebad7c07eeac87b /games-arcade/xgalaga
parentapp-metrics/node_exporter: remove broken versions (diff)
downloadgentoo-e73a0e5dcf5f39f0ebc9ff9199d87e1aca5ad43e.tar.gz
gentoo-e73a0e5dcf5f39f0ebc9ff9199d87e1aca5ad43e.tar.bz2
gentoo-e73a0e5dcf5f39f0ebc9ff9199d87e1aca5ad43e.zip
games-arcade/xgalaga: port to EAPI 7, games.eclass-, respect AR
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-arcade/xgalaga')
-rw-r--r--games-arcade/xgalaga/files/xgalaga-2.1.1.0-respect-AR.patch10
-rw-r--r--games-arcade/xgalaga/xgalaga-2.1.1.0-r1.ebuild (renamed from games-arcade/xgalaga/xgalaga-2.1.1.0.ebuild)45
2 files changed, 40 insertions, 15 deletions
diff --git a/games-arcade/xgalaga/files/xgalaga-2.1.1.0-respect-AR.patch b/games-arcade/xgalaga/files/xgalaga-2.1.1.0-respect-AR.patch
new file mode 100644
index 000000000000..eedc9b24ce17
--- /dev/null
+++ b/games-arcade/xgalaga/files/xgalaga-2.1.1.0-respect-AR.patch
@@ -0,0 +1,10 @@
+--- a/configure.in
++++ b/configure.in
+@@ -14,6 +14,7 @@ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+ AC_PROG_RANLIB
++AM_PROG_AR
+
+ AC_ARG_WITH(xpm-lib,[ --with-xpm-lib Directory containing libXpm (may be autodetected)],xpm_lib=$withval)
+ AC_ARG_WITH(sound, [ --with-sound Type of sound to use (native or nas)],sound_type=$withval)
diff --git a/games-arcade/xgalaga/xgalaga-2.1.1.0.ebuild b/games-arcade/xgalaga/xgalaga-2.1.1.0-r1.ebuild
index 4d3b86a97566..d644d2087dd3 100644
--- a/games-arcade/xgalaga/xgalaga-2.1.1.0.ebuild
+++ b/games-arcade/xgalaga/xgalaga-2.1.1.0-r1.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit eutils games
+EAPI=7
+
+inherit autotools desktop
DESCRIPTION="A clone of the classic game Galaga for the X Window System"
HOMEPAGE="https://sourceforge.net/projects/xgalaga"
@@ -11,7 +12,6 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~x86"
-IUSE=""
RDEPEND="x11-libs/libX11
x11-libs/libXmu
@@ -21,34 +21,49 @@ RDEPEND="x11-libs/libX11
DEPEND="${RDEPEND}
x11-base/xorg-proto"
+RDEPEND+=" acct-group/gamestat"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.1.1.0-respect-AR.patch
+)
+
src_prepare() {
+ default
+
+ eautoreconf
+
sed -i \
-e "/LEVELDIR\|SOUNDDIR/ s:prefix:datadir/${PN}:" \
-e "/\/scores/ s:prefix:localstatedir/${PN}:" \
- configure \
- || die "sed configure failed"
+ configure || die "sed configure failed"
+
sed -i \
-e "/SOUNDDEFS/ s:(SOUNDSRVDIR):(SOUNDSRVDIR)/bin:" \
-e 's:make ;:$(MAKE) ;:' \
- Makefile.in \
- || die "sed Makefile.in failed"
+ Makefile.in || die "sed Makefile.in failed"
+
+ sed -i \
+ -e 's/AR = ar/AR = @AR@/' \
+ libsprite/Makefile.in || die
}
src_install() {
- dogamesbin xgalaga xgal.sndsrv.oss xgalaga-hyperspace
+ dobin xgalaga xgal.sndsrv.oss xgalaga-hyperspace
dodoc README README.SOUND CHANGES
newman xgalaga.6x xgalaga.6
- insinto "${GAMES_DATADIR}/${PN}/sounds"
+ insinto /usr/share/${PN}/sounds
doins sounds/*.raw
- insinto "${GAMES_DATADIR}/${PN}/levels"
+ insinto /usr/share/${PN}/levels
doins levels/*.xgl
make_desktop_entry ${PN} XGalaga
- dodir "${GAMES_STATEDIR}/${PN}"
- touch "${D}${GAMES_STATEDIR}/${PN}/scores"
- fperms 660 "${GAMES_STATEDIR}/${PN}/scores"
- prepgamesdirs
+ dodir /var/games/${PN}
+ touch "${ED}"/var/games/${PN}/scores || die
+
+ fperms -R 660 /var/games/${PN}
+ fowners -R root:gamestat /var/games/${PN}
+ fperms g+s /usr/bin/{xgalaga,xgal.sndsrv.oss,xgalaga-hyperspace}
}