commit:     23a68e787330631bb05a3fa67ffca3bdbef1da08
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 29 11:39:38 2018 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Apr 29 13:06:23 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23a68e78

games-emulation/nestra: Stop using games.eclass

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 .../nestra/files/nestra-0.66-exec-stack.patch      |  4 +-
 .../nestra/files/nestra-0.66-include.patch         | 28 ++++++-------
 games-emulation/nestra/nestra-0.66-r3.ebuild       | 49 ++++++++++++++++++++++
 3 files changed, 65 insertions(+), 16 deletions(-)

diff --git a/games-emulation/nestra/files/nestra-0.66-exec-stack.patch 
b/games-emulation/nestra/files/nestra-0.66-exec-stack.patch
index f5c662e2260..d9e9b3c6114 100644
--- a/games-emulation/nestra/files/nestra-0.66-exec-stack.patch
+++ b/games-emulation/nestra/files/nestra-0.66-exec-stack.patch
@@ -1,5 +1,5 @@
---- x86.S.orig 2006-01-09 20:02:58.000000000 -0500
-+++ x86.S      2006-01-09 20:03:38.000000000 -0500
+--- a/x86.S.orig       2006-01-09 20:02:58.000000000 -0500
++++ b/x86.S    2006-01-09 20:03:38.000000000 -0500
 @@ -1458,3 +1458,7 @@
   leal   0x1(%eax),%ebx
   popl   %eax

diff --git a/games-emulation/nestra/files/nestra-0.66-include.patch 
b/games-emulation/nestra/files/nestra-0.66-include.patch
index b4733b172bb..096fd18af47 100644
--- a/games-emulation/nestra/files/nestra-0.66-include.patch
+++ b/games-emulation/nestra/files/nestra-0.66-include.patch
@@ -1,5 +1,5 @@
---- comptbl.c
-+++ comptbl.c
+--- a/comptbl.c
++++ b/comptbl.c
 @@ -9,6 +9,7 @@
  #include <stdio.h>
  #include <string.h>
@@ -8,8 +8,8 @@
  
  #define ALLOC_SIZE 0x400000 /* 4MB */
  #define TBL_BASE ((unsigned char *)0x10000000)
---- d6502.c
-+++ d6502.c
+--- a/d6502.c
++++ b/d6502.c
 @@ -1,6 +1,7 @@
  /* 6502 disassembler */
  /* Public Domain */
@@ -18,8 +18,8 @@
  #include "globals.h"
  
  char Opcodes_6502[256][4]={
---- emu.c
-+++ emu.c
+--- a/emu.c
++++ b/emu.c
 @@ -12,6 +12,7 @@
  #include <sys/mman.h>
  #include <stdio.h>
@@ -28,8 +28,8 @@
  
  #include "mapper.h"
  #include "io.h"
---- fb.c
-+++ fb.c
+--- a/fb.c
++++ b/fb.c
 @@ -2,6 +2,8 @@
  /* Framebuffer/pixmap rendering */
  /* Public Domain */
@@ -39,8 +39,8 @@
  #include <stdio.h>
  #include "mapper.h"
  #include "globals.h"
---- io.c
-+++ io.c
+--- a/io.c
++++ b/io.c
 @@ -5,6 +5,7 @@
     to do I/O operations. */
  
@@ -49,8 +49,8 @@
  #include "mapper.h"
  #include "io.h"
  #include "globals.h"
---- mapper.c
-+++ mapper.c
+--- a/mapper.c
++++ b/mapper.c
 @@ -1,6 +1,7 @@
  /* Nestra mapper.c */
  /* Public Domain */
@@ -59,8 +59,8 @@
  #include "mapper.h"
  #include "consts.h"
  
---- x11.c
-+++ x11.c
+--- a/x11.c
++++ b/x11.c
 @@ -1,6 +1,9 @@
  /* Nestra x11.c */
  /* Public Domain */

diff --git a/games-emulation/nestra/nestra-0.66-r3.ebuild 
b/games-emulation/nestra/nestra-0.66-r3.ebuild
new file mode 100644
index 00000000000..44ca1daa1d3
--- /dev/null
+++ b/games-emulation/nestra/nestra-0.66-r3.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit epatch toolchain-funcs flag-o-matic
+
+PATCH="${P/-/_}-10.diff"
+DESCRIPTION="NES emulation for Linux/x86"
+HOMEPAGE="http://nestra.linuxgames.com/";
+SRC_URI="http://nestra.linuxgames.com/${P}.tar.gz
+       mirror://debian/pool/contrib/n/nestra/${PATCH}.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/libX11[abi_x86_32(-)]"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+       default
+       epatch "${WORKDIR}"/${PATCH}
+       eapply "${FILESDIR}"/${P}-exec-stack.patch
+       eapply "${FILESDIR}"/${P}-include.patch
+
+       append-ldflags -Wl,-z,noexecstack
+       use amd64 && multilib_toolchain_setup x86
+
+       sed -i \
+               -e "s:-L/usr/X11R6/lib:${LDFLAGS}:" \
+               -e 's:-O2 ::' \
+               -e "s:gcc:$(tc-getCC) ${CFLAGS}:" \
+               -e "s:ld:$(tc-getLD) -m elf_i386 $(raw-ldflags):" \
+               Makefile || die
+}
+
+src_compile() {
+       use amd64 && multilib_toolchain_setup x86
+       default
+}
+
+src_install() {
+       dobin nestra
+       einstalldocs
+       doman nestra.6
+}

Reply via email to