Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/nestra/, games-emulation/nestra/files/
Date: Sun, 29 Apr 2018 13:07:01
Message-Id: 1525007183.23a68e787330631bb05a3fa67ffca3bdbef1da08.pacho@gentoo
1 commit: 23a68e787330631bb05a3fa67ffca3bdbef1da08
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 29 11:39:38 2018 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 29 13:06:23 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23a68e78
7
8 games-emulation/nestra: Stop using games.eclass
9
10 Package-Manager: Portage-2.3.31, Repoman-2.3.9
11
12 .../nestra/files/nestra-0.66-exec-stack.patch | 4 +-
13 .../nestra/files/nestra-0.66-include.patch | 28 ++++++-------
14 games-emulation/nestra/nestra-0.66-r3.ebuild | 49 ++++++++++++++++++++++
15 3 files changed, 65 insertions(+), 16 deletions(-)
16
17 diff --git a/games-emulation/nestra/files/nestra-0.66-exec-stack.patch b/games-emulation/nestra/files/nestra-0.66-exec-stack.patch
18 index f5c662e2260..d9e9b3c6114 100644
19 --- a/games-emulation/nestra/files/nestra-0.66-exec-stack.patch
20 +++ b/games-emulation/nestra/files/nestra-0.66-exec-stack.patch
21 @@ -1,5 +1,5 @@
22 ---- x86.S.orig 2006-01-09 20:02:58.000000000 -0500
23 -+++ x86.S 2006-01-09 20:03:38.000000000 -0500
24 +--- a/x86.S.orig 2006-01-09 20:02:58.000000000 -0500
25 ++++ b/x86.S 2006-01-09 20:03:38.000000000 -0500
26 @@ -1458,3 +1458,7 @@
27 leal 0x1(%eax),%ebx
28 popl %eax
29
30 diff --git a/games-emulation/nestra/files/nestra-0.66-include.patch b/games-emulation/nestra/files/nestra-0.66-include.patch
31 index b4733b172bb..096fd18af47 100644
32 --- a/games-emulation/nestra/files/nestra-0.66-include.patch
33 +++ b/games-emulation/nestra/files/nestra-0.66-include.patch
34 @@ -1,5 +1,5 @@
35 ---- comptbl.c
36 -+++ comptbl.c
37 +--- a/comptbl.c
38 ++++ b/comptbl.c
39 @@ -9,6 +9,7 @@
40 #include <stdio.h>
41 #include <string.h>
42 @@ -8,8 +8,8 @@
43
44 #define ALLOC_SIZE 0x400000 /* 4MB */
45 #define TBL_BASE ((unsigned char *)0x10000000)
46 ---- d6502.c
47 -+++ d6502.c
48 +--- a/d6502.c
49 ++++ b/d6502.c
50 @@ -1,6 +1,7 @@
51 /* 6502 disassembler */
52 /* Public Domain */
53 @@ -18,8 +18,8 @@
54 #include "globals.h"
55
56 char Opcodes_6502[256][4]={
57 ---- emu.c
58 -+++ emu.c
59 +--- a/emu.c
60 ++++ b/emu.c
61 @@ -12,6 +12,7 @@
62 #include <sys/mman.h>
63 #include <stdio.h>
64 @@ -28,8 +28,8 @@
65
66 #include "mapper.h"
67 #include "io.h"
68 ---- fb.c
69 -+++ fb.c
70 +--- a/fb.c
71 ++++ b/fb.c
72 @@ -2,6 +2,8 @@
73 /* Framebuffer/pixmap rendering */
74 /* Public Domain */
75 @@ -39,8 +39,8 @@
76 #include <stdio.h>
77 #include "mapper.h"
78 #include "globals.h"
79 ---- io.c
80 -+++ io.c
81 +--- a/io.c
82 ++++ b/io.c
83 @@ -5,6 +5,7 @@
84 to do I/O operations. */
85
86 @@ -49,8 +49,8 @@
87 #include "mapper.h"
88 #include "io.h"
89 #include "globals.h"
90 ---- mapper.c
91 -+++ mapper.c
92 +--- a/mapper.c
93 ++++ b/mapper.c
94 @@ -1,6 +1,7 @@
95 /* Nestra mapper.c */
96 /* Public Domain */
97 @@ -59,8 +59,8 @@
98 #include "mapper.h"
99 #include "consts.h"
100
101 ---- x11.c
102 -+++ x11.c
103 +--- a/x11.c
104 ++++ b/x11.c
105 @@ -1,6 +1,9 @@
106 /* Nestra x11.c */
107 /* Public Domain */
108
109 diff --git a/games-emulation/nestra/nestra-0.66-r3.ebuild b/games-emulation/nestra/nestra-0.66-r3.ebuild
110 new file mode 100644
111 index 00000000000..44ca1daa1d3
112 --- /dev/null
113 +++ b/games-emulation/nestra/nestra-0.66-r3.ebuild
114 @@ -0,0 +1,49 @@
115 +# Copyright 1999-2018 Gentoo Foundation
116 +# Distributed under the terms of the GNU General Public License v2
117 +
118 +EAPI=6
119 +inherit epatch toolchain-funcs flag-o-matic
120 +
121 +PATCH="${P/-/_}-10.diff"
122 +DESCRIPTION="NES emulation for Linux/x86"
123 +HOMEPAGE="http://nestra.linuxgames.com/"
124 +SRC_URI="http://nestra.linuxgames.com/${P}.tar.gz
125 + mirror://debian/pool/contrib/n/nestra/${PATCH}.gz"
126 +
127 +LICENSE="GPL-2"
128 +SLOT="0"
129 +KEYWORDS="~amd64 ~x86"
130 +IUSE=""
131 +
132 +RDEPEND="x11-libs/libX11[abi_x86_32(-)]"
133 +DEPEND="${RDEPEND}"
134 +
135 +S="${WORKDIR}/${PN}"
136 +
137 +src_prepare() {
138 + default
139 + epatch "${WORKDIR}"/${PATCH}
140 + eapply "${FILESDIR}"/${P}-exec-stack.patch
141 + eapply "${FILESDIR}"/${P}-include.patch
142 +
143 + append-ldflags -Wl,-z,noexecstack
144 + use amd64 && multilib_toolchain_setup x86
145 +
146 + sed -i \
147 + -e "s:-L/usr/X11R6/lib:${LDFLAGS}:" \
148 + -e 's:-O2 ::' \
149 + -e "s:gcc:$(tc-getCC) ${CFLAGS}:" \
150 + -e "s:ld:$(tc-getLD) -m elf_i386 $(raw-ldflags):" \
151 + Makefile || die
152 +}
153 +
154 +src_compile() {
155 + use amd64 && multilib_toolchain_setup x86
156 + default
157 +}
158 +
159 +src_install() {
160 + dobin nestra
161 + einstalldocs
162 + doman nestra.6
163 +}