Control: tags -1 +patch

Hello,

On Tue, 2023-08-29 at 13:05 +0200, John Paul Adrian Glaubitz wrote:
> Any chance this can get a proper release so that we can update the Debian 
> package
> without having to add local patches?

Attaching the two patches that I used for porting the openSUSE package to SDL-2.

The patch virtualjaguar-sdl2.patch required some rebasing before it applied 
against
the original tarball source.

I will try to take care of this bug and the FTBFS over the Easter holidays.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
From 05c2e7989d2c73fcfa5e01b014ac6ee649ba3de2 Mon Sep 17 00:00:00 2001
From: Teemu Hukkanen <[email protected]>
Date: Thu, 3 Aug 2023 02:43:04 +0300
Subject: [PATCH 2/3] Use joystick identifier from SDL_JoystickOpen for
 SDL_JoystickName

---
 src/gui/gamepad.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gui/gamepad.cpp b/src/gui/gamepad.cpp
index a7a9498..f72cc0c 100644
--- a/src/gui/gamepad.cpp
+++ b/src/gui/gamepad.cpp
@@ -55,7 +55,7 @@ void Gamepad::AllocateJoysticks(void)
 		// We need to copy the contents of this pointer, as SDL will change it
 		// willy nilly to suit itself
 //		padName[i] = SDL_JoystickName(i);
-		strncpy(padName[i], SDL_JoystickName(i), 127);
+		strncpy(padName[i], SDL_JoystickName(pad[i]), 127);
 		padName[i][127] = 0;	// Just in case name's length > 127
 
 		if (pad[i])
-- 
2.43.0

From 5bfd43189df61e1f49b9186bcfce129f2a643e9b Mon Sep 17 00:00:00 2001
From: Teemu Hukkanen <[email protected]>
Date: Thu, 3 Aug 2023 02:37:07 +0300
Subject: [PATCH 1/3] Switch to SDL2

---
 jaguarcore.mak      | 3 ++-
 src/dac.cpp         | 2 +-
 src/dsp.cpp         | 2 +-
 src/gui/app.cpp     | 2 +-
 src/gui/gamepad.h   | 2 +-
 src/gui/mainwin.cpp | 2 +-
 src/jaguar.cpp      | 3 +--
 src/m68000/Makefile | 2 +-
 virtualjaguar.pro   | 8 ++++----
 9 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/jaguarcore.mak b/jaguarcore.mak
index 7252be7..e4a39c2 100644
--- a/jaguarcore.mak
+++ b/jaguarcore.mak
@@ -41,8 +41,9 @@ LD      := $(CROSS)gcc
 AR      := $(CROSS)ar
 ARFLAGS := -rs
 
-SDL_CFLAGS = `$(CROSS)sdl-config --cflags`
+SDL_CFLAGS = `$(CROSS)sdl2-config --cflags`
 DEFINES = -D$(SYSTYPE) $(HAVECDIO)
+
 GCC_DEPS = -MMD
 
 INCS := -I./src
diff --git a/src/dac.cpp b/src/dac.cpp
index e94d564..3745846 100644
--- a/src/dac.cpp
+++ b/src/dac.cpp
@@ -43,7 +43,7 @@
 #include "dac.h"
 
 //#include <ctype.h>
-#include "SDL.h"
+#include <SDL2/SDL.h>
 #include "cdrom.h"
 #include "dsp.h"
 #include "event.h"
diff --git a/src/dsp.cpp b/src/dsp.cpp
index 8853f94..f9f3f8b 100644
--- a/src/dsp.cpp
+++ b/src/dsp.cpp
@@ -16,7 +16,7 @@
 
 #include "dsp.h"
 
-#include <SDL.h>								// Used only for SDL_GetTicks...
+#include <SDL2/SDL.h>								// Used only for SDL_GetTicks...
 #include <stdlib.h>
 #include "dac.h"
 #include "gpu.h"
