|
@@ -0,0 +1,229 @@
|
|
|
+diff --git a/package/sdl/0003-add-SDL_NOKBD.patch b/package/sdl/0003-add-SDL_NOKBD.patch
|
|
|
+new file mode 100644
|
|
|
+index 0000000..d944555
|
|
|
+--- /dev/null
|
|
|
++++ b/package/sdl/0003-add-SDL_NOKBD.patch
|
|
|
+@@ -0,0 +1,55 @@
|
|
|
++diff --git a/src/video/fbcon/SDL_fbvideo.c b/src/video/fbcon/SDL_fbvideo.c
|
|
|
++index 5e58809..81830b6 100644
|
|
|
++--- a/src/video/fbcon/SDL_fbvideo.c
|
|
|
+++++ b/src/video/fbcon/SDL_fbvideo.c
|
|
|
++@@ -793,9 +793,11 @@ static int FB_VideoInit(_THIS, SDL_PixelFormat *vformat)
|
|
|
++ }
|
|
|
++
|
|
|
++ /* Enable mouse and keyboard support */
|
|
|
++- if ( FB_OpenKeyboard(this) < 0 ) {
|
|
|
++- FB_VideoQuit(this);
|
|
|
++- return(-1);
|
|
|
+++ if (!SDL_getenv("SDL_NOKBD")){
|
|
|
+++ if ( FB_OpenKeyboard(this) < 0 ) {
|
|
|
+++ FB_VideoQuit(this);
|
|
|
+++ return(-1);
|
|
|
+++ }
|
|
|
++ }
|
|
|
++ if ( FB_OpenMouse(this) < 0 ) {
|
|
|
++ const char *sdl_nomouse;
|
|
|
++@@ -944,7 +946,7 @@ static SDL_Surface *FB_SetVGA16Mode(_THIS, SDL_Surface *current,
|
|
|
++
|
|
|
++ /* Set the terminal into graphics mode */
|
|
|
++ if ( FB_EnterGraphicsMode(this) < 0 ) {
|
|
|
++- return(NULL);
|
|
|
+++ if (!SDL_getenv("SDL_NOKBD")) return(NULL);
|
|
|
++ }
|
|
|
++
|
|
|
++ /* Restore the original palette */
|
|
|
++@@ -1009,7 +1011,7 @@ static SDL_Surface *FB_SetVideoMode(_THIS, SDL_Surface *current,
|
|
|
++
|
|
|
++ /* Set the terminal into graphics mode */
|
|
|
++ if ( FB_EnterGraphicsMode(this) < 0 ) {
|
|
|
++- return(NULL);
|
|
|
+++ if (!SDL_getenv("SDL_NOKBD")) return(NULL);
|
|
|
++ }
|
|
|
++
|
|
|
++ /* Restore the original palette */
|
|
|
++@@ -1919,7 +1921,7 @@ static void FB_VideoQuit(_THIS)
|
|
|
++ SDL_memcpy(flip_address[0], flip_address[1], this->screen->pitch * this->screen->h);
|
|
|
++ }
|
|
|
++
|
|
|
++- if ( !dontClearPixels && this->screen->pixels && FB_InGraphicsMode(this) ) {
|
|
|
+++ if ( (!dontClearPixels && this->screen->pixels && FB_InGraphicsMode(this)) || SDL_getenv("SDL_NOKBD") ) {
|
|
|
++ #if defined(__powerpc__) || defined(__ia64__) /* SIGBUS when using SDL_memset() ?? */
|
|
|
++ Uint8 *rowp = (Uint8 *)this->screen->pixels;
|
|
|
++ int left = this->screen->pitch*this->screen->h;
|
|
|
++@@ -1968,7 +1970,7 @@ static void FB_VideoQuit(_THIS)
|
|
|
++ }
|
|
|
++
|
|
|
++ /* Restore the original video mode and palette */
|
|
|
++- if ( FB_InGraphicsMode(this) ) {
|
|
|
+++ if ( FB_InGraphicsMode(this) || SDL_getenv("SDL_NOKBD") ) {
|
|
|
++ FB_RestorePalette(this);
|
|
|
++ ioctl(console_fd, FBIOPUT_VSCREENINFO, &saved_vinfo);
|
|
|
++ }
|
|
|
+diff --git a/package/sdl/0004-sdl-fbdev-blit32.patch b/package/sdl/0004-sdl-fbdev-blit32.patch
|
|
|
+new file mode 100644
|
|
|
+index 0000000..e06a57a
|
|
|
+--- /dev/null
|
|
|
++++ b/package/sdl/0004-sdl-fbdev-blit32.patch
|
|
|
+@@ -0,0 +1,99 @@
|
|
|
++diff --git a/src/video/fbcon/SDL_fbvideo.c b/src/video/fbcon/SDL_fbvideo.c
|
|
|
++index 81830b6..1399140 100644
|
|
|
++--- a/src/video/fbcon/SDL_fbvideo.c
|
|
|
+++++ b/src/video/fbcon/SDL_fbvideo.c
|
|
|
++@@ -165,6 +165,10 @@ static void FB_RestorePalette(_THIS);
|
|
|
++ static FB_bitBlit FB_blit16;
|
|
|
++ static FB_bitBlit FB_blit16blocked;
|
|
|
++
|
|
|
+++static FB_bitBlit FB_blit32;
|
|
|
+++static FB_bitBlit FB_blit32blocked;
|
|
|
+++
|
|
|
+++
|
|
|
++ static int SDL_getpagesize(void)
|
|
|
++ {
|
|
|
++ #ifdef HAVE_GETPAGESIZE
|
|
|
++@@ -1119,6 +1123,10 @@ static SDL_Surface *FB_SetVideoMode(_THIS, SDL_Surface *current,
|
|
|
++ blitFunc = (rotate == FBCON_ROTATE_NONE ||
|
|
|
++ rotate == FBCON_ROTATE_UD) ?
|
|
|
++ FB_blit16 : FB_blit16blocked;
|
|
|
+++ } else if (vinfo.bits_per_pixel == 32) {
|
|
|
+++ blitFunc = (rotate == FBCON_ROTATE_NONE ||
|
|
|
+++ rotate == FBCON_ROTATE_UD) ?
|
|
|
+++ FB_blit32 : FB_blit32blocked;
|
|
|
++ } else {
|
|
|
++ #ifdef FBCON_DEBUG
|
|
|
++ fprintf(stderr, "Init vinfo:\n");
|
|
|
++@@ -1495,6 +1503,57 @@ static void FB_blit16blocked(Uint8 *byte_src_pos, int src_right_delta, int src_d
|
|
|
++ }
|
|
|
++ }
|
|
|
++
|
|
|
+++static void FB_blit32(Uint8 *byte_src_pos, int src_right_delta, int src_down_delta,
|
|
|
+++ Uint8 *byte_dst_pos, int dst_linebytes, int width, int height)
|
|
|
+++{
|
|
|
+++ int w;
|
|
|
+++ Uint32 *src_pos = (Uint32 *)byte_src_pos;
|
|
|
+++ Uint32 *dst_pos = (Uint32 *)byte_dst_pos;
|
|
|
+++
|
|
|
+++ while (height) {
|
|
|
+++ Uint32 *src = src_pos;
|
|
|
+++ Uint32 *dst = dst_pos;
|
|
|
+++ for (w = width; w != 0; w--) {
|
|
|
+++ *dst = *src;
|
|
|
+++ src += src_right_delta;
|
|
|
+++ dst++;
|
|
|
+++ }
|
|
|
+++ dst_pos = (Uint32 *)((Uint8 *)dst_pos + dst_linebytes);
|
|
|
+++ src_pos += src_down_delta;
|
|
|
+++ height--;
|
|
|
+++ }
|
|
|
+++}
|
|
|
+++
|
|
|
+++#define BLOCKSIZE_W 32
|
|
|
+++#define BLOCKSIZE_H 32
|
|
|
+++
|
|
|
+++static void FB_blit32blocked(Uint8 *byte_src_pos, int src_right_delta, int src_down_delta,
|
|
|
+++ Uint8 *byte_dst_pos, int dst_linebytes, int width, int height)
|
|
|
+++{
|
|
|
+++ int w;
|
|
|
+++ Uint32 *src_pos = (Uint32 *)byte_src_pos;
|
|
|
+++ Uint32 *dst_pos = (Uint32 *)byte_dst_pos;
|
|
|
+++
|
|
|
+++ while (height > 0) {
|
|
|
+++ Uint32 *src = src_pos;
|
|
|
+++ Uint32 *dst = dst_pos;
|
|
|
+++ for (w = width; w > 0; w -= BLOCKSIZE_W) {
|
|
|
+++ FB_blit32((Uint8 *)src,
|
|
|
+++ src_right_delta,
|
|
|
+++ src_down_delta,
|
|
|
+++ (Uint8 *)dst,
|
|
|
+++ dst_linebytes,
|
|
|
+++ min(w, BLOCKSIZE_W),
|
|
|
+++ min(height, BLOCKSIZE_H));
|
|
|
+++ src += src_right_delta * BLOCKSIZE_W;
|
|
|
+++ dst += BLOCKSIZE_W;
|
|
|
+++ }
|
|
|
+++ dst_pos = (Uint32 *)((Uint8 *)dst_pos + dst_linebytes * BLOCKSIZE_H);
|
|
|
+++ src_pos += src_down_delta * BLOCKSIZE_H;
|
|
|
+++ height -= BLOCKSIZE_H;
|
|
|
+++ }
|
|
|
+++}
|
|
|
+++
|
|
|
++ static void FB_DirectUpdate(_THIS, int numrects, SDL_Rect *rects)
|
|
|
++ {
|
|
|
++ int width = cache_vinfo.xres;
|
|
|
++@@ -1507,10 +1566,10 @@ static void FB_DirectUpdate(_THIS, int numrects, SDL_Rect *rects)
|
|
|
++ return;
|
|
|
++ }
|
|
|
++
|
|
|
++- if (cache_vinfo.bits_per_pixel != 16) {
|
|
|
++- SDL_SetError("Shadow copy only implemented for 16 bpp");
|
|
|
++- return;
|
|
|
++- }
|
|
|
+++// if (cache_vinfo.bits_per_pixel != 16) {
|
|
|
+++// SDL_SetError("Shadow copy only implemented for 16 bpp");
|
|
|
+++// return;
|
|
|
+++// }
|
|
|
++
|
|
|
++ for (i = 0; i < numrects; i++) {
|
|
|
++ int x1, y1, x2, y2;
|
|
|
+diff --git a/package/sdl/Config.in b/package/sdl/Config.in
|
|
|
+index 9f1e34d..65ac8a2 100644
|
|
|
+--- a/package/sdl/Config.in
|
|
|
++++ b/package/sdl/Config.in
|
|
|
+@@ -17,6 +17,10 @@ config BR2_PACKAGE_SDL_DIRECTFB
|
|
|
+ bool "SDL DirectFB video driver"
|
|
|
+ depends on BR2_PACKAGE_DIRECTFB
|
|
|
+
|
|
|
++config BR2_PACKAGE_SDL_QTOPIA
|
|
|
++ bool "SDL Qtopia video driver"
|
|
|
++ depends on BR2_PACKAGE_QT
|
|
|
++
|
|
|
+ config BR2_PACKAGE_SDL_X11
|
|
|
+ bool "SDL X11 video driver"
|
|
|
+ depends on BR2_PACKAGE_XORG7
|
|
|
+diff --git a/package/sdl/sdl.hash b/package/sdl/sdl.hash
|
|
|
+index 2c46975..ad59b90 100644
|
|
|
+--- a/package/sdl/sdl.hash
|
|
|
++++ b/package/sdl/sdl.hash
|
|
|
+@@ -1,4 +1,2 @@
|
|
|
+ # Locally calculated after checking pgp signature
|
|
|
+ sha256 d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00 SDL-1.2.15.tar.gz
|
|
|
+-# Locally computed
|
|
|
+-sha256 bb117c0fbd7f57f64170b690285d7df07c2371b578e3b3cd3aa2e1155ef461a0 COPYING
|
|
|
+diff --git a/package/sdl/sdl.mk b/package/sdl/sdl.mk
|
|
|
+index 7389cd3..38b4b97 100644
|
|
|
+--- a/package/sdl/sdl.mk
|
|
|
++++ b/package/sdl/sdl.mk
|
|
|
+@@ -7,10 +7,8 @@
|
|
|
+ SDL_VERSION = 1.2.15
|
|
|
+ SDL_SOURCE = SDL-$(SDL_VERSION).tar.gz
|
|
|
+ SDL_SITE = http://www.libsdl.org/release
|
|
|
+-SDL_LICENSE = LGPL-2.1+
|
|
|
++SDL_LICENSE = LGPLv2.1+
|
|
|
+ SDL_LICENSE_FILES = COPYING
|
|
|
+-SDL_CPE_ID_VENDOR = libsdl
|
|
|
+-SDL_CPE_ID_PRODUCT = simple_directmedia_layer
|
|
|
+ SDL_INSTALL_STAGING = YES
|
|
|
+
|
|
|
+ # we're patching configure.in, but package cannot autoreconf with our version of
|
|
|
+@@ -25,8 +23,6 @@ HOST_SDL_PRE_CONFIGURE_HOOKS += SDL_RUN_AUTOGEN
|
|
|
+ SDL_DEPENDENCIES += host-automake host-autoconf host-libtool
|
|
|
+ HOST_SDL_DEPENDENCIES += host-automake host-autoconf host-libtool
|
|
|
+
|
|
|
+-SDL_CONF_OPTS += --enable-video-qtopia=no
|
|
|
+-
|
|
|
+ ifeq ($(BR2_PACKAGE_SDL_FBCON),y)
|
|
|
+ SDL_CONF_OPTS += --enable-video-fbcon=yes
|
|
|
+ else
|
|
|
+@@ -41,6 +37,13 @@ else
|
|
|
+ SDL_CONF_OPTS += --enable-video-directfb=no
|
|
|
+ endif
|
|
|
+
|
|
|
++ifeq ($(BR2_PACKAGE_SDL_QTOPIA),y)
|
|
|
++SDL_CONF_OPTS += --enable-video-qtopia=yes
|
|
|
++SDL_DEPENDENCIES += qt
|
|
|
++else
|
|
|
++SDL_CONF_OPTS += --enable-video-qtopia=no
|
|
|
++endif
|
|
|
++
|
|
|
+ ifeq ($(BR2_PACKAGE_SDL_X11),y)
|
|
|
+ SDL_CONF_OPTS += --enable-video-x11=yes
|
|
|
+ SDL_DEPENDENCIES += \
|