commit:     7ff1adca02731a0f8dfe5b5e8f9a0a2e42efbc31
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 15 18:49:33 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Nov 15 18:49:33 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ff1adca

games-arcade/moleinvasion: Port to EAPI 7

Closes: https://bugs.gentoo.org/709502
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../files/moleinvasion-0.4-fno-common.patch        | 11 +++++++
 .../moleinvasion/moleinvasion-0.4-r2.ebuild        | 37 +++++++++++++++-------
 2 files changed, 36 insertions(+), 12 deletions(-)

diff --git a/games-arcade/moleinvasion/files/moleinvasion-0.4-fno-common.patch 
b/games-arcade/moleinvasion/files/moleinvasion-0.4-fno-common.patch
new file mode 100644
index 00000000000..3d183314879
--- /dev/null
+++ b/games-arcade/moleinvasion/files/moleinvasion-0.4-fno-common.patch
@@ -0,0 +1,11 @@
+--- a/worldmap.h
++++ b/worldmap.h
+@@ -24,7 +24,7 @@
+ void draw_level_name(int current_level,myList * all_level_desc);
+ 
+ /* on stocke ici toutes les datas evoluant relatives au monde en cours */
+-#ifdef MAIN_WORLDMAP
++#ifndef MAIN_WORLDMAP
+ #define EXTERN_WLD extern
+ #else
+ #define EXTERN_WLD

diff --git a/games-arcade/moleinvasion/moleinvasion-0.4-r2.ebuild 
b/games-arcade/moleinvasion/moleinvasion-0.4-r2.ebuild
index 885dd1d1524..91e9e1aa5d0 100644
--- a/games-arcade/moleinvasion/moleinvasion-0.4-r2.ebuild
+++ b/games-arcade/moleinvasion/moleinvasion-0.4-r2.ebuild
@@ -1,12 +1,14 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
-inherit desktop
+EAPI=7
+
+inherit desktop toolchain-funcs
 
 DESCRIPTION="Mole infested 2D platform game"
 HOMEPAGE="http://moleinvasion.tuxfamily.org/";
-SRC_URI="ftp://download.tuxfamily.org/minvasion/packages/MoleInvasion-${PV}.tar.bz2
+SRC_URI="
+       
ftp://download.tuxfamily.org/minvasion/packages/MoleInvasion-${PV}.tar.bz2
        music? ( mirror://gentoo/${PN}-music-20090731.tar.gz )"
 
 LICENSE="GPL-2"
@@ -14,19 +16,23 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE="music"
 
-DEPEND="media-libs/libsdl[opengl,video]
-       virtual/opengl
+DEPEND="
+       media-libs/libsdl[opengl,video]
        media-libs/sdl-image[jpeg,png]
        media-libs/sdl-mixer[vorbis]
        media-libs/sdl-ttf
-"
+       virtual/opengl"
 RDEPEND="${DEPEND}"
 
 S="${WORKDIR}/${P}/src"
 
 src_prepare() {
        default
-       use music && mv -f "${WORKDIR}"/music ../
+
+       if use music; then
+               mv -f "${WORKDIR}"/music ../ || die
+       fi
+
        sed -i \
                -e '/^CFLAGS/s:= -g:+=:' \
                -e '/^LDFLAGS/d' \
@@ -34,13 +40,20 @@ src_prepare() {
                -e "/^FINALDATADIR/s:/usr.*:/usr/share/${PN}:" \
                Makefile || die "sed failed"
 
-       eapply "${FILESDIR}"/${P}-opengl.patch \
-               "${FILESDIR}"/${P}-underlink.patch
+       eapply \
+               "${FILESDIR}"/${P}-opengl.patch \
+               "${FILESDIR}"/${P}-underlink.patch \
+               "${FILESDIR}"/${P}-fno-common.patch
+}
+
+src_configure() {
+       tc-export CC
 }
 
 src_install() {
        emake DESTDIR="${D}" install install-data
-       newicon ../gfx/icon.xpm ${PN}.xpm
-       make_desktop_entry ${PN} "Mole Invasion"
        doman ../debian/*.6
+
+       newicon ../gfx/icon.xpm moleinvasion.xpm
+       make_desktop_entry moleinvasion "Mole Invasion"
 }

Reply via email to