From: Mike Frysinger Date: Thu, 4 Jan 2007 07:09:17 +0000 (+0000) Subject: Fix building with sanitized linux headers #159923. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=de2f643924d5f9a4488a4e8faa319edfcd66c317;p=gentoo.git Fix building with sanitized linux headers #159923. Package-Manager: portage-2.1.2_rc4-r5 --- diff --git a/media-libs/libsdl/ChangeLog b/media-libs/libsdl/ChangeLog index 96a3747f5802..db86e3c72c33 100644 --- a/media-libs/libsdl/ChangeLog +++ b/media-libs/libsdl/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-libs/libsdl -# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.118 2006/10/27 19:36:52 tupone Exp $ +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.119 2007/01/04 07:09:17 vapier Exp $ + + 04 Jan 2007; Mike Frysinger + +files/libsdl-1.2.11-linux-headers.patch, libsdl-1.2.11-r1.ebuild: + Fix building with sanitized linux headers #159923. *libsdl-1.2.11-r1 (27 Oct 2006) 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 new file mode 100644 index 000000000000..6e7b165f8175 --- /dev/null +++ b/media-libs/libsdl/files/libsdl-1.2.11-linux-headers.patch @@ -0,0 +1,28 @@ +http://bugs.gentoo.org/159923 + +--- src/video/fbcon/SDL_fbvideo.c ++++ src/video/fbcon/SDL_fbvideo.c +@@ -32,6 +32,10 @@ + #include /* For definition of PAGE_SIZE */ + #include + ++#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 + #include /* 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 3b8b89577619..7a6ada35d739 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-2006 Gentoo Foundation +# 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.1 2006/10/27 19:36:52 tupone Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.11-r1.ebuild,v 1.2 2007/01/04 07:09:17 vapier Exp $ inherit flag-o-matic toolchain-funcs eutils libtool @@ -76,8 +76,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 - # Fix segfault when auto converting stream #151991 - epatch "${FILESDIR}"/${P}-audioConv.patch + epatch "${FILESDIR}"/${P}-linux-headers.patch #159923 + epatch "${FILESDIR}"/${P}-audioConv.patch #151991 # add yasm-compatible defines to nasm code (hopefully we # can get this killed soonish)