Skip to content

Commit

Permalink
games-emulation/nestra: Stop using games.eclass
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.31, Repoman-2.3.9
  • Loading branch information
pacho2 committed Apr 29, 2018
1 parent 71990c2 commit 23a68e7
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 16 deletions.
4 changes: 2 additions & 2 deletions games-emulation/nestra/files/nestra-0.66-exec-stack.patch
Original file line number Diff line number Diff line change
@@ -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
Expand Down
28 changes: 14 additions & 14 deletions games-emulation/nestra/files/nestra-0.66-include.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- comptbl.c
+++ comptbl.c
--- a/comptbl.c
+++ b/comptbl.c
@@ -9,6 +9,7 @@
#include <stdio.h>
#include <string.h>
Expand All @@ -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 */
Expand All @@ -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>
Expand All @@ -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 */
Expand All @@ -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. */

Expand All @@ -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 */
Expand All @@ -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 */
Expand Down
49 changes: 49 additions & 0 deletions games-emulation/nestra/nestra-0.66-r3.ebuild
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 23a68e7

Please sign in to comment.