Blame patches/sdl2-2.0.8_pre.local.patch

213fe0
diff -ru SDL2-2.0.8.orig/configure.in SDL2-2.0.8/configure.in
213fe0
--- SDL2-2.0.8.orig/configure.in	2018-03-01 17:34:41.000000000 +0100
213fe0
+++ SDL2-2.0.8/configure.in	2020-09-27 15:02:24.837099348 +0200
213fe0
@@ -1868,7 +1868,6 @@
213fe0
 XITouchClassInfo *t;
213fe0
             	],[
213fe0
             	have_xinput2_multitouch=yes
213fe0
-            	AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [])
213fe0
                 SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
213fe0
             	])
213fe0
             	AC_MSG_RESULT($have_xinput2_multitouch)
213fe0
@@ -2770,6 +2769,10 @@
213fe0
             pthread_cflags="-D_REENTRANT"
213fe0
             pthread_lib="-lpthread"
213fe0
             ;;
213fe0
+        *-*-midipix*)
213fe0
+            pthread_cflags="-D_REENTRANT"
213fe0
+            pthread_lib=""
213fe0
+            ;;
213fe0
         *-*-bsdi*)
213fe0
             pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
213fe0
             pthread_lib=""
213fe0
@@ -3484,6 +3487,67 @@
213fe0
         # Set up other core UNIX files
213fe0
         SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
213fe0
         ;;
213fe0
+    *-*-midipix*)
213fe0
+        ARCH=midipix
213fe0
+
213fe0
+        CheckWINDOWS
213fe0
+        # TODO: oh dear.
213fe0
+        #CheckWINDOWSGL
213fe0
+        #CheckWINDOWSGLES
213fe0
+        #CheckVulkan
213fe0
+        CheckDIRECTX
213fe0
+        CheckVisibilityHidden
213fe0
+        CheckDeclarationAfterStatement
213fe0
+        CheckDummyVideo
213fe0
+        CheckDiskAudio
213fe0
+        CheckDummyAudio
213fe0
+        CheckDLOPEN
213fe0
+        CheckPTHREAD
213fe0
+        CheckClockGettime
213fe0
+
213fe0
+        # Set up files for the video library
213fe0
+        if test x$enable_video = xyes; then
213fe0
+            AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS, 1, [ ])
213fe0
+            SOURCES="$SOURCES $srcdir/src/video/windows/*.c"
213fe0
+            have_video=yes
213fe0
+            AC_ARG_ENABLE(render-d3d,
213fe0
+AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]),
213fe0
+                                , enable_render_d3d=yes)
213fe0
+            if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then
213fe0
+                AC_DEFINE(SDL_VIDEO_RENDER_D3D, 1, [ ])
213fe0
+            fi
213fe0
+            if test x$enable_render_d3d = xyes -a x$have_d3d11 = xyes; then
213fe0
+                AC_DEFINE(SDL_VIDEO_RENDER_D3D11, 1, [ ])
213fe0
+            fi
213fe0
+        fi
213fe0
+
213fe0
+        # Set up files for the audio library
213fe0
+        # TODO: wasapi is missing entirely still
213fe0
+
213fe0
+        # Set up files for the haptic library
213fe0
+	# TODO: not sure.
213fe0
+
213fe0
+        # Set up files for the power library
213fe0
+        if test x$enable_power = xyes; then
213fe0
+            AC_DEFINE(SDL_POWER_WINDOWS, 1, [ ])
213fe0
+            SOURCES="$SOURCES $srcdir/src/power/windows/*.c"
213fe0
+            have_power=yes
213fe0
+        fi
213fe0
+        # Set up files for the filesystem library
213fe0
+        if test x$enable_filesystem = xyes; then
213fe0
+            AC_DEFINE(SDL_FILESYSTEM_UNIX, 1, [ ])
213fe0
+            SOURCES="$SOURCES $srcdir/src/filesystem/unix/*.c"
213fe0
+            have_filesystem=yes
213fe0
+        fi
213fe0
+        # Set up files for the timer library
213fe0
+        if test x$enable_timers = xyes; then
213fe0
+            AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
213fe0
+            SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
213fe0
+            have_timers=yes
213fe0
+        fi
213fe0
+
213fe0
+        SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
213fe0
+        ;;
213fe0
     *-*-cygwin* | *-*-mingw32*)
213fe0
         ARCH=win32
213fe0
         if test "$build" != "$host"; then # cross-compiling
213fe0
diff -ru SDL2-2.0.8.orig/Makefile.in SDL2-2.0.8/Makefile.in
213fe0
--- SDL2-2.0.8.orig/Makefile.in	2018-03-01 17:34:41.000000000 +0100
213fe0
+++ SDL2-2.0.8/Makefile.in	2020-09-27 14:14:34.616542401 +0200
213fe0
@@ -124,7 +124,7 @@
213fe0
 LT_REVISION = @LT_REVISION@
213fe0
 LT_LDFLAGS  = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
213fe0
 
213fe0
-all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
213fe0
+all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
213fe0
 
213fe0
 $(srcdir)/configure: $(srcdir)/configure.in
213fe0
 	@echo "Warning, configure is out of date, please re-run autogen.sh"
213fe0
@@ -167,11 +167,10 @@
213fe0
 	    $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL2/SDL_revision.h; \
213fe0
 	fi
213fe0
 
213fe0
-install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
213fe0
+install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
213fe0
 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
213fe0
 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
213fe0
 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET)
213fe0
-	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET)
213fe0
 install-data:
213fe0
 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal
213fe0
 	$(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
213fe0
diff -ru SDL2-2.0.8.orig/src/dynapi/SDL_dynapi.c SDL2-2.0.8/src/dynapi/SDL_dynapi.c
213fe0
--- SDL2-2.0.8.orig/src/dynapi/SDL_dynapi.c	2018-03-01 17:34:42.000000000 +0100
213fe0
+++ SDL2-2.0.8/src/dynapi/SDL_dynapi.c	2020-09-27 14:14:34.616542401 +0200
213fe0
@@ -222,7 +222,7 @@
213fe0
     return retval;
213fe0
 }
213fe0
 
213fe0
-#elif defined(unix) || defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__) || defined(__QNX__)
213fe0
+#elif defined(unix) || defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__) || defined(__QNX__) || defined(__midipix__)
213fe0
 #include <dlfcn.h>
213fe0
 static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
213fe0
 {