summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2004-12-16 00:53:01 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2004-12-16 00:53:01 +0000
commit5eea6fed228b99414be865b845568f8894a780d9 (patch)
tree72222229994b54e163e35f835d0fd4514b98af82 /media-libs
parentrename the manpage too #74535 (diff)
downloadhistorical-5eea6fed228b99414be865b845568f8894a780d9.tar.gz
historical-5eea6fed228b99414be865b845568f8894a780d9.tar.bz2
historical-5eea6fed228b99414be865b845568f8894a780d9.zip
version bump
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/libsdl/ChangeLog9
-rw-r--r--media-libs/libsdl/Manifest20
-rw-r--r--media-libs/libsdl/files/1.2.8-libcaca.patch792
-rw-r--r--media-libs/libsdl/files/1.2.8-nobuggy-X.patch13
-rw-r--r--media-libs/libsdl/files/digest-libsdl-1.2.81
-rw-r--r--media-libs/libsdl/libsdl-1.2.8.ebuild122
6 files changed, 948 insertions, 9 deletions
diff --git a/media-libs/libsdl/ChangeLog b/media-libs/libsdl/ChangeLog
index 982384ff96d3..c7068165ac31 100644
--- a/media-libs/libsdl/ChangeLog
+++ b/media-libs/libsdl/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-libs/libsdl
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.63 2004/11/10 14:41:29 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.64 2004/12/16 00:53:00 mr_bones_ Exp $
+
+*libsdl-1.2.8 (15 Dec 2004)
+
+ 15 Dec 2004; Michael Sterrett <mr_bones_@gentoo.org>
+ +files/1.2.8-libcaca.patch, +files/1.2.8-nobuggy-X.patch,
+ +libsdl-1.2.8.ebuild:
+ version bump
10 Nov 2004; Gustavo Zacarias <gustavoz@gentoo.org> libsdl-1.2.7-r3.ebuild:
Stable on sparc
diff --git a/media-libs/libsdl/Manifest b/media-libs/libsdl/Manifest
index 1c9ff7d9774a..c09d4cd176ef 100644
--- a/media-libs/libsdl/Manifest
+++ b/media-libs/libsdl/Manifest
@@ -1,21 +1,25 @@
-MD5 71ae427cbb1fd40e1036496047164c03 ChangeLog 9435
+MD5 37c052b4d86c415c8d369f1d42fef93a ChangeLog 9620
+MD5 baaaa69f33ef9027dac84ee4ff02773b metadata.xml 974
MD5 ca3bfcb303f4ddb5c6f708f377e4dc61 libsdl-1.2.6-r3.ebuild 2900
MD5 894fae13cc92aaec797c7eee55743d1d libsdl-1.2.7-r1.ebuild 2823
MD5 498c3c407eac50b2b7a5b50a48e70309 libsdl-1.2.7-r2.ebuild 3722
-MD5 e4a05431dd91039287fbfa7df275997d libsdl-1.2.7-r3.ebuild 3795
MD5 df227c0b42516d12513e066ac110c1ca libsdl-1.2.7.ebuild 2531
-MD5 baaaa69f33ef9027dac84ee4ff02773b metadata.xml 974
-MD5 0c2020ec3ce37ea0612064c52d1014b1 files/1.2.6-alsa-1.0.0.patch 557
-MD5 2e9d99f7ab858b5a64d124abea4565b9 files/digest-libsdl-1.2.7-r1 62
+MD5 e4a05431dd91039287fbfa7df275997d libsdl-1.2.7-r3.ebuild 3795
+MD5 2c10581d60072040aa0ace147cd81d16 libsdl-1.2.8.ebuild 3651
MD5 803844293dc7df2bb7d2323c03977b71 files/1.2.7-libcaca.patch 23266
-MD5 b66ce90b8939cef871c1c9b065fc0658 files/digest-libsdl-1.2.6-r3 62
+MD5 2e9d99f7ab858b5a64d124abea4565b9 files/digest-libsdl-1.2.7-r1 62
+MD5 0c2020ec3ce37ea0612064c52d1014b1 files/1.2.6-alsa-1.0.0.patch 557
+MD5 2e9d99f7ab858b5a64d124abea4565b9 files/digest-libsdl-1.2.7 62
MD5 206ddd08dd3e33819d03245d11af3014 files/1.2.7-gcc34.patch 8196
-MD5 419d8c241f85b4deba895c615faa5612 files/libsdl-1.2.6-fullscreen.patch 1094
MD5 e71ab5ce20cb7c70631a59f9d209cce1 files/1.2.7-joystick.patch 1317
+MD5 b66ce90b8939cef871c1c9b065fc0658 files/digest-libsdl-1.2.6-r3 62
+MD5 419d8c241f85b4deba895c615faa5612 files/libsdl-1.2.6-fullscreen.patch 1094
MD5 4f1ce33c931d461bed06277f60341085 files/1.2.6-nobuggy-X.patch 568
MD5 4f1ce33c931d461bed06277f60341085 files/1.2.7-nobuggy-X.patch 568
-MD5 2e9d99f7ab858b5a64d124abea4565b9 files/digest-libsdl-1.2.7 62
MD5 abf0c6fe9d93e5b0cc9a4dbb6d93ad87 files/1.2.7-joystick2.patch 16196
MD5 2e9d99f7ab858b5a64d124abea4565b9 files/digest-libsdl-1.2.7-r2 62
MD5 71a857d2bbcc34c4807638eb5d710f2e files/1.2.7-26headers.patch 1017
MD5 2e9d99f7ab858b5a64d124abea4565b9 files/digest-libsdl-1.2.7-r3 62
+MD5 4ce5ec18eafcf0b1c6caf31c9f67cb1d files/digest-libsdl-1.2.8 62
+MD5 4f1ce33c931d461bed06277f60341085 files/1.2.8-nobuggy-X.patch 568
+MD5 88437c556d9b4571f08de4a4e2d9323a files/1.2.8-libcaca.patch 23278
diff --git a/media-libs/libsdl/files/1.2.8-libcaca.patch b/media-libs/libsdl/files/1.2.8-libcaca.patch
new file mode 100644
index 000000000000..898148abf072
--- /dev/null
+++ b/media-libs/libsdl/files/1.2.8-libcaca.patch
@@ -0,0 +1,792 @@
+diff -r -P -c -C 4 SDL-1.2.6/configure.in SDL-1.2.6.patched/configure.in
+*** SDL-1.2.6.orig/configure.in Sat Aug 30 15:13:18 2003
+--- SDL-1.2.6/configure.in Mon Feb 2 16:05:08 2004
+***************
+*** 951,958 ****
+--- 951,984 ----
+ fi
+ fi
+ }
+
++ dnl Find the libcaca includes
++ CheckCaca()
++ {
++ AC_ARG_ENABLE(video-caca,
++ [ --enable-video-caca use libcaca video driver [default=no]],
++ , enable_video_caca=no)
++ if test x$enable_video = xyes -a x$enable_video_caca = xyes; then
++ AC_MSG_CHECKING(for libcaca support)
++ video_caca=no
++ AC_TRY_COMPILE([
++ #include <caca.h>
++ ],[
++ ],[
++ video_caca=yes
++ ])
++ AC_MSG_RESULT($video_caca)
++ if test x$video_caca = xyes; then
++ CFLAGS="$CFLAGS -DENABLE_CACA `caca-config --cflags`"
++ SYSTEM_LIBS="$SYSTEM_LIBS `caca-config --plugin-libs`"
++
++ VIDEO_SUBDIRS="$VIDEO_SUBDIRS caca"
++ VIDEO_DRIVERS="$VIDEO_DRIVERS caca/libvideo_caca.la"
++ fi
++ fi
++ }
++
+ dnl Set up the Atari Xbios driver
+ CheckAtariXbiosVideo()
+ {
+ AC_ARG_ENABLE(xbios,
+***************
+*** 1731,1738 ****
+--- 1757,1765 ----
+ CheckPS2GS
+ CheckGGI
+ CheckSVGA
+ CheckAAlib
++ CheckCaca
+ CheckQtopia
+ CheckPicoGUI
+ CheckOpenGL
+ CheckInputEvents
+***************
+*** 1784,1791 ****
+--- 1811,1819 ----
+ CheckX11
+ CheckDGA
+ CheckSVGA
+ CheckAAlib
++ CheckCaca
+ CheckOpenGL
+ CheckPTHREAD
+ # Set up files for the main() stub
+ COPY_ARCH_SRC(src/main, linux, SDL_main.c)
+***************
+*** 1830,1837 ****
+--- 1858,1866 ----
+ CheckX11
+ CheckDGA
+ CheckSVGA
+ CheckAAlib
++ CheckCaca
+ CheckOpenGL
+ CheckPTHREAD
+ CheckUSBHID
+ # Set up files for the main() stub
+***************
+*** 1868,1875 ****
+--- 1897,1905 ----
+ CheckESD
+ CheckNAS
+ CheckX11
+ CheckAAlib
++ CheckCaca
+ CheckOpenGL
+ CheckPTHREAD
+ CheckUSBHID
+ # Set up files for the main() stub
+***************
+*** 1910,1917 ****
+--- 1940,1948 ----
+ CheckESD
+ CheckNAS
+ CheckX11
+ CheckAAlib
++ CheckCaca
+ CheckOpenGL
+ CheckPTHREAD
+ CheckUSBHID
+ # Set up files for the main() stub
+***************
+*** 1953,1960 ****
+--- 1984,1992 ----
+ CheckESD
+ CheckNAS
+ CheckX11
+ CheckAAlib
++ CheckCaca
+ CheckOpenGL
+ CheckPTHREAD
+ # Set up files for the main() stub
+ COPY_ARCH_SRC(src/main, linux, SDL_main.c)
+***************
+*** 1996,2003 ****
+--- 2028,2036 ----
+ CheckESD
+ CheckNAS
+ CheckX11
+ CheckAAlib
++ CheckCaca
+ CheckOpenGL
+ CheckPTHREAD
+ # Set up files for the main() stub
+ COPY_ARCH_SRC(src/main, linux, SDL_main.c)
+***************
+*** 2036,2043 ****
+--- 2069,2077 ----
+ CheckESD
+ CheckNAS
+ CheckX11
+ CheckAAlib
++ CheckCaca
+ CheckOpenGL
+ CheckPTHREAD
+ # Set up files for the main() stub
+ COPY_ARCH_SRC(src/main, linux, SDL_main.c)
+***************
+*** 2088,2095 ****
+--- 2122,2130 ----
+ CheckNAS
+ CheckX11
+ CheckGGI
+ CheckAAlib
++ CheckCaca
+ CheckOpenGL
+ CheckPTHREAD
+ # Set up files for the main() stub
+ COPY_ARCH_SRC(src/main, linux, SDL_main.c)
+***************
+*** 2129,2136 ****
+--- 2164,2172 ----
+ CheckNAS
+ CheckX11
+ CheckGGI
+ CheckAAlib
++ CheckCaca
+ CheckOpenGL
+ CheckPTHREAD
+ # Set up files for the main() stub
+ COPY_ARCH_SRC(src/main, linux, SDL_main.c)
+***************
+*** 2167,2174 ****
+--- 2203,2211 ----
+ CheckNAS
+ CheckX11
+ CheckGGI
+ CheckAAlib
++ CheckCaca
+ CheckOpenGL
+ CheckPTHREAD
+ SDL_LIBS="$SDL_LIBS -lrt"
+ # Set up files for the main() stub
+***************
+*** 2674,2681 ****
+--- 2711,2719 ----
+ src/video/Makefile
+ src/video/aalib/Makefile
+ src/video/ataricommon/Makefile
+ src/video/bwindow/Makefile
++ src/video/caca/Makefile
+ src/video/cybergfx/Makefile
+ src/video/dc/Makefile
+ src/video/dga/Makefile
+ src/video/directfb/Makefile
+diff -r -P -c -C 4 SDL-1.2.6/src/video/Makefile.am SDL-1.2.6.patched/src/video/Makefile.am
+*** SDL-1.2.6.orig/src/video/Makefile.am Sat Aug 30 15:13:06 2003
+--- SDL-1.2.6/src/video/Makefile.am Mon Feb 2 16:05:32 2004
+***************
+*** 4,12 ****
+ noinst_LTLIBRARIES = libvideo.la
+
+ # Define which subdirectories need to be built
+ SUBDIRS = @VIDEO_SUBDIRS@
+! DIST_SUBDIRS = dummy x11 dga nanox fbcon directfb vgl svga ggi aalib \
+ wincommon windib windx5 \
+ maccommon macdsp macrom riscos quartz \
+ bwindow ps2gs photon cybergfx epoc picogui \
+ ataricommon xbios gem dc qtopia XFree86
+--- 4,12 ----
+ noinst_LTLIBRARIES = libvideo.la
+
+ # Define which subdirectories need to be built
+ SUBDIRS = @VIDEO_SUBDIRS@
+! DIST_SUBDIRS = dummy x11 dga nanox fbcon directfb vgl svga ggi aalib caca \
+ wincommon windib windx5 \
+ maccommon macdsp macrom riscos quartz \
+ bwindow ps2gs photon cybergfx epoc picogui \
+ ataricommon xbios gem dc qtopia XFree86
+diff -r -P -c -C 4 SDL-1.2.6/src/video/SDL_sysvideo.h SDL-1.2.6.patched/src/video/SDL_sysvideo.h
+*** SDL-1.2.6.orig/src/video/SDL_sysvideo.h Sat Aug 30 15:13:07 2003
+--- SDL-1.2.6/src/video/SDL_sysvideo.h Mon Feb 2 16:07:24 2004
+***************
+*** 358,365 ****
+--- 358,368 ----
+ #endif
+ #ifdef ENABLE_AALIB
+ extern VideoBootStrap AALIB_bootstrap;
+ #endif
++ #ifdef ENABLE_CACA
++ extern VideoBootStrap Caca_bootstrap;
++ #endif
+ #ifdef ENABLE_WINDIB
+ extern VideoBootStrap WINDIB_bootstrap;
+ #endif
+ #ifdef ENABLE_DIRECTX
+diff -r -P -c -C 4 SDL-1.2.6/src/video/SDL_video.c SDL-1.2.6.patched/src/video/SDL_video.c
+*** SDL-1.2.6.orig/src/video/SDL_video.c Sat Aug 30 15:13:07 2003
+--- SDL-1.2.6/src/video/SDL_video.c Mon Feb 2 16:08:14 2004
+***************
+*** 77,84 ****
+--- 77,87 ----
+ #endif
+ #ifdef ENABLE_AALIB
+ &AALIB_bootstrap,
+ #endif
++ #ifdef ENABLE_CACA
++ &Caca_bootstrap,
++ #endif
+ #ifdef ENABLE_DIRECTX
+ &DIRECTX_bootstrap,
+ #endif
+ #ifdef ENABLE_WINDIB
+diff -r -P -c -C 4 SDL-1.2.6/src/video/caca/Makefile.am SDL-1.2.6.patched/src/video/caca/Makefile.am
+*** SDL-1.2.6.orig/src/video/caca/Makefile.am Wed Dec 31 19:00:00 1969
+--- SDL-1.2.6/src/video/caca/Makefile.am Mon Feb 2 16:21:54 2004
+***************
+*** 0 ****
+--- 1,13 ----
++
++ ## Makefile.am for SDL using the libcaca video driver
++
++ noinst_LTLIBRARIES = libvideo_caca.la
++ libvideo_caca_la_SOURCES = $(CACA_SRCS)
++
++ # The SDL libcaca video driver sources
++ CACA_SRCS = \
++ SDL_cacavideo.h \
++ SDL_cacaevents.c \
++ SDL_cacaevents_c.h \
++ SDL_cacavideo.c
++
+diff -r -P -c -C 4 SDL-1.2.6/src/video/caca/SDL_cacaevents.c SDL-1.2.6.patched/src/video/caca/SDL_cacaevents.c
+*** SDL-1.2.6.orig/src/video/caca/SDL_cacaevents.c Wed Dec 31 19:00:00 1969
+--- SDL-1.2.6/src/video/caca/SDL_cacaevents.c Mon Feb 2 16:22:30 2004
+***************
+*** 0 ****
+--- 1,98 ----
++ /*
++ SDL - Simple DirectMedia Layer
++ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Library General Public
++ License as published by the Free Software Foundation; either
++ version 2 of the License, or (at your option) any later version.
++
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public
++ License along with this library; if not, write to the Free
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++
++ Sam Lantinga
++ slouken@libsdl.org
++ */
++
++ #ifdef SAVE_RCSID
++ static char rcsid =
++ "@(#) $Id: 1.2.8-libcaca.patch,v 1.1 2004/12/16 00:53:01 mr_bones_ Exp $";
++ #endif
++
++ #include <stdio.h>
++
++ #include <caca.h>
++
++ #include "SDL.h"
++ #include "SDL_sysevents.h"
++ #include "SDL_events_c.h"
++ #include "SDL_cacavideo.h"
++ #include "SDL_cacaevents_c.h"
++
++ void Caca_PumpEvents(_THIS)
++ {
++ int posted = 0;
++ int event;
++ SDL_keysym keysym;
++
++ if( ! this->screen ) /* Wait till we got the screen initialised */
++ return;
++
++ do {
++ posted = 0;
++
++ /* Get libcaca event */
++ SDL_mutexP(Caca_mutex);
++ event = caca_get_event(CACA_EVENT_ANY);
++ SDL_mutexV(Caca_mutex);
++
++ if ( event & (CACA_EVENT_KEY_PRESS | CACA_EVENT_KEY_RELEASE)) {
++ int key;
++ switch ( event & 0xffffff )
++ {
++ case CACA_KEY_LEFT: key = SDLK_LEFT; break;
++ case CACA_KEY_RIGHT: key = SDLK_RIGHT; break;
++ case CACA_KEY_UP: key = SDLK_UP; break;
++ case CACA_KEY_DOWN: key = SDLK_DOWN; break;
++ default: key = event & 0xff; break;
++ }
++ /* Key pressed */
++ /* printf("Key pressed: %d (%c)\n", key, key); */
++ keysym.scancode = key;
++ keysym.sym = key;
++ keysym.mod = KMOD_NONE;
++ keysym.unicode = 0;
++ if ( SDL_TranslateUNICODE ) {
++ keysym.unicode = key;
++ }
++ posted += SDL_PrivateKeyboard((event & CACA_EVENT_KEY_PRESS) ? SDL_PRESSED : SDL_RELEASED, &keysym);
++ }
++ else if ( event & (CACA_EVENT_MOUSE_PRESS | CACA_EVENT_MOUSE_RELEASE) ) {
++ /* FIXME: we currently ignore the button type! */
++ int button = event & 0x00ffffff;
++ if ( button > 3 ) {
++ button = 1;
++ }
++ posted += SDL_PrivateMouseButton((event & CACA_EVENT_MOUSE_PRESS) ? SDL_PRESSED : SDL_RELEASED, button, 0, 0);
++ }
++ else if ( event & CACA_EVENT_MOUSE_MOTION ) {
++ int new_x = 0, new_y = 0;
++ new_x = ((event & 0x00fff000) >> 12) * Caca_w / caca_get_width();
++ new_y = ((event & 0x00000fff) >> 0) * Caca_h / caca_get_height();
++ posted += SDL_PrivateMouseMotion(0, 0, new_x, new_y);
++ }
++ } while ( posted );
++ }
++
++ void Caca_InitOSKeymap(_THIS)
++ {
++ return;
++ }
++
++
+diff -r -P -c -C 4 SDL-1.2.6/src/video/caca/SDL_cacaevents_c.h SDL-1.2.6.patched/src/video/caca/SDL_cacaevents_c.h
+*** SDL-1.2.6.orig/src/video/caca/SDL_cacaevents_c.h Wed Dec 31 19:00:00 1969
+--- SDL-1.2.6/src/video/caca/SDL_cacaevents_c.h Mon Feb 2 16:13:06 2004
+***************
+*** 0 ****
+--- 1,35 ----
++ /*
++ SDL - Simple DirectMedia Layer
++ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Library General Public
++ License as published by the Free Software Foundation; either
++ version 2 of the License, or (at your option) any later version.
++
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public
++ License along with this library; if not, write to the Free
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++
++ Sam Lantinga
++ slouken@libsdl.org
++ */
++
++ #ifdef SAVE_RCSID
++ static char rcsid =
++ "@(#) $Id: 1.2.8-libcaca.patch,v 1.1 2004/12/16 00:53:01 mr_bones_ Exp $";
++ #endif
++
++ #include "SDL_cacavideo.h"
++
++ /* Variables and functions exported by SDL_sysevents.c to other parts.
++ of the native video subsystem (SDL_sysvideo.c)
++ */
++ extern void Caca_PumpEvents(_THIS);
++ extern void Caca_InitOSKeymap(_THIS);
++
+diff -r -P -c -C 4 SDL-1.2.6/src/video/caca/SDL_cacavideo.c SDL-1.2.6.patched/src/video/caca/SDL_cacavideo.c
+*** SDL-1.2.6.orig/src/video/caca/SDL_cacavideo.c Wed Dec 31 19:00:00 1969
+--- SDL-1.2.6/src/video/caca/SDL_cacavideo.c Mon Feb 2 16:15:22 2004
+***************
+*** 0 ****
+--- 1,301 ----
++ /*
++ SDL - Simple DirectMedia Layer
++ Copyright (C) 2003 Sam Hocevar
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Library General Public
++ License as published by the Free Software Foundation; either
++ version 2 of the License, or (at your option) any later version.
++
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public
++ License along with this library; if not, write to the Free
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++
++ Sam Hocevar
++ sam@zoy.org
++ */
++
++ #ifdef SAVE_RCSID
++ static char rcsid =
++ "@(#) $Id: 1.2.8-libcaca.patch,v 1.1 2004/12/16 00:53:01 mr_bones_ Exp $";
++ #endif
++
++ /* libcaca based SDL video driver implementation.
++ */
++
++ #include <stdlib.h>
++ #include <stdio.h>
++ #include <string.h>
++ #include <unistd.h>
++ #include <sys/stat.h>
++
++
++ #include "SDL.h"
++ #include "SDL_error.h"
++ #include "SDL_video.h"
++ #include "SDL_mouse.h"
++ #include "SDL_sysvideo.h"
++ #include "SDL_pixels_c.h"
++ #include "SDL_events_c.h"
++
++ #include "SDL_cacavideo.h"
++ #include "SDL_cacaevents_c.h"
++
++ #include <caca.h>
++
++ /* Initialization/Query functions */
++ static int Caca_VideoInit(_THIS, SDL_PixelFormat *vformat);
++ static SDL_Rect **Caca_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags);
++ static SDL_Surface *Caca_SetVideoMode(_THIS, SDL_Surface *current, int width, int height, int bpp, Uint32 flags);
++ static void Caca_VideoQuit(_THIS);
++
++ /* Hardware surface functions */
++ static int Caca_AllocHWSurface(_THIS, SDL_Surface *surface);
++ static int Caca_LockHWSurface(_THIS, SDL_Surface *surface);
++ static int Caca_FlipHWSurface(_THIS, SDL_Surface *surface);
++ static void Caca_UnlockHWSurface(_THIS, SDL_Surface *surface);
++ static void Caca_FreeHWSurface(_THIS, SDL_Surface *surface);
++
++ /* Cache the VideoDevice struct */
++ static struct SDL_VideoDevice *local_this;
++
++ /* libcaca driver bootstrap functions */
++
++ static int Caca_Available(void)
++ {
++ return 1; /* Always available ! */
++ }
++
++ static void Caca_DeleteDevice(SDL_VideoDevice *device)
++ {
++ free(device->hidden);
++ free(device);
++ }
++ static SDL_VideoDevice *Caca_CreateDevice(int devindex)
++ {
++ SDL_VideoDevice *device;
++
++ /* Initialize all variables that we clean on shutdown */
++ device = (SDL_VideoDevice *)malloc(sizeof(SDL_VideoDevice));
++ if ( device ) {
++ memset(device, 0, (sizeof *device));
++ device->hidden = (struct SDL_PrivateVideoData *)
++ malloc((sizeof *device->hidden));
++ }
++ if ( (device == NULL) || (device->hidden == NULL) ) {
++ SDL_OutOfMemory();
++ if ( device ) {
++ free(device);
++ }
++ return(0);
++ }
++ memset(device->hidden, 0, (sizeof *device->hidden));
++
++ /* Set the function pointers */
++ device->VideoInit = Caca_VideoInit;
++ device->ListModes = Caca_ListModes;
++ device->SetVideoMode = Caca_SetVideoMode;
++ device->CreateYUVOverlay = NULL;
++ device->SetColors = NULL;
++ device->UpdateRects = NULL;
++ device->VideoQuit = Caca_VideoQuit;
++ device->AllocHWSurface = Caca_AllocHWSurface;
++ device->CheckHWBlit = NULL;
++ device->FillHWRect = NULL;
++ device->SetHWColorKey = NULL;
++ device->SetHWAlpha = NULL;
++ device->LockHWSurface = Caca_LockHWSurface;
++ device->UnlockHWSurface = Caca_UnlockHWSurface;
++ device->FlipHWSurface = NULL;
++ device->FreeHWSurface = Caca_FreeHWSurface;
++ device->SetCaption = NULL;
++ device->SetIcon = NULL;
++ device->IconifyWindow = NULL;
++ device->GrabInput = NULL;
++ device->GetWMInfo = NULL;
++ device->InitOSKeymap = Caca_InitOSKeymap;
++ device->PumpEvents = Caca_PumpEvents;
++
++ device->free = Caca_DeleteDevice;
++
++ return device;
++ }
++
++ VideoBootStrap Caca_bootstrap = {
++ "caca", "Color ASCII Art Library",
++ Caca_Available, Caca_CreateDevice
++ };
++
++ int Caca_VideoInit(_THIS, SDL_PixelFormat *vformat)
++ {
++ int i;
++
++ /* Initialize all variables that we clean on shutdown */
++ for ( i=0; i<SDL_NUMMODES; ++i ) {
++ SDL_modelist[i] = malloc(sizeof(SDL_Rect));
++ SDL_modelist[i]->x = SDL_modelist[i]->y = 0;
++ }
++ /* Modes sorted largest to smallest */
++ SDL_modelist[0]->w = 1024; SDL_modelist[0]->h = 768;
++ SDL_modelist[1]->w = 800; SDL_modelist[1]->h = 600;
++ SDL_modelist[2]->w = 640; SDL_modelist[2]->h = 480;
++ SDL_modelist[3]->w = 320; SDL_modelist[3]->h = 400;
++ SDL_modelist[4]->w = 320; SDL_modelist[4]->h = 240;
++ SDL_modelist[5]->w = 320; SDL_modelist[5]->h = 200;
++ SDL_modelist[6] = NULL;
++
++ Caca_mutex = SDL_CreateMutex();
++
++ /* Initialize the library */
++ if ( caca_init() != 0 ) {
++ SDL_SetError("Unable to initialize libcaca");
++ return(-1);
++ }
++
++ /* Initialize private variables */
++ Caca_lastkey = 0;
++ Caca_bitmap = NULL;
++ Caca_buffer = NULL;
++
++ local_this = this;
++
++ /* Determine the screen depth (use default 8-bit depth) */
++ vformat->BitsPerPixel = 8;
++ vformat->BytesPerPixel = 1;
++
++ /* We're done! */
++ return(0);
++ }
++
++ SDL_Rect **Caca_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags)
++ {
++ if(format->BitsPerPixel != 8)
++ return NULL;
++
++ if ( flags & SDL_FULLSCREEN ) {
++ return SDL_modelist;
++ } else {
++ return (SDL_Rect **) -1;
++ }
++ }
++
++ /* Various screen update functions available */
++ static void Caca_DirectUpdate(_THIS, int numrects, SDL_Rect *rects);
++
++ SDL_Surface *Caca_SetVideoMode(_THIS, SDL_Surface *current,
++ int width, int height, int bpp, Uint32 flags)
++ {
++ if ( Caca_buffer ) {
++ free( Caca_buffer );
++ Caca_buffer = NULL;
++ }
++
++ if ( Caca_bitmap ) {
++ caca_free_bitmap( Caca_bitmap );
++ Caca_bitmap = NULL;
++ }
++
++ Caca_buffer = malloc(2 * ((width + 15) & ~15) * height);
++ if ( ! Caca_buffer ) {
++ SDL_SetError("Couldn't allocate buffer for requested mode");
++ return(NULL);
++ }
++
++ memset(Caca_buffer, 0, 2 * ((width + 15) & ~15) * height);
++
++ /* Allocate the new pixel format for the screen */
++ if ( ! SDL_ReallocFormat(current, 16, 0xf800, 0x07e0, 0x001f, 0) ) {
++ return(NULL);
++ }
++
++ /* Set up the new mode framebuffer */
++ current->flags = SDL_FULLSCREEN;
++ Caca_w = current->w = width;
++ Caca_h = current->h = height;
++ current->pitch = 2 * ((width + 15) & ~15);
++ current->pixels = Caca_buffer;
++
++ /* Create the libcaca bitmap */
++ Caca_bitmap = caca_create_bitmap( 16, width, height, current->pitch, 0xf800, 0x07e0, 0x001f, 0x0000 );
++ if ( ! Caca_bitmap ) {
++ SDL_SetError("Couldn't allocate libcaca bitmap");
++ return(NULL);
++ }
++
++ /* Set the blit function */
++ this->UpdateRects = Caca_DirectUpdate;
++
++ /* We're done */
++ return(current);
++ }
++
++ /* We don't actually allow hardware surfaces other than the main one */
++ static int Caca_AllocHWSurface(_THIS, SDL_Surface *surface)
++ {
++ return(-1);
++ }
++ static void Caca_FreeHWSurface(_THIS, SDL_Surface *surface)
++ {
++ return;
++ }
++
++ /* We need to wait for vertical retrace on page flipped displays */
++ static int Caca_LockHWSurface(_THIS, SDL_Surface *surface)
++ {
++ /* TODO ? */
++ return(0);
++ }
++ static void Caca_UnlockHWSurface(_THIS, SDL_Surface *surface)
++ {
++ return;
++ }
++
++ /* FIXME: How is this done with libcaca? */
++ static int Caca_FlipHWSurface(_THIS, SDL_Surface *surface)
++ {
++ SDL_mutexP(Caca_mutex);
++ caca_refresh();
++ SDL_mutexV(Caca_mutex);
++ return(0);
++ }
++
++ static void Caca_DirectUpdate(_THIS, int numrects, SDL_Rect *rects)
++ {
++ SDL_mutexP(Caca_mutex);
++ caca_draw_bitmap( 0, 0, caca_get_width() - 1, caca_get_height() - 1,
++ Caca_bitmap, Caca_buffer );
++ caca_refresh();
++ SDL_mutexV(Caca_mutex);
++ return;
++ }
++
++ /* Note: If we are terminated, this could be called in the middle of
++ another SDL video routine -- notably UpdateRects.
++ */
++ void Caca_VideoQuit(_THIS)
++ {
++ int i;
++
++ /* Free video mode lists */
++ for ( i=0; i<SDL_NUMMODES; ++i ) {
++ if ( SDL_modelist[i] != NULL ) {
++ free(SDL_modelist[i]);
++ SDL_modelist[i] = NULL;
++ }
++ }
++
++ if ( Caca_bitmap ) {
++ caca_free_bitmap( Caca_bitmap );
++ Caca_bitmap = NULL;
++ }
++
++ caca_end();
++
++ SDL_DestroyMutex(Caca_mutex);
++ }
++
+diff -r -P -c -C 4 SDL-1.2.6/src/video/caca/SDL_cacavideo.h SDL-1.2.6.patched/src/video/caca/SDL_cacavideo.h
+*** SDL-1.2.6.orig/src/video/caca/SDL_cacavideo.h Wed Dec 31 19:00:00 1969
+--- SDL-1.2.6/src/video/caca/SDL_cacavideo.h Mon Feb 2 16:21:27 2004
+***************
+*** 0 ****
+--- 1,73 ----
++ /*
++ SDL - Simple DirectMedia Layer
++ Copyright (C) 2003 Sam Hocevar
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Library General Public
++ License as published by the Free Software Foundation; either
++ version 2 of the License, or (at your option) any later version.
++
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public
++ License along with this library; if not, write to the Free
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++
++ Sam Hocevar
++ sam@zoy.org
++ */
++
++ #ifdef SAVE_RCSID
++ static char rcsid =
++ "@(#) $Id: 1.2.8-libcaca.patch,v 1.1 2004/12/16 00:53:01 mr_bones_ Exp $";
++ #endif
++
++ #ifndef _SDL_cacavideo_h
++ #define _SDL_cacavideo_h
++
++ #include "SDL_mouse.h"
++ #include "SDL_sysvideo.h"
++ #include "SDL_mutex.h"
++
++ #include <sys/time.h>
++ #include <time.h>
++
++ #include <caca.h>
++
++ /* Hidden "this" pointer for the video functions */
++ #define _THIS SDL_VideoDevice *this
++
++ #define SDL_NUMMODES 6
++
++ /* Private display data */
++ struct SDL_PrivateVideoData {
++ SDL_Rect *SDL_modelist[SDL_NUMMODES+1];
++ SDL_mutex *mutex;
++
++ struct caca_bitmap *bitmap;
++ void *buffer;
++ int w, h;
++
++ int lastkey;
++ struct timeval lasttime;
++ };
++
++ /* Old variable names */
++ #define SDL_modelist (this->hidden->SDL_modelist)
++ #define Caca_palette (this->hidden->palette)
++ #define Caca_bitmap (this->hidden->bitmap)
++ #define Caca_buffer (this->hidden->buffer)
++
++ #define Caca_w (this->hidden->w)
++ #define Caca_h (this->hidden->h)
++
++ #define Caca_lastkey (this->hidden->lastkey)
++ #define Caca_lasttime (this->hidden->lasttime)
++
++ #define Caca_mutex (this->hidden->mutex)
++
++ #endif /* _SDL_cacavideo_h */
++
diff --git a/media-libs/libsdl/files/1.2.8-nobuggy-X.patch b/media-libs/libsdl/files/1.2.8-nobuggy-X.patch
new file mode 100644
index 000000000000..50f1297590a4
--- /dev/null
+++ b/media-libs/libsdl/files/1.2.8-nobuggy-X.patch
@@ -0,0 +1,13 @@
+--- SDL-1.2.6.orig/src/video/x11/SDL_x11modes.c 2003-12-16 05:00:33.000000000 +0100
++++ SDL-1.2.6/src/video/x11/SDL_x11modes.c 2003-12-16 05:01:42.000000000 +0100
+@@ -323,10 +323,6 @@
+ fclose(metro_fp);
+ }
+ }
+-#if defined(__alpha__) || defined(__sparc64__) || defined(__powerpc__)
+- /* The alpha, sparc64 and PPC XFree86 servers are also buggy */
+- buggy_X11 = 1;
+-#endif
+ /* Enumerate the available fullscreen modes */
+ if ( ! buggy_X11 ) {
+ if ( SDL_NAME(XF86VidModeQueryExtension)(SDL_Display, &vm_event, &vm_error) &&
diff --git a/media-libs/libsdl/files/digest-libsdl-1.2.8 b/media-libs/libsdl/files/digest-libsdl-1.2.8
new file mode 100644
index 000000000000..e3eee3d4428d
--- /dev/null
+++ b/media-libs/libsdl/files/digest-libsdl-1.2.8
@@ -0,0 +1 @@
+MD5 37aaf9f069f9c2c18856022f35de9f8c SDL-1.2.8.tar.gz 2602449
diff --git a/media-libs/libsdl/libsdl-1.2.8.ebuild b/media-libs/libsdl/libsdl-1.2.8.ebuild
new file mode 100644
index 000000000000..c4f35de28093
--- /dev/null
+++ b/media-libs/libsdl/libsdl-1.2.8.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.8.ebuild,v 1.1 2004/12/16 00:53:01 mr_bones_ Exp $
+
+inherit toolchain-funcs eutils gnuconfig
+
+DESCRIPTION="Simple Direct Media Layer"
+HOMEPAGE="http://www.libsdl.org/"
+SRC_URI="http://www.libsdl.org/release/SDL-${PV}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="oss alsa esd arts nas X dga xv xinerama fbcon directfb ggi svga aalib opengl libcaca noaudio novideo nojoystick"
+# if you disable audio/video/joystick and something breaks, you pick up the pieces
+
+RDEPEND=">=media-libs/audiofile-0.1.9
+ alsa? ( media-libs/alsa-lib )
+ esd? ( >=media-sound/esound-0.2.19 )
+ arts? ( kde-base/arts )
+ nas? ( media-libs/nas
+ virtual/x11 )
+ X? ( virtual/x11 )
+ directfb? ( >=dev-libs/DirectFB-0.9.19 )
+ ggi? ( >=media-libs/libggi-2.0_beta3 )
+ svga? ( >=media-libs/svgalib-1.4.2 )
+ aalib? ( media-libs/aalib )
+ libcaca? ( >=media-libs/libcaca-0.9-r1 )
+ opengl? ( virtual/opengl )"
+DEPEND="${RDEPEND}
+ x86? ( dev-lang/nasm )"
+
+S="${WORKDIR}/SDL-${PV}"
+
+pkg_setup() {
+ if use noaudio || use novideo || use nojoystick ; then
+ ewarn "Since you've chosen to turn off some of libsdl's functionality,"
+ ewarn "don't bother filing libsdl-related bugs until trying to remerge"
+ ewarn "libsdl without the no* flags in USE. You need to know what"
+ ewarn "you're doing to selectively turn off parts of libsdl."
+ epause 30
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PV}-nobuggy-X.patch" #30089
+ epatch "${FILESDIR}/${PV}-libcaca.patch" #40224
+
+ if use nas && ! use X ; then #32447
+ sed -i \
+ -e 's:-laudio:-laudio -L/usr/X11R6/lib:' \
+ configure.in || die "nas sed hack failed"
+ fi
+
+ ./autogen.sh || die "autogen failed"
+ gnuconfig_update
+}
+
+src_compile() {
+ local myconf=
+ use noaudio && myconf="${myconf} --disable-audio"
+ use novideo \
+ && myconf="${myconf} --disable-video" \
+ || myconf="${myconf} --enable-video-dummy"
+ use nojoystick && myconf="${myconf} --disable-joystick"
+
+ local directfbconf="--disable-video-directfb"
+ if use directfb ; then
+ # since DirectFB can link against SDL and trigger a
+ # dependency loop, only link against DirectFB if it
+ # isn't broken #61592
+ echo 'int main(){}' > directfb-test.c
+ $(tc-getCC) directfb-test.c -ldirectfb 2>/dev/null \
+ && directfbconf="--enable-video-directfb" \
+ || ewarn "Disabling DirectFB since libdirectfb.so is broken"
+ fi
+ myconf="${myconf} ${directfbconf}"
+
+ econf \
+ --disable-dependency-tracking \
+ --enable-events \
+ --enable-cdrom \
+ --enable-threads \
+ --enable-timers \
+ --enable-endian \
+ --enable-file \
+ --enable-cpuinfo \
+ $(use_enable oss) \
+ $(use_enable alsa) \
+ $(use_enable esd) \
+ $(use_enable arts) \
+ $(use_enable nas) \
+ $(use_enable x86 nasm) \
+ $(use_enable X video-x11) \
+ $(use_enable dga) \
+ $(use_enable xv video-x11-xv) \
+ $(use_enable xinerama video-x11-xinerama) \
+ $(use_enable dga video-dga) \
+ $(use_enable fbcon video-fbcon) \
+ $(use_enable ggi video-ggi) \
+ $(use_enable svga video-svga) \
+ $(use_enable aalib video-aalib) \
+ $(use_enable libcaca video-caca) \
+ $(use_enable opengl video-opengl) \
+ $(use_with X x) \
+ ${myconf} || die
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ preplib
+ # Bug 34804; $(get_libdir) fixed BUG #65495
+ sed -i \
+ -e "s:-pthread::g" "${D}/usr/$(get_libdir)/libSDL.la" \
+ || die "sed failed"
+ dodoc BUGS CREDITS README README-SDL.txt README.CVS TODO WhatsNew
+ dohtml -r ./
+}