commit:     663a0737e3a48cedefaf0b812ec01b2edb407e91
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  5 00:23:35 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jul  5 00:23:35 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=663a0737

games-action/maelstrom: Fix build system

Closes: https://bugs.gentoo.org/724326
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../files/maelstrom-3.0.6-autotools.patch          | 34 ++++++++++++++++++
 games-action/maelstrom/maelstrom-3.0.6-r3.ebuild   | 40 ++++++++++------------
 2 files changed, 52 insertions(+), 22 deletions(-)

diff --git a/games-action/maelstrom/files/maelstrom-3.0.6-autotools.patch 
b/games-action/maelstrom/files/maelstrom-3.0.6-autotools.patch
new file mode 100644
index 00000000000..25657849485
--- /dev/null
+++ b/games-action/maelstrom/files/maelstrom-3.0.6-autotools.patch
@@ -0,0 +1,34 @@
+--- a/configure.in
++++ b/configure.in
+@@ -13,6 +13,7 @@
+ AC_PROG_MAKE_SET
+ AC_PROG_CC
+ AC_PROG_CXX
++AM_PROG_AR
+ AC_PROG_RANLIB
+ AC_PROG_INSTALL
+ 
+@@ -102,10 +103,10 @@
+         ;;
+     *-*-beos*)
+         ac_default_prefix=/boot/beos
+-        GAME_INSTALLDIR="\$(prefix)/games/$PACKAGE"
++        GAME_INSTALLDIR="\$(datadir)/$PACKAGE"
+         ;;
+     *)
+-        GAME_INSTALLDIR="\$(prefix)/games/$PACKAGE"
++        GAME_INSTALLDIR="\$(datadir)/$PACKAGE"
+         ;;
+ esac
+ AC_SUBST(GAME_INSTALLDIR)
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -65,7 +65,7 @@
+ 
+ # Special install rule for the game
+ install:
+-      make install_gamedata target=@GAME_INSTALLDIR@
++      $(MAKE) install-binPROGRAMS install_gamedata 
target=$(DESTDIR)/@GAME_INSTALLDIR@
+ 
+ install_gamedata:
+       sh mkinstalldirs $(target)/

diff --git a/games-action/maelstrom/maelstrom-3.0.6-r3.ebuild 
b/games-action/maelstrom/maelstrom-3.0.6-r3.ebuild
index db33e84ab96..50639f25c72 100644
--- a/games-action/maelstrom/maelstrom-3.0.6-r3.ebuild
+++ b/games-action/maelstrom/maelstrom-3.0.6-r3.ebuild
@@ -1,25 +1,25 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
-inherit autotools eutils
+EAPI=7
+
+inherit autotools desktop
 
-MY_P=Maelstrom-${PV}
 DESCRIPTION="An asteroids battle game"
 HOMEPAGE="http://www.libsdl.org/projects/Maelstrom/";
-SRC_URI="http://www.libsdl.org/projects/Maelstrom/src/${MY_P}.tar.gz";
+SRC_URI="http://www.libsdl.org/projects/Maelstrom/src/${P^}.tar.gz";
 
-KEYWORDS="~alpha ~amd64 ~x86"
-SLOT="0"
 LICENSE="GPL-2"
-IUSE=""
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~x86"
 
-DEPEND="acct-group/gamestat
+DEPEND="
+       acct-group/gamestat
        media-libs/libsdl[sound,joystick,video]
        media-libs/sdl-net"
 RDEPEND="${DEPEND}"
 
-S=${WORKDIR}/${MY_P}
+S="${WORKDIR}/${P^}"
 
 PATCHES=(
        "${FILESDIR}"/${P}-security.patch
@@ -27,21 +27,17 @@ PATCHES=(
        "${FILESDIR}"/${P}-gcc34.patch
        "${FILESDIR}"/${P}-warnings.patch
        "${FILESDIR}"/${P}-gcc53.patch
+       "${FILESDIR}"/${P}-autotools.patch
 )
 
 src_prepare() {
        default
 
-       # Install the data into $(datadir)/..., not $(prefix)/games/...
-       sed -i \
-               -e "s:(prefix)/games/:(datadir)/:" configure.in || die
-       sed -i \
-               -e '/make install_gamedata/ { s:=:=$(DESTDIR)/:; 
s/make/$(MAKE)/; s/install_gamedata/install-binPROGRAMS install_gamedata/; }' 
Makefile.am || die
        # Install the high scores file in ${GAMES_STATEDIR}
        sed -i \
                -e 
"s:path.Path(MAELSTROM_SCORES):\"/var/games/\"MAELSTROM_SCORES:" scores.cpp || 
die
-       mv configure.{in,ac}
-       rm aclocal.m4 acinclude.m4
+       mv configure.{in,ac} || die
+       rm aclocal.m4 acinclude.m4 || die
        eautoreconf
 }
 
@@ -49,17 +45,17 @@ src_install() {
        default
        dodoc Changelog 
Docs/{Maelstrom-Announce,*FAQ,MaelstromGPL_press_release,*.Paper,Technical_Notes*}
 
-       newicon "${D}/usr/share/Maelstrom/icon.xpm" maelstrom.xpm
+       newicon "${ED}"/usr/share/Maelstrom/icon.xpm maelstrom.xpm
        make_desktop_entry Maelstrom "Maelstrom" maelstrom
 
        # Put the high scores file in the right place
        insinto /var/games
-       doins "${D}/usr/share/Maelstrom/Maelstrom-Scores"
+       doins "${ED}"/usr/share/Maelstrom/Maelstrom-Scores
 
        # clean up some cruft
-       rm -f \
-               "${D}/usr/share/Maelstrom/Maelstrom-Scores" \
-               "${D}/usr/share/Maelstrom/Images/Makefile*"
+       rm \
+               "${ED}"/usr/share/Maelstrom/Maelstrom-Scores \
+               "${ED}"/usr/share/Maelstrom/Images/Makefile* || die
 
        # make sure we can update the high scores
        fowners root:gamestat /var/games/Maelstrom-Scores 
/usr/bin/Maelstrom{,-netd}

Reply via email to