games-emulation/nestra: Stop using games.eclass

Package-Manager: Portage-2.3.31, Repoman-2.3.9
This commit is contained in:
Pacho Ramos
2018-04-29 13:39:38 +02:00
parent 71990c23de
commit 23a68e7873
3 changed files with 65 additions and 16 deletions

View File

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

View File

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

View File

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