summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2016-12-30 22:37:33 +0200
committerDavid Seifert <soap@gentoo.org>2016-12-30 22:37:56 +0200
commitaf86d3b8aefc35023717e6cfd3ed15980471bb26 (patch)
tree849e46c8e992a25f5d2b24ab0cbff1ae008722b5 /games-emulation
parentkde-apps/messagelib: Block oldpim kmail (file collision) (diff)
downloadgentoo-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')
-rw-r--r--games-emulation/nestopia/Manifest1
-rw-r--r--games-emulation/nestopia/files/nestopia-1.47-fix-buildsystem.patch120
-rw-r--r--games-emulation/nestopia/files/nestopia-1.47-fix-c++14.patch43
-rw-r--r--games-emulation/nestopia/nestopia-1.47.ebuild54
4 files changed, 218 insertions, 0 deletions
diff --git a/games-emulation/nestopia/Manifest b/games-emulation/nestopia/Manifest
index 809f35aeae4..a13c7e27814 100644
--- a/games-emulation/nestopia/Manifest
+++ b/games-emulation/nestopia/Manifest
@@ -1 +1,2 @@
DIST nestopia-1.46.2.tgz 1223407 SHA256 4a5065726ad9e7a120a2c6aa39b9c0904090119998a4d690d4deb5e374118fc0 SHA512 3aa87e98aa24b71e5feac5ffe8229e97d407fc0b14567b0ddbe7cc1eaca08a08f435a6fe294fbbd7066054befdfd27602db7c3c0577246b0e8addfe296404a23 WHIRLPOOL 25c43194797e5edca3abc5cb75dba126d9d246e9ab12270521e7fe6c13427b371ba9f92a71ed557271f159711411286b5ac5ab3fe06144760320531c33bf0c02
+DIST nestopia-1.47.tgz 1306183 SHA256 84624d30ab05d609db2734db0065616b268f79d4aa35f1cd90cb35ee8d96be0c SHA512 27155a82ca9631623c4800110371ec374de2c3d649d3274c9495b58ddede36bfb4a6f52e39552d55e0e90795cd779c3331c488c557aba6b738998e19f1d3bf72 WHIRLPOOL 4f30b66e1eb229419fa4862db2b3828cb983dcba9f0cac531f84e45a885db2bfdbb24cc33a87729f524922c42aa761d0294e53c5ffa00540dd20765a79e08c41
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 00000000000..ed52eb189c9
--- /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 00000000000..c63b9debbab
--- /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[]);
diff --git a/games-emulation/nestopia/nestopia-1.47.ebuild b/games-emulation/nestopia/nestopia-1.47.ebuild
new file mode 100644
index 00000000000..941373c3ff5
--- /dev/null
+++ b/games-emulation/nestopia/nestopia-1.47.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit gnome2-utils toolchain-funcs
+
+MY_P=${P/ue/}
+DESCRIPTION="A portable Nintendo Entertainment System emulator written in C++"
+HOMEPAGE="http://0ldsk00l.ca/nestopia/"
+SRC_URI="mirror://sourceforge/nestopiaue/${PV%.*}/${MY_P}.tgz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="
+ app-arch/libarchive:=
+ media-libs/libao
+ media-libs/libsdl2[sound,joystick,video]
+ sys-libs/zlib
+ virtual/opengl
+ virtual/glu
+ x11-libs/gtk+:3"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( AUTHORS changelog.txt README.md README.unix )
+HTML_DOCS=( readme.html )
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.47-fix-buildsystem.patch
+ "${FILESDIR}"/${PN}-1.47-fix-c++14.patch
+)
+
+src_configure() {
+ tc-export CXX
+ use doc && HTML_DOCS+=( doc/. )
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}