desmume: copy debian patches

Obtained from
http://deb.debian.org/debian/pool/main/d/desmume/desmume_0.9.11-3.diff.gz
since desmume never moved to salsa.debian.org (previously on
anonscm.debian.org as a subversion repo)
This commit is contained in:
Linus Heckemann 2019-10-04 12:03:09 +02:00
parent 761df21d6f
commit c6be8bfc10
4 changed files with 313 additions and 6 deletions

View file

@ -0,0 +1,231 @@
From: Evgeni Golov <evgeni@debian.org>
Subject: use the system tinyxml instead of the embedded copy
Last-Update: 2015-08-09
diff --git a/src/Makefile.am b/src/Makefile.am
index 7b9e263..bc7ba8c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -81,12 +81,6 @@ libdesmume_a_SOURCES = \
utils/libfat/mem_allocate.h \
utils/libfat/partition.cpp \
utils/libfat/partition.h \
- utils/tinyxml/tinystr.cpp \
- utils/tinyxml/tinystr.h \
- utils/tinyxml/tinyxml.cpp \
- utils/tinyxml/tinyxml.h \
- utils/tinyxml/tinyxmlerror.cpp \
- utils/tinyxml/tinyxmlparser.cpp \
utils/glcorearb.h \
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_mc.h addons/slot1comp_rom.h addons/slot1comp_rom.cpp addons/slot1comp_protocol.h addons/slot1comp_protocol.cpp \
cheatSystem.cpp cheatSystem.h \
@@ -204,3 +198,4 @@ if HAVE_GDB_STUB
libdesmume_a_SOURCES += gdbstub.h
endif
libdesmume_a_LIBADD = fs-$(desmume_arch).$(OBJEXT)
+LIBS += -ltinyxml
diff --git a/src/Makefile.in b/src/Makefile.in
index 9cf26a3..d9ff7b2 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -184,9 +184,6 @@ am__libdesmume_a_SOURCES_DIST = armcpu.cpp armcpu.h \
utils/libfat/libfat_public_api.h utils/libfat/lock.cpp \
utils/libfat/lock.h utils/libfat/mem_allocate.h \
utils/libfat/partition.cpp utils/libfat/partition.h \
- utils/tinyxml/tinystr.cpp utils/tinyxml/tinystr.h \
- utils/tinyxml/tinyxml.cpp utils/tinyxml/tinyxml.h \
- utils/tinyxml/tinyxmlerror.cpp utils/tinyxml/tinyxmlparser.cpp \
utils/glcorearb.h addons/slot2_auto.cpp addons/slot2_mpcf.cpp \
addons/slot2_paddle.cpp addons/slot2_gbagame.cpp \
addons/slot2_none.cpp addons/slot2_rumblepak.cpp \
@@ -324,10 +321,6 @@ am_libdesmume_a_OBJECTS = armcpu.$(OBJEXT) arm_instructions.$(OBJEXT) \
utils/libfat/libfat.$(OBJEXT) \
utils/libfat/libfat_public_api.$(OBJEXT) \
utils/libfat/lock.$(OBJEXT) utils/libfat/partition.$(OBJEXT) \
- utils/tinyxml/tinystr.$(OBJEXT) \
- utils/tinyxml/tinyxml.$(OBJEXT) \
- utils/tinyxml/tinyxmlerror.$(OBJEXT) \
- utils/tinyxml/tinyxmlparser.$(OBJEXT) \
addons/slot2_auto.$(OBJEXT) addons/slot2_mpcf.$(OBJEXT) \
addons/slot2_paddle.$(OBJEXT) addons/slot2_gbagame.$(OBJEXT) \
addons/slot2_none.$(OBJEXT) addons/slot2_rumblepak.$(OBJEXT) \
@@ -475,7 +468,7 @@ LIBAGG_LIBS = @LIBAGG_LIBS@
LIBGLADE_CFLAGS = @LIBGLADE_CFLAGS@
LIBGLADE_LIBS = @LIBGLADE_LIBS@
LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
+LIBS = @LIBS@ -ltinyxml
LIBSOUNDTOUCH_CFLAGS = @LIBSOUNDTOUCH_CFLAGS@
LIBSOUNDTOUCH_LIBS = @LIBSOUNDTOUCH_LIBS@
LTLIBOBJS = @LTLIBOBJS@
@@ -625,9 +618,6 @@ libdesmume_a_SOURCES = armcpu.cpp armcpu.h arm_instructions.cpp \
utils/libfat/libfat_public_api.h utils/libfat/lock.cpp \
utils/libfat/lock.h utils/libfat/mem_allocate.h \
utils/libfat/partition.cpp utils/libfat/partition.h \
- utils/tinyxml/tinystr.cpp utils/tinyxml/tinystr.h \
- utils/tinyxml/tinyxml.cpp utils/tinyxml/tinyxml.h \
- utils/tinyxml/tinyxmlerror.cpp utils/tinyxml/tinyxmlparser.cpp \
utils/glcorearb.h addons/slot2_auto.cpp addons/slot2_mpcf.cpp \
addons/slot2_paddle.cpp addons/slot2_gbagame.cpp \
addons/slot2_none.cpp addons/slot2_rumblepak.cpp \
@@ -760,20 +750,6 @@ utils/libfat/lock.$(OBJEXT): utils/libfat/$(am__dirstamp) \
utils/libfat/$(DEPDIR)/$(am__dirstamp)
utils/libfat/partition.$(OBJEXT): utils/libfat/$(am__dirstamp) \
utils/libfat/$(DEPDIR)/$(am__dirstamp)
-utils/tinyxml/$(am__dirstamp):
- @$(MKDIR_P) utils/tinyxml
- @: > utils/tinyxml/$(am__dirstamp)
-utils/tinyxml/$(DEPDIR)/$(am__dirstamp):
- @$(MKDIR_P) utils/tinyxml/$(DEPDIR)
- @: > utils/tinyxml/$(DEPDIR)/$(am__dirstamp)
-utils/tinyxml/tinystr.$(OBJEXT): utils/tinyxml/$(am__dirstamp) \
- utils/tinyxml/$(DEPDIR)/$(am__dirstamp)
-utils/tinyxml/tinyxml.$(OBJEXT): utils/tinyxml/$(am__dirstamp) \
- utils/tinyxml/$(DEPDIR)/$(am__dirstamp)
-utils/tinyxml/tinyxmlerror.$(OBJEXT): utils/tinyxml/$(am__dirstamp) \
- utils/tinyxml/$(DEPDIR)/$(am__dirstamp)
-utils/tinyxml/tinyxmlparser.$(OBJEXT): utils/tinyxml/$(am__dirstamp) \
- utils/tinyxml/$(DEPDIR)/$(am__dirstamp)
addons/$(am__dirstamp):
@$(MKDIR_P) addons
@: > addons/$(am__dirstamp)
@@ -1035,10 +1011,6 @@ mostlyclean-compile:
-rm -f utils/libfat/partition.$(OBJEXT)
-rm -f utils/md5.$(OBJEXT)
-rm -f utils/task.$(OBJEXT)
- -rm -f utils/tinyxml/tinystr.$(OBJEXT)
- -rm -f utils/tinyxml/tinyxml.$(OBJEXT)
- -rm -f utils/tinyxml/tinyxmlerror.$(OBJEXT)
- -rm -f utils/tinyxml/tinyxmlparser.$(OBJEXT)
-rm -f utils/vfat.$(OBJEXT)
-rm -f utils/xstring.$(OBJEXT)
@@ -1175,10 +1147,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@utils/libfat/$(DEPDIR)/libfat_public_api.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@utils/libfat/$(DEPDIR)/lock.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@utils/libfat/$(DEPDIR)/partition.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@utils/tinyxml/$(DEPDIR)/tinystr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@utils/tinyxml/$(DEPDIR)/tinyxml.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@utils/tinyxml/$(DEPDIR)/tinyxmlerror.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@utils/tinyxml/$(DEPDIR)/tinyxmlparser.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -1449,8 +1417,6 @@ distclean-generic:
-rm -f utils/decrypt/$(am__dirstamp)
-rm -f utils/libfat/$(DEPDIR)/$(am__dirstamp)
-rm -f utils/libfat/$(am__dirstamp)
- -rm -f utils/tinyxml/$(DEPDIR)/$(am__dirstamp)
- -rm -f utils/tinyxml/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -1460,7 +1426,7 @@ clean: clean-recursive
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-recursive
- -rm -rf ./$(DEPDIR) addons/$(DEPDIR) filter/$(DEPDIR) metaspu/$(DEPDIR) utils/$(DEPDIR) utils/AsmJit/core/$(DEPDIR) utils/AsmJit/x86/$(DEPDIR) utils/decrypt/$(DEPDIR) utils/libfat/$(DEPDIR) utils/tinyxml/$(DEPDIR)
+ -rm -rf ./$(DEPDIR) addons/$(DEPDIR) filter/$(DEPDIR) metaspu/$(DEPDIR) utils/$(DEPDIR) utils/AsmJit/core/$(DEPDIR) utils/AsmJit/x86/$(DEPDIR) utils/decrypt/$(DEPDIR) utils/libfat/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -1506,7 +1472,7 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
- -rm -rf ./$(DEPDIR) addons/$(DEPDIR) filter/$(DEPDIR) metaspu/$(DEPDIR) utils/$(DEPDIR) utils/AsmJit/core/$(DEPDIR) utils/AsmJit/x86/$(DEPDIR) utils/decrypt/$(DEPDIR) utils/libfat/$(DEPDIR) utils/tinyxml/$(DEPDIR)
+ -rm -rf ./$(DEPDIR) addons/$(DEPDIR) filter/$(DEPDIR) metaspu/$(DEPDIR) utils/$(DEPDIR) utils/AsmJit/core/$(DEPDIR) utils/AsmJit/x86/$(DEPDIR) utils/decrypt/$(DEPDIR) utils/libfat/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/src/cli/Makefile.am b/src/cli/Makefile.am
index 1985209..d958323 100755
--- a/src/cli/Makefile.am
+++ b/src/cli/Makefile.am
@@ -5,7 +5,7 @@ AM_CPPFLAGS += $(SDL_CFLAGS) $(ALSA_CFLAGS) $(LIBAGG_CFLAGS) $(GLIB_CFLAGS) $(GT
bin_PROGRAMS = desmume-cli
desmume_cli_SOURCES = main.cpp ../sndsdl.cpp ../ctrlssdl.h ../ctrlssdl.cpp ../driver.h ../driver.cpp
-desmume_cli_LDADD = ../libdesmume.a $(SDL_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) $(GLIB_LIBS) $(GTHREAD_LIBS) $(LIBSOUNDTOUCH_LIBS)
+desmume_cli_LDADD = ../libdesmume.a $(SDL_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) $(GLIB_LIBS) $(GTHREAD_LIBS) $(LIBSOUNDTOUCH_LIBS) -ltinyxml
if HAVE_GDB_STUB
desmume_cli_LDADD += ../gdbstub/libgdbstub.a
endif
diff --git a/src/cli/Makefile.in b/src/cli/Makefile.in
index 14efd77..f04ab7d 100644
--- a/src/cli/Makefile.in
+++ b/src/cli/Makefile.in
@@ -311,7 +311,7 @@ AM_LDFLAGS =
desmume_cli_SOURCES = main.cpp ../sndsdl.cpp ../ctrlssdl.h ../ctrlssdl.cpp ../driver.h ../driver.cpp
desmume_cli_LDADD = ../libdesmume.a $(SDL_LIBS) $(ALSA_LIBS) \
$(LIBAGG_LIBS) $(GLIB_LIBS) $(GTHREAD_LIBS) \
- $(LIBSOUNDTOUCH_LIBS) $(am__append_1)
+ $(LIBSOUNDTOUCH_LIBS) -ltinyxml $(am__append_1)
all: all-recursive
.SUFFIXES:
diff --git a/src/gtk-glade/Makefile.am b/src/gtk-glade/Makefile.am
index b667fca..c79fdac 100755
--- a/src/gtk-glade/Makefile.am
+++ b/src/gtk-glade/Makefile.am
@@ -33,7 +33,7 @@ desmume_glade_SOURCES = \
desmume_glade_LDADD = ../libdesmume.a \
$(SDL_LIBS) $(GTKGLEXT_LIBS) $(LIBGLADE_LIBS) \
$(GTHREAD_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) \
- $(LIBSOUNDTOUCH_LIBS)
+ $(LIBSOUNDTOUCH_LIBS) -ltinyxml
if HAVE_GDB_STUB
desmume_glade_LDADD += ../gdbstub/libgdbstub.a
endif
diff --git a/src/gtk-glade/Makefile.in b/src/gtk-glade/Makefile.in
index 5f77ec5..012aa72 100644
--- a/src/gtk-glade/Makefile.in
+++ b/src/gtk-glade/Makefile.in
@@ -367,7 +367,7 @@ desmume_glade_SOURCES = \
desmume_glade_LDADD = ../libdesmume.a $(SDL_LIBS) $(GTKGLEXT_LIBS) \
$(LIBGLADE_LIBS) $(GTHREAD_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) \
- $(LIBSOUNDTOUCH_LIBS) $(am__append_1)
+ $(LIBSOUNDTOUCH_LIBS) -ltinyxml $(am__append_1)
all: all-recursive
.SUFFIXES:
diff --git a/src/gtk/Makefile.am b/src/gtk/Makefile.am
index 59cb1f2..e451102 100755
--- a/src/gtk/Makefile.am
+++ b/src/gtk/Makefile.am
@@ -32,7 +32,7 @@ desmume_SOURCES = \
../filter/videofilter.cpp ../filter/videofilter.h \
main.cpp main.h
desmume_LDADD = ../libdesmume.a \
- $(SDL_LIBS) $(GTK_LIBS) $(GTHREAD_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) $(LIBSOUNDTOUCH_LIBS)
+ $(SDL_LIBS) $(GTK_LIBS) $(GTHREAD_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) $(LIBSOUNDTOUCH_LIBS) -ltinyxml
if HAVE_GDB_STUB
desmume_LDADD += ../gdbstub/libgdbstub.a
endif
diff --git a/src/gtk/Makefile.in b/src/gtk/Makefile.in
index e1a2c37..75f392f 100644
--- a/src/gtk/Makefile.in
+++ b/src/gtk/Makefile.in
@@ -382,7 +382,7 @@ desmume_SOURCES = \
desmume_LDADD = ../libdesmume.a $(SDL_LIBS) $(GTK_LIBS) \
$(GTHREAD_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) \
- $(LIBSOUNDTOUCH_LIBS) $(am__append_1) $(am__append_2) \
+ $(LIBSOUNDTOUCH_LIBS) -ltinyxml $(am__append_1) $(am__append_2) \
$(am__append_3)
UPDATE_DESKTOP = \
appsdir=$(DESTDIR)$(datadir)/applications ; \
diff --git a/src/utils/advanscene.cpp b/src/utils/advanscene.cpp
index 8d8f370..09c35bb 100755
--- a/src/utils/advanscene.cpp
+++ b/src/utils/advanscene.cpp
@@ -19,7 +19,7 @@
#include <time.h>
#define TIXML_USE_STL
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
#include "advanscene.h"
#include "../common.h"

View file

@ -2,6 +2,7 @@
, pkgconfig, libtool, intltool
, libXmu
, lua
, tinyxml
, agg, alsaLib, soundtouch, openal
, desktop-file-utils
, gtk2, gtkglext, libglade, pangox_compat
@ -19,11 +20,9 @@ stdenv.mkDerivation rec {
};
patches = [
(fetchpatch {
name = "gcc6_fixes.patch";
url = "https://anonscm.debian.org/viewvc/pkg-games/packages/trunk/desmume/debian/patches/gcc6_fixes.patch?revision=15925";
sha256 = "0j3fmxz0mfb3f4biks03pyz8f9hy958ks6qplisl60rzq9v9qpks";
})
./gcc6_fixes.patch
./gcc7_fixes.patch
./01_use_system_tinyxml.patch
];
CXXFLAGS = "-fpermissive";
@ -31,7 +30,7 @@ stdenv.mkDerivation rec {
buildInputs =
[ pkgconfig libtool intltool libXmu lua agg alsaLib soundtouch
openal desktop-file-utils gtk2 gtkglext libglade pangox_compat
libGLU libpcap SDL zziplib ];
libGLU libpcap SDL zziplib tinyxml ];
configureFlags = [
"--disable-glade" # Failing on compile step

View file

@ -0,0 +1,59 @@
From: zeromus
Origin: upstream, https://sourceforge.net/p/desmume/code/5514, https://sourceforge.net/p/desmume/code/5517, https://sourceforge.net/p/desmume/code/5430
Subject: fix GCC6 issues
Bug: https://sourceforge.net/p/desmume/bugs/1570/
Bug-Debian: http://bugs.debian.org/811691
Index: desmume/src/MMU_timing.h
===================================================================
--- desmume/src/MMU_timing.h (revision 5513)
+++ desmume/src/MMU_timing.h (revision 5517)
@@ -155,8 +155,8 @@
enum { ASSOCIATIVITY = 1 << ASSOCIATIVESHIFT };
enum { BLOCKSIZE = 1 << BLOCKSIZESHIFT };
enum { TAGSHIFT = SIZESHIFT - ASSOCIATIVESHIFT };
- enum { TAGMASK = (u32)(~0 << TAGSHIFT) };
- enum { BLOCKMASK = ((u32)~0 >> (32 - TAGSHIFT)) & (u32)(~0 << BLOCKSIZESHIFT) };
+ enum { TAGMASK = (u32)(~0U << TAGSHIFT) };
+ enum { BLOCKMASK = ((u32)~0U >> (32 - TAGSHIFT)) & (u32)(~0U << BLOCKSIZESHIFT) };
enum { WORDSIZE = sizeof(u32) };
enum { WORDSPERBLOCK = (1 << BLOCKSIZESHIFT) / WORDSIZE };
enum { DATAPERWORD = WORDSIZE * ASSOCIATIVITY };
Index: desmume/src/ctrlssdl.cpp
===================================================================
--- desmume/src/ctrlssdl.cpp (revision 5513)
+++ desmume/src/ctrlssdl.cpp (revision 5517)
@@ -200,7 +200,7 @@
break;
case SDL_JOYAXISMOTION:
/* Dead zone of 50% */
- if( (abs(event.jaxis.value) >> 14) != 0 )
+ if( ((u32)abs(event.jaxis.value) >> 14) != 0 )
{
key = ((event.jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event.jaxis.axis & 127) << 1);
if (event.jaxis.value > 0) {
@@ -370,7 +370,7 @@
Note: button constants have a 1bit offset. */
case SDL_JOYAXISMOTION:
key_code = ((event->jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event->jaxis.axis & 127) << 1);
- if( (abs(event->jaxis.value) >> 14) != 0 )
+ if( ((u32)abs(event->jaxis.value) >> 14) != 0 )
{
if (event->jaxis.value > 0)
key_code |= 1;
Index: desmume/src/wifi.cpp
===================================================================
--- desmume/src/wifi.cpp (revision 5429)
+++ desmume/src/wifi.cpp (revision 5430)
@@ -320,9 +320,9 @@
#if (WIFI_LOGGING_LEVEL >= 1)
#if WIFI_LOG_USE_LOGC
- #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: "__VA_ARGS__);
+ #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: " __VA_ARGS__);
#else
- #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: "__VA_ARGS__);
+ #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: " __VA_ARGS__);
#endif
#else
#define WIFI_LOG(level, ...) {}

View file

@ -0,0 +1,18 @@
From e1f7039f1b06add4fb75b2f8774000b8f05574af Mon Sep 17 00:00:00 2001
From: rogerman <rogerman@users.sf.net>
Date: Mon, 17 Aug 2015 21:15:04 +0000
Subject: Fix bug with libfat string handling.
diff --git a/src/utils/libfat/directory.cpp b/src/utils/libfat/directory.cpp
index 765d7ae5..b6d7f01f 100644
--- a/src/utils/libfat/directory.cpp
+++ b/src/utils/libfat/directory.cpp
@@ -139,7 +139,7 @@ static size_t _FAT_directory_mbstoucs2 (ucs2_t* dst, const char* src, size_t len
int bytes;
size_t count = 0;
- while (count < len-1 && src != '\0') {
+ while (count < len-1 && *src != '\0') {
bytes = mbrtowc (&tempChar, src, MB_CUR_MAX, &ps);
if (bytes > 0) {
*dst = (ucs2_t)tempChar;