commit 599f6c1cf1c78db36c9935a4d7479b3e384eeb55
Author: Andrea Musuruane <musuruan(a)gmail.com>
Date: Sun Jun 19 10:15:40 2022 +0200
Updated to upstream version 0.9.13
Spec file clean up
.gitignore | 1 +
desmume-0.9.11-dontlookinbuilddir.patch | 15 ---
desmume-0.9.11-null_terminator.patch | 12 ---
desmume-0.9.11-tinyxml.patch | 181 -------------------------------
desmume-0.9.13-formatstring.patch | 21 ++++
desmume-0.9.13-tinyxml.patch | 43 ++++++++
desmume.spec | 183 +++++++++-----------------------
gcc6_fixes.patch | 46 --------
sources | 2 +-
9 files changed, 118 insertions(+), 386 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index dc1df0e..40c3b23 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
desmume-0.9.11.tar.gz
+/desmume-0.9.13.tar.gz
diff --git a/desmume-0.9.13-formatstring.patch b/desmume-0.9.13-formatstring.patch
new file mode 100644
index 0000000..dfd49d1
--- /dev/null
+++ b/desmume-0.9.13-formatstring.patch
@@ -0,0 +1,21 @@
+diff -durN desmume-release_0_9_13.orig/desmume/src/commandline.cpp
desmume-release_0_9_13/desmume/src/commandline.cpp
+--- desmume-release_0_9_13.orig/desmume/src/commandline.cpp 2022-05-23 06:37:41.000000000
+0200
++++ desmume-release_0_9_13/desmume/src/commandline.cpp 2022-06-18 18:40:49.218922840
+0200
+@@ -31,7 +31,7 @@
+ #include <compat/getopt.h>
+ //#include "frontend/modules/mGetOpt.h" //to test with this, make sure global
`optind` is initialized to 1
+
+-#define printerror(...) fprintf(stderr, __VA_ARGS__)
++#define printerror(...) fprintf(stderr, "%s", __VA_ARGS__)
+
+ int _scanline_filter_a = 0, _scanline_filter_b = 2, _scanline_filter_c = 2,
_scanline_filter_d = 4;
+ int _commandline_linux_nojoy = 0;
+@@ -397,7 +397,7 @@
+
+ if(opt_help)
+ {
+- printf(help_string);
++ printf("%s", help_string);
+ exit(1);
+ }
+
diff --git a/desmume-0.9.13-tinyxml.patch b/desmume-0.9.13-tinyxml.patch
new file mode 100644
index 0000000..bd59d7c
--- /dev/null
+++ b/desmume-0.9.13-tinyxml.patch
@@ -0,0 +1,43 @@
+diff -durN desmume-release_0_9_13.orig/desmume/src/frontend/posix/meson.build
desmume-release_0_9_13/desmume/src/frontend/posix/meson.build
+--- desmume-release_0_9_13.orig/desmume/src/frontend/posix/meson.build 2022-05-23
06:37:41.000000000 +0200
++++ desmume-release_0_9_13/desmume/src/frontend/posix/meson.build 2022-06-18
19:22:06.688637556 +0200
+@@ -15,6 +15,7 @@
+ dep_pcap = dependency('pcap')
+ dep_zlib = dependency('zlib')
+ dep_threads = dependency('threads')
++dep_tinyxml = dependency('tinyxml')
+ dep_gl = dependency('gl', required: false)
+ dep_openal = dependency('openal', required: get_option('openal'))
+ dep_alsa = dependency('alsa', required: false)
+@@ -28,7 +29,7 @@
+ add_global_arguments('-DEXPERIMENTAL_WIFI_COMM', language: ['c',
'cpp'])
+ endif
+
+-dependencies = [dep_glib2, dep_sdl, dep_pcap, dep_zlib, dep_threads]
++dependencies = [dep_glib2, dep_sdl, dep_pcap, dep_zlib, dep_threads, dep_tinyxml]
+
+ if target_machine.cpu() == 'x86_64'
+ add_global_arguments('-DHAVE_JIT', language: ['c', 'cpp'])
+@@ -99,10 +100,6 @@
+ '../../utils/libfat/libfat_public_api.cpp',
+ '../../utils/libfat/lock.cpp',
+ '../../utils/libfat/partition.cpp',
+- '../../utils/tinyxml/tinystr.cpp',
+- '../../utils/tinyxml/tinyxml.cpp',
+- '../../utils/tinyxml/tinyxmlerror.cpp',
+- '../../utils/tinyxml/tinyxmlparser.cpp',
+ '../../utils/colorspacehandler/colorspacehandler.cpp',
+ '../../addons/slot2_auto.cpp', '../../addons/slot2_mpcf.cpp',
'../../addons/slot2_paddle.cpp', '../../addons/slot2_gbagame.cpp',
'../../addons/slot2_none.cpp', '../../addons/slot2_rumblepak.cpp',
'../../addons/slot2_guitarGrip.cpp', '../../addons/slot2_expMemory.cpp',
'../../addons/slot2_piano.cpp', '../../addons/slot2_passme.cpp',
'../../addons/slot1_none.cpp', '../../addons/slot1_r4.cpp',
'../../addons/slot1_retail_nand.cpp',
'../../addons/slot1_retail_auto.cpp',
'../../addons/slot1_retail_mcrom.cpp',
'../../addons/slot1_retail_mcrom_debug.cpp',
'../../addons/slot1comp_mc.cpp', '../../addons/slot1comp_rom.cpp',
'../../addons/slot1comp_protocol.cpp',
+ '../../cheatSystem.cpp',
+diff -durN desmume-release_0_9_13.orig/desmume/src/utils/advanscene.cpp
desmume-release_0_9_13/desmume/src/utils/advanscene.cpp
+--- desmume-release_0_9_13.orig/desmume/src/utils/advanscene.cpp 2022-05-23
06:37:41.000000000 +0200
++++ desmume-release_0_9_13/desmume/src/utils/advanscene.cpp 2022-06-18 19:14:40.054101672
+0200
+@@ -19,7 +19,7 @@
+ #include <time.h>
+
+ #define TIXML_USE_STL
+-#include "tinyxml/tinyxml.h"
++#include <tinyxml.h>
+
+ #include "advanscene.h"
+ #include "../common.h"
diff --git a/desmume.spec b/desmume.spec
index f991b1a..6e62519 100644
--- a/desmume.spec
+++ b/desmume.spec
@@ -1,55 +1,46 @@
+%define pkgversion %(echo %version|sed "s/\\\\\./_/g")
+
Name: desmume
-Version: 0.9.11
-Release: 15%{?dist}
+Version: 0.9.13
+Release: 1%{?dist}
Summary: A Nintendo DS emulator
License: GPLv2+
URL:
http://desmume.org/
-Source0:
http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
-# Do not look into builddir
-Patch0: %{name}-0.9.11-dontlookinbuilddir.patch
+Source0:
https://github.com/TASEmulators/desmume/archive/release_%{pkgversion}/%{n...
+# Fix format strings
+Patch0: %{name}-0.9.13-formatstring.patch
# Use system tinyxml instead of the embedded copy
-Patch1: %{name}-0.9.11-tinyxml.patch
-# Compile with gcc6
-Patch2: gcc6_fixes.patch
-# Fix check for null terminator
-Patch3: %{name}-0.9.11-null_terminator.patch
+Patch1: %{name}-0.9.13-tinyxml.patch
BuildRequires: gcc-c++
-BuildRequires: gtkglext-devel
-BuildRequires: libglade2-devel
-BuildRequires: openal-soft-devel
-BuildRequires: lua-devel
-BuildRequires: zziplib-devel
-# Retired from Fedora for F25+
-%if 0%{?fedora} <= 24
-BuildRequires: agg-devel
-%endif
-BuildRequires: tinyxml-devel
-BuildRequires: soundtouch-devel >= 1.5.0
-BuildRequires: libpcap-devel
-BuildRequires: gettext
-BuildRequires: intltool
+BuildRequires: meson
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(sdl2)
+BuildRequires: pkgconfig(libpcap)
+BuildRequires: pkgconfig(zlib)
+BuildRequires: pkgconfig(gl)
+BuildRequires: pkgconfig(openal)
+BuildRequires: pkgconfig(alsa)
+BuildRequires: pkgconfig(soundtouch)
+BuildRequires: pkgconfig(gtk+-3.0)
+BuildRequires: pkgconfig(tinyxml)
BuildRequires: desktop-file-utils
+BuildRequires: libappstream-glib
Requires: hicolor-icon-theme
+# desmume-glade is no longer provided
+Provides: desmume-glade = %{version}-%{release}
+Obsoletes: desmume-glade < 0.9.13
-%package glade
-Summary: A Nintendo DS emulator (Glade GUI version)
-Group: Applications/Emulators
%package cli
Summary: A Nintendo DS emulator (CLI version)
-Group: Applications/Emulators
%description
DeSmuME is a Nintendo DS emulator running homebrew demos and commercial games.
-%description glade
-DeSmuME is a Nintendo DS emulator running homebrew demos and commercial games.
-
-This is the GTK/Glade version.
%description cli
DeSmuME is a Nintendo DS emulator running homebrew demos and commercial games.
@@ -58,12 +49,9 @@ This is the CLI version.
%prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
-sed -i 's/\r//' src/MMU_timing.h
-%patch2 -p1
-%patch3 -p1
+%autosetup -p1 -n %{name}-release_%{pkgversion}
+
+pushd desmume
# Remove bundled tinyxml
rm -rf src/utils/tinyxml
@@ -72,7 +60,7 @@ rm -rf src/utils/tinyxml
sed -i 's/\r//' AUTHORS
# Fix file encoding
-for txtfile in ChangeLog AUTHORS
+for txtfile in AUTHORS
do
iconv --from=ISO-8859-1 --to=UTF-8 $txtfile > tmp
touch -r $txtfile tmp
@@ -80,120 +68,53 @@ do
done
# Fix premissions
-chmod 644 COPYING README README.LIN
-chmod 644 src/filter/hq4x.dat
-chmod 644 src/gtk/DeSmuME.xpm
find src -name *.[ch]* -exec chmod 644 {} \;
-# Fix glade path
-sed -i 's|gladedir = $(datadir)/desmume/glade|gladedir =
$(datadir)/desmume-glade/|g' src/gtk-glade/Makefile.{am,in}
-
-# We need a different icon for desmume-glade
-sed -i 's|Icon=DeSmuME|Icon=DeSmuME-glade|g' src/gtk-glade/desmume-glade.desktop
-
-# Fix gettext package name
-sed -i 's|GETTEXT_PACKAGE=desmume|GETTEXT_PACKAGE=desmume-glade|g'
configure{,.ac}
+popd
%build
-%configure \
- --enable-glx \
- --enable-openal \
- --enable-glade \
- --enable-wifi
-make %{?_smp_mflags}
-
+pushd desmume/src/frontend/posix
+%meson
+%meson_build
+popd
%install
-make install DESTDIR=%{buildroot}
-
-# Remove installed icon
-rm %{buildroot}%{_datadir}/pixmaps/DeSmuME.xpm
-
-# Install icons
-mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps
-install -m 644 src/gtk/DeSmuME.xpm %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/
-install -m 644 src/gtk/DeSmuME.xpm
%{buildroot}%{_datadir}/icons/hicolor/32x32/apps/DeSmuME-glade.xpm
-
-# Rename desktop files and fix categories
-mkdir -p %{buildroot}%{_datadir}/applications
-desktop-file-install \
- --delete-original \
- --remove-key Version \
- --remove-category GNOME \
- --remove-category GTK \
- --dir %{buildroot}%{_datadir}/applications \
- %{buildroot}%{_datadir}/applications/%{name}.desktop
-
-desktop-file-install \
- --delete-original \
- --remove-key Version \
- --remove-category GNOME \
- --remove-category GTK \
- --dir %{buildroot}%{_datadir}/applications \
- %{buildroot}%{_datadir}/applications/%{name}-glade.desktop
-
-%find_lang %{name}-glade
+pushd desmume/src/frontend/posix
+%meson_install
+popd
+# Validate desktop file
+desktop-file-validate \
+ %{buildroot}%{_datadir}/applications/org.desmume.DeSmuME.desktop
-%post
-/usr/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
-/usr/bin/update-desktop-database &> /dev/null || :
-
-%post glade
-/usr/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
-
-
-%postun
-if [ $1 -eq 0 ] ; then
- /usr/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
- /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-fi
-/usr/bin/update-desktop-database &> /dev/null || :
-
-
-%postun glade
-if [ $1 -eq 0 ] ; then
- /usr/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
- /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-fi
-
-
-%posttrans
-/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-
-
-%posttrans glade
-/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+# Verify AppData file
+appstream-util validate-relax --nonet \
+ %{buildroot}%{_metainfodir}/org.desmume.DeSmuME.metainfo.xml
%files
-%doc AUTHORS ChangeLog README README.LIN
-%license COPYING
+%doc desmume/AUTHORS desmume/ChangeLog desmume/README desmume/README.LIN
+%license desmume/COPYING
%{_bindir}/%{name}
-%{_datadir}/icons/hicolor/32x32/apps/DeSmuME.xpm
-%{_datadir}/applications/%{name}.desktop
+%{_datadir}/icons/hicolor/*/apps/org.desmume.DeSmuME.*
+%{_datadir}/applications/org.desmume.DeSmuME.desktop
%{_mandir}/man1/%{name}.1*
-
-
-%files glade -f %{name}-glade.lang
-%doc AUTHORS ChangeLog README README.LIN
-%license COPYING
-%{_bindir}/%{name}-glade
-%{_datadir}/%{name}-glade
-%{_datadir}/icons/hicolor/32x32/apps/DeSmuME-glade.xpm
-%{_datadir}/applications/%{name}-glade.desktop
-%{_mandir}/man1/%{name}-glade.1*
+%{_metainfodir}/org.desmume.DeSmuME.metainfo.xml
%files cli
-%doc AUTHORS ChangeLog README README.LIN
-%license COPYING
+%doc desmume/AUTHORS desmume/ChangeLog desmume/README desmume/README.LIN
+%license desmume/COPYING
%{_bindir}/%{name}-cli
%{_mandir}/man1/%{name}-cli.1*
%changelog
+* Sat Jun 18 2022 Andrea Musuruane <musuruan(a)gmail.com> - 0.9.13-1
+- Updated to upstream version 0.9.13
+- Spec file clean up
+
* Wed Feb 09 2022 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
0.9.11-15
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
diff --git a/sources b/sources
index b4e967d..671e5b2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-269b5d4ddc5715720469a9d0efc53044 desmume-0.9.11.tar.gz
+SHA512 (desmume-0.9.13.tar.gz) =
76bd4af8a9a8412ca406d6021f53eb04acd680c1661c052b57cf410e2c5aecd8d45fd5df9027a3ee5ba7c9fe87b7d105b4cfd801a011a6aaf9ab8b8eab85c50d