diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-03-05 16:47:11 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-03-05 16:47:11 +0000 |
commit | f4e4e111d41d4a9b7b3c98830c8b542447d2c07a (patch) | |
tree | b405f47b4a7c3f46ca8e24e4ab91f00fb13c274b /media-libs/libsdl/files | |
parent | Remove, vulnerable and useless (diff) | |
download | historical-f4e4e111d41d4a9b7b3c98830c8b542447d2c07a.tar.gz historical-f4e4e111d41d4a9b7b3c98830c8b542447d2c07a.tar.bz2 historical-f4e4e111d41d4a9b7b3c98830c8b542447d2c07a.zip |
Backport some fixes from upstream to support building without asm/page.h #169388 by merwan kashouty.
Package-Manager: portage-2.1.2-r14
Diffstat (limited to 'media-libs/libsdl/files')
-rw-r--r-- | media-libs/libsdl/files/libsdl-1.2.11-fbcon-page-header.patch | 64 | ||||
-rw-r--r-- | media-libs/libsdl/files/libsdl-1.2.11-linux-headers.patch | 28 |
2 files changed, 64 insertions, 28 deletions
diff --git a/media-libs/libsdl/files/libsdl-1.2.11-fbcon-page-header.patch b/media-libs/libsdl/files/libsdl-1.2.11-fbcon-page-header.patch new file mode 100644 index 000000000000..00675cb47def --- /dev/null +++ b/media-libs/libsdl/files/libsdl-1.2.11-fbcon-page-header.patch @@ -0,0 +1,64 @@ +Backport from current libsdl svn so we can work with newer kernel headers + +http://bugs.gentoo.org/159923 +http://bugs.gentoo.org/169388 + +--- configure.in ++++ configure.in +@@ -807,6 +807,7 @@ + ]) + AC_MSG_RESULT($video_fbcon) + if test x$video_fbcon = xyes; then ++ AC_CHECK_FUNCS(getpagesize) + AC_DEFINE(SDL_VIDEO_DRIVER_FBCON) + SOURCES="$SOURCES $srcdir/src/video/fbcon/*.c" + have_video=yes +--- include/SDL_config.h.in ++++ include/SDL_config.h.in +@@ -302,4 +302,6 @@ + #undef SDL_HERMES_BLITTERS + #undef SDL_ALTIVEC_BLITTERS + ++#undef HAVE_GETPAGESIZE ++ + #endif /* _SDL_config_h */ +--- src/video/fbcon/SDL_fbvideo.c ++++ src/video/fbcon/SDL_fbvideo.c +@@ -29,7 +29,9 @@ + #include <unistd.h> + #include <sys/ioctl.h> + #include <sys/mman.h> ++#ifndef HAVE_GETPAGESIZE + #include <asm/page.h> /* For definition of PAGE_SIZE */ ++#endif + #include <linux/vt.h> + + #include "SDL_video.h" +@@ -149,6 +151,18 @@ + struct fb_var_screeninfo *vinfo); + static void FB_RestorePalette(_THIS); + ++static int SDL_getpagesize(void) ++{ ++#ifdef HAVE_GETPAGESIZE ++ return getpagesize(); ++#elif defined(PAGE_SIZE) ++ return PAGE_SIZE; ++#else ++#error Can not determine system page size. ++ return 4096; /* this is what it USED to be in Linux... */ ++#endif ++} ++ + /* Small wrapper for mmap() so we can play nicely with no-mmu hosts + * (non-mmu hosts disallow the MAP_SHARED flag) */ + +@@ -547,7 +561,7 @@ + + /* Memory map the device, compensating for buggy PPC mmap() */ + mapped_offset = (((long)finfo.smem_start) - +- (((long)finfo.smem_start)&~(PAGE_SIZE-1))); ++ (((long)finfo.smem_start)&~(SDL_getpagesize()-1))); + mapped_memlen = finfo.smem_len+mapped_offset; + mapped_mem = do_mmap(NULL, mapped_memlen, + PROT_READ|PROT_WRITE, MAP_SHARED, console_fd, 0); diff --git a/media-libs/libsdl/files/libsdl-1.2.11-linux-headers.patch b/media-libs/libsdl/files/libsdl-1.2.11-linux-headers.patch deleted file mode 100644 index 6e7b165f8175..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.11-linux-headers.patch +++ /dev/null @@ -1,28 +0,0 @@ -http://bugs.gentoo.org/159923 - ---- src/video/fbcon/SDL_fbvideo.c -+++ src/video/fbcon/SDL_fbvideo.c -@@ -32,6 +32,10 @@ - #include <asm/page.h> /* For definition of PAGE_SIZE */ - #include <linux/vt.h> - -+#ifndef PAGE_SIZE -+# define PAGE_SIZE sysconf(_SC_PAGE_SIZE) -+#endif -+ - #include "SDL_video.h" - #include "SDL_mouse.h" - #include "../SDL_sysvideo.h" ---- src/video/ps2gs/SDL_gsyuv.c -+++ src/video/ps2gs/SDL_gsyuv.c -@@ -29,6 +29,10 @@ - #include <sys/mman.h> - #include <asm/page.h> /* For definition of PAGE_SIZE */ - -+#ifndef PAGE_SIZE -+# define PAGE_SIZE sysconf(_SC_PAGE_SIZE) -+#endif -+ - #include "SDL_video.h" - #include "SDL_gsyuv_c.h" - #include "../SDL_yuvfuncs.h" |