From 23a68e787330631bb05a3fa67ffca3bdbef1da08 Mon Sep 17 00:00:00 2001 From: Pacho Ramos Date: Sun, 29 Apr 2018 13:39:38 +0200 Subject: 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(-) create mode 100644 games-emulation/nestra/nestra-0.66-r3.ebuild (limited to 'games-emulation/nestra') 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 f5c662e22600..d9e9b3c61147 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 b4733b172bba..096fd18af47f 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 #include @@ -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 #include @@ -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 #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 000000000000..44ca1daa1d33 --- /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 +} -- cgit v1.2.3-65-gdbad