diff --git a/src/gui/app.cpp b/src/gui/app.cpp
index 9414dd4..347be00 100644
--- a/src/gui/app.cpp
+++ b/src/gui/app.cpp
@@ -17,7 +17,7 @@
 
 #include "app.h"
 
-#include <SDL.h>
+#include <SDL2/SDL.h>
 #include <QApplication>
 #include "gamepad.h"
 #include "log.h"
diff --git a/src/gui/gamepad.h b/src/gui/gamepad.h
index 902dae1..2c62932 100644
--- a/src/gui/gamepad.h
+++ b/src/gui/gamepad.h
@@ -21,7 +21,7 @@
 #define JOY_AXISDIR_MASK	0x000001
 
 #include <stdint.h>
-#include "SDL.h"
+#include <SDL2/SDL.h>
 
 // buttonID is the combination of the type (BUTTON, HAT) and the button #
 // (0-255 for buttons, 0-31 for hats). Hats also have 0-7 for a button #
diff --git a/src/gui/mainwin.cpp b/src/gui/mainwin.cpp
index cb01b02..a9f9cfc 100644
--- a/src/gui/mainwin.cpp
+++ b/src/gui/mainwin.cpp
@@ -36,7 +36,7 @@
 
 #include "mainwin.h"
 
-#include "SDL.h"
+#include <SDL2/SDL.h>
 #include "app.h"
 #include "about.h"
 #include "configdialog.h"
diff --git a/src/jaguar.cpp b/src/jaguar.cpp
index f829892..5d7726f 100644
--- a/src/jaguar.cpp
+++ b/src/jaguar.cpp
@@ -17,8 +17,7 @@
 #include "jaguar.h"
 
 #include <time.h>
-#include <SDL.h>
-#include "SDL_opengl.h"
+#include <SDL2/SDL.h>
 #include "blitter.h"
 #include "cdrom.h"
 #include "dac.h"
diff --git a/src/m68000/Makefile b/src/m68000/Makefile
index 16ed159..6796a85 100644
--- a/src/m68000/Makefile
+++ b/src/m68000/Makefile
@@ -23,7 +23,7 @@ HOSTCC  := gcc
 
 ARFLAGS := -rs
 GCC_DEPS = -MMD
-INCS    := -I. -I./obj `$(CROSS)sdl-config --cflags`
+INCS    := -I. -I./obj `$(CROSS)sdl2-config --cflags`
 
 OBJS = \
 	obj/cpustbl.o \
diff --git a/virtualjaguar.pro b/virtualjaguar.pro
index a53b444..6b6e651 100644
--- a/virtualjaguar.pro
+++ b/virtualjaguar.pro
@@ -33,8 +33,8 @@ else:macx { DEFINES += __GCCUNIX__ __THINK_STUPID__ }
 else:unix { DEFINES += __GCCUNIX__ }
 
 # SDL (to link statically on Mac)
-macx { LIBS += `sdl-config --static-libs` }
-else { LIBS += `$(CROSS)sdl-config --libs` }
+macx { LIBS += `sdl2-config --static-libs` }
+else { LIBS += `$(CROSS)sdl2-config --libs` }
 
 # libCDIO (may or may not be cross compatible, so we have this for now, just in
 # case we need it... (N.B.: the $(CDIO) is needed because under MXE, qmake
@@ -53,8 +53,8 @@ macx  { ICON = res/vj-icon.icns }
 # NOTE: May have to put -Wall back in, but only on non-release cycles. It can
 #       cause problems if you're not careful. (Can do this via command line in
 #       qmake)
-QMAKE_CFLAGS += `$(CROSS)sdl-config --cflags`
-QMAKE_CXXFLAGS += `$(CROSS)sdl-config --cflags`
+QMAKE_CFLAGS += `$(CROSS)sdl2-config --cflags`
+QMAKE_CXXFLAGS += `$(CROSS)sdl2-config --cflags`
 
 # Need to add libcdio stuffola (checking/including)...
 
-- 
2.43.0

Reply via email to