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@gentoo.org>
This commit is contained in:
David Seifert
2020-11-15 19:49:33 +01:00
parent a95a36e844
commit 7ff1adca02
2 changed files with 36 additions and 12 deletions

View File

@@ -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

View File

@@ -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"
}