mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
libsdl2: add recipe for version 2.0.4.
* remove oldest recipes.
This commit is contained in:
@@ -1,80 +0,0 @@
|
||||
SUMMARY="Simple Direct Media Layer 2.0"
|
||||
DESCRIPTION="Simple DirectMedia Layer is a cross-platform development library designed to \
|
||||
provide low level access to audio, keyboard, mouse, joystick, and graphics \
|
||||
hardware via OpenGL and Direct3D. It is used by video playback software, \
|
||||
emulators, and popular games."
|
||||
HOMEPAGE="http://www.libsdl.org/"
|
||||
COPYRIGHT="1997-2013 Sam Lantinga"
|
||||
LICENSE="Zlib"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://www.libsdl.org/release/SDL2-2.0.0.tar.gz"
|
||||
CHECKSUM_SHA256="6f6ac8153d90e06a118474d5400624ae82b3d3e080915505db27cebc52b27178"
|
||||
SOURCE_DIR="SDL2-$portVersion"
|
||||
PATCHES="libsdl2-2.0.0.patch"
|
||||
|
||||
ARCHITECTURES="x86 x86_gcc2"
|
||||
|
||||
PROVIDES="
|
||||
libsdl2 = $portVersion compat >= 2.0
|
||||
lib:libSDL2 = 0.12.0 compat >= 0.12
|
||||
lib:libSDL2_2.0 = 0.12.0 compat >= 0.12
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
# lib:libGL
|
||||
lib:libglu
|
||||
lib:libpng
|
||||
lib:libjpeg
|
||||
lib:libtiff
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
cmd:sdl2_config = $portVersion compat >= 2.0
|
||||
devel:libSDL2 = 0.12.0 compat >= 2.0
|
||||
devel:libSDL2main = 0.12.0 compat >= 0.12
|
||||
devel:libSDL2_test = 0.12.0 compat >= 0.12
|
||||
devel:libSDL2_2.0 = 0.12.0 compat >= 0.12
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libsdl2 == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
# devel:mesa
|
||||
devel:libglu
|
||||
devel:libpng
|
||||
devel:libjpeg
|
||||
# devel:libtiff
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cmd:autoconf
|
||||
cmd:libtool
|
||||
cmd:aclocal
|
||||
cmd:make
|
||||
cmd:gcc${secondaryArchSuffix}
|
||||
cmd:ld${secondaryArchSuffix}
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
# devel package
|
||||
prepareInstalledDevelLibs \
|
||||
libSDL2 \
|
||||
libSDL2main \
|
||||
libSDL2_test
|
||||
|
||||
fixPkgconfig
|
||||
fixDevelopLibDirReferences $binDir/sdl2-config
|
||||
|
||||
packageEntries devel \
|
||||
$developDir $binDir/sdl2-config $dataDir
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
SUMMARY="Simple Direct Media Layer 2.0"
|
||||
DESCRIPTION="Simple DirectMedia Layer is a cross-platform development library designed to \
|
||||
provide low level access to audio, keyboard, mouse, joystick, and graphics \
|
||||
hardware via OpenGL and Direct3D. It is used by video playback software, \
|
||||
emulators, and popular games."
|
||||
HOMEPAGE="http://www.libsdl.org/"
|
||||
COPYRIGHT="1997-2013 Sam Lantinga"
|
||||
LICENSE="Zlib"
|
||||
REVISION="4"
|
||||
SOURCE_URI="http://www.libsdl.org/release/SDL2-2.0.1.tar.gz"
|
||||
CHECKSUM_SHA256="0ae7e902a26777614a011fe7053ca7e8b14843db3c42ca117564d208cf6732f0"
|
||||
SOURCE_DIR="SDL2-$portVersion"
|
||||
PATCHES="libsdl2-2.0.1.patchset"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
PROVIDES="
|
||||
libsdl2$secondaryArchSuffix = $portVersion compat >= 2.0
|
||||
cmd:sdl2_config = $portVersion
|
||||
lib:libSDL2$secondaryArchSuffix = 2.0_0.1.0 compat >= 2.0_0.0
|
||||
lib:libSDL2_2.0$secondaryArchSuffix = 0.1.0 compat >= 0.0
|
||||
lib:libSDL2_2.0.1$secondaryArchSuffix = 0.1.0 compat >= 0.0
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libglu$secondaryArchSuffix
|
||||
lib:libpng$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:libtiff$secondaryArchSuffix
|
||||
lib:libltdl$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
libsdl2${secondaryArchSuffix}_devel = $portVersion compat >= 2.0
|
||||
cmd:sdl2_config$secondaryArchSuffix = $portVersion compat >= 2.0
|
||||
devel:libSDL2$secondaryArchSuffix = 2.0_0.1.0 compat >= 2.0_0
|
||||
devel:libSDL2main$secondaryArchSuffix = 2.0_0.1.0 compat >= 2.0_0
|
||||
devel:libSDL2_test$secondaryArchSuffix = 2.0_0.1.0 compat >= 2.0_0
|
||||
devel:libSDL2_2.0$secondaryArchSuffix = 0.1.0 compat >= 0.0
|
||||
devel:libSDL2_2.0.1$secondaryArchSuffix = 0.1.0 compat >= 0.0
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libsdl2$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libglu$secondaryArchSuffix
|
||||
devel:libpng$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
# devel:libtiff$secondaryArchSuffix # haiku_devel missing devel_libtiff
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:autoconf
|
||||
cmd:libtool
|
||||
cmd:aclocal
|
||||
cmd:make
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:which
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
sh autogen.sh
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
# devel package
|
||||
prepareInstalledDevelLibs \
|
||||
libSDL2 \
|
||||
libSDL2main \
|
||||
libSDL2_test \
|
||||
libSDL2-2.0
|
||||
|
||||
fixPkgconfig
|
||||
fixDevelopLibDirReferences $binDir/sdl2-config
|
||||
|
||||
packageEntries devel \
|
||||
$developDir $binDir/sdl2-config $dataDir
|
||||
}
|
||||
88
media-libs/libsdl2/libsdl2-2.0.4.recipe
Normal file
88
media-libs/libsdl2/libsdl2-2.0.4.recipe
Normal file
@@ -0,0 +1,88 @@
|
||||
SUMMARY="Simple Direct Media Layer 2.0"
|
||||
DESCRIPTION="Simple DirectMedia Layer is a cross-platform development library \
|
||||
designed to provide low level access to audio, keyboard, mouse, joystick, and \
|
||||
graphics hardware via OpenGL and Direct3D. It is used by video playback \
|
||||
software, emulators, and popular games."
|
||||
HOMEPAGE="http://www.libsdl.org/"
|
||||
COPYRIGHT="1997-2014 Sam Lantinga"
|
||||
LICENSE="Zlib"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://www.libsdl.org/release/SDL2-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="da55e540bf6331824153805d58b590a29c39d2d506c6d02fa409aedeab21174b"
|
||||
SOURCE_DIR="SDL2-$portVersion"
|
||||
PATCHES="libsdl2-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
PROVIDES="
|
||||
libsdl2$secondaryArchSuffix = $portVersion compat >= 2.0
|
||||
lib:libSDL2$secondaryArchSuffix = 0.4.0 compat >= 0
|
||||
lib:libSDL2_2.0$secondaryArchSuffix = 0.4.0 compat >= 0
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libglu$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
libsdl2${secondaryArchSuffix}_devel = $portVersion compat >= 2.0
|
||||
cmd:sdl2_config$secondaryArchSuffix = $portVersion compat >= 2.0
|
||||
devel:libSDL2$secondaryArchSuffix = 0.4.0 compat >= 0
|
||||
devel:libSDL2main$secondaryArchSuffix = 0.4.0 compat >= 0
|
||||
devel:libSDL2_test$secondaryArchSuffix = 0.4.0 compat >= 0
|
||||
devel:libSDL2_2.0$secondaryArchSuffix = 0.4.0 compat >= 0
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libsdl2$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libgl$secondaryArchSuffix
|
||||
devel:libglu$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:autoconf
|
||||
cmd:libtool
|
||||
cmd:aclocal
|
||||
cmd:make
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:which
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:gettext
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
if [ $effectiveTargetArchitecture != "x86_gcc2" ]; then
|
||||
sed -i 's/lstdc++.r4/lstdc++/' configure.in
|
||||
fi
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
autoreconf -fi
|
||||
runConfigure ./configure
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
# devel package
|
||||
prepareInstalledDevelLibs \
|
||||
libSDL2 \
|
||||
libSDL2main \
|
||||
libSDL2_test \
|
||||
libSDL2-2.0
|
||||
|
||||
fixPkgconfig
|
||||
fixDevelopLibDirReferences $binDir/sdl2-config
|
||||
|
||||
packageEntries devel \
|
||||
$developDir $binDir/sdl2-config $dataDir
|
||||
}
|
||||
@@ -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<SDL_Window*> _window_map; /* Keeps track of SDL_Windows by index-id*/
|
||||
+ std::vector<SDL_Window*> _window_map; /* Keeps track of SDL_Windows by index-id*/
|
||||
|
||||
display_mode *_saved_mode;
|
||||
BGLView *_current_context;
|
||||
@@ -1,265 +0,0 @@
|
||||
From eeccaba1d365f8ce622c38cbd59c07ef28d9c335 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander von Gluck IV <kallisti5@unixzen.com>
|
||||
Date: Wed, 15 Jan 2014 00:55:06 -0600
|
||||
Subject: Haiku: Clean up includes
|
||||
|
||||
* Remove random references to be/os/
|
||||
|
||||
diff --git a/src/joystick/beos/SDL_bejoystick.cc b/src/joystick/beos/SDL_bejoystick.cc
|
||||
index c324581..2b93d09 100644
|
||||
--- a/src/joystick/beos/SDL_bejoystick.cc
|
||||
+++ b/src/joystick/beos/SDL_bejoystick.cc
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
/* This is the system specific header for the SDL joystick API */
|
||||
|
||||
-#include <be/support/String.h>
|
||||
-#include <be/device/Joystick.h>
|
||||
+#include <String.h>
|
||||
+#include <Joystick.h>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
diff --git a/src/loadso/beos/SDL_sysloadso.c b/src/loadso/beos/SDL_sysloadso.c
|
||||
index 524cd71..0679bcb 100644
|
||||
--- a/src/loadso/beos/SDL_sysloadso.c
|
||||
+++ b/src/loadso/beos/SDL_sysloadso.c
|
||||
@@ -26,7 +26,7 @@
|
||||
/* System dependent library loading routines */
|
||||
|
||||
#include <stdio.h>
|
||||
-#include <be/kernel/image.h>
|
||||
+#include <image.h>
|
||||
|
||||
#include "SDL_loadso.h"
|
||||
|
||||
diff --git a/src/thread/beos/SDL_syssem.c b/src/thread/beos/SDL_syssem.c
|
||||
index 9661f90..269557e 100644
|
||||
--- a/src/thread/beos/SDL_syssem.c
|
||||
+++ b/src/thread/beos/SDL_syssem.c
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/* Semaphores in the BeOS environment */
|
||||
|
||||
-#include <be/kernel/OS.h>
|
||||
+#include <OS.h>
|
||||
|
||||
#include "SDL_thread.h"
|
||||
|
||||
diff --git a/src/thread/beos/SDL_systhread.c b/src/thread/beos/SDL_systhread.c
|
||||
index 11646f9..7371f0a 100644
|
||||
--- a/src/thread/beos/SDL_systhread.c
|
||||
+++ b/src/thread/beos/SDL_systhread.c
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
-#include <be/kernel/OS.h>
|
||||
+#include <OS.h>
|
||||
|
||||
#include "SDL_mutex.h"
|
||||
#include "SDL_thread.h"
|
||||
diff --git a/src/thread/beos/SDL_systhread_c.h b/src/thread/beos/SDL_systhread_c.h
|
||||
index a350ab5..65ef60d 100644
|
||||
--- a/src/thread/beos/SDL_systhread_c.h
|
||||
+++ b/src/thread/beos/SDL_systhread_c.h
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "SDL_config.h"
|
||||
|
||||
#include <signal.h>
|
||||
-#include <be/kernel/OS.h>
|
||||
+#include <OS.h>
|
||||
|
||||
typedef thread_id SYS_ThreadHandle;
|
||||
|
||||
diff --git a/src/timer/beos/SDL_systimer.c b/src/timer/beos/SDL_systimer.c
|
||||
index fd22e44..370e2d9 100644
|
||||
--- a/src/timer/beos/SDL_systimer.c
|
||||
+++ b/src/timer/beos/SDL_systimer.c
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#ifdef SDL_TIMER_BEOS
|
||||
|
||||
-#include <be/kernel/OS.h>
|
||||
+#include <OS.h>
|
||||
|
||||
#include "SDL_timer.h"
|
||||
|
||||
diff --git a/src/video/bwindow/SDL_BWin.h b/src/video/bwindow/SDL_BWin.h
|
||||
index 6b6a71e..fc034ed 100644
|
||||
--- a/src/video/bwindow/SDL_BWin.h
|
||||
+++ b/src/video/bwindow/SDL_BWin.h
|
||||
@@ -38,9 +38,9 @@ extern "C" {
|
||||
#include <stdio.h>
|
||||
#include <AppKit.h>
|
||||
#include <InterfaceKit.h>
|
||||
-#include <be/game/DirectWindow.h>
|
||||
+#include <DirectWindow.h>
|
||||
#if SDL_VIDEO_OPENGL
|
||||
-#include <be/opengl/GLView.h>
|
||||
+#include <GLView.h>
|
||||
#endif
|
||||
#include "SDL_events.h"
|
||||
#include "../../main/beos/SDL_BApp.h"
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From ca4d682e5434f5ca262d01c70f9db522b24c6844 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Thu, 10 Jul 2014 15:07:01 +0200
|
||||
Subject: Initialize variable to avoid crash.
|
||||
|
||||
|
||||
diff --git a/src/video/bwindow/SDL_BWin.h b/src/video/bwindow/SDL_BWin.h
|
||||
index fc034ed..3246bad 100644
|
||||
--- a/src/video/bwindow/SDL_BWin.h
|
||||
+++ b/src/video/bwindow/SDL_BWin.h
|
||||
@@ -83,6 +83,7 @@ class SDL_BWin:public BDirectWindow
|
||||
_trash_window_buffer = false;
|
||||
_buffer_locker = new BLocker();
|
||||
_bitmap = NULL;
|
||||
+ _clips = NULL;
|
||||
#ifdef DRAWTHREAD
|
||||
_draw_thread_id = spawn_thread(BE_DrawThread, "drawing_thread",
|
||||
B_NORMAL_PRIORITY, (void*) this);
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From ffd12eaadf11ce7b2ec606cbbf8a29913f9681b8 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Thu, 10 Jul 2014 17:22:57 +0200
|
||||
Subject: Use dlopen for SDL loadso.
|
||||
|
||||
* This works fine, no need for platform specific implementation.
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 5c56f00..3b024ac 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -2616,6 +2616,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
||||
*-*-beos* | *-*-haiku*)
|
||||
ARCH=beos
|
||||
ac_default_prefix=/boot/common
|
||||
+ CheckDLOPEN
|
||||
CheckDummyVideo
|
||||
CheckDiskAudio
|
||||
CheckDummyAudio
|
||||
@@ -2647,12 +2648,6 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
||||
SOURCES="$SOURCES $srcdir/src/timer/beos/*.c"
|
||||
have_timers=yes
|
||||
fi
|
||||
- # Set up files for the shared object loading library
|
||||
- if test x$enable_loadso = xyes; then
|
||||
- AC_DEFINE(SDL_LOADSO_BEOS, 1, [ ])
|
||||
- SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c"
|
||||
- have_loadso=yes
|
||||
- fi
|
||||
# Set up files for the system power library
|
||||
if test x$enable_power = xyes; then
|
||||
AC_DEFINE(SDL_POWER_BEOS, 1, [ ])
|
||||
diff --git a/src/loadso/beos/SDL_sysloadso.c b/src/loadso/beos/SDL_sysloadso.c
|
||||
deleted file mode 100644
|
||||
index 0679bcb..0000000
|
||||
--- a/src/loadso/beos/SDL_sysloadso.c
|
||||
+++ /dev/null
|
||||
@@ -1,71 +0,0 @@
|
||||
-/*
|
||||
- Simple DirectMedia Layer
|
||||
- Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
|
||||
-
|
||||
- This software is provided 'as-is', without any express or implied
|
||||
- warranty. In no event will the authors be held liable for any damages
|
||||
- arising from the use of this software.
|
||||
-
|
||||
- Permission is granted to anyone to use this software for any purpose,
|
||||
- including commercial applications, and to alter it and redistribute it
|
||||
- freely, subject to the following restrictions:
|
||||
-
|
||||
- 1. The origin of this software must not be misrepresented; you must not
|
||||
- claim that you wrote the original software. If you use this software
|
||||
- in a product, an acknowledgment in the product documentation would be
|
||||
- appreciated but is not required.
|
||||
- 2. Altered source versions must be plainly marked as such, and must not be
|
||||
- misrepresented as being the original software.
|
||||
- 3. This notice may not be removed or altered from any source distribution.
|
||||
-*/
|
||||
-#include "SDL_config.h"
|
||||
-
|
||||
-#ifdef SDL_LOADSO_BEOS
|
||||
-
|
||||
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
-/* System dependent library loading routines */
|
||||
-
|
||||
-#include <stdio.h>
|
||||
-#include <image.h>
|
||||
-
|
||||
-#include "SDL_loadso.h"
|
||||
-
|
||||
-void *
|
||||
-SDL_LoadObject(const char *sofile)
|
||||
-{
|
||||
- void *handle = NULL;
|
||||
- image_id library_id = load_add_on(sofile);
|
||||
- if (library_id < 0) {
|
||||
- SDL_SetError(strerror((int) library_id));
|
||||
- } else {
|
||||
- handle = (void *) (library_id);
|
||||
- }
|
||||
- return (handle);
|
||||
-}
|
||||
-
|
||||
-void *
|
||||
-SDL_LoadFunction(void *handle, const char *name)
|
||||
-{
|
||||
- void *sym = NULL;
|
||||
- image_id library_id = (image_id) handle;
|
||||
- status_t rc =
|
||||
- get_image_symbol(library_id, name, B_SYMBOL_TYPE_TEXT, &sym);
|
||||
- if (rc != B_NO_ERROR) {
|
||||
- SDL_SetError(strerror(rc));
|
||||
- }
|
||||
- return (sym);
|
||||
-}
|
||||
-
|
||||
-void
|
||||
-SDL_UnloadObject(void *handle)
|
||||
-{
|
||||
- image_id library_id;
|
||||
- if (handle != NULL) {
|
||||
- library_id = (image_id) handle;
|
||||
- unload_add_on(library_id);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-#endif /* SDL_LOADSO_BEOS */
|
||||
-
|
||||
-/* vi: set ts=4 sw=4 expandtab: */
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
|
||||
From 077d0aedbb3e593a62aabc2933addbfe9fef1bb0 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Fri, 11 Jul 2014 11:54:17 +0200
|
||||
Subject: SDL_thread: gcc2 fix.
|
||||
|
||||
|
||||
diff --git a/include/SDL_thread.h b/include/SDL_thread.h
|
||||
index f248c3d..1e1ccec 100644
|
||||
--- a/include/SDL_thread.h
|
||||
+++ b/include/SDL_thread.h
|
||||
@@ -228,7 +228,8 @@ extern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id);
|
||||
* \sa SDL_TLSCreate()
|
||||
* \sa SDL_TLSGet()
|
||||
*/
|
||||
-extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (*destructor)(void*));
|
||||
+typedef void(*Destructor)(void*);
|
||||
+extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, Destructor destructor);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
214
media-libs/libsdl2/patches/libsdl2-2.0.4.patchset
Normal file
214
media-libs/libsdl2/patches/libsdl2-2.0.4.patchset
Normal file
@@ -0,0 +1,214 @@
|
||||
From 1411b340e473e75344ce336b89326fefd5962821 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Fri, 29 Aug 2014 15:24:11 +0000
|
||||
Subject: haiku patch
|
||||
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index f585d01..47186d6 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -276,7 +276,7 @@ if test x$enable_libc = xyes; then
|
||||
AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
|
||||
AC_CHECK_FUNCS(iconv)
|
||||
|
||||
- AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE(HAVE_SA_SIGACTION)], ,[#include <signal.h>])
|
||||
+ AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], [], [Description])], ,[#include <signal.h>])
|
||||
fi
|
||||
|
||||
dnl AC_CHECK_SIZEOF(void*)
|
||||
@@ -1466,7 +1466,7 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
|
||||
],[
|
||||
],[
|
||||
have_const_param_XextAddDisplay=yes
|
||||
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY)
|
||||
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY], [], [Description])
|
||||
])
|
||||
AC_MSG_RESULT($have_const_param_XextAddDisplay)
|
||||
|
||||
@@ -1484,7 +1484,7 @@ XGetEventData(display, cookie);
|
||||
XFreeEventData(display, cookie);
|
||||
],[
|
||||
have_XGenericEvent=yes
|
||||
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS)
|
||||
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS], [], [Description])
|
||||
])
|
||||
AC_MSG_RESULT($have_XGenericEvent)
|
||||
|
||||
@@ -1598,7 +1598,7 @@ int event_type = XI_TouchBegin;
|
||||
XITouchClassInfo *t;
|
||||
],[
|
||||
have_xinput2_multitouch=yes
|
||||
- AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH)
|
||||
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], [], [Description])
|
||||
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
|
||||
])
|
||||
AC_MSG_RESULT($have_xinput2_multitouch)
|
||||
@@ -2451,7 +2451,7 @@ AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]])
|
||||
sem_timedwait(NULL, NULL);
|
||||
],[
|
||||
have_sem_timedwait=yes
|
||||
- AC_DEFINE(HAVE_SEM_TIMEDWAIT)
|
||||
+ AC_DEFINE([HAVE_SEM_TIMEDWAIT], [], [Description])
|
||||
])
|
||||
AC_MSG_RESULT($have_sem_timedwait)
|
||||
fi
|
||||
@@ -3188,7 +3188,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
||||
fi
|
||||
# The Haiku platform requires special setup.
|
||||
SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
|
||||
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
|
||||
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding -lstdc++.r4"
|
||||
;;
|
||||
arm*-apple-darwin*)
|
||||
# iOS - We are not writing anything to confdefs.h because you have to replace
|
||||
diff --git a/src/thread/pthread/SDL_systhread.c b/src/thread/pthread/SDL_systhread.c
|
||||
index 22f7bd5..486cf69 100644
|
||||
--- a/src/thread/pthread/SDL_systhread.c
|
||||
+++ b/src/thread/pthread/SDL_systhread.c
|
||||
@@ -53,7 +53,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef __HAIKU__
|
||||
-#include <be/kernel/OS.h>
|
||||
+#include <kernel/OS.h>
|
||||
#endif
|
||||
|
||||
#include "SDL_assert.h"
|
||||
diff --git a/src/video/haiku/SDL_BWin.h b/src/video/haiku/SDL_BWin.h
|
||||
index dade664..416c30c 100644
|
||||
--- a/src/video/haiku/SDL_BWin.h
|
||||
+++ b/src/video/haiku/SDL_BWin.h
|
||||
@@ -38,9 +38,9 @@ extern "C" {
|
||||
#include <stdio.h>
|
||||
#include <AppKit.h>
|
||||
#include <InterfaceKit.h>
|
||||
-#include <be/game/DirectWindow.h>
|
||||
+#include <game/DirectWindow.h>
|
||||
#if SDL_VIDEO_OPENGL
|
||||
-#include <be/opengl/GLView.h>
|
||||
+#include <opengl/GLView.h>
|
||||
#endif
|
||||
#include "SDL_events.h"
|
||||
#include "../../main/haiku/SDL_BApp.h"
|
||||
diff --git a/src/video/haiku/SDL_bopengl.cc b/src/video/haiku/SDL_bopengl.cc
|
||||
index 15454f1..c42a910 100644
|
||||
--- a/src/video/haiku/SDL_bopengl.cc
|
||||
+++ b/src/video/haiku/SDL_bopengl.cc
|
||||
@@ -56,7 +56,7 @@ int BE_GL_LoadLibrary(_THIS, const char *path)
|
||||
if( get_image_symbol(info.id, "glBegin", B_SYMBOL_TYPE_ANY,
|
||||
&location) == B_OK) {
|
||||
|
||||
- _this->gl_config.dll_handle = (void *) info.id;
|
||||
+ _this->gl_config.dll_handle = (void *)(addr_t) info.id;
|
||||
_this->gl_config.driver_loaded = 1;
|
||||
SDL_strlcpy(_this->gl_config.driver_path, "libGL.so",
|
||||
SDL_arraysize(_this->gl_config.driver_path));
|
||||
@@ -71,7 +71,7 @@ void *BE_GL_GetProcAddress(_THIS, const char *proc)
|
||||
void *location = NULL;
|
||||
status_t err;
|
||||
if ((err =
|
||||
- get_image_symbol((image_id) _this->gl_config.dll_handle,
|
||||
+ get_image_symbol((image_id)(addr_t) _this->gl_config.dll_handle,
|
||||
proc, B_SYMBOL_TYPE_ANY,
|
||||
&location)) == B_OK) {
|
||||
return location;
|
||||
--
|
||||
2.2.2
|
||||
|
||||
|
||||
From 2969992d8368ee4c9661552897fb2d98e4180009 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Wed, 3 Sep 2014 19:22:12 +0200
|
||||
Subject: Fix null pointer dereference.
|
||||
|
||||
|
||||
diff --git a/src/video/haiku/SDL_bopengl.cc b/src/video/haiku/SDL_bopengl.cc
|
||||
index c42a910..4d98641 100644
|
||||
--- a/src/video/haiku/SDL_bopengl.cc
|
||||
+++ b/src/video/haiku/SDL_bopengl.cc
|
||||
@@ -93,7 +93,8 @@ void BE_GL_SwapWindow(_THIS, SDL_Window * window) {
|
||||
}
|
||||
|
||||
int BE_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) {
|
||||
- _GetBeApp()->SetCurrentContext(((SDL_BWin*)context)->GetGLView());
|
||||
+ SDL_BWin* win = (SDL_BWin*)context;
|
||||
+ _GetBeApp()->SetCurrentContext(win ? win->GetGLView() : NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.2.2
|
||||
|
||||
|
||||
From 1aabf6b42b4ede813ede6a7143e717359e9fe920 Mon Sep 17 00:00:00 2001
|
||||
From: Puck Meerburg <puck@puckipedia.nl>
|
||||
Date: Sat, 17 Jan 2015 19:33:32 +0100
|
||||
Subject: SDL_BApp: Make sure _current_context isn't NULL before trying to lock
|
||||
it
|
||||
|
||||
|
||||
diff --git a/src/main/haiku/SDL_BApp.h b/src/main/haiku/SDL_BApp.h
|
||||
index 157c236..220bf7a 100644
|
||||
--- a/src/main/haiku/SDL_BApp.h
|
||||
+++ b/src/main/haiku/SDL_BApp.h
|
||||
@@ -193,7 +193,8 @@ public:
|
||||
if(_current_context)
|
||||
_current_context->UnlockGL();
|
||||
_current_context = newContext;
|
||||
- _current_context->LockGL();
|
||||
+ if (_current_context)
|
||||
+ _current_context->LockGL();
|
||||
}
|
||||
private:
|
||||
/* Event management */
|
||||
--
|
||||
2.2.2
|
||||
|
||||
|
||||
From 7191972735818e39e3c02e1a69ffc88f67a377ab Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Thu, 25 Feb 2016 20:23:41 +0000
|
||||
Subject: remove nacl, missing templates on Haiku
|
||||
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 47186d6..5fcfeec 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -1317,32 +1317,6 @@ AC_HELP_STRING([--enable-mir-shared], [dynamically load Mir support [[default=ma
|
||||
fi
|
||||
}
|
||||
|
||||
-dnl Check for Native Client stuff
|
||||
-CheckNativeClient()
|
||||
-{
|
||||
- AC_TRY_COMPILE([
|
||||
- #if !defined(__native_client__)
|
||||
- #error "NO NACL"
|
||||
- #endif
|
||||
- ],[
|
||||
- ],[
|
||||
- AC_DEFINE(SDL_VIDEO_DRIVER_NACL)
|
||||
- AC_DEFINE(SDL_AUDIO_DRIVER_NACL)
|
||||
- AC_DEFINE(HAVE_POW, 1, [ ])
|
||||
- AC_DEFINE(HAVE_OPENGLES2, 1, [ ])
|
||||
- AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
|
||||
- AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
|
||||
-
|
||||
- SDL_LIBS="-lppapi_simple -lppapi_gles2 $SDL_LIBS"
|
||||
-
|
||||
- SDLMAIN_SOURCES="$srcdir/src/main/nacl/*.c"
|
||||
- SOURCES="$SOURCES $srcdir/src/audio/nacl/*.c"
|
||||
- SUMMARY_audio="${SUMMARY_audio} nacl"
|
||||
- SOURCES="$SOURCES $srcdir/src/video/nacl/*.c"
|
||||
- SUMMARY_video="${SUMMARY_video} nacl opengles2"
|
||||
- ])
|
||||
-}
|
||||
-
|
||||
|
||||
dnl Find the X11 include and library directories
|
||||
CheckX11()
|
||||
--
|
||||
2.2.2
|
||||
|
||||
Reference in New Issue
Block a user