From 9092b244ad342e1ecdbf5f49d0ee5bd42d620853 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Mon, 13 Jan 2014 22:33:32 +0100 Subject: [PATCH] SDL: remove useless patchsets. --- media-libs/libsdl/patches/libsdl-1.2.14.patch | 64 ----- .../libsdl/patches/libsdl-1.2.15.patchset | 34 ++- media-libs/libsdl/patches/libsdl-2.0.0.patch | 39 --- .../libsdl/patches/libsdl_x86-1.2.15.patchset | 249 ------------------ 4 files changed, 29 insertions(+), 357 deletions(-) delete mode 100644 media-libs/libsdl/patches/libsdl-1.2.14.patch delete mode 100644 media-libs/libsdl/patches/libsdl-2.0.0.patch delete mode 100644 media-libs/libsdl/patches/libsdl_x86-1.2.15.patchset diff --git a/media-libs/libsdl/patches/libsdl-1.2.14.patch b/media-libs/libsdl/patches/libsdl-1.2.14.patch deleted file mode 100644 index b9278756d..000000000 --- a/media-libs/libsdl/patches/libsdl-1.2.14.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff -r 5002d6aeb85c libsdl-1.2.14/nclude/begin_code.h ---- SDL-1.2.14/include/begin_code.h Fri Jul 09 17:19:18 2010 +0200 -+++ SDL-1.2.14-haiku/include/begin_code.h Fri Sep 17 14:58:26 2010 +0000 -@@ -43,7 +43,7 @@ - #ifndef DECLSPEC - # if defined(__BEOS__) || defined(__HAIKU__) - # if defined(__GNUC__) --# define DECLSPEC __declspec(dllexport) -+# define DECLSPEC - # else - # define DECLSPEC __declspec(export) - # endif -diff -r 31b0f2e06e3c src/main/beos/SDL_BeApp.cc ---- SDL-1.2.14/src/main/beos/SDL_BeApp.cc Sun Apr 25 20:16:38 2010 -0400 -+++ SDL-1.2.14-haiku/src/main/beos/SDL_BeApp.cc Sun Jun 06 08:55:47 2010 +0000 -@@ -39,13 +39,15 @@ - - static int StartBeApp(void *unused) - { -+ if(!be_app) { - BApplication *App; - - App = new BApplication("application/x-SDL-executable"); - - App->Run(); - delete App; -- return(0); -+ } -+ return(0); - } - - /* Initialize the Be Application, if it's not already started */ -@@ -86,7 +88,7 @@ - ++SDL_BeAppActive; - - /* The app is running, and we're ready to go */ -- return(0); -+ return(0); - } - - /* Quit the Be Application, if there's nothing left to do */ -diff -r 31b0f2e06e3c src/video/bwindow/SDL_sysvideo.cc ---- SDL-1.2.14/src/video/bwindow/SDL_sysvideo.cc Sun Apr 25 20:16:38 2010 -0400 -+++ SDL-1.2.14-haiku/src/video/bwindow/SDL_sysvideo.cc Sun Jun 06 08:55:47 2010 +0000 -@@ -57,7 +57,6 @@ - static void BE_FreeHWSurface(_THIS, SDL_Surface *surface); - - static int BE_ToggleFullScreen(_THIS, int fullscreen); --static SDL_Overlay *BE_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, SDL_Surface *display); - - /* OpenGL functions */ - #if SDL_VIDEO_OPENGL -diff -r 31b0f2e06e3c src/video/bwindow/SDL_sysyuv.h ---- SDL-1.2.14/src/video/bwindow/SDL_sysyuv.h Sun Apr 25 20:16:38 2010 -0400 -+++ SDL-1.2.14-haiku/src/video/bwindow/SDL_sysyuv.h Sun Jun 06 08:55:47 2010 +0000 -@@ -62,7 +62,7 @@ - }; - - extern BBitmap * BE_GetOverlayBitmap(BRect bounds, color_space cs); --SDL_Overlay* BE_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, SDL_Surface* display); -+extern SDL_Overlay* BE_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, SDL_Surface* display); - extern int BE_LockYUVOverlay(_THIS, SDL_Overlay* overlay); - extern void BE_UnlockYUVOverlay(_THIS, SDL_Overlay* overlay); - extern int BE_DisplayYUVOverlay(_THIS, SDL_Overlay* overlay, SDL_Rect* src, SDL_Rect* dst); diff --git a/media-libs/libsdl/patches/libsdl-1.2.15.patchset b/media-libs/libsdl/patches/libsdl-1.2.15.patchset index d36d015a9..fa82bad92 100644 --- a/media-libs/libsdl/patches/libsdl-1.2.15.patchset +++ b/media-libs/libsdl/patches/libsdl-1.2.15.patchset @@ -1,4 +1,4 @@ -From 59cfb52a4c0564e1713c37be2ae6026f9e4e76a9 Mon Sep 17 00:00:00 2001 +From ca09de99c346e44cdd1f578848b4958067b5fb06 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 22 Nov 2013 23:38:56 +0100 Subject: Remove Alsa and ESD detection @@ -36,7 +36,7 @@ index 08c8e1e..84d9a55 100644 1.8.3.4 -From b2657c374826ed213072b5e80263f59a42e76faf Mon Sep 17 00:00:00 2001 +From 735586f7d0600476b0b02206daa76926193da957 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 22 Nov 2013 23:39:26 +0100 Subject: Fix samples vs bytes issues @@ -67,7 +67,7 @@ index de635f8..7faf571 100644 1.8.3.4 -From 847264a916bb4b9e3bfa1ff8217beed67b37b8a4 Mon Sep 17 00:00:00 2001 +From 164201f49d1310bdd229feaf33c1f0e988a89f49 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Fri, 22 Nov 2013 23:40:12 +0100 Subject: Various fixes to the video code @@ -147,7 +147,7 @@ index c32b661..a26f18b 100644 1.8.3.4 -From 6a8dccbefe9522f65a07177441a93251cfcc8d9f Mon Sep 17 00:00:00 2001 +From ae129e6505148189a3d73fc085f20e214c0d6446 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sat, 23 Nov 2013 11:59:00 +0100 Subject: Actually fix the sample vs bytes problem in audio driver. @@ -201,7 +201,7 @@ index 7faf571..300bf03 100644 1.8.3.4 -From 112569083122d8d14b2571aaf2b73483ce3738db Mon Sep 17 00:00:00 2001 +From 9b20d4dc8a3f5d607623b5d8b2c4ce14e830f4c8 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Sun, 22 Dec 2013 18:37:30 -0700 Subject: Remove Haiku from specialized DECLSPEC definition @@ -223,3 +223,27 @@ index 27e2f7b..d5e2f1f 100644 -- 1.8.3.4 + +From 09ba1fa7eccef32323c9987bdd4742bca6e9dfbc Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 5 Jan 2014 17:22:10 +0100 +Subject: Change prefix from "be" to "os" for OpenGL includes + +Accomodate the new OpenGL kit that doesn't have the "be" symlink. + +diff --git a/src/video/bwindow/SDL_BWin.h b/src/video/bwindow/SDL_BWin.h +index f2b19a2..2cb94ee 100644 +--- a/src/video/bwindow/SDL_BWin.h ++++ b/src/video/bwindow/SDL_BWin.h +@@ -31,7 +31,7 @@ + #include + #if SDL_VIDEO_OPENGL + #include "SDL_opengl.h" +-#include ++#include + #endif + #include + +-- +1.8.3.4 + diff --git a/media-libs/libsdl/patches/libsdl-2.0.0.patch b/media-libs/libsdl/patches/libsdl-2.0.0.patch deleted file mode 100644 index dae2a97bf..000000000 --- a/media-libs/libsdl/patches/libsdl-2.0.0.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -Naur SDL2-2.0.0/include/begin_code.h SDL2-2.0.0-haiku/include/begin_code.h ---- SDL2-2.0.0/include/begin_code.h 2013-08-11 21:57:54.011796480 -0500 -+++ SDL2-2.0.0-haiku/include/begin_code.h 2013-08-19 15:12:06.654049280 -0500 -@@ -35,13 +35,7 @@ - - /* Some compilers use a special export keyword */ - #ifndef DECLSPEC --# if defined(__BEOS__) || defined(__HAIKU__) --# if defined(__GNUC__) --# define DECLSPEC __declspec(dllexport) --# else --# define DECLSPEC __declspec(export) --# endif --# elif defined(__WIN32__) -+# if defined(__WIN32__) - # ifdef __BORLANDC__ - # ifdef BUILD_SDL - # define DECLSPEC -@@ -54,6 +48,8 @@ - # else - # if defined(__GNUC__) && __GNUC__ >= 4 - # define DECLSPEC __attribute__ ((visibility("default"))) -+# elif defined(__GNUC__) && __GNUC__ >= 2 -+# define DECLSPEC __declspec(dllexport) - # else - # define DECLSPEC - # endif -diff -Naur SDL2-2.0.0/src/main/beos/SDL_BApp.h SDL2-2.0.0-haiku/src/main/beos/SDL_BApp.h ---- SDL2-2.0.0/src/main/beos/SDL_BApp.h 2013-08-11 21:57:54.058982400 -0500 -+++ SDL2-2.0.0-haiku/src/main/beos/SDL_BApp.h 2013-08-19 15:10:50.412876800 -0500 -@@ -371,7 +371,7 @@ - - - /* Members */ -- vector _window_map; /* Keeps track of SDL_Windows by index-id*/ -+ std::vector _window_map; /* Keeps track of SDL_Windows by index-id*/ - - display_mode *_saved_mode; - BGLView *_current_context; diff --git a/media-libs/libsdl/patches/libsdl_x86-1.2.15.patchset b/media-libs/libsdl/patches/libsdl_x86-1.2.15.patchset deleted file mode 100644 index fa82bad92..000000000 --- a/media-libs/libsdl/patches/libsdl_x86-1.2.15.patchset +++ /dev/null @@ -1,249 +0,0 @@ -From ca09de99c346e44cdd1f578848b4958067b5fb06 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Fri, 22 Nov 2013 23:38:56 +0100 -Subject: Remove Alsa and ESD detection - -These will fail on Haiku, and we don't need them anyway. - -diff --git a/configure.in b/configure.in -index 08c8e1e..84d9a55 100644 ---- a/configure.in -+++ b/configure.in -@@ -361,7 +361,7 @@ CheckALSA() - AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]), - , enable_alsa=yes) - if test x$enable_audio = xyes -a x$enable_alsa = xyes; then -- AM_PATH_ALSA(0.9.0, have_alsa=yes, have_alsa=no) -+ have_alsa=no - # Restore all flags from before the ALSA detection runs - CFLAGS="$alsa_save_CFLAGS" - LDFLAGS="$alsa_save_LDFLAGS" -@@ -460,7 +460,7 @@ CheckESD() - AC_HELP_STRING([--enable-esd], [support the Enlightened Sound Daemon [[default=yes]]]), - , enable_esd=yes) - if test x$enable_audio = xyes -a x$enable_esd = xyes; then -- AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no) -+ have_esd=no - if test x$have_esd = xyes; then - AC_ARG_ENABLE(esd-shared, - AC_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [[default=yes]]]), -@@ -2963,3 +2963,4 @@ AC_OUTPUT([ - : >build-deps - if test x"$MAKE" = x; then MAKE=make; fi; $MAKE depend - ]) -+AC_CONFIG_MACRO_DIR([acinclude]) --- -1.8.3.4 - - -From 735586f7d0600476b0b02206daa76926193da957 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Fri, 22 Nov 2013 23:39:26 +0100 -Subject: Fix samples vs bytes issues - -This was particularly noticeable in Milkytracker (SDL version) and -Hivelytracker, where all the audio timing relies on the buffer being -played during the right time. - -diff --git a/src/audio/baudio/SDL_beaudio.cc b/src/audio/baudio/SDL_beaudio.cc -index de635f8..7faf571 100644 ---- a/src/audio/baudio/SDL_beaudio.cc -+++ b/src/audio/baudio/SDL_beaudio.cc -@@ -199,11 +199,11 @@ int BE_OpenAudio(_THIS, SDL_AudioSpec *spec) - return (-1); - } - -- format.buffer_size = spec->samples; -- - /* Calculate the final parameters for this audio specification */ - SDL_CalculateAudioSpec(spec); - -+ format.buffer_size = spec->samples; -+ - /* Subscribe to the audio stream (creates a new thread) */ - { sigset_t omask; - SDL_MaskSignals(&omask); --- -1.8.3.4 - - -From 164201f49d1310bdd229feaf33c1f0e988a89f49 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Fri, 22 Nov 2013 23:40:12 +0100 -Subject: Various fixes to the video code - -* Do not center the window each time it is resized -* Do not reset video mode if we didn't enter fullscreen -* remove annoying debug print - -diff --git a/src/video/bwindow/SDL_sysvideo.cc b/src/video/bwindow/SDL_sysvideo.cc -index c32b661..a26f18b 100644 ---- a/src/video/bwindow/SDL_sysvideo.cc -+++ b/src/video/bwindow/SDL_sysvideo.cc -@@ -406,6 +406,7 @@ static int BE_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen) - { - // printf("SetFullScreen(%d)\n", fullscreen); - BScreen bscreen; -+ static bool firstTime = true; - - // SetFullSscreen() does not work as expected if called in a window - // that was never shown. This is probably a bug in the Haiku Game Kit that needs -@@ -425,6 +426,8 @@ static int BE_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen) - int width = screen->w; - int height = screen->h; - -+ bool wasFullScreen = SDL_Win->IsFullScreen(); -+ - if (fullscreen) { - // Set resolution to the closest available one that matches the - // current SDL resolution. -@@ -444,7 +447,8 @@ static int BE_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen) - } else { - // Reset to the previous known resolution as we are now in window - // mode. -- bscreen.SetMode(&saved_mode); -+ if(wasFullScreen) -+ bscreen.SetMode(&saved_mode); - } - - // Effectivelly set/reset full screen mode. If we are already in -@@ -456,14 +460,6 @@ static int BE_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen) - // printf("Going windowed\n"); - SDL_Win->SetFullScreen(fullscreen); - -- // Calculate offsets for centering the window (in window mode) and for -- // dentering the bitmap (in full screen mode). -- BRect bounds = bscreen.Frame(); -- bounds.PrintToStream(); -- int32 cx = (bounds.IntegerWidth() - width)/2; -- int32 cy = (bounds.IntegerHeight() - height)/2; -- -- // printf ("cx = %d, cy = %d\n", cx, cy); - if (!SDL_Win->IsFullScreen()) { - // printf("Doing not fullscreen stuff.\n"); - // We are not in full screen mode, so we want to change the window -@@ -471,10 +467,18 @@ static int BE_SetFullScreen(_THIS, SDL_Surface *screen, int fullscreen) - SDL_Win->ResizeTo(width, height); - - // And also center the window and reset the drawing offset. -- SDL_Win->MoveTo(cx, cy); -+ if(firstTime || wasFullScreen) { -+ SDL_Win->CenterOnScreen(); -+ firstTime = false; -+ } - SDL_Win->SetXYOffset(0, 0); - } else { -- // printf("Doing fullscreen stuff."); -+ // Calculate offsets for centering the bitmap. -+ -+ BRect bounds = bscreen.Frame(); -+ int cx = (bounds.Width() - width) / 2; -+ int cy = (bounds.Height() - height) / 2; -+ - // Center the bitmap whenever we are in full screen mode. - SDL_Win->SetXYOffset(cx, cy); - } --- -1.8.3.4 - - -From ae129e6505148189a3d73fc085f20e214c0d6446 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Sat, 23 Nov 2013 11:59:00 +0100 -Subject: Actually fix the sample vs bytes problem in audio driver. - - -diff --git a/src/audio/baudio/SDL_beaudio.cc b/src/audio/baudio/SDL_beaudio.cc -index 7faf571..300bf03 100644 ---- a/src/audio/baudio/SDL_beaudio.cc -+++ b/src/audio/baudio/SDL_beaudio.cc -@@ -161,25 +161,30 @@ int BE_OpenAudio(_THIS, SDL_AudioSpec *spec) - format.byte_order = B_MEDIA_LITTLE_ENDIAN; - format.frame_rate = (float) spec->freq; - format.channel_count = spec->channels; /* !!! FIXME: support > 2? */ -+ int samplesize = 1; - while ((!valid_datatype) && (test_format)) { - valid_datatype = 1; - spec->format = test_format; - switch (test_format) { - case AUDIO_S8: - format.format = media_raw_audio_format::B_AUDIO_CHAR; -+ samplesize = 1; - break; - - case AUDIO_U8: - format.format = media_raw_audio_format::B_AUDIO_UCHAR; -+ samplesize = 1; - break; - - case AUDIO_S16LSB: - format.format = media_raw_audio_format::B_AUDIO_SHORT; -+ samplesize = 2; - break; - - case AUDIO_S16MSB: - format.format = media_raw_audio_format::B_AUDIO_SHORT; - format.byte_order = B_MEDIA_BIG_ENDIAN; -+ samplesize = 2; - break; - - default: -@@ -202,7 +207,7 @@ int BE_OpenAudio(_THIS, SDL_AudioSpec *spec) - /* Calculate the final parameters for this audio specification */ - SDL_CalculateAudioSpec(spec); - -- format.buffer_size = spec->samples; -+ format.buffer_size = spec->samples * spec->channels * samplesize; - - /* Subscribe to the audio stream (creates a new thread) */ - { sigset_t omask; --- -1.8.3.4 - - -From 9b20d4dc8a3f5d607623b5d8b2c4ce14e830f4c8 Mon Sep 17 00:00:00 2001 -From: Chris Roberts -Date: Sun, 22 Dec 2013 18:37:30 -0700 -Subject: Remove Haiku from specialized DECLSPEC definition - - -diff --git a/include/begin_code.h b/include/begin_code.h -index 27e2f7b..d5e2f1f 100644 ---- a/include/begin_code.h -+++ b/include/begin_code.h -@@ -41,7 +41,7 @@ - * Some compilers use a special export keyword - */ - #ifndef DECLSPEC --# if defined(__BEOS__) || defined(__HAIKU__) -+# if defined(__BEOS__) - # if defined(__GNUC__) - # define DECLSPEC - # else --- -1.8.3.4 - - -From 09ba1fa7eccef32323c9987bdd4742bca6e9dfbc Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Sun, 5 Jan 2014 17:22:10 +0100 -Subject: Change prefix from "be" to "os" for OpenGL includes - -Accomodate the new OpenGL kit that doesn't have the "be" symlink. - -diff --git a/src/video/bwindow/SDL_BWin.h b/src/video/bwindow/SDL_BWin.h -index f2b19a2..2cb94ee 100644 ---- a/src/video/bwindow/SDL_BWin.h -+++ b/src/video/bwindow/SDL_BWin.h -@@ -31,7 +31,7 @@ - #include - #if SDL_VIDEO_OPENGL - #include "SDL_opengl.h" --#include -+#include - #endif - #include - --- -1.8.3.4 -