commit c309839e20e718fde5b32142da04388734a99386
Author: Andrea Musuruane <musuruan(a)gmail.com>
Date: Sun Oct 22 09:48:51 2017 +0200
Updated to new upstream release
Added AppData from Debian
.gitignore | 1 +
Nestopia-1.47-buildflags.patch | 20 ---------
Nestopia-1.47-format-security.patch | 13 ------
Nestopia-1.47-install-location.patch | 32 --------------
Nestopia-1.47-use-system-nes_ntsc.patch | 35 ---------------
Nestopia-1.47-use-system-zlib.patch | 14 ------
Nestopia-1.48-use-system-nes_ntsc.patch | 42 ++++++++++++++++++
Nestopia.spec | 78 ++++++++++++++-------------------
nestopia.appdata.xml | 25 +++++++++++
sources | 2 +-
10 files changed, 101 insertions(+), 161 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 3189e2e..a9fd0b3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
nestopia-1.45.tgz
/nestopia-1.47.tgz
+/nestopia-1.48.tar.gz
diff --git a/Nestopia-1.48-use-system-nes_ntsc.patch
b/Nestopia-1.48-use-system-nes_ntsc.patch
new file mode 100644
index 0000000..7be28c5
--- /dev/null
+++ b/Nestopia-1.48-use-system-nes_ntsc.patch
@@ -0,0 +1,42 @@
+diff -durN nestopia-1.48.orig/Makefile.am nestopia-1.48/Makefile.am
+--- nestopia-1.48.orig/Makefile.am 2017-09-03 22:32:25.000000000 +0200
++++ nestopia-1.48/Makefile.am 2017-10-21 18:57:22.632895583 +0200
+@@ -8,6 +8,7 @@
+
+ nestopia_CPPFLAGS = \
+ -I$(top_srcdir)/source \
++ -I$(top_srcdir)/source/nes_ntsc \
+ -DDATADIR=\"$(datadir)/nestopia\" \
+ -DDATAROOTDIR=\"$(datarootdir)\" \
+ -DNST_PRAGMA_ONCE \
+@@ -18,6 +19,7 @@
+ $(LIBEPOXY_CFLAGS)
+ nestopia_LDADD = \
+ $(ZLIB_LIBS) \
++ -lnes_ntsc \
+ $(LIBARCHIVE_LIBS) \
+ $(LIBAO_LIBS) \
+ $(SDL2_LIBS) \
+diff -durN nestopia-1.48.orig/source/core/NstVideoFilterNtscCfg.cpp
nestopia-1.48/source/core/NstVideoFilterNtscCfg.cpp
+--- nestopia-1.48.orig/source/core/NstVideoFilterNtscCfg.cpp 2017-09-03
22:32:25.000000000 +0200
++++ nestopia-1.48/source/core/NstVideoFilterNtscCfg.cpp 2017-10-21 18:22:20.277346003
+0200
+@@ -34,7 +34,6 @@
+ #endif
+
+ #define NES_NTSC_NO_BLITTERS
+-#include "../nes_ntsc/nes_ntsc.inl"
+
+ #ifdef _MSC_VER
+ #pragma warning( pop )
+diff -durN nestopia-1.48.orig/source/core/NstVideoFilterNtsc.hpp
nestopia-1.48/source/core/NstVideoFilterNtsc.hpp
+--- nestopia-1.48.orig/source/core/NstVideoFilterNtsc.hpp 2017-09-03 22:32:25.000000000
+0200
++++ nestopia-1.48/source/core/NstVideoFilterNtsc.hpp 2017-10-21 18:22:48.776599992 +0200
+@@ -25,7 +25,7 @@
+ #ifndef NST_VIDEO_FILTER_NTSC_H
+ #define NST_VIDEO_FILTER_NTSC_H
+
+-#include "../nes_ntsc/nes_ntsc.h"
++#include <nes_ntsc.h>
+
+ #ifdef NST_PRAGMA_ONCE
+ #pragma once
diff --git a/Nestopia.spec b/Nestopia.spec
index 9650767..4382cfc 100644
--- a/Nestopia.spec
+++ b/Nestopia.spec
@@ -1,35 +1,32 @@
%global realname nestopia
Name: Nestopia
-Version: 1.47
-Release: 3%{?dist}
+Version: 1.48
+Release: 1%{?dist}
Summary: A portable open source NES/Famicom emulator
License: GPLv2+
URL:
http://0ldsk00l.ca/nestopia/
-Source0:
http://downloads.sourceforge.net/nestopiaue/%{version}/%{realname}-%{vers...
+Source0:
https://github.com/rdanbrook/%{realname}/archive/%{version}/%{realname}-%...
# Debian man page
Source1: %{realname}.6
-# Install to FHS-compliant locations and handle DESTDIR
-Patch0: %{name}-1.47-install-location.patch
-# Use a format specifier with gtk_message_dialog_new
-Patch1: %{name}-1.47-format-security.patch
-# Preserve externally-provided build flags
-Patch2: %{name}-1.47-buildflags.patch
-# Use system zlib
-Patch3: %{name}-1.47-use-system-zlib.patch
+# AppData from Debian
+Source2: %{realname}.appdata.xml
# Use system nes_ntsc
-Patch4: %{name}-1.47-use-system-nes_ntsc.patch
+Patch0: %{name}-1.48-use-system-nes_ntsc.patch
+BuildRequires: autoconf
+BuildRequires: autoconf-archive
+BuildRequires: automake
BuildRequires: gtk3-devel
BuildRequires: SDL2-devel
BuildRequires: libarchive-devel
BuildRequires: zlib-devel
-BuildRequires: mesa-libGL-devel
-BuildRequires: mesa-libGLU-devel
+BuildRequires: libepoxy-devel
BuildRequires: nes_ntsc-devel
BuildRequires: libao-devel
BuildRequires: desktop-file-utils
+BuildRequires: libappstream-glib
Requires: hicolor-icon-theme
%description
@@ -41,54 +38,38 @@ full support for software that do mid-scanline and other timing
trickery.
%prep
%setup -q -n %{realname}-%{version}
%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-
-# Link system nes_ntsc lib
-sed -i 's/ -lz/ -lz -lnes_ntsc/' Makefile
# Fix end-of-line encoding
-sed -i 's/\r//' changelog.txt
+sed -i 's/\r//' ChangeLog
# Remove bundled libs
-rm -rf source/zlib
-rm -rf source/nes_ntsc/{*.c,*.inl,demo_impl.h,nes_ntsc.h,nes_ntsc_impl.h}
+find source/nes_ntsc/ -type f -not -name "nes_ntsc_config.h" -delete
+
%build
-# Wordaround FTBFS with GCC 6
-%global optflags %{optflags} -std=gnu++98
+autoreconf -fvi
+%configure --disable-silent-rules
+%make_build
-export CFLAGS="%{optflags}"
-export CXXFLAGS="%{optflags}"
-# It does not compile with smp_mflags
-make
%install
-export PREFIX="%{_prefix}"
-export BINDIR="%{_bindir}"
%make_install
+# Move docs to %%{_pkgdocdir}
+mv %{buildroot}%{_docdir}/%{realname} %{buildroot}%{_pkgdocdir}
+
# Validate desktop file
desktop-file-validate \
%{buildroot}%{_datadir}/applications/%{realname}.desktop
-# Move icon into %%{_datadir}/icons/hicolor/
-install -d %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
-mv %{buildroot}%{_datadir}/pixmaps/%{realname}.svg \
- %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
-
-# Install icons
-for i in 32 48 64 96 128; do
- install -d %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps
- install -p -m 644 source/unix/icons/%{realname}${i}.png \
- %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{realname}.png
-done
-
# Install man page
install -d %{buildroot}%{_mandir}/man6
-install -p -m 0644 %{SOURCE1} %{buildroot}%{_mandir}/man6/
+install -p -m 644 %{SOURCE1} %{buildroot}%{_mandir}/man6/
+
+# Install AppData file
+install -d %{buildroot}%{_datadir}/appdata
+install -p -m 644 %{SOURCE2} %{buildroot}%{_datadir}/appdata
+appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/*.appdata.xml
%post
@@ -110,12 +91,17 @@ fi
%{_bindir}/%{realname}
%{_datadir}/%{realname}
%{_datadir}/icons/hicolor/*/apps/*
+%{_datadir}/appdata/%{realname}.appdata.xml
%{_datadir}/applications/%{realname}.desktop
%{_mandir}/man6/*
%license COPYING
-%doc AUTHORS changelog.txt README.md README.unix readme.html
+%doc %{_pkgdocdir}
%changelog
+* Sat Oct 21 2017 Andrea Musuruane <musuruan(a)gmail.com> - 1.48-1
+- Updated to new upstream release
+- Added AppData from Debian
+
* Thu Aug 31 2017 RPM Fusion Release Engineering <kwizart(a)rpmfusion.org> - 1.47-3
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
diff --git a/nestopia.appdata.xml b/nestopia.appdata.xml
new file mode 100644
index 0000000..2500731
--- /dev/null
+++ b/nestopia.appdata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop">
+ <id>nestopia.desktop</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>GPL-2.0+</project_license>
+ <name>Nestopia</name>
+ <summary>Accurate NES emulator</summary>
+ <description>
+ <p>Nestopia is a cycle-accurate NES/Famicom emulator.
+ It has a high compatibility rate and support for
+ many peripherals and input devices.</p>
+ <p>Features:</p>
+ <ul>
+ <li>Save states</li>
+ <li>Movie recording</li>
+ <li>Game rewinding</li>
+ <li>GUI or command line interface</li>
+ <li>Emulation of NTSC, PAL, and Dendy systems</li>
+ <li>Support for NES Zapper games</li>
+ <li>Support for Famicom Disk System games</li>
+ </ul>
+ </description>
+ <url type="homepage">http://0ldsk00l.ca/nestopia/</url>
+ <url
type="bugtracker">https://github.com/rdanbrook/nestopia/issu...
+</component>
diff --git a/sources b/sources
index 5ac330e..2e47723 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-426c22ba9d9f7a5ece227bbe1de25982 nestopia-1.47.tgz
+b88c026ed368d43cd90335a90e998982 nestopia-1.48.tar.gz