games-puzzle/mirrormagic: Stop using games.eclass
authorPacho Ramos <pacho@gentoo.org>
Tue, 1 May 2018 12:53:53 +0000 (14:53 +0200)
committerPacho Ramos <pacho@gentoo.org>
Tue, 1 May 2018 19:33:33 +0000 (21:33 +0200)
Package-Manager: Portage-2.3.31, Repoman-2.3.9

games-puzzle/mirrormagic/files/mirrormagic-2.0.2-64bit.patch
games-puzzle/mirrormagic/files/mirrormagic-2.0.2-gcc41.patch
games-puzzle/mirrormagic/files/mirrormagic-2.0.2-parallel.patch
games-puzzle/mirrormagic/mirrormagic-2.0.2-r2.ebuild [new file with mode: 0644]

index e9b313423699d066eab1ac7aff17c5c869f5a5da..4817f75786f89709799f35eba3bee6c329cb4bad 100644 (file)
@@ -6,8 +6,8 @@ unsigned long.  Should probably really be uint32_t but I'll leave
 that decision to upstream. Thanks Pelle Nilsson (and son).
 64bit check borrowed from bug #496863.  Closes: #498912.
 
---- src/libgame/gadgets.c
-+++ src/libgame/gadgets.c
+--- a/src/libgame/gadgets.c
++++ b/src/libgame/gadgets.c
 @@ -18,6 +18,12 @@
  #include "text.h"
  #include "misc.h"
index c8d386f4e58125fa3c208ba474176be0bc134999..be7f701de42f089c6357b49ddbe03748d04a00a5 100644 (file)
@@ -1,5 +1,5 @@
---- src/main.h.old
-+++ src/main.h
+--- a/src/main.h.old
++++ b/src/main.h
 @@ -459,7 +459,6 @@
  #endif
  extern struct HiScore         highscore[];
index 9b538a68881652309f7001b2619863ed78867c43..a7effd4b69848e640345a885459ff8764eb6dec7 100644 (file)
@@ -1,5 +1,5 @@
---- src/Makefile.old
-+++ src/Makefile
+--- a/src/Makefile.old
++++ b/src/Makefile
 @@ -146,7 +146,7 @@
  endif
  
diff --git a/games-puzzle/mirrormagic/mirrormagic-2.0.2-r2.ebuild b/games-puzzle/mirrormagic/mirrormagic-2.0.2-r2.ebuild
new file mode 100644 (file)
index 0000000..812835f
--- /dev/null
@@ -0,0 +1,59 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop toolchain-funcs
+
+DESCRIPTION="A game like Deflektor (C 64) or Mindbender (Amiga)"
+HOMEPAGE="http://www.artsoft.org/mirrormagic/"
+SRC_URI="http://www.artsoft.org/RELEASES/unix/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="sdl"
+
+RDEPEND="
+       !sdl? ( x11-libs/libX11 )
+       sdl? (
+               media-libs/libsdl[video]
+               media-libs/sdl-mixer
+               media-libs/sdl-image
+       )
+"
+DEPEND="${RDEPEND}
+       !sdl? ( x11-libs/libXt )
+"
+
+src_prepare() {
+       default
+       eapply \
+               "${FILESDIR}"/${P}-gcc41.patch \
+               "${FILESDIR}"/${P}-parallel.patch \
+               "${FILESDIR}"/${P}-64bit.patch \
+               "${FILESDIR}"/${P}-gcc5.patch \
+               "${FILESDIR}"/${P}-editor.patch
+       rm -f ${PN} || die
+}
+
+src_compile() {
+       emake \
+               -C src \
+               CC="$(tc-getCC)" \
+               AR="$(tc-getAR)" \
+               RANLIB="$(tc-getRANLIB)" \
+               OPTIONS="${CFLAGS}" \
+               EXTRA_LDFLAGS="${LDFLAGS}" \
+               RO_GAME_DIR=/usr/share/${PN} \
+               RW_GAME_DIR=/var/${PN} \
+               TARGET=$(usex sdl sdl x11)
+}
+
+src_install() {
+       dobin ${PN}
+       insinto /usr/share/${PN}
+       doins -r graphics levels music sounds
+       doicon "${FILESDIR}"/${PN}.xpm
+       make_desktop_entry ${PN} "Mirror Magic II"
+       einstalldocs
+}