libsdl2: add recipe for version 2.0.6.

tested on x86_64.
This commit is contained in:
Jerome Duval
2017-09-30 13:58:58 +02:00
parent a9f826cdff
commit 4f824b7196
2 changed files with 185 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
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-2017 Sam Lantinga"
LICENSE="Zlib"
REVISION="1"
SOURCE_URI="http://www.libsdl.org/release/SDL2-$portVersion.tar.gz"
CHECKSUM_SHA256="03658b5660d16d7b31263a691e058ed37acdab155d68dabbad79998fb552c5df"
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_2.0$secondaryArchSuffix = 0.6.0 compat >= 0
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
lib:libltdl$secondaryArchSuffix
"
PROVIDES_devel="
libsdl2${secondaryArchSuffix}_devel = $portVersion compat >= 2.0
cmd:sdl2_config$secondaryArchSuffix = $portVersion compat >= 2.0
devel:libSDL2$secondaryArchSuffix = 0.6.0 compat >= 0
devel:libSDL2main$secondaryArchSuffix = 0.6.0 compat >= 0
devel:libSDL2_test$secondaryArchSuffix = 0.6.0 compat >= 0
devel:libSDL2_2.0$secondaryArchSuffix = 0.6.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
"
BUILD()
{
autoreconf -fi
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/libSDL*.la
# devel package
prepareInstalledDevelLibs \
libSDL2 \
libSDL2main \
libSDL2_test \
libSDL2-2.0
fixPkgconfig
fixDevelopLibDirReferences $binDir/sdl2-config
packageEntries devel \
$developDir $binDir/sdl2-config $dataDir
}

View File

@@ -0,0 +1,102 @@
From 357b0e7d9842be41636f498d740f45395e4e1a02 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/src/video/haiku/SDL_bopengl.cc b/src/video/haiku/SDL_bopengl.cc
index 6bf7a17..0b60466 100644
--- a/src/video/haiku/SDL_bopengl.cc
+++ b/src/video/haiku/SDL_bopengl.cc
@@ -54,7 +54,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 *) (size_t) 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));
@@ -69,7 +69,7 @@ void *BE_GL_GetProcAddress(_THIS, const char *proc)
void *location = NULL;
status_t err;
if ((err =
- get_image_symbol((image_id) (size_t) _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.13.1
From 9da1e4aee27290c16c7b20eb67fe1c6a90087fe1 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 e91851e..7d85a5d 100644
--- a/configure.in
+++ b/configure.in
@@ -1527,33 +1527,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, 1, [ ])
- AC_DEFINE(SDL_AUDIO_DRIVER_NACL, 1, [ ])
- 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"
- ])
-}
-
-
CheckRPI()
{
AC_ARG_ENABLE(video-rpi,
--
2.13.1
From aa9490806bacc5ae684bc416c2263f9bf1dc70f0 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 30 Sep 2017 13:36:12 +0200
Subject: fix AC_DEFINE
diff --git a/configure.in b/configure.in
index 7d85a5d..6f48fef 100644
--- a/configure.in
+++ b/configure.in
@@ -1826,7 +1826,7 @@ int event_type = XI_TouchBegin;
XITouchClassInfo *t;
],[
have_xinput2_multitouch=yes
- AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [])
+ AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], [], [Description])
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
])
AC_MSG_RESULT($have_xinput2_multitouch)
--
2.13.1