diff options
author | David Seifert <soap@gentoo.org> | 2016-12-30 22:37:33 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2016-12-30 22:37:56 +0200 |
commit | af86d3b8aefc35023717e6cfd3ed15980471bb26 (patch) | |
tree | 849e46c8e992a25f5d2b24ab0cbff1ae008722b5 /games-emulation/nestopia/files | |
parent | kde-apps/messagelib: Block oldpim kmail (file collision) (diff) | |
download | gentoo-af86d3b8aefc35023717e6cfd3ed15980471bb26.tar.gz gentoo-af86d3b8aefc35023717e6cfd3ed15980471bb26.tar.bz2 gentoo-af86d3b8aefc35023717e6cfd3ed15980471bb26.zip |
games-emulation/nestopia: Version bump to 1.47
Gentoo-bug: 597364
* EAPI=6
* Remove games.eclass
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'games-emulation/nestopia/files')
-rw-r--r-- | games-emulation/nestopia/files/nestopia-1.47-fix-buildsystem.patch | 120 | ||||
-rw-r--r-- | games-emulation/nestopia/files/nestopia-1.47-fix-c++14.patch | 43 |
2 files changed, 163 insertions, 0 deletions
diff --git a/games-emulation/nestopia/files/nestopia-1.47-fix-buildsystem.patch b/games-emulation/nestopia/files/nestopia-1.47-fix-buildsystem.patch new file mode 100644 index 000000000000..ed52eb189c99 --- /dev/null +++ b/games-emulation/nestopia/files/nestopia-1.47-fix-buildsystem.patch @@ -0,0 +1,120 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,34 +1,26 @@ +-CC ?= cc +-CXX ?= c++ +-CXXFLAGS ?= -O3 +-CPPFLAGS += -DNST_PRAGMA_ONCE +-CFLAGS = $(shell sdl2-config --cflags) +- +-INCLUDES = -Isource ++nestopia_CPPFLAGS = -DNST_PRAGMA_ONCE -Isource $(shell sdl2-config --cflags) + WARNINGS = -Wno-write-strings + +-LDFLAGS = -Wl,--as-needed +-LIBS = -lstdc++ -lm -lz +-LIBS += $(shell sdl2-config --libs) ++nestopia_LIBS = -lm -lz $(shell sdl2-config --libs) + + UNAME := $(shell uname) + + BIN = nestopia + +-PREFIX ?= /usr/local ++PREFIX ?= /usr + BINDIR ?= $(PREFIX)/bin + DATADIR ?= $(PREFIX)/share/nestopia + + ifneq ($(findstring MINGW,$(UNAME)),) +- DEFINES = -D_MINGW +- LDFLAGS += -mconsole +- LIBS += -lepoxy -lopengl32 ++ nestopia_CPPFLAGS += -D_MINGW ++ nestopia_LIBS += -mconsole ++ nestopia_LIBS += -lepoxy -lopengl32 + else ifneq ($(findstring Darwin,$(UNAME)),) +- DEFINES = -D_APPLE +- DEFINES += -DDATADIR=\"$(DATADIR)\" +- INCLUDES += -I/usr/local/include -I/usr/local/opt/libarchive/include +- LDFLAGS = -Wl -L/usr/local/opt/libarchive/lib +- LIBS += -larchive -lepoxy -lao ++ nestopia_CPPFLAGS += -D_APPLE ++ nestopia_CPPFLAGS += -DDATADIR=\"$(DATADIR)\" ++ nestopia_CPPFLAGS += -I/usr/local/include -I/usr/local/opt/libarchive/include ++ nestopia_LIBS += -Wl -L/usr/local/opt/libarchive/lib ++ nestopia_LIBS += -larchive -lepoxy -lao + # GTK Stuff - Comment this section to disable GTK+ + #CFLAGS += $(shell pkg-config --cflags gtk+-3.0) + #LIBS += $(shell pkg-config --libs gtk+-3.0) +@@ -43,12 +35,12 @@ + #WARNINGS += -Wno-deprecated-declarations + # end GTK + else +- DEFINES = -DDATADIR=\"$(DATADIR)\" +- LIBS += -larchive -lepoxy -lGL -lGLU -lao ++ nestopia_CPPFLAGS += -DDATADIR=\"$(DATADIR)\" ++ nestopia_LIBS += -larchive -lepoxy -lGL -lGLU -lao + # GTK Stuff - Comment this section to disable GTK+ +- CFLAGS += $(shell pkg-config --cflags gtk+-3.0) +- LIBS += $(shell pkg-config --libs gtk+-3.0) +- DEFINES += -D_GTK ++ nestopia_CPPFLAGS += $(shell pkg-config --cflags gtk+-3.0) ++ nestopia_LIBS += $(shell pkg-config --libs gtk+-3.0) ++ nestopia_CPPFLAGS += -D_GTK + IOBJS += objs/unix/gtkui/gtkui.o + IOBJS += objs/unix/gtkui/gtkui_archive.o + IOBJS += objs/unix/gtkui/gtkui_callbacks.o +@@ -374,11 +366,11 @@ + + # Core rules + objs/core/%.o: source/core/%.cpp +- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ ++ $(CXX) $(nestopia_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(WARNINGS) -c $< -o $@ + + # Interface rules + objs/unix/%.o: source/unix/%.cpp +- $(CXX) $(CXXFLAGS) $(INCLUDES) $(WARNINGS) $(DEFINES) $(CFLAGS) -c $< -o $@ ++ $(CXX) $(nestopia_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(WARNINGS) -c $< -o $@ + + all: maketree $(BIN) + +@@ -392,19 +384,28 @@ + @mkdir -p $@ + + $(BIN): $(OBJS) $(IOBJS) +- $(CC) $(LDFLAGS) $^ $(LIBS) -o $(BIN) ++ $(CXX) $(LDFLAGS) $(CXXFLAGS) $^ $(nestopia_LIBS) $(LIBS) -o $(BIN) + + install: +- mkdir -p $(BINDIR) +- mkdir -p $(DATADIR)/icons +- mkdir -p $(PREFIX)/share/pixmaps +- install -m 0755 $(BIN) $(BINDIR) +- install -m 0644 source/unix/icons/nestopia.desktop $(DATADIR) +- install -m 0644 NstDatabase.xml $(DATADIR) +- install -m 0644 source/unix/icons/*.png $(DATADIR)/icons +- install -m 0644 source/unix/icons/*.svg $(DATADIR)/icons +- install -m 0644 source/unix/icons/nestopia.svg $(PREFIX)/share/pixmaps +- xdg-desktop-menu install --novendor $(DATADIR)/nestopia.desktop ++ mkdir -p $(DESTDIR)$(BINDIR) ++ mkdir -p $(DESTDIR)$(DATADIR) ++ mkdir -p $(DESTDIR)$(PREFIX)/share/applications/ ++ mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps ++ mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps ++ mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/64x64/apps ++ mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/96x96/apps ++ mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps ++ mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps ++ mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps ++ install -m 0755 $(BIN) $(DESTDIR)$(BINDIR) ++ install -m 0644 NstDatabase.xml $(DESTDIR)$(DATADIR) ++ install -m 0644 source/unix/icons/nestopia.desktop $(DESTDIR)$(PREFIX)/share/applications/ ++ install -m 0644 source/unix/icons/nestopia32.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/32x32/apps/nestopia.png ++ install -m 0644 source/unix/icons/nestopia48.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/nestopia.png ++ install -m 0644 source/unix/icons/nestopia64.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/64x64/apps/nestopia.png ++ install -m 0644 source/unix/icons/nestopia96.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/96x96/apps/nestopia.png ++ install -m 0644 source/unix/icons/nestopia128.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/nestopia.png ++ install -m 0644 source/unix/icons/*.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps + + uninstall: + xdg-desktop-menu uninstall $(DATADIR)/nestopia.desktop 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 new file mode 100644 index 000000000000..c63b9debbab2 --- /dev/null +++ b/games-emulation/nestopia/files/nestopia-1.47-fix-c++14.patch @@ -0,0 +1,43 @@ +Fix compiling with C++14 due to bit-shifting of negative integers. +See also: https://bugs.gentoo.org/show_bug.cgi?id=597364 + +--- a/source/core/NstCore.hpp ++++ b/source/core/NstCore.hpp +@@ -279,14 +279,14 @@ + template<typename T>
+ inline long signed_shl(T v,uint c)
+ {
+- enum {NATIVE = T(-7) << 1 == -14};
++ enum {NATIVE = T(-(7 << 1)) == -14};
+ return Helper::ShiftSigned<T,NATIVE>::Left( v, c );
+ }
+
+ template<typename T>
+ inline long signed_shr(T v,uint c)
+ {
+- enum {NATIVE = T(-7) >> 1 == -4 || T(-7) >> 1 == -3};
++ enum {NATIVE = T(-(7 >> 1)) == -4 || T(-(7 >> 1)) == -3};
+ return Helper::ShiftSigned<T,NATIVE>::Right( v, c );
+ }
+
+--- a/source/unix/gtkui/gtkui.cpp ++++ b/source/unix/gtkui/gtkui.cpp +@@ -438,7 +438,7 @@ + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_INFO, + GTK_BUTTONS_OK, +- message); ++ "%s", message); + gtk_dialog_run(GTK_DIALOG(messagewindow)); + gtk_widget_destroy(messagewindow); + } +--- a/source/unix/gtkui/gtkui.h ++++ b/source/unix/gtkui/gtkui.h +@@ -8,7 +8,6 @@ + #elif _APPLE + #else + #include <gdk/gdkx.h> +-#include <gdk/gdkwayland.h> + #endif + + void gtkui_init(int argc, char *argv[]); |