1 |
commit: af86d3b8aefc35023717e6cfd3ed15980471bb26 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 30 20:37:33 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 30 20:37:56 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af86d3b8 |
7 |
|
8 |
games-emulation/nestopia: Version bump to 1.47 |
9 |
|
10 |
Gentoo-bug: 597364 |
11 |
* EAPI=6 |
12 |
* Remove games.eclass |
13 |
|
14 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
15 |
|
16 |
games-emulation/nestopia/Manifest | 1 + |
17 |
.../files/nestopia-1.47-fix-buildsystem.patch | 120 +++++++++++++++++++++ |
18 |
.../nestopia/files/nestopia-1.47-fix-c++14.patch | 43 ++++++++ |
19 |
games-emulation/nestopia/nestopia-1.47.ebuild | 54 ++++++++++ |
20 |
4 files changed, 218 insertions(+) |
21 |
|
22 |
diff --git a/games-emulation/nestopia/Manifest b/games-emulation/nestopia/Manifest |
23 |
index 809f35a..a13c7e2 100644 |
24 |
--- a/games-emulation/nestopia/Manifest |
25 |
+++ b/games-emulation/nestopia/Manifest |
26 |
@@ -1 +1,2 @@ |
27 |
DIST nestopia-1.46.2.tgz 1223407 SHA256 4a5065726ad9e7a120a2c6aa39b9c0904090119998a4d690d4deb5e374118fc0 SHA512 3aa87e98aa24b71e5feac5ffe8229e97d407fc0b14567b0ddbe7cc1eaca08a08f435a6fe294fbbd7066054befdfd27602db7c3c0577246b0e8addfe296404a23 WHIRLPOOL 25c43194797e5edca3abc5cb75dba126d9d246e9ab12270521e7fe6c13427b371ba9f92a71ed557271f159711411286b5ac5ab3fe06144760320531c33bf0c02 |
28 |
+DIST nestopia-1.47.tgz 1306183 SHA256 84624d30ab05d609db2734db0065616b268f79d4aa35f1cd90cb35ee8d96be0c SHA512 27155a82ca9631623c4800110371ec374de2c3d649d3274c9495b58ddede36bfb4a6f52e39552d55e0e90795cd779c3331c488c557aba6b738998e19f1d3bf72 WHIRLPOOL 4f30b66e1eb229419fa4862db2b3828cb983dcba9f0cac531f84e45a885db2bfdbb24cc33a87729f524922c42aa761d0294e53c5ffa00540dd20765a79e08c41 |
29 |
|
30 |
diff --git a/games-emulation/nestopia/files/nestopia-1.47-fix-buildsystem.patch b/games-emulation/nestopia/files/nestopia-1.47-fix-buildsystem.patch |
31 |
new file mode 100644 |
32 |
index 00000000..ed52eb1 |
33 |
--- /dev/null |
34 |
+++ b/games-emulation/nestopia/files/nestopia-1.47-fix-buildsystem.patch |
35 |
@@ -0,0 +1,120 @@ |
36 |
+--- a/Makefile |
37 |
++++ b/Makefile |
38 |
+@@ -1,34 +1,26 @@ |
39 |
+-CC ?= cc |
40 |
+-CXX ?= c++ |
41 |
+-CXXFLAGS ?= -O3 |
42 |
+-CPPFLAGS += -DNST_PRAGMA_ONCE |
43 |
+-CFLAGS = $(shell sdl2-config --cflags) |
44 |
+- |
45 |
+-INCLUDES = -Isource |
46 |
++nestopia_CPPFLAGS = -DNST_PRAGMA_ONCE -Isource $(shell sdl2-config --cflags) |
47 |
+ WARNINGS = -Wno-write-strings |
48 |
+ |
49 |
+-LDFLAGS = -Wl,--as-needed |
50 |
+-LIBS = -lstdc++ -lm -lz |
51 |
+-LIBS += $(shell sdl2-config --libs) |
52 |
++nestopia_LIBS = -lm -lz $(shell sdl2-config --libs) |
53 |
+ |
54 |
+ UNAME := $(shell uname) |
55 |
+ |
56 |
+ BIN = nestopia |
57 |
+ |
58 |
+-PREFIX ?= /usr/local |
59 |
++PREFIX ?= /usr |
60 |
+ BINDIR ?= $(PREFIX)/bin |
61 |
+ DATADIR ?= $(PREFIX)/share/nestopia |
62 |
+ |
63 |
+ ifneq ($(findstring MINGW,$(UNAME)),) |
64 |
+- DEFINES = -D_MINGW |
65 |
+- LDFLAGS += -mconsole |
66 |
+- LIBS += -lepoxy -lopengl32 |
67 |
++ nestopia_CPPFLAGS += -D_MINGW |
68 |
++ nestopia_LIBS += -mconsole |
69 |
++ nestopia_LIBS += -lepoxy -lopengl32 |
70 |
+ else ifneq ($(findstring Darwin,$(UNAME)),) |
71 |
+- DEFINES = -D_APPLE |
72 |
+- DEFINES += -DDATADIR=\"$(DATADIR)\" |
73 |
+- INCLUDES += -I/usr/local/include -I/usr/local/opt/libarchive/include |
74 |
+- LDFLAGS = -Wl -L/usr/local/opt/libarchive/lib |
75 |
+- LIBS += -larchive -lepoxy -lao |
76 |
++ nestopia_CPPFLAGS += -D_APPLE |
77 |
++ nestopia_CPPFLAGS += -DDATADIR=\"$(DATADIR)\" |
78 |
++ nestopia_CPPFLAGS += -I/usr/local/include -I/usr/local/opt/libarchive/include |
79 |
++ nestopia_LIBS += -Wl -L/usr/local/opt/libarchive/lib |
80 |
++ nestopia_LIBS += -larchive -lepoxy -lao |
81 |
+ # GTK Stuff - Comment this section to disable GTK+ |
82 |
+ #CFLAGS += $(shell pkg-config --cflags gtk+-3.0) |
83 |
+ #LIBS += $(shell pkg-config --libs gtk+-3.0) |
84 |
+@@ -43,12 +35,12 @@ |
85 |
+ #WARNINGS += -Wno-deprecated-declarations |
86 |
+ # end GTK |
87 |
+ else |
88 |
+- DEFINES = -DDATADIR=\"$(DATADIR)\" |
89 |
+- LIBS += -larchive -lepoxy -lGL -lGLU -lao |
90 |
++ nestopia_CPPFLAGS += -DDATADIR=\"$(DATADIR)\" |
91 |
++ nestopia_LIBS += -larchive -lepoxy -lGL -lGLU -lao |
92 |
+ # GTK Stuff - Comment this section to disable GTK+ |
93 |
+- CFLAGS += $(shell pkg-config --cflags gtk+-3.0) |
94 |
+- LIBS += $(shell pkg-config --libs gtk+-3.0) |
95 |
+- DEFINES += -D_GTK |
96 |
++ nestopia_CPPFLAGS += $(shell pkg-config --cflags gtk+-3.0) |
97 |
++ nestopia_LIBS += $(shell pkg-config --libs gtk+-3.0) |
98 |
++ nestopia_CPPFLAGS += -D_GTK |
99 |
+ IOBJS += objs/unix/gtkui/gtkui.o |
100 |
+ IOBJS += objs/unix/gtkui/gtkui_archive.o |
101 |
+ IOBJS += objs/unix/gtkui/gtkui_callbacks.o |
102 |
+@@ -374,11 +366,11 @@ |
103 |
+ |
104 |
+ # Core rules |
105 |
+ objs/core/%.o: source/core/%.cpp |
106 |
+- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ |
107 |
++ $(CXX) $(nestopia_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(WARNINGS) -c $< -o $@ |
108 |
+ |
109 |
+ # Interface rules |
110 |
+ objs/unix/%.o: source/unix/%.cpp |
111 |
+- $(CXX) $(CXXFLAGS) $(INCLUDES) $(WARNINGS) $(DEFINES) $(CFLAGS) -c $< -o $@ |
112 |
++ $(CXX) $(nestopia_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(WARNINGS) -c $< -o $@ |
113 |
+ |
114 |
+ all: maketree $(BIN) |
115 |
+ |
116 |
+@@ -392,19 +384,28 @@ |
117 |
+ @mkdir -p $@ |
118 |
+ |
119 |
+ $(BIN): $(OBJS) $(IOBJS) |
120 |
+- $(CC) $(LDFLAGS) $^ $(LIBS) -o $(BIN) |
121 |
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $^ $(nestopia_LIBS) $(LIBS) -o $(BIN) |
122 |
+ |
123 |
+ install: |
124 |
+- mkdir -p $(BINDIR) |
125 |
+- mkdir -p $(DATADIR)/icons |
126 |
+- mkdir -p $(PREFIX)/share/pixmaps |
127 |
+- install -m 0755 $(BIN) $(BINDIR) |
128 |
+- install -m 0644 source/unix/icons/nestopia.desktop $(DATADIR) |
129 |
+- install -m 0644 NstDatabase.xml $(DATADIR) |
130 |
+- install -m 0644 source/unix/icons/*.png $(DATADIR)/icons |
131 |
+- install -m 0644 source/unix/icons/*.svg $(DATADIR)/icons |
132 |
+- install -m 0644 source/unix/icons/nestopia.svg $(PREFIX)/share/pixmaps |
133 |
+- xdg-desktop-menu install --novendor $(DATADIR)/nestopia.desktop |
134 |
++ mkdir -p $(DESTDIR)$(BINDIR) |
135 |
++ mkdir -p $(DESTDIR)$(DATADIR) |
136 |
++ mkdir -p $(DESTDIR)$(PREFIX)/share/applications/ |
137 |
++ mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps |
138 |
++ mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps |
139 |
++ mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/64x64/apps |
140 |
++ mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/96x96/apps |
141 |
++ mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps |
142 |
++ mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps |
143 |
++ mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps |
144 |
++ install -m 0755 $(BIN) $(DESTDIR)$(BINDIR) |
145 |
++ install -m 0644 NstDatabase.xml $(DESTDIR)$(DATADIR) |
146 |
++ install -m 0644 source/unix/icons/nestopia.desktop $(DESTDIR)$(PREFIX)/share/applications/ |
147 |
++ install -m 0644 source/unix/icons/nestopia32.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps/nestopia.png |
148 |
++ install -m 0644 source/unix/icons/nestopia48.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/nestopia.png |
149 |
++ install -m 0644 source/unix/icons/nestopia64.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/64x64/apps/nestopia.png |
150 |
++ install -m 0644 source/unix/icons/nestopia96.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/96x96/apps/nestopia.png |
151 |
++ install -m 0644 source/unix/icons/nestopia128.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/nestopia.png |
152 |
++ install -m 0644 source/unix/icons/*.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps |
153 |
+ |
154 |
+ uninstall: |
155 |
+ xdg-desktop-menu uninstall $(DATADIR)/nestopia.desktop |
156 |
|
157 |
diff --git a/games-emulation/nestopia/files/nestopia-1.47-fix-c++14.patch b/games-emulation/nestopia/files/nestopia-1.47-fix-c++14.patch |
158 |
new file mode 100644 |
159 |
index 00000000..c63b9de |
160 |
--- /dev/null |
161 |
+++ b/games-emulation/nestopia/files/nestopia-1.47-fix-c++14.patch |
162 |
@@ -0,0 +1,43 @@ |
163 |
+Fix compiling with C++14 due to bit-shifting of negative integers. |
164 |
+See also: https://bugs.gentoo.org/show_bug.cgi?id=597364 |
165 |
+ |
166 |
+--- a/source/core/NstCore.hpp |
167 |
++++ b/source/core/NstCore.hpp |
168 |
+@@ -279,14 +279,14 @@ |
169 |
+ template<typename T> |
170 |
+ inline long signed_shl(T v,uint c) |
171 |
+ { |
172 |
+- enum {NATIVE = T(-7) << 1 == -14}; |
173 |
++ enum {NATIVE = T(-(7 << 1)) == -14}; |
174 |
+ return Helper::ShiftSigned<T,NATIVE>::Left( v, c ); |
175 |
+ } |
176 |
+ |
177 |
+ template<typename T> |
178 |
+ inline long signed_shr(T v,uint c) |
179 |
+ { |
180 |
+- enum {NATIVE = T(-7) >> 1 == -4 || T(-7) >> 1 == -3}; |
181 |
++ enum {NATIVE = T(-(7 >> 1)) == -4 || T(-(7 >> 1)) == -3}; |
182 |
+ return Helper::ShiftSigned<T,NATIVE>::Right( v, c ); |
183 |
+ } |
184 |
+ |
185 |
+--- a/source/unix/gtkui/gtkui.cpp |
186 |
++++ b/source/unix/gtkui/gtkui.cpp |
187 |
+@@ -438,7 +438,7 @@ |
188 |
+ GTK_DIALOG_DESTROY_WITH_PARENT, |
189 |
+ GTK_MESSAGE_INFO, |
190 |
+ GTK_BUTTONS_OK, |
191 |
+- message); |
192 |
++ "%s", message); |
193 |
+ gtk_dialog_run(GTK_DIALOG(messagewindow)); |
194 |
+ gtk_widget_destroy(messagewindow); |
195 |
+ } |
196 |
+--- a/source/unix/gtkui/gtkui.h |
197 |
++++ b/source/unix/gtkui/gtkui.h |
198 |
+@@ -8,7 +8,6 @@ |
199 |
+ #elif _APPLE |
200 |
+ #else |
201 |
+ #include <gdk/gdkx.h> |
202 |
+-#include <gdk/gdkwayland.h> |
203 |
+ #endif |
204 |
+ |
205 |
+ void gtkui_init(int argc, char *argv[]); |
206 |
|
207 |
diff --git a/games-emulation/nestopia/nestopia-1.47.ebuild b/games-emulation/nestopia/nestopia-1.47.ebuild |
208 |
new file mode 100644 |
209 |
index 00000000..941373c |
210 |
--- /dev/null |
211 |
+++ b/games-emulation/nestopia/nestopia-1.47.ebuild |
212 |
@@ -0,0 +1,54 @@ |
213 |
+# Copyright 1999-2016 Gentoo Foundation |
214 |
+# Distributed under the terms of the GNU General Public License v2 |
215 |
+# $Id$ |
216 |
+ |
217 |
+EAPI=6 |
218 |
+ |
219 |
+inherit gnome2-utils toolchain-funcs |
220 |
+ |
221 |
+MY_P=${P/ue/} |
222 |
+DESCRIPTION="A portable Nintendo Entertainment System emulator written in C++" |
223 |
+HOMEPAGE="http://0ldsk00l.ca/nestopia/" |
224 |
+SRC_URI="mirror://sourceforge/nestopiaue/${PV%.*}/${MY_P}.tgz" |
225 |
+ |
226 |
+LICENSE="GPL-2+" |
227 |
+SLOT="0" |
228 |
+KEYWORDS="~amd64 ~x86" |
229 |
+IUSE="doc" |
230 |
+ |
231 |
+RDEPEND=" |
232 |
+ app-arch/libarchive:= |
233 |
+ media-libs/libao |
234 |
+ media-libs/libsdl2[sound,joystick,video] |
235 |
+ sys-libs/zlib |
236 |
+ virtual/opengl |
237 |
+ virtual/glu |
238 |
+ x11-libs/gtk+:3" |
239 |
+DEPEND="${RDEPEND} |
240 |
+ virtual/pkgconfig" |
241 |
+ |
242 |
+S=${WORKDIR}/${MY_P} |
243 |
+ |
244 |
+DOCS=( AUTHORS changelog.txt README.md README.unix ) |
245 |
+HTML_DOCS=( readme.html ) |
246 |
+PATCHES=( |
247 |
+ "${FILESDIR}"/${PN}-1.47-fix-buildsystem.patch |
248 |
+ "${FILESDIR}"/${PN}-1.47-fix-c++14.patch |
249 |
+) |
250 |
+ |
251 |
+src_configure() { |
252 |
+ tc-export CXX |
253 |
+ use doc && HTML_DOCS+=( doc/. ) |
254 |
+} |
255 |
+ |
256 |
+pkg_preinst() { |
257 |
+ gnome2_icon_savelist |
258 |
+} |
259 |
+ |
260 |
+pkg_postinst() { |
261 |
+ gnome2_icon_cache_update |
262 |
+} |
263 |
+ |
264 |
+pkg_postrm() { |
265 |
+ gnome2_icon_cache_update |
266 |
+} |