summaryrefslogtreecommitdiff
path: root/recipes/libsdl
diff options
context:
space:
mode:
authorGraeme Gregory <dp@xora.org.uk>2009-09-17 22:00:02 +0100
committerGraeme Gregory <dp@xora.org.uk>2009-09-17 22:00:02 +0100
commitb0a80126c9dce4500a2c5da945fdb53aecf2a507 (patch)
tree2c11c8d261ec44f7eab1c0cda54d676e394624db /recipes/libsdl
parent33cee0586991e235d0fe3d984f822ef2f310e7c3 (diff)
libsdl-x11_1.2.11.bb : remove asm/page.h as its no longer there
Diffstat (limited to 'recipes/libsdl')
-rwxr-xr-xrecipes/libsdl/files/libsdl-1.2.11-pagesize.patch44
-rw-r--r--recipes/libsdl/libsdl-x11_1.2.11.bb3
2 files changed, 46 insertions, 1 deletions
diff --git a/recipes/libsdl/files/libsdl-1.2.11-pagesize.patch b/recipes/libsdl/files/libsdl-1.2.11-pagesize.patch
new file mode 100755
index 0000000000..1d606d1af9
--- /dev/null
+++ b/recipes/libsdl/files/libsdl-1.2.11-pagesize.patch
@@ -0,0 +1,44 @@
+From Mandriva. Realigned for Gentoo by Peter Alfredsen
+
+Index: SDL-1.2.11/src/video/fbcon/SDL_fbvideo.c
+===================================================================
+--- SDL-1.2.11.orig/src/video/fbcon/SDL_fbvideo.c
++++ SDL-1.2.11/src/video/fbcon/SDL_fbvideo.c
+@@ -29,7 +29,6 @@
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+-#include <asm/page.h> /* For definition of PAGE_SIZE */
+ #include <linux/vt.h>
+
+ #include "SDL_video.h"
+@@ -547,7 +546,7 @@ static int FB_VideoInit(_THIS, SDL_Pixel
+
+ /* Memory map the device, compensating for buggy PPC mmap() */
+ mapped_offset = (((long)finfo.smem_start) -
+- (((long)finfo.smem_start)&~(getpagesize()-1)));
++ (((long)finfo.smem_start)&~((int)sysconf(_SC_PAGE_SIZE)-1)));
+ mapped_memlen = finfo.smem_len+mapped_offset;
+ mapped_mem = do_mmap(NULL, mapped_memlen,
+ PROT_READ|PROT_WRITE, MAP_SHARED, console_fd, 0);
+Index: SDL-1.2.11/src/video/ps2gs/SDL_gsyuv.c
+===================================================================
+--- SDL-1.2.11.orig/src/video/ps2gs/SDL_gsyuv.c
++++ SDL-1.2.11/src/video/ps2gs/SDL_gsyuv.c
+@@ -27,7 +27,6 @@
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+-#include <asm/page.h> /* For definition of PAGE_SIZE */
+
+ #include "SDL_video.h"
+ #include "SDL_gsyuv_c.h"
+@@ -180,7 +179,7 @@ SDL_Overlay *GS_CreateYUVOverlay(_THIS,
+
+ /* Allocate a DMA area for pixel conversion */
+ bpp = this->screen->format->BytesPerPixel;
+- map_offset = (mapped_len + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
++ map_offset = (mapped_len + ((int)sysconf(_SC_PAGE_SIZE) - 1)) & ~((int)sysconf(_SC_PAGE_SIZE) - 1);
+ hwdata->dma_len = hwdata->macroblocks * (16 * 16 + 8 * 8 + 8 * 8) +
+ width * height * bpp +
+ hwdata->macroblocks * (16 * sizeof(long long)) +
diff --git a/recipes/libsdl/libsdl-x11_1.2.11.bb b/recipes/libsdl/libsdl-x11_1.2.11.bb
index ab349d6306..0dffe4ab3f 100644
--- a/recipes/libsdl/libsdl-x11_1.2.11.bb
+++ b/recipes/libsdl/libsdl-x11_1.2.11.bb
@@ -3,7 +3,7 @@ require libsdl.inc
# extra-keys.patch is missing
DEFAULT_PREFERENCE = "-1"
-PR = "r7"
+PR = "r8"
SRC_URI = "\
http://www.libsdl.org/release/SDL-${PV}.tar.gz \
@@ -13,6 +13,7 @@ SRC_URI = "\
file://kernel-asm-page.patch;patch=1 \
file://sdl-cdfix.patch;patch=1 \
file://fixmfour.patch;patch=1 \
+ file://libsdl-1.2.11-pagesize.patch;patch=1 \
"
EXTRA_OECONF = "--disable-static --disable-debug --enable-cdrom --enable-threads --enable-timers --enable-endian \