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 | b5f8a15b4af64ce212727080868bedda09441673 (patch) | |
tree | a192467861e4812e0b337660dc6b0dd25919fb2d /media-libs/libsdl | |
parent | Remove, vulnerable and useless (diff) | |
download | gentoo-2-b5f8a15b4af64ce212727080868bedda09441673.tar.gz gentoo-2-b5f8a15b4af64ce212727080868bedda09441673.tar.bz2 gentoo-2-b5f8a15b4af64ce212727080868bedda09441673.zip |
Backport some fixes from upstream to support building without asm/page.h #169388 by merwan kashouty.
(Portage version: 2.1.2-r14)
Diffstat (limited to 'media-libs/libsdl')
-rw-r--r-- | media-libs/libsdl/ChangeLog | 8 | ||||
-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 | ||||
-rw-r--r-- | media-libs/libsdl/libsdl-1.2.11-r1.ebuild | 4 |
4 files changed, 73 insertions, 31 deletions
diff --git a/media-libs/libsdl/ChangeLog b/media-libs/libsdl/ChangeLog index 1447d96ff5d6..e65dc91e0a7a 100644 --- a/media-libs/libsdl/ChangeLog +++ b/media-libs/libsdl/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-libs/libsdl # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.122 2007/02/13 14:24:10 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.123 2007/03/05 16:47:11 vapier Exp $ + + 05 Mar 2007; Mike Frysinger <vapier@gentoo.org> + +files/libsdl-1.2.11-fbcon-page-header.patch, + -files/libsdl-1.2.11-linux-headers.patch, libsdl-1.2.11-r1.ebuild: + Backport some fixes from upstream to support building without asm/page.h + #169388 by merwan kashouty. 13 Feb 2007; Gustavo Zacarias <gustavoz@gentoo.org> libsdl-1.2.11-r1.ebuild: 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" diff --git a/media-libs/libsdl/libsdl-1.2.11-r1.ebuild b/media-libs/libsdl/libsdl-1.2.11-r1.ebuild index 5d8177e43ca8..517b12384a6e 100644 --- a/media-libs/libsdl/libsdl-1.2.11-r1.ebuild +++ b/media-libs/libsdl/libsdl-1.2.11-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.11-r1.ebuild,v 1.4 2007/02/13 14:24:10 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.11-r1.ebuild,v 1.5 2007/03/05 16:47:11 vapier Exp $ inherit flag-o-matic toolchain-funcs eutils libtool @@ -75,8 +75,8 @@ src_unpack() { epatch "${FILESDIR}"/${P}-sdl-config.patch epatch "${FILESDIR}"/${P}-xinerama-head-0.patch #145917 epatch "${FILESDIR}"/${P}-no-inline-BlitRGBtoRGBPixelAlphaMMX3DNOW.patch #148186 - epatch "${FILESDIR}"/${P}-linux-headers.patch #159923 epatch "${FILESDIR}"/${P}-audioConv.patch #151991 + epatch "${FILESDIR}"/${P}-fbcon-page-header.patch #159923 #169388 # add yasm-compatible defines to nasm code (hopefully we # can get this killed soonish) |