diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-03-20 02:39:35 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-03-20 02:39:35 +0000 |
commit | 7250d0d7c33df8009cc433c136c16559b277e9b9 (patch) | |
tree | 7637df9c37953c5df28aec248913fe8d4508cbcd /media-libs/libsdl | |
parent | Bump to 1.3RC2. (diff) | |
download | gentoo-2-7250d0d7c33df8009cc433c136c16559b277e9b9.tar.gz gentoo-2-7250d0d7c33df8009cc433c136c16559b277e9b9.tar.bz2 gentoo-2-7250d0d7c33df8009cc433c136c16559b277e9b9.zip |
old
(Portage version: 2.1.2.2)
Diffstat (limited to 'media-libs/libsdl')
38 files changed, 0 insertions, 5180 deletions
diff --git a/media-libs/libsdl/files/1.2.7-26headers.patch b/media-libs/libsdl/files/1.2.7-26headers.patch deleted file mode 100644 index d145d90e4761..000000000000 --- a/media-libs/libsdl/files/1.2.7-26headers.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- SDL-1.2.7/src/video/fbcon/SDL_fbevents.c.old 2004-02-18 17:22:06.000000000 +0000 -+++ SDL-1.2.7/src/video/fbcon/SDL_fbevents.c 2004-07-25 13:44:16.654181264 +0100 -@@ -835,7 +835,7 @@ - static void switch_vt(_THIS, unsigned short which) - { - struct vt_stat vtstate; -- unsigned short current; -+ unsigned short current_; - SDL_Surface *screen; - __u16 saved_pal[3*256]; - Uint32 screen_arealen; -@@ -846,7 +846,7 @@ - (which == vtstate.v_active) ) { - return; - } -- current = vtstate.v_active; -+ current_ = vtstate.v_active; - - /* Save the contents of the screen, and go to text mode */ - SDL_mutexP(hw_lock); -@@ -864,7 +864,7 @@ - if ( ioctl(keyboard_fd, VT_ACTIVATE, which) == 0 ) { - /* Wait for our console to be activated again */ - ioctl(keyboard_fd, VT_WAITACTIVE, which); -- while ( ioctl(keyboard_fd, VT_WAITACTIVE, current) < 0 ) { -+ while ( ioctl(keyboard_fd, VT_WAITACTIVE, current_) < 0 ) { - if ( (errno != EINTR) && (errno != EAGAIN) ) { - /* Unknown VT error - cancel this */ - break; diff --git a/media-libs/libsdl/files/1.2.7-gcc34.patch b/media-libs/libsdl/files/1.2.7-gcc34.patch deleted file mode 100644 index d36a908aefad..000000000000 --- a/media-libs/libsdl/files/1.2.7-gcc34.patch +++ /dev/null @@ -1,270 +0,0 @@ -Index: src/audio/SDL_mixer_MMX.c -=================================================================== -RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/audio/SDL_mixer_MMX.c,v -retrieving revision 1.1 -diff -u -r1.1 SDL_mixer_MMX.c ---- src/audio/SDL_mixer_MMX.c 9 Nov 2002 06:13:28 -0000 1.1 -+++ src/audio/SDL_mixer_MMX.c 3 May 2004 19:51:58 -0000 -@@ -15,13 +15,11 @@ - { - __asm__ __volatile__ ( - --" movl %0,%%edi\n" // edi = dst --" movl %1,%%esi\n" // esi = src - " movl %3,%%eax\n" // eax = volume - --" movl %2,%%ebx\n" // ebx = size -+" movl %2,%%edx\n" // edx = size - --" shrl $4,%%ebx\n" // process 16 bytes per iteration = 8 samples -+" shrl $4,%%edx\n" // process 16 bytes per iteration = 8 samples - - " jz .endS16\n" - -@@ -39,14 +37,14 @@ - ".align 16\n" - " .mixloopS16:\n" - --" movq (%%esi),%%mm1\n" // mm1 = a|b|c|d -+" movq (%1),%%mm1\n" // mm1 = a|b|c|d - - " movq %%mm1,%%mm2\n" // mm2 = a|b|c|d - --" movq 8(%%esi),%%mm4\n" // mm4 = e|f|g|h -+" movq 8(%1),%%mm4\n" // mm4 = e|f|g|h - - // pré charger le buffer dst dans mm7 --" movq (%%edi),%%mm7\n" // mm7 = dst[0]" -+" movq (%0),%%mm7\n" // mm7 = dst[0]" - - // multiplier par le volume - " pmullw %%mm0,%%mm1\n" // mm1 = l(a*v)|l(b*v)|l(c*v)|l(d*v) -@@ -69,11 +67,11 @@ - " punpcklwd %%mm5,%%mm6\n" // mm6 = g*v|h*v - - // pré charger le buffer dst dans mm5 --" movq 8(%%edi),%%mm5\n" // mm5 = dst[1] -+" movq 8(%0),%%mm5\n" // mm5 = dst[1] - - // diviser par 128 - " psrad $7,%%mm1\n" // mm1 = a*v/128|b*v/128 , 128 = SDL_MIX_MAXVOLUME --" addl $16,%%esi\n" -+" add $16,%1\n" - - " psrad $7,%%mm3\n" // mm3 = c*v/128|d*v/128 - -@@ -87,15 +85,15 @@ - - // mm4 = le sample avec le volume modifié - " packssdw %%mm4,%%mm6\n" // mm6 = s(e*v|f*v|g*v|h*v) --" movq %%mm3,(%%edi)\n" -+" movq %%mm3,(%0)\n" - - " paddsw %%mm5,%%mm6\n" // mm6 = adjust_volume(src)+dst - --" movq %%mm6,8(%%edi)\n" -+" movq %%mm6,8(%0)\n" - --" addl $16,%%edi\n" -+" add $16,%0\n" - --" dec %%ebx\n" -+" dec %%edx\n" - - " jnz .mixloopS16\n" - -@@ -103,9 +101,9 @@ - - ".endS16:\n" - : -- : "m" (dst), "m"(src),"m"(size), -+ : "r" (dst), "r"(src),"m"(size), - "m"(volume) -- : "eax","ebx", "esi", "edi","memory" -+ : "eax","edx","memory" - ); - } - -@@ -119,11 +117,9 @@ - { - __asm__ __volatile__ ( - --" movl %0,%%edi\n" // edi = dst --" movl %1,%%esi\n" // esi = src - " movl %3,%%eax\n" // eax = volume - --" movd %%ebx,%%mm0\n" -+" movd %%edx,%%mm0\n" - " movq %%mm0,%%mm1\n" - " psllq $16,%%mm0\n" - " por %%mm1,%%mm0\n" -@@ -132,17 +128,17 @@ - " psllq $16,%%mm0\n" - " por %%mm1,%%mm0\n" - --" movl %2,%%ebx\n" // ebx = size --" shr $3,%%ebx\n" // process 8 bytes per iteration = 8 samples -+" movl %2,%%edx\n" // edx = size -+" shr $3,%%edx\n" // process 8 bytes per iteration = 8 samples - --" cmp $0,%%ebx\n" -+" cmp $0,%%edx\n" - " je .endS8\n" - - ".align 16\n" - " .mixloopS8:\n" - - " pxor %%mm2,%%mm2\n" // mm2 = 0 --" movq (%%esi),%%mm1\n" // mm1 = a|b|c|d|e|f|g|h -+" movq (%1),%%mm1\n" // mm1 = a|b|c|d|e|f|g|h - - " movq %%mm1,%%mm3\n" // mm3 = a|b|c|d|e|f|g|h - -@@ -152,10 +148,10 @@ - " punpckhbw %%mm2,%%mm1\n" // mm1 = 0|a|0|b|0|c|0|d - - " punpcklbw %%mm2,%%mm3\n" // mm3 = 0|e|0|f|0|g|0|h --" movq (%%edi),%%mm2\n" // mm2 = destination -+" movq (%0),%%mm2\n" // mm2 = destination - - " pmullw %%mm0,%%mm1\n" // mm1 = v*a|v*b|v*c|v*d --" addl $8,%%esi\n" -+" add $8,%1\n" - - " pmullw %%mm0,%%mm3\n" // mm3 = v*e|v*f|v*g|v*h - " psraw $7,%%mm1\n" // mm1 = v*a/128|v*b/128|v*c/128|v*d/128 -@@ -166,19 +162,19 @@ - - " paddsb %%mm2,%%mm3\n" // add to destination buffer - --" movq %%mm3,(%%edi)\n" // store back to ram --" addl $8,%%edi\n" -+" movq %%mm3,(%0)\n" // store back to ram -+" add $8,%0\n" - --" dec %%ebx\n" -+" dec %%edx\n" - - " jnz .mixloopS8\n" - - ".endS8:\n" - " emms\n" - : -- : "m" (dst), "m"(src),"m"(size), -+ : "r" (dst), "r"(src),"m"(size), - "m"(volume) -- : "eax","ebx", "esi", "edi","memory" -+ : "eax","edx","memory" - ); - } - #endif -Index: src/cpuinfo/SDL_cpuinfo.c -=================================================================== -RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/cpuinfo/SDL_cpuinfo.c,v -retrieving revision 1.15 -diff -u -r1.15 SDL_cpuinfo.c ---- src/cpuinfo/SDL_cpuinfo.c 11 Apr 2004 19:49:34 -0000 1.15 -+++ src/cpuinfo/SDL_cpuinfo.c 3 May 2004 19:52:08 -0000 -@@ -118,7 +118,7 @@ - " movl %%edi,%%ebx\n" - : "=m" (features) - : -- : "%eax", "%ebx", "%ecx", "%edx", "%edi" -+ : "%eax", "%ecx", "%edx", "%edi" - ); - #elif defined(_MSC_VER) - __asm { -@@ -153,7 +153,7 @@ - " movl %%edi,%%ebx\n" - : "=m" (features) - : -- : "%eax", "%ebx", "%ecx", "%edx", "%edi" -+ : "%eax", "%ecx", "%edx", "%edi" - ); - #elif defined(_MSC_VER) - __asm { -Index: src/video/SDL_yuv_mmx.c -=================================================================== -RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/video/SDL_yuv_mmx.c,v -retrieving revision 1.5 -diff -u -r1.5 SDL_yuv_mmx.c ---- src/video/SDL_yuv_mmx.c 4 Jan 2004 16:49:22 -0000 1.5 -+++ src/video/SDL_yuv_mmx.c 3 May 2004 19:52:24 -0000 -@@ -120,12 +120,12 @@ - "movd (%2), %%mm2\n" // 0 0 0 0 l3 l2 l1 l0 - "punpcklbw %%mm7,%%mm1\n" // 0 v3 0 v2 00 v1 00 v0 - "punpckldq %%mm1,%%mm1\n" // 00 v1 00 v0 00 v1 00 v0 -- "psubw _MMX_0080w,%%mm1\n" // mm1-128:r1 r1 r0 r0 r1 r1 r0 r0 -+ "psubw %[_MMX_0080w],%%mm1\n" // mm1-128:r1 r1 r0 r0 r1 r1 r0 r0 - - // create Cr_g (result in mm0) - "movq %%mm1,%%mm0\n" // r1 r1 r0 r0 r1 r1 r0 r0 -- "pmullw _MMX_VgrnRGB,%%mm0\n"// red*-46dec=0.7136*64 -- "pmullw _MMX_VredRGB,%%mm1\n"// red*89dec=1.4013*64 -+ "pmullw %[_MMX_VgrnRGB],%%mm0\n"// red*-46dec=0.7136*64 -+ "pmullw %[_MMX_VredRGB],%%mm1\n"// red*89dec=1.4013*64 - "psraw $6, %%mm0\n" // red=red/64 - "psraw $6, %%mm1\n" // red=red/64 - -@@ -134,8 +134,8 @@ - "movq (%2,%4),%%mm3\n" // 0 0 0 0 L3 L2 L1 L0 - "punpckldq %%mm3,%%mm2\n" // L3 L2 L1 L0 l3 l2 l1 l0 - "movq %%mm2,%%mm4\n" // L3 L2 L1 L0 l3 l2 l1 l0 -- "pand _MMX_FF00w,%%mm2\n" // L3 0 L1 0 l3 0 l1 0 -- "pand _MMX_00FFw,%%mm4\n" // 0 L2 0 L0 0 l2 0 l0 -+ "pand %[_MMX_FF00w],%%mm2\n" // L3 0 L1 0 l3 0 l1 0 -+ "pand %[_MMX_00FFw],%%mm4\n" // 0 L2 0 L0 0 l2 0 l0 - "psrlw $8,%%mm2\n" // 0 L3 0 L1 0 l3 0 l1 - - // create R (result in mm6) -@@ -152,11 +152,11 @@ - "movd (%1), %%mm1\n" // 0 0 0 0 u3 u2 u1 u0 - "punpcklbw %%mm7,%%mm1\n" // 0 u3 0 u2 00 u1 00 u0 - "punpckldq %%mm1,%%mm1\n" // 00 u1 00 u0 00 u1 00 u0 -- "psubw _MMX_0080w,%%mm1\n" // mm1-128:u1 u1 u0 u0 u1 u1 u0 u0 -+ "psubw %[_MMX_0080w],%%mm1\n" // mm1-128:u1 u1 u0 u0 u1 u1 u0 u0 - // create Cb_g (result in mm5) - "movq %%mm1,%%mm5\n" // u1 u1 u0 u0 u1 u1 u0 u0 -- "pmullw _MMX_UgrnRGB,%%mm5\n" // blue*-109dec=1.7129*64 -- "pmullw _MMX_UbluRGB,%%mm1\n" // blue*114dec=1.78125*64 -+ "pmullw %[_MMX_UgrnRGB],%%mm5\n" // blue*-109dec=1.7129*64 -+ "pmullw %[_MMX_UbluRGB],%%mm1\n" // blue*114dec=1.78125*64 - "psraw $6, %%mm5\n" // blue=red/64 - "psraw $6, %%mm1\n" // blue=blue/64 - -@@ -238,8 +238,14 @@ - "popl %%ebx\n" - : - : "m" (cr), "r"(cb),"r"(lum), -- "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod) -- : "%ebx" -+ "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod), -+ [_MMX_0080w] "m" (*_MMX_0080w), -+ [_MMX_00FFw] "m" (*_MMX_00FFw), -+ [_MMX_FF00w] "m" (*_MMX_FF00w), -+ [_MMX_VgrnRGB] "m" (*_MMX_VgrnRGB), -+ [_MMX_VredRGB] "m" (*_MMX_VredRGB), -+ [_MMX_UgrnRGB] "m" (*_MMX_UgrnRGB), -+ [_MMX_UbluRGB] "m" (*_MMX_UbluRGB) - ); - } - -@@ -413,8 +419,16 @@ - "popl %%ebx\n" - : - :"m" (cr), "r"(cb),"r"(lum), -- "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod) -- : "%ebx" -+ "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod), -+ [_MMX_0080w] "m" (*_MMX_0080w), -+ [_MMX_Ugrn565] "m" (*_MMX_Ugrn565), -+ [_MMX_Ublu5x5] "m" (*_MMX_Ublu5x5), -+ [_MMX_00FFw] "m" (*_MMX_00FFw), -+ [_MMX_Vgrn565] "m" (*_MMX_Vgrn565), -+ [_MMX_Vred5x5] "m" (*_MMX_Vred5x5), -+ [_MMX_Ycoeff] "m" (*_MMX_Ycoeff), -+ [_MMX_red565] "m" (*_MMX_red565), -+ [_MMX_grn565] "m" (*_MMX_grn565) - ); - } - diff --git a/media-libs/libsdl/files/1.2.7-joystick.patch b/media-libs/libsdl/files/1.2.7-joystick.patch deleted file mode 100644 index 3e5229da2c7c..000000000000 --- a/media-libs/libsdl/files/1.2.7-joystick.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -u -r1.13 -r1.14 ---- SDL12/src/joystick/linux/SDL_sysjoystick.c 2004/01/04 16:49:18 1.13 -+++ SDL12/src/joystick/linux/SDL_sysjoystick.c 2004/03/05 15:09:18 1.14 -@@ -383,7 +383,7 @@ - - static SDL_bool EV_ConfigJoystick(SDL_Joystick *joystick, int fd) - { -- int i; -+ int i, t; - unsigned long keybit[40]; - unsigned long absbit[40]; - unsigned long relbit[40]; -@@ -436,12 +436,18 @@ - joystick->hwdata->abs_correct[i].used = 0; - } else { - joystick->hwdata->abs_correct[i].used = 1; -- joystick->hwdata->abs_correct[i].coef[0] = -- (values[2] + values[1]) / 2 - values[4]; -- joystick->hwdata->abs_correct[i].coef[1] = -- (values[2] + values[1]) / 2 + values[4]; -- joystick->hwdata->abs_correct[i].coef[2] = -- (1 << 29) / ((values[2] - values[1]) / 2 - 2 * values[4]); -+ t = (2 - values[4]); -+ if ( t != 0 ) { -+ joystick->hwdata->abs_correct[i].coef[0] = (values[2] + values[1]) / t; -+ } -+ t = (2 + values[4]); -+ if ( t != 0 ) { -+ joystick->hwdata->abs_correct[i].coef[1] = (values[2] + values[1]) / t; -+ } -+ t = ((values[2] - values[1]) / 2 - 2 * values[4]); -+ if ( t != 0 ) { -+ joystick->hwdata->abs_correct[i].coef[2] = (1 << 29) / t; -+ } - } - ++joystick->naxes; - } diff --git a/media-libs/libsdl/files/1.2.7-joystick2.patch b/media-libs/libsdl/files/1.2.7-joystick2.patch deleted file mode 100644 index ad6eda329156..000000000000 --- a/media-libs/libsdl/files/1.2.7-joystick2.patch +++ /dev/null @@ -1,567 +0,0 @@ ---- src/joystick/linux/SDL_sysjoystick.c.orig 2004-07-13 04:20:48.000000000 -0700 -+++ src/joystick/linux/SDL_sysjoystick.c 2004-07-13 04:20:53.000000000 -0700 -@@ -67,11 +67,102 @@ - { "Saitek Saitek X45", 6, 1, 0 } - }; - -+#ifndef NO_LOGICAL_JOYSTICKS -+ -+static struct joystick_logical_values { -+ int njoy; -+ int nthing; -+} joystick_logical_values[] = { -+ -+/* +0 */ -+ /* MP-8800 axes map - map to {logical joystick #, logical axis #} */ -+ {0,0},{0,1},{0,2},{1,0},{1,1},{0,3},{1,2},{1,3},{2,0},{2,1},{2,2},{2,3}, -+ {3,0},{3,1},{3,2},{3,3},{0,4},{1,4},{2,4}, -+ -+/* +19 */ -+ /* MP-8800 hat map - map to {logical joystick #, logical hat #} */ -+ {0,0},{1,0},{2,0},{3,0}, -+ -+/* +23 */ -+ /* MP-8800 button map - map to {logical joystick #, logical button #} */ -+ {0,0},{0,1},{0,2},{0,3},{0,4},{0,5},{0,6},{0,7},{0,8},{0,9},{0,10},{0,11}, -+ {1,0},{1,1},{1,2},{1,3},{1,4},{1,5},{1,6},{1,7},{1,8},{1,9},{1,10},{1,11}, -+ {2,0},{2,1},{2,2},{2,3},{2,4},{2,5},{2,6},{2,7},{2,8},{2,9},{2,10},{2,11}, -+ {3,0},{3,1},{3,2},{3,3},{3,4},{3,5},{3,6},{3,7},{3,8},{3,9},{3,10},{3,11} -+}; -+ -+static struct joystick_logical_layout { -+ int naxes; -+ int nhats; -+ int nballs; -+ int nbuttons; -+} joystick_logical_layout[] = { -+ /* MP-8800 logical layout */ -+ {5, 1, 0, 12}, -+ {5, 1, 0, 12}, -+ {5, 1, 0, 12}, -+ {4, 1, 0, 12} -+}; -+ -+/* -+ Some USB HIDs show up as a single joystick even though they actually -+ control 2 or more joysticks. This array sets up a means of mapping -+ a single physical joystick to multiple logical joysticks. (djm) -+ -+ njoys -+ the number of logical joysticks -+ -+ layouts -+ an array of layout structures, one to describe each logical joystick -+ -+ axes, hats, balls, buttons -+ arrays that map a physical thingy to a logical thingy -+ */ -+static struct joystick_logicalmap { -+ const char *name; -+ int njoys; -+ struct joystick_logical_layout *layouts; -+ struct joystick_logical_values *axes; -+ struct joystick_logical_values *hats; -+ struct joystick_logical_values *balls; -+ struct joystick_logical_values *buttons; -+ -+} joystick_logicalmap[] = { -+ {"WiseGroup.,Ltd MP-8800 Quad USB Joypad", 4, joystick_logical_layout, -+ joystick_logical_values, joystick_logical_values+19, NULL, -+ joystick_logical_values+23} -+}; -+ -+/* find the head of a linked list, given a point in it -+ */ -+#define SDL_joylist_head(i, start)\ -+ for(i = start; SDL_joylist[i].fname == NULL;) i = SDL_joylist[i].prev; -+ -+#define SDL_logical_joydecl(d) d -+ -+ -+#else -+ -+#define SDL_logical_joydecl(d) -+ -+#endif /* USE_LOGICAL_JOYSTICKS */ -+ - /* The maximum number of joysticks we'll detect */ - #define MAX_JOYSTICKS 32 - - /* A list of available joysticks */ --static char *SDL_joylist[MAX_JOYSTICKS]; -+static struct -+{ -+ char* fname; -+#ifndef NO_LOGICAL_JOYSTICKS -+ SDL_Joystick* joy; -+ struct joystick_logicalmap* map; -+ int prev; -+ int next; -+ int logicalno; -+#endif /* USE_LOGICAL_JOYSTICKS */ -+} SDL_joylist[MAX_JOYSTICKS]; -+ - - /* The private structure used to keep track of a joystick */ - struct joystick_hwdata { -@@ -108,6 +199,73 @@ - return(newstring); - } - -+ -+#ifndef NO_LOGICAL_JOYSTICKS -+ -+static int CountLogicalJoysticks(int max) -+{ -+ register int i, j, k, ret, prev; -+ const char* name; -+ -+ ret = 0; -+ -+ for(i = 0; i < max; i++) { -+ name = SDL_SYS_JoystickName(i); -+ -+ if (name) { -+ for(j = 0; j < SDL_TABLESIZE(joystick_logicalmap); j++) { -+ if (!strcmp(name, joystick_logicalmap[j].name)) { -+ -+ prev = i; -+ SDL_joylist[prev].map = joystick_logicalmap+j; -+ -+ for(k = 1; k < joystick_logicalmap[j].njoys; k++) { -+ SDL_joylist[prev].next = max + ret; -+ -+ if (prev != i) -+ SDL_joylist[max+ret].prev = prev; -+ -+ prev = max + ret; -+ SDL_joylist[prev].logicalno = k; -+ SDL_joylist[prev].map = joystick_logicalmap+j; -+ ret++; -+ } -+ -+ break; -+ } -+ } -+ } -+ } -+ -+ return ret; -+} -+ -+static void LogicalSuffix(int logicalno, char* namebuf, int len) -+{ -+ register int slen; -+ const static char suffixs[] = -+ "01020304050607080910111213141516171819" -+ "20212223242526272829303132"; -+ const char* suffix; -+ -+ slen = strlen(namebuf); -+ -+ suffix = NULL; -+ -+ if (logicalno*2<sizeof(suffixs)) -+ suffix = suffixs + (logicalno*2); -+ -+ if (slen + 4 < len && suffix) { -+ namebuf[slen++] = ' '; -+ namebuf[slen++] = '#'; -+ namebuf[slen++] = suffix[0]; -+ namebuf[slen++] = suffix[1]; -+ namebuf[slen++] = 0; -+ } -+} -+ -+#endif /* USE_LOGICAL_JOYSTICKS */ -+ - #ifdef USE_INPUT_EVENTS - #define test_bit(nr, addr) \ - (((1UL << ((nr) & 31)) & (((const unsigned int *) addr)[(nr) >> 5])) != 0) -@@ -160,8 +318,8 @@ - fd = open(path, O_RDONLY, 0); - if ( fd >= 0 ) { - /* Assume the user knows what they're doing. */ -- SDL_joylist[numjoysticks] = mystrdup(path); -- if ( SDL_joylist[numjoysticks] ) { -+ SDL_joylist[numjoysticks].fname =mystrdup(path); -+ if ( SDL_joylist[numjoysticks].fname ) { - dev_nums[numjoysticks] = sb.st_rdev; - ++numjoysticks; - } -@@ -208,8 +366,8 @@ - close(fd); - - /* We're fine, add this joystick */ -- SDL_joylist[numjoysticks] = mystrdup(path); -- if ( SDL_joylist[numjoysticks] ) { -+ SDL_joylist[numjoysticks].fname =mystrdup(path); -+ if ( SDL_joylist[numjoysticks].fname ) { - dev_nums[numjoysticks] = sb.st_rdev; - ++numjoysticks; - } -@@ -229,6 +387,9 @@ - break; - #endif - } -+#ifndef NO_LOGICAL_JOYSTICKS -+ numjoysticks += CountLogicalJoysticks(numjoysticks); -+#endif - - return(numjoysticks); - } -@@ -239,20 +400,29 @@ - int fd; - static char namebuf[128]; - char *name; -+ SDL_logical_joydecl(int oindex = index); - -+#ifndef NO_LOGICAL_JOYSTICKS -+ SDL_joylist_head(index, index); -+#endif - name = NULL; -- fd = open(SDL_joylist[index], O_RDONLY, 0); -+ fd = open(SDL_joylist[index].fname, O_RDONLY, 0); - if ( fd >= 0 ) { - if ( - #ifdef USE_INPUT_EVENTS - (ioctl(fd, EVIOCGNAME(sizeof(namebuf)), namebuf) <= 0) && - #endif - (ioctl(fd, JSIOCGNAME(sizeof(namebuf)), namebuf) <= 0) ) { -- name = SDL_joylist[index]; -+ name = SDL_joylist[index].fname; - } else { - name = namebuf; - } - close(fd); -+ -+#ifndef NO_LOGICAL_JOYSTICKS -+ if (SDL_joylist[oindex].prev || SDL_joylist[oindex].next) -+ LogicalSuffix(SDL_joylist[oindex].logicalno, namebuf, 128); -+#endif - } - return name; - } -@@ -383,7 +553,7 @@ - - static SDL_bool EV_ConfigJoystick(SDL_Joystick *joystick, int fd) - { -- int i; -+ int i, t; - unsigned long keybit[40]; - unsigned long absbit[40]; - unsigned long relbit[40]; -@@ -424,7 +594,8 @@ - if ( test_bit(i, absbit) ) { - int values[5]; - -- ioctl(fd, EVIOCGABS(i), values); -+ if ( ioctl(fd, EVIOCGABS(i), values) < 0 ) -+ continue; - #ifdef DEBUG_INPUT_EVENTS - printf("Joystick has absolute axis: %x\n", i); - printf("Values = { %d, %d, %d, %d, %d }\n", -@@ -440,8 +611,12 @@ - (values[2] + values[1]) / 2 - values[4]; - joystick->hwdata->abs_correct[i].coef[1] = - (values[2] + values[1]) / 2 + values[4]; -- joystick->hwdata->abs_correct[i].coef[2] = -- (1 << 29) / ((values[2] - values[1]) / 2 - 2 * values[4]); -+ t = ((values[2] - values[1]) / 2 - 2 * values[4]); -+ if ( t != 0 ) { -+ joystick->hwdata->abs_correct[i].coef[2] = (1 << 29) / t; -+ } else { -+ joystick->hwdata->abs_correct[i].coef[2] = 0; -+ } - } - ++joystick->naxes; - } -@@ -475,6 +650,22 @@ - - #endif /* USE_INPUT_EVENTS */ - -+#ifndef NO_LOGICAL_JOYSTICKS -+static void ConfigLogicalJoystick(SDL_Joystick *joystick) -+{ -+ struct joystick_logical_layout* layout; -+ -+ layout = SDL_joylist[joystick->index].map->layouts + -+ SDL_joylist[joystick->index].logicalno; -+ -+ joystick->nbuttons = layout->nbuttons; -+ joystick->nhats = layout->nhats; -+ joystick->naxes = layout->naxes; -+ joystick->nballs = layout->nballs; -+} -+#endif -+ -+ - /* Function to open a joystick for use. - The joystick to open is specified by the index field of the joystick. - This should fill the nbuttons and naxes fields of the joystick structure. -@@ -483,9 +674,28 @@ - int SDL_SYS_JoystickOpen(SDL_Joystick *joystick) - { - int fd; -+ SDL_logical_joydecl(int realindex); -+ SDL_logical_joydecl(SDL_Joystick *realjoy = NULL); - - /* Open the joystick and set the joystick file descriptor */ -- fd = open(SDL_joylist[joystick->index], O_RDONLY, 0); -+#ifndef NO_LOGICAL_JOYSTICKS -+ if (SDL_joylist[joystick->index].fname == NULL) { -+ SDL_joylist_head(realindex, joystick->index); -+ realjoy = SDL_JoystickOpen(realindex); -+ -+ if (realjoy == NULL) -+ return(-1); -+ -+ fd = realjoy->hwdata->fd; -+ -+ } else { -+ fd = open(SDL_joylist[joystick->index].fname, O_RDONLY, 0); -+ } -+ SDL_joylist[joystick->index].joy = joystick; -+#else -+ fd = open(SDL_joylist[joystick->index].fname, O_RDONLY, 0); -+#endif -+ - if ( fd < 0 ) { - SDL_SetError("Unable to open %s\n", - SDL_joylist[joystick->index]); -@@ -505,6 +715,11 @@ - fcntl(fd, F_SETFL, O_NONBLOCK); - - /* Get the number of buttons and axes on the joystick */ -+#ifndef NO_LOGICAL_JOYSTICKS -+ if (realjoy) -+ ConfigLogicalJoystick(joystick); -+ else -+#endif - #ifdef USE_INPUT_EVENTS - if ( ! EV_ConfigJoystick(joystick, fd) ) - #endif -@@ -513,6 +728,84 @@ - return(0); - } - -+#ifndef NO_LOGICAL_JOYSTICKS -+ -+static SDL_Joystick* FindLogicalJoystick( -+ SDL_Joystick *joystick, struct joystick_logical_values* v) -+{ -+ SDL_Joystick *logicaljoy; -+ register int i; -+ -+ i = joystick->index; -+ logicaljoy = NULL; -+ -+ /* get the fake joystick that will receive the event -+ */ -+ for(;;) { -+ -+ if (SDL_joylist[i].logicalno == v->njoy) { -+ logicaljoy = SDL_joylist[i].joy; -+ break; -+ } -+ -+ if (SDL_joylist[i].next == 0) -+ break; -+ -+ i = SDL_joylist[i].next; -+ -+ } -+ -+ return logicaljoy; -+} -+ -+static int LogicalJoystickButton( -+ SDL_Joystick *joystick, Uint8 button, Uint8 state){ -+ struct joystick_logical_values* buttons; -+ SDL_Joystick *logicaljoy = NULL; -+ -+ /* if there's no map then this is just a regular joystick -+ */ -+ if (SDL_joylist[joystick->index].map == NULL) -+ return 0; -+ -+ /* get the logical joystick that will receive the event -+ */ -+ buttons = SDL_joylist[joystick->index].map->buttons+button; -+ logicaljoy = FindLogicalJoystick(joystick, buttons); -+ -+ if (logicaljoy == NULL) -+ return 1; -+ -+ SDL_PrivateJoystickButton(logicaljoy, buttons->nthing, state); -+ -+ return 1; -+} -+ -+static int LogicalJoystickAxis( -+ SDL_Joystick *joystick, Uint8 axis, Sint16 value) -+{ -+ struct joystick_logical_values* axes; -+ SDL_Joystick *logicaljoy = NULL; -+ -+ /* if there's no map then this is just a regular joystick -+ */ -+ if (SDL_joylist[joystick->index].map == NULL) -+ return 0; -+ -+ /* get the logical joystick that will receive the event -+ */ -+ axes = SDL_joylist[joystick->index].map->axes+axis; -+ logicaljoy = FindLogicalJoystick(joystick, axes); -+ -+ if (logicaljoy == NULL) -+ return 1; -+ -+ SDL_PrivateJoystickAxis(logicaljoy, axes->nthing, value); -+ -+ return 1; -+} -+#endif /* USE_LOGICAL_JOYSTICKS */ -+ - static __inline__ - void HandleHat(SDL_Joystick *stick, Uint8 hat, int axis, int value) - { -@@ -522,6 +815,8 @@ - { SDL_HAT_LEFT, SDL_HAT_CENTERED, SDL_HAT_RIGHT }, - { SDL_HAT_LEFTDOWN, SDL_HAT_DOWN, SDL_HAT_RIGHTDOWN } - }; -+ SDL_logical_joydecl(SDL_Joystick *logicaljoy = NULL); -+ SDL_logical_joydecl(struct joystick_logical_values* hats = NULL); - - the_hat = &stick->hwdata->hats[hat]; - if ( value < 0 ) { -@@ -535,6 +830,24 @@ - } - if ( value != the_hat->axis[axis] ) { - the_hat->axis[axis] = value; -+ -+#ifndef NO_LOGICAL_JOYSTICKS -+ /* if there's no map then this is just a regular joystick -+ */ -+ if (SDL_joylist[stick->index].map != NULL) { -+ -+ /* get the fake joystick that will receive the event -+ */ -+ hats = SDL_joylist[stick->index].map->hats+hat; -+ logicaljoy = FindLogicalJoystick(stick, hats); -+ } -+ -+ if (logicaljoy) { -+ stick = logicaljoy; -+ hat = hats->nthing; -+ } -+#endif /* USE_LOGICAL_JOYSTICKS */ -+ - SDL_PrivateJoystickHat(stick, hat, - position_map[the_hat->axis[1]][the_hat->axis[0]]); - } -@@ -557,12 +870,23 @@ - int i, len; - Uint8 other_axis; - -+#ifndef NO_LOGICAL_JOYSTICKS -+ if (SDL_joylist[joystick->index].fname == NULL) { -+ SDL_joylist_head(i, joystick->index); -+ return JS_HandleEvents(SDL_joylist[i].joy); -+ } -+#endif -+ - while ((len=read(joystick->hwdata->fd, events, (sizeof events))) > 0) { - len /= sizeof(events[0]); - for ( i=0; i<len; ++i ) { - switch (events[i].type & ~JS_EVENT_INIT) { - case JS_EVENT_AXIS: - if ( events[i].number < joystick->naxes ) { -+#ifndef NO_LOGICAL_JOYSTICKS -+ if (!LogicalJoystickAxis(joystick, -+ events[i].number, events[i].value)) -+#endif - SDL_PrivateJoystickAxis(joystick, - events[i].number, events[i].value); - break; -@@ -585,6 +909,10 @@ - } - break; - case JS_EVENT_BUTTON: -+#ifndef NO_LOGICAL_JOYSTICKS -+ if (!LogicalJoystickButton(joystick, -+ events[i].number, events[i].value)) -+#endif - SDL_PrivateJoystickButton(joystick, - events[i].number, events[i].value); - break; -@@ -627,6 +955,13 @@ - int i, len; - int code; - -+#ifndef NO_LOGICAL_JOYSTICKS -+ if (SDL_joylist[joystick->index].fname == NULL) { -+ SDL_joylist_head(i, joystick->index); -+ return EV_HandleEvents(SDL_joylist[i].joy); -+ } -+#endif -+ - while ((len=read(joystick->hwdata->fd, events, (sizeof events))) > 0) { - len /= sizeof(events[0]); - for ( i=0; i<len; ++i ) { -@@ -635,6 +970,11 @@ - case EV_KEY: - if ( code >= BTN_MISC ) { - code -= BTN_MISC; -+#ifndef NO_LOGICAL_JOYSTICKS -+ if (!LogicalJoystickButton(joystick, -+ joystick->hwdata->key_map[code], -+ events[i].value)) -+#endif - SDL_PrivateJoystickButton(joystick, - joystick->hwdata->key_map[code], - events[i].value); -@@ -656,6 +996,11 @@ - break; - default: - events[i].value = EV_AxisCorrect(joystick, code, events[i].value); -+#ifndef NO_LOGICAL_JOYSTICKS -+ if (!LogicalJoystickAxis(joystick, -+ joystick->hwdata->abs_map[code], -+ events[i].value)) -+#endif - SDL_PrivateJoystickAxis(joystick, - joystick->hwdata->abs_map[code], - events[i].value); -@@ -710,7 +1055,18 @@ - /* Function to close a joystick after use */ - void SDL_SYS_JoystickClose(SDL_Joystick *joystick) - { -+#ifndef NO_LOGICAL_JOYSTICKS -+ register int i; -+ if (SDL_joylist[joystick->index].fname == NULL) { -+ SDL_joylist_head(i, joystick->index); -+ SDL_JoystickClose(SDL_joylist[i].joy); -+ } -+#endif -+ - if ( joystick->hwdata ) { -+#ifndef NO_LOGICAL_JOYSTICKS -+ if (SDL_joylist[joystick->index].fname != NULL) -+#endif - close(joystick->hwdata->fd); - if ( joystick->hwdata->hats ) { - free(joystick->hwdata->hats); -@@ -728,9 +1084,9 @@ - { - int i; - -- for ( i=0; SDL_joylist[i]; ++i ) { -- free(SDL_joylist[i]); -+ for ( i=0; SDL_joylist[i].fname; ++i ) { -+ free(SDL_joylist[i].fname); - } -- SDL_joylist[0] = NULL; -+ SDL_joylist[0].fname = NULL; - } - diff --git a/media-libs/libsdl/files/1.2.8-amd64-endian.patch b/media-libs/libsdl/files/1.2.8-amd64-endian.patch deleted file mode 100644 index d2b3f1aed0d5..000000000000 --- a/media-libs/libsdl/files/1.2.8-amd64-endian.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: include/SDL_endian.h -=================================================================== -RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/include/SDL_endian.h,v -retrieving revision 1.11 -retrieving revision 1.12 -diff -u -r1.11 -r1.12 ---- include/SDL_endian.h 27 Nov 2004 23:11:20 -0000 1.11 -+++ include/SDL_endian.h 12 Jan 2005 06:04:47 -0000 1.12 -@@ -68,7 +68,7 @@ - #elif defined(__GNUC__) && defined(__x86_64__) - static __inline__ Uint16 SDL_Swap16(Uint16 x) - { -- __asm__("xchgb %b0,%h0" : "=q" (x) : "0" (x)); -+ __asm__("xchgb %b0,%h0" : "=Q" (x) : "0" (x)); - return x; - } - #elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__)) diff --git a/media-libs/libsdl/files/1.2.8-direct-8bit-color.patch b/media-libs/libsdl/files/1.2.8-direct-8bit-color.patch deleted file mode 100644 index 3a035e133bf6..000000000000 --- a/media-libs/libsdl/files/1.2.8-direct-8bit-color.patch +++ /dev/null @@ -1,261 +0,0 @@ -Index: src/video/SDL_pixels.c -=================================================================== -RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/video/SDL_pixels.c,v -retrieving revision 1.12 -retrieving revision 1.13 -diff -u -r1.12 -r1.13 ---- src/video/SDL_pixels.c 30 Nov 2004 14:28:20 -0000 1.12 -+++ src/video/SDL_pixels.c 12 Jan 2005 19:38:24 -0000 1.13 -@@ -61,160 +61,45 @@ - /* Set up the format */ - format->BitsPerPixel = bpp; - format->BytesPerPixel = (bpp+7)/8; -- switch (bpp) { -- case 1: -- /* Create the 2 color black-white palette */ -- format->palette = (SDL_Palette *)malloc( -- sizeof(SDL_Palette)); -- if ( format->palette == NULL ) { -- SDL_FreeFormat(format); -- SDL_OutOfMemory(); -- return(NULL); -- } -- (format->palette)->ncolors = 2; -- (format->palette)->colors = (SDL_Color *)malloc( -- (format->palette)->ncolors*sizeof(SDL_Color)); -- if ( (format->palette)->colors == NULL ) { -- SDL_FreeFormat(format); -- SDL_OutOfMemory(); -- return(NULL); -- } -- format->palette->colors[0].r = 0xFF; -- format->palette->colors[0].g = 0xFF; -- format->palette->colors[0].b = 0xFF; -- format->palette->colors[1].r = 0x00; -- format->palette->colors[1].g = 0x00; -- format->palette->colors[1].b = 0x00; -- format->Rloss = 8; -- format->Gloss = 8; -- format->Bloss = 8; -- format->Aloss = 8; -- format->Rshift = 0; -- format->Gshift = 0; -- format->Bshift = 0; -- format->Ashift = 0; -- format->Rmask = 0; -- format->Gmask = 0; -- format->Bmask = 0; -- format->Amask = 0; -- break; -- -- case 4: -- /* Create the 16 color VGA palette */ -- format->palette = (SDL_Palette *)malloc( -- sizeof(SDL_Palette)); -- if ( format->palette == NULL ) { -- SDL_FreeFormat(format); -- SDL_OutOfMemory(); -- return(NULL); -- } -- (format->palette)->ncolors = 16; -- (format->palette)->colors = (SDL_Color *)malloc( -- (format->palette)->ncolors*sizeof(SDL_Color)); -- if ( (format->palette)->colors == NULL ) { -- SDL_FreeFormat(format); -- SDL_OutOfMemory(); -- return(NULL); -- } -- /* Punt for now, will this ever be used? */ -- memset((format->palette)->colors, 0, -- (format->palette)->ncolors*sizeof(SDL_Color)); -- -- /* Palettized formats have no mask info */ -- format->Rloss = 8; -- format->Gloss = 8; -- format->Bloss = 8; -- format->Aloss = 8; -- format->Rshift = 0; -- format->Gshift = 0; -- format->Bshift = 0; -- format->Ashift = 0; -- format->Rmask = 0; -- format->Gmask = 0; -- format->Bmask = 0; -- format->Amask = 0; -- break; -- -- case 8: -- /* Create an empty 256 color palette */ -- format->palette = (SDL_Palette *)malloc( -- sizeof(SDL_Palette)); -- if ( format->palette == NULL ) { -- SDL_FreeFormat(format); -- SDL_OutOfMemory(); -- return(NULL); -- } -- (format->palette)->ncolors = 256; -- (format->palette)->colors = (SDL_Color *)malloc( -- (format->palette)->ncolors*sizeof(SDL_Color)); -- if ( (format->palette)->colors == NULL ) { -- SDL_FreeFormat(format); -- SDL_OutOfMemory(); -- return(NULL); -- } -- memset((format->palette)->colors, 0, -- (format->palette)->ncolors*sizeof(SDL_Color)); -- -- /* Palettized formats have no mask info */ -- format->Rloss = 8; -- format->Gloss = 8; -- format->Bloss = 8; -- format->Aloss = 8; -- format->Rshift = 0; -- format->Gshift = 0; -- format->Bshift = 0; -- format->Ashift = 0; -- format->Rmask = 0; -- format->Gmask = 0; -- format->Bmask = 0; -- format->Amask = 0; -- break; -- -- default: -- /* No palette, just packed pixel info */ -- format->palette = NULL; -- format->Rshift = 0; -- format->Rloss = 8; -- if ( Rmask ) { -- for ( mask = Rmask; !(mask&0x01); mask >>= 1 ) -- ++format->Rshift; -- for ( ; (mask&0x01); mask >>= 1 ) -- --format->Rloss; -- } -- format->Gshift = 0; -- format->Gloss = 8; -- if ( Gmask ) { -- for ( mask = Gmask; !(mask&0x01); mask >>= 1 ) -- ++format->Gshift; -- for ( ; (mask&0x01); mask >>= 1 ) -- --format->Gloss; -- } -- format->Bshift = 0; -- format->Bloss = 8; -- if ( Bmask ) { -- for ( mask = Bmask; !(mask&0x01); mask >>= 1 ) -- ++format->Bshift; -- for ( ; (mask&0x01); mask >>= 1 ) -- --format->Bloss; -- } -- format->Ashift = 0; -- format->Aloss = 8; -- if ( Amask ) { -- for ( mask = Amask; !(mask&0x01); mask >>= 1 ) -- ++format->Ashift; -- for ( ; (mask&0x01); mask >>= 1 ) -- --format->Aloss; -- } -- format->Rmask = Rmask; -- format->Gmask = Gmask; -- format->Bmask = Bmask; -- format->Amask = Amask; -- break; -- } -- /* Calculate some standard bitmasks, if necessary -- * Note: This could conflict with an alpha mask, if given. -- */ -- if ( (bpp > 8) && !format->Rmask && !format->Gmask && !format->Bmask ) { -+ if ( Rmask || Bmask || Gmask ) { /* Packed pixels with custom mask */ -+ format->palette = NULL; -+ format->Rshift = 0; -+ format->Rloss = 8; -+ if ( Rmask ) { -+ for ( mask = Rmask; !(mask&0x01); mask >>= 1 ) -+ ++format->Rshift; -+ for ( ; (mask&0x01); mask >>= 1 ) -+ --format->Rloss; -+ } -+ format->Gshift = 0; -+ format->Gloss = 8; -+ if ( Gmask ) { -+ for ( mask = Gmask; !(mask&0x01); mask >>= 1 ) -+ ++format->Gshift; -+ for ( ; (mask&0x01); mask >>= 1 ) -+ --format->Gloss; -+ } -+ format->Bshift = 0; -+ format->Bloss = 8; -+ if ( Bmask ) { -+ for ( mask = Bmask; !(mask&0x01); mask >>= 1 ) -+ ++format->Bshift; -+ for ( ; (mask&0x01); mask >>= 1 ) -+ --format->Bloss; -+ } -+ format->Ashift = 0; -+ format->Aloss = 8; -+ if ( Amask ) { -+ for ( mask = Amask; !(mask&0x01); mask >>= 1 ) -+ ++format->Ashift; -+ for ( ; (mask&0x01); mask >>= 1 ) -+ --format->Aloss; -+ } -+ format->Rmask = Rmask; -+ format->Gmask = Gmask; -+ format->Bmask = Bmask; -+ format->Amask = Amask; -+ } else if ( bpp > 8 ) { /* Packed pixels with standard mask */ - /* R-G-B */ - if ( bpp > 24 ) - bpp = 24; -@@ -227,6 +112,52 @@ - format->Rmask = ((0xFF>>format->Rloss)<<format->Rshift); - format->Gmask = ((0xFF>>format->Gloss)<<format->Gshift); - format->Bmask = ((0xFF>>format->Bloss)<<format->Bshift); -+ } else { /* Palettized mode */ -+ int i, ncolors = 1; -+ for ( i = 0; i < bpp; ++i ) { -+ ncolors *= 2; -+ } -+ format->palette = (SDL_Palette *)malloc(sizeof(SDL_Palette)); -+ if ( format->palette == NULL ) { -+ SDL_FreeFormat(format); -+ SDL_OutOfMemory(); -+ return(NULL); -+ } -+ (format->palette)->ncolors = ncolors; -+ (format->palette)->colors = (SDL_Color *)malloc( -+ (format->palette)->ncolors*sizeof(SDL_Color)); -+ if ( (format->palette)->colors == NULL ) { -+ SDL_FreeFormat(format); -+ SDL_OutOfMemory(); -+ return(NULL); -+ } -+ if ( ncolors == 2 ) { -+ /* Create a black and white bitmap palette */ -+ format->palette->colors[0].r = 0xFF; -+ format->palette->colors[0].g = 0xFF; -+ format->palette->colors[0].b = 0xFF; -+ format->palette->colors[1].r = 0x00; -+ format->palette->colors[1].g = 0x00; -+ format->palette->colors[1].b = 0x00; -+ } else { -+ /* Create an empty palette */ -+ memset((format->palette)->colors, 0, -+ (format->palette)->ncolors*sizeof(SDL_Color)); -+ } -+ -+ /* Palettized formats have no mask info */ -+ format->Rloss = 8; -+ format->Gloss = 8; -+ format->Bloss = 8; -+ format->Aloss = 8; -+ format->Rshift = 0; -+ format->Gshift = 0; -+ format->Bshift = 0; -+ format->Ashift = 0; -+ format->Rmask = 0; -+ format->Gmask = 0; -+ format->Bmask = 0; -+ format->Amask = 0; - } - return(format); - } diff --git a/media-libs/libsdl/files/1.2.8-gcc2.patch b/media-libs/libsdl/files/1.2.8-gcc2.patch deleted file mode 100644 index 8bc592a1e238..000000000000 --- a/media-libs/libsdl/files/1.2.8-gcc2.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- SDL-1.2.8/src/video/directfb/SDL_DirectFB_video.c~ 2004-12-13 02:54:35 -0500 -+++ SDL-1.2.8/src/video/directfb/SDL_DirectFB_video.c 2004-12-22 22:00:44 -0500 -@@ -468,6 +468,9 @@ - - if (HIDDEN->enable_mga_crtc2) - { -+ DFBDisplayLayerConfig dlc; -+ DFBDisplayLayerConfigFlags failed; -+ - ret = dfb->GetDisplayLayer (dfb, 2, &HIDDEN->c2layer); - if (ret) - { -@@ -492,8 +495,6 @@ - HIDDEN->c2layer->SetOpacity(HIDDEN->c2layer, 0x0); - - /* Init the surface here as it got a fixed size */ -- DFBDisplayLayerConfig dlc; -- DFBDisplayLayerConfigFlags failed; - - dlc.flags = DLCONF_PIXELFORMAT | DLCONF_BUFFERMODE | DLCONF_OPTIONS; - dlc.buffermode = DLBM_BACKVIDEO; diff --git a/media-libs/libsdl/files/1.2.8-gcc4.patch b/media-libs/libsdl/files/1.2.8-gcc4.patch deleted file mode 100644 index be775d1a6fc4..000000000000 --- a/media-libs/libsdl/files/1.2.8-gcc4.patch +++ /dev/null @@ -1,135 +0,0 @@ ---- SDL-1.2.8/src/hermes/HeadMMX.h.gcc4 2001-04-26 12:45:45.000000000 -0400 -+++ SDL-1.2.8/src/hermes/HeadMMX.h 2005-04-14 07:00:01.390719842 -0400 -@@ -50,21 +50,19 @@ - extern "C" { - #endif - -- void ConvertMMX(HermesConverterInterface *) __attribute__ ((alias ("_ConvertMMX"))); --#if 0 -- void ClearMMX_32(HermesClearInterface *) __attribute__ ((alias ("_ClearMMX_32"))); -- void ClearMMX_24(HermesClearInterface *) __attribute__ ((alias ("_ClearMMX_24"))); -- void ClearMMX_16(HermesClearInterface *) __attribute__ ((alias ("_ClearMMX_16"))); -- void ClearMMX_8(HermesClearInterface *) __attribute__ ((alias ("_ClearMMX_8"))); -- -- void ConvertMMXp32_16RGB555() __attribute__ ((alias ("_ConvertMMXp32_16RGB555"))); --#endif -- -- void ConvertMMXpII32_24RGB888() __attribute__ ((alias ("_ConvertMMXpII32_24RGB888"))); -- void ConvertMMXpII32_16RGB565() __attribute__ ((alias ("_ConvertMMXpII32_16RGB565"))); -- void ConvertMMXpII32_16BGR565() __attribute__ ((alias ("_ConvertMMXpII32_16BGR565"))); -- void ConvertMMXpII32_16RGB555() __attribute__ ((alias ("_ConvertMMXpII32_16RGB555"))); -- void ConvertMMXpII32_16BGR555() __attribute__ ((alias ("_ConvertMMXpII32_16BGR555"))); -+ extern void _ConvertMMX(HermesConverterInterface *); -+ extern void _ConvertMMXpII32_24RGB888(); -+ extern void _ConvertMMXpII32_16RGB565(); -+ extern void _ConvertMMXpII32_16BGR565(); -+ extern void _ConvertMMXpII32_16RGB555(); -+ extern void _ConvertMMXpII32_16BGR555(); -+ -+ #define ConvertMMX _ConvertMMX -+ #define ConvertMMXpII32_24RGB888 _ConvertMMXpII32_24RGB888 -+ #define ConvertMMXpII32_16RGB565 _ConvertMMXpII32_16RGB565 -+ #define ConvertMMXpII32_16BGR565 _ConvertMMXpII32_16BGR565 -+ #define ConvertMMXpII32_16RGB555 _ConvertMMXpII32_16RGB555 -+ #define ConvertMMXpII32_16BGR555 _ConvertMMXpII32_16BGR555 - - #ifdef __cplusplus - } ---- SDL-1.2.8/src/hermes/HeadX86.h.gcc4 2002-06-08 13:45:39.000000000 -0400 -+++ SDL-1.2.8/src/hermes/HeadX86.h 2005-04-14 07:04:00.579143961 -0400 -@@ -79,56 +79,47 @@ - extern "C" { - #endif - -- int Hermes_X86_CPU() __attribute__ ((alias ("_Hermes_X86_CPU"))); -+ extern int _Hermes_X86_CPU(); - -- void ConvertX86(HermesConverterInterface *) __attribute__ ((alias ("_ConvertX86"))); -+ extern void _ConvertX86(HermesConverterInterface *); -+ -+ extern void _ConvertX86p32_32BGR888(); -+ extern void _ConvertX86p32_32RGBA888(); -+ extern void _ConvertX86p32_32BGRA888(); -+ extern void _ConvertX86p32_24RGB888(); -+ extern void _ConvertX86p32_24BGR888(); -+ extern void _ConvertX86p32_16RGB565(); -+ extern void _ConvertX86p32_16BGR565(); -+ extern void _ConvertX86p32_16RGB555(); -+ extern void _ConvertX86p32_16BGR555(); -+ extern void _ConvertX86p32_8RGB332(); -+ -+ extern void _ConvertX86p16_16BGR565(); -+ extern void _ConvertX86p16_16RGB555(); -+ extern void _ConvertX86p16_16BGR555(); -+ extern void _ConvertX86p16_8RGB332(); -+ -+ -+ #define Hermes_X86_CPU _Hermes_X86_CPU -+ -+ #define ConvertX86 _ConvertX86 -+ -+ #define ConvertX86p32_32BGR888 _ConvertX86p32_32BGR888 -+ #define ConvertX86p32_32RGBA888 _ConvertX86p32_32RGBA888 -+ #define ConvertX86p32_32BGRA888 _ConvertX86p32_32BGRA888 -+ #define ConvertX86p32_24RGB888 _ConvertX86p32_24RGB888 -+ #define ConvertX86p32_24BGR888 _ConvertX86p32_24BGR888 -+ #define ConvertX86p32_16RGB565 _ConvertX86p32_16RGB565 -+ #define ConvertX86p32_16BGR565 _ConvertX86p32_16BGR565 -+ #define ConvertX86p32_16RGB555 _ConvertX86p32_16RGB555 -+ #define ConvertX86p32_16BGR555 _ConvertX86p32_16BGR555 -+ #define ConvertX86p32_8RGB332 _ConvertX86p32_8RGB332 -+ -+ #define ConvertX86p16_16BGR565 _ConvertX86p16_16BGR565 -+ #define ConvertX86p16_16RGB555 _ConvertX86p16_16RGB555 -+ #define ConvertX86p16_16BGR555 _ConvertX86p16_16BGR555 -+ #define ConvertX86p16_8RGB332 _ConvertX86p16_8RGB332 - --#if 0 -- void ClearX86_32(HermesClearInterface *) __attribute__ ((alias ("_ClearX86_32"))); -- void ClearX86_24(HermesClearInterface *) __attribute__ ((alias ("_ClearX86_24"))); -- void ClearX86_16(HermesClearInterface *) __attribute__ ((alias ("_ClearX86_16"))); -- void ClearX86_8(HermesClearInterface *) __attribute__ ((alias ("_ClearX86_8"))); --#endif -- -- void ConvertX86p32_32BGR888() __attribute__ ((alias ("_ConvertX86p32_32BGR888"))); -- void ConvertX86p32_32RGBA888() __attribute__ ((alias ("_ConvertX86p32_32RGBA888"))); -- void ConvertX86p32_32BGRA888() __attribute__ ((alias ("_ConvertX86p32_32BGRA888"))); -- void ConvertX86p32_24RGB888() __attribute__ ((alias ("_ConvertX86p32_24RGB888"))); -- void ConvertX86p32_24BGR888() __attribute__ ((alias ("_ConvertX86p32_24BGR888"))); -- void ConvertX86p32_16RGB565() __attribute__ ((alias ("_ConvertX86p32_16RGB565"))); -- void ConvertX86p32_16BGR565() __attribute__ ((alias ("_ConvertX86p32_16BGR565"))); -- void ConvertX86p32_16RGB555() __attribute__ ((alias ("_ConvertX86p32_16RGB555"))); -- void ConvertX86p32_16BGR555() __attribute__ ((alias ("_ConvertX86p32_16BGR555"))); -- void ConvertX86p32_8RGB332() __attribute__ ((alias ("_ConvertX86p32_8RGB332"))); -- --#if 0 -- void ConvertX86p16_32RGB888() __attribute__ ((alias ("_ConvertX86p16_32RGB888"))); -- void ConvertX86p16_32BGR888() __attribute__ ((alias ("_ConvertX86p16_32BGR888"))); -- void ConvertX86p16_32RGBA888() __attribute__ ((alias ("_ConvertX86p16_32RGBA888"))); -- void ConvertX86p16_32BGRA888() __attribute__ ((alias ("_ConvertX86p16_32BGRA888"))); -- void ConvertX86p16_24RGB888() __attribute__ ((alias ("_ConvertX86p16_24RGB888"))); -- void ConvertX86p16_24BGR888() __attribute__ ((alias ("_ConvertX86p16_24BGR888"))); --#endif -- void ConvertX86p16_16BGR565() __attribute__ ((alias ("_ConvertX86p16_16BGR565"))); -- void ConvertX86p16_16RGB555() __attribute__ ((alias ("_ConvertX86p16_16RGB555"))); -- void ConvertX86p16_16BGR555() __attribute__ ((alias ("_ConvertX86p16_16BGR555"))); -- void ConvertX86p16_8RGB332() __attribute__ ((alias ("_ConvertX86p16_8RGB332"))); -- --#if 0 -- void CopyX86p_4byte() __attribute__ ((alias ("_CopyX86p_4byte"))); -- void CopyX86p_3byte() __attribute__ ((alias ("_CopyX86p_3byte"))); -- void CopyX86p_2byte() __attribute__ ((alias ("_CopyX86p_2byte"))); -- void CopyX86p_1byte() __attribute__ ((alias ("_CopyX86p_1byte"))); -- -- void ConvertX86pI8_32() __attribute__ ((alias ("_ConvertX86pI8_32"))); -- void ConvertX86pI8_24() __attribute__ ((alias ("_ConvertX86pI8_24"))); -- void ConvertX86pI8_16() __attribute__ ((alias ("_ConvertX86pI8_16"))); -- -- extern int ConvertX86p16_32RGB888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32RGB888_LUT_X86"))); -- extern int ConvertX86p16_32BGR888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32BGR888_LUT_X86"))); -- extern int ConvertX86p16_32RGBA888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32RGBA888_LUT_X86"))); -- extern int ConvertX86p16_32BGRA888_LUT_X86[512] __attribute__ ((alias ("_ConvertX86p16_32BGRA888_LUT_X86"))); --#endif - - #ifdef __cplusplus - } diff --git a/media-libs/libsdl/files/1.2.8-keyrepeat.patch b/media-libs/libsdl/files/1.2.8-keyrepeat.patch deleted file mode 100644 index c716b4a2a929..000000000000 --- a/media-libs/libsdl/files/1.2.8-keyrepeat.patch +++ /dev/null @@ -1,18 +0,0 @@ -Index: SDL_keyboard.c -=================================================================== -RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/events/SDL_keyboard.c,v -retrieving revision 1.9 -retrieving revision 1.10 -diff -u -r1.9 -r1.10 ---- src/events/SDL_keyboard.c 4 Jan 2004 16:49:17 -0000 1.9 -+++ src/events/SDL_keyboard.c 3 Jan 2005 00:24:44 -0000 1.10 -@@ -491,7 +491,8 @@ - /* - * jk 991215 - Added - */ -- if ( SDL_KeyRepeat.timestamp ) { -+ if ( SDL_KeyRepeat.timestamp && -+ SDL_KeyRepeat.evt.key.keysym.sym == keysym->sym ) { - SDL_KeyRepeat.timestamp = 0; - } - break; diff --git a/media-libs/libsdl/files/1.2.8-linux26.patch b/media-libs/libsdl/files/1.2.8-linux26.patch deleted file mode 100644 index d0d009b7543c..000000000000 --- a/media-libs/libsdl/files/1.2.8-linux26.patch +++ /dev/null @@ -1,37 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=74608 - -Index: SDL_fbevents.c -=================================================================== -RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/video/fbcon/SDL_fbevents.c,v -retrieving revision 1.13 -retrieving revision 1.14 -diff -u -r1.13 -r1.14 ---- src/video/fbcon/SDL_fbevents.c 4 Jan 2004 16:49:25 -0000 1.13 -+++ src/video/fbcon/SDL_fbevents.c 4 Jan 2005 19:04:14 -0000 1.14 -@@ -835,7 +835,7 @@ - static void switch_vt(_THIS, unsigned short which) - { - struct vt_stat vtstate; -- unsigned short current; -+ unsigned short v_active; - SDL_Surface *screen; - __u16 saved_pal[3*256]; - Uint32 screen_arealen; -@@ -846,7 +846,7 @@ - (which == vtstate.v_active) ) { - return; - } -- current = vtstate.v_active; -+ v_active = vtstate.v_active; - - /* Save the contents of the screen, and go to text mode */ - SDL_mutexP(hw_lock); -@@ -864,7 +864,7 @@ - if ( ioctl(keyboard_fd, VT_ACTIVATE, which) == 0 ) { - /* Wait for our console to be activated again */ - ioctl(keyboard_fd, VT_WAITACTIVE, which); -- while ( ioctl(keyboard_fd, VT_WAITACTIVE, current) < 0 ) { -+ while ( ioctl(keyboard_fd, VT_WAITACTIVE, v_active) < 0 ) { - if ( (errno != EINTR) && (errno != EAGAIN) ) { - /* Unknown VT error - cancel this */ - break; diff --git a/media-libs/libsdl/files/1.2.8-nobuggy-X.patch b/media-libs/libsdl/files/1.2.8-nobuggy-X.patch deleted file mode 100644 index 50f1297590a4..000000000000 --- a/media-libs/libsdl/files/1.2.8-nobuggy-X.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- 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.7-r3 b/media-libs/libsdl/files/digest-libsdl-1.2.7-r3 deleted file mode 100644 index 81733274e550..000000000000 --- a/media-libs/libsdl/files/digest-libsdl-1.2.7-r3 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 d29b34b6ba3ed213893fc9d8d35e357a SDL-1.2.7.tar.gz 2470936 -RMD160 2e19851fca8dac81c8d07cb39b8757aa54093023 SDL-1.2.7.tar.gz 2470936 -SHA256 f5708b3909261df2043859e771601a5ec973197b2c59d18c6649c1096b5151bd SDL-1.2.7.tar.gz 2470936 diff --git a/media-libs/libsdl/files/digest-libsdl-1.2.8-r1 b/media-libs/libsdl/files/digest-libsdl-1.2.8-r1 deleted file mode 100644 index 36873368c3c6..000000000000 --- a/media-libs/libsdl/files/digest-libsdl-1.2.8-r1 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 37aaf9f069f9c2c18856022f35de9f8c SDL-1.2.8.tar.gz 2602449 -RMD160 91aa02f6b52792b3ec7f5478bcaebda1542980dc SDL-1.2.8.tar.gz 2602449 -SHA256 6508abb6068df597896da4e926606bb80c0b03ebfb8cf0017471fdb41307125a SDL-1.2.8.tar.gz 2602449 diff --git a/media-libs/libsdl/files/digest-libsdl-1.2.9 b/media-libs/libsdl/files/digest-libsdl-1.2.9 deleted file mode 100644 index e1fb636f47d7..000000000000 --- a/media-libs/libsdl/files/digest-libsdl-1.2.9 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 80919ef556425ff82a8555ff40a579a0 SDL-1.2.9.tar.gz 2688179 -RMD160 9faeeda9cf8f649a2b506e9db7c5cedb4512cfe7 SDL-1.2.9.tar.gz 2688179 -SHA256 d5a168968051536641ab5a3ba5fc234383511c77a8bc5ceb8bed619bdd42e5f9 SDL-1.2.9.tar.gz 2688179 diff --git a/media-libs/libsdl/files/digest-libsdl-1.2.9-r1 b/media-libs/libsdl/files/digest-libsdl-1.2.9-r1 deleted file mode 100644 index e1fb636f47d7..000000000000 --- a/media-libs/libsdl/files/digest-libsdl-1.2.9-r1 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 80919ef556425ff82a8555ff40a579a0 SDL-1.2.9.tar.gz 2688179 -RMD160 9faeeda9cf8f649a2b506e9db7c5cedb4512cfe7 SDL-1.2.9.tar.gz 2688179 -SHA256 d5a168968051536641ab5a3ba5fc234383511c77a8bc5ceb8bed619bdd42e5f9 SDL-1.2.9.tar.gz 2688179 diff --git a/media-libs/libsdl/files/libsdl-1.2.10-libcaca.patch b/media-libs/libsdl/files/libsdl-1.2.10-libcaca.patch deleted file mode 100644 index d5ec96dd6adf..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.10-libcaca.patch +++ /dev/null @@ -1,592 +0,0 @@ ---- SDL-1.2.10/configure.in -+++ SDL-1.2.10/configure.in -@@ -1316,6 +1316,38 @@ AC_HELP_STRING([--enable-video-aalib], [ - fi - } - -+dnl Find the libcaca includes -+CheckCaca() -+{ -+ AC_ARG_ENABLE(video-caca, -+AC_HELP_STRING([--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 -+ video_caca=no -+ AC_PATH_PROG(CACACONFIG, caca-config, no) -+ if test x$CACACONFIG != xno; then -+ AC_MSG_CHECKING(for libcaca support) -+ CACA_CFLAGS=`$CACACONFIG --cflags` -+ CACA_LDFLAGS=`$CACACONFIG --libs` -+ save_CFLAGS="$CFLAGS" -+ AC_TRY_COMPILE([ -+ #include <caca.h> -+ ],[ -+ ],[ -+ video_caca=yes -+ ]) -+ CFLAGS="$save_CFLAGS" -+ AC_MSG_RESULT($video_caca) -+ if test x$video_caca = xyes; then -+ AC_DEFINE(SDL_VIDEO_DRIVER_CACA) -+ EXTRA_CFLAGS="$EXTRA_CFLAGS $CACA_CFLAGS" -+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $CACA_LDFLAGS" -+ SOURCES="$SOURCES $srcdir/src/video/caca/*.c" -+ fi -+ fi -+ fi -+} -+ - dnl Set up the QTopia video driver if enabled - CheckQtopia() - { -@@ -2130,6 +2162,7 @@ case "$host" in - CheckVGL - CheckWscons - CheckAAlib -+ CheckCaca - CheckQtopia - CheckPicoGUI - CheckOpenGLX11 ---- SDL-1.2.10/src/video/caca/SDL_cacaevents.c -+++ SDL-1.2.10/src/video/caca/SDL_cacaevents.c -@@ -0,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: libsdl-1.2.10-libcaca.patch,v 1.1 2006/05/26 05:26:45 vapier Exp $"; -+#endif -+ -+#include <stdio.h> -+ -+#include <caca.h> -+ -+#include "SDL.h" -+#include "../../events/SDL_sysevents.h" -+#include "../../events/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; -+} -+ -+ ---- SDL-1.2.10/src/video/caca/SDL_cacaevents_c.h -+++ SDL-1.2.10/src/video/caca/SDL_cacaevents_c.h -@@ -0,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: libsdl-1.2.10-libcaca.patch,v 1.1 2006/05/26 05:26:45 vapier 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); -+ ---- SDL-1.2.10/src/video/caca/SDL_cacavideo.c -+++ SDL-1.2.10/src/video/caca/SDL_cacavideo.c -@@ -0,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: libsdl-1.2.10-libcaca.patch,v 1.1 2006/05/26 05:26:45 vapier 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 "../../events/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); -+} -+ ---- SDL-1.2.10/src/video/caca/SDL_cacavideo.h -+++ SDL-1.2.10/src/video/caca/SDL_cacavideo.h -@@ -0,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: libsdl-1.2.10-libcaca.patch,v 1.1 2006/05/26 05:26:45 vapier 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 */ -+ ---- SDL-1.2.10/src/video/SDL_sysvideo.h -+++ SDL-1.2.10/src/video/SDL_sysvideo.h -@@ -404,6 +404,9 @@ extern VideoBootStrap OS2FSLib_bootstrap - #if SDL_VIDEO_DRIVER_AALIB - extern VideoBootStrap AALIB_bootstrap; - #endif -+#if SDL_VIDEO_DRIVER_CACA -+extern VideoBootStrap CACA_bootstrap; -+#endif - #if SDL_VIDEO_DRIVER_DUMMY - extern VideoBootStrap DUMMY_bootstrap; - #endif ---- SDL-1.2.10/src/video/SDL_video.c -+++ SDL-1.2.10/src/video/SDL_video.c -@@ -120,6 +120,9 @@ static VideoBootStrap *bootstrap[] = { - #if SDL_VIDEO_DRIVER_AALIB - &AALIB_bootstrap, - #endif -+#if SDL_VIDEO_DRIVER_CACA -+ &CACA_bootstrap, -+#endif - #if SDL_VIDEO_DRIVER_DUMMY - &DUMMY_bootstrap, - #endif diff --git a/media-libs/libsdl/files/libsdl-1.2.10-noxinerama.patch b/media-libs/libsdl/files/libsdl-1.2.10-noxinerama.patch deleted file mode 100644 index 399dd9937abc..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.10-noxinerama.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -urN SDL-1.2.10.orig/src/video/x11/SDL_x11modes.c SDL-1.2.10/src/video/x11/SDL_x11modes.c ---- SDL-1.2.10.orig/src/video/x11/SDL_x11modes.c 2006-05-07 00:47:58.000000000 -0300 -+++ SDL-1.2.10/src/video/x11/SDL_x11modes.c 2006-05-26 23:55:29.000000000 -0300 -@@ -629,7 +629,9 @@ - #if SDL_VIDEO_DRIVER_X11_VIDMODE - /* XVidMode */ - if ( !use_xrandr && -+#if SDL_VIDEO_DRIVER_X11_XINERAMA - (!use_xinerama || xinerama_info.screen_number == 0) && -+#endif - CheckVidMode(this, &vm_major, &vm_minor) && - SDL_NAME(XF86VidModeGetAllModeLines)(SDL_Display, SDL_Screen,&nmodes,&modes) ) - { -@@ -901,6 +903,7 @@ - screen_h = DisplayHeight(SDL_Display, SDL_Screen); - - #if SDL_VIDEO_DRIVER_X11_VIDMODE -+#if SDL_VIDEO_DRIVER_X11_XINERAMA - if ( use_xinerama && - window_w <= xinerama_info.width && - window_h <= xinerama_info.height ) { -@@ -908,6 +911,7 @@ - y = xinerama_info.y_org; - } - #endif -+#endif - if ( currently_fullscreen ) { - /* Switch resolution and cover it with the FSwindow */ - move_cursor_to(this, x, y); -@@ -963,6 +967,7 @@ - X11_GrabInputNoLock(this, SDL_GRAB_OFF); - - #if SDL_VIDEO_DRIVER_X11_VIDMODE -+#if SDL_VIDEO_DRIVER_X11_XINERAMA - if ( use_xinerama && - window_w <= xinerama_info.width && - window_h <= xinerama_info.height ) { -@@ -970,6 +975,7 @@ - y = xinerama_info.y_org; - } - #endif -+#endif - /* Map the fullscreen window to blank the screen */ - screen_w = DisplayWidth(SDL_Display, SDL_Screen); - screen_h = DisplayHeight(SDL_Display, SDL_Screen); -diff -urN SDL-1.2.10.orig/src/video/x11/SDL_x11video.c SDL-1.2.10/src/video/x11/SDL_x11video.c ---- SDL-1.2.10.orig/src/video/x11/SDL_x11video.c 2006-05-08 03:43:14.000000000 -0300 -+++ SDL-1.2.10/src/video/x11/SDL_x11video.c 2006-05-26 23:55:32.000000000 -0300 -@@ -330,11 +330,13 @@ - XDestroyWindow(SDL_Display, FSwindow); - - #if SDL_VIDEO_DRIVER_X11_VIDMODE -+#if SDL_VIDEO_DRIVER_X11_XINERAMA - if ( use_xinerama ) { - x = xinerama_info.x_org; - y = xinerama_info.y_org; - } - #endif -+#endif - xattr.override_redirect = True; - xattr.background_pixel = def_vis ? BlackPixel(SDL_Display, SDL_Screen) : 0; - xattr.border_pixel = 0; diff --git a/media-libs/libsdl/files/libsdl-1.2.10-sdl-config.patch b/media-libs/libsdl/files/libsdl-1.2.10-sdl-config.patch deleted file mode 100644 index f430428e6e90..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.10-sdl-config.patch +++ /dev/null @@ -1,20 +0,0 @@ -Only output -L -rpath cruft if using a non-standard install location. - -Makes ABI / cross-compiling easier on the soul. - ---- sdl-config.in -+++ sdl-config.in -@@ -44,7 +44,12 @@ - echo -I@includedir@/SDL @SDL_CFLAGS@ - ;; - @ENABLE_SHARED_TRUE@ --libs) --@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@ -+@ENABLE_SHARED_TRUE@ if test x"${prefix}" != x"/usr" ; then -+@ENABLE_SHARED_TRUE@ libdirs="-L@libdir@" -+@ENABLE_SHARED_TRUE@ else -+@ENABLE_SHARED_TRUE@ libdirs="" -+@ENABLE_SHARED_TRUE@ fi -+@ENABLE_SHARED_TRUE@ echo $libdirs @SDL_RLD_FLAGS@ @SDL_LIBS@ - @ENABLE_SHARED_TRUE@ ;; - @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs) - @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs) diff --git a/media-libs/libsdl/files/libsdl-1.2.6-fullscreen.patch b/media-libs/libsdl/files/libsdl-1.2.6-fullscreen.patch deleted file mode 100644 index 1b94689f63e0..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.6-fullscreen.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -ur SDL-1.2.6.orig/src/video/x11/SDL_x11modes.c SDL-1.2.6/src/video/x11/SDL_x11modes.c ---- SDL-1.2.6.orig/src/video/x11/SDL_x11modes.c 2003-12-04 10:48:37.304994416 -0500 -+++ SDL-1.2.6/src/video/x11/SDL_x11modes.c 2003-12-04 10:50:35.869969800 -0500 -@@ -120,7 +120,7 @@ - goto match; - } - qsort(modes, nmodes, sizeof *modes, cmpmodes); -- for ( i = nmodes-1; i >= 0 ; i-- ) { -+ for ( i = nmodes-1; i > 0 ; i-- ) { - if ( ! best_width ) { - if ( (modes[i]->hdisplay >= width) && - (modes[i]->vdisplay >= height) ) { -diff -ur SDL-1.2.6.orig/src/video/xbios/SDL_xbios.c SDL-1.2.6/src/video/xbios/SDL_xbios.c ---- SDL-1.2.6.orig/src/video/xbios/SDL_xbios.c 2003-12-04 10:48:37.333990008 -0500 -+++ SDL-1.2.6/src/video/xbios/SDL_xbios.c 2003-12-04 10:50:05.694557160 -0500 -@@ -402,6 +402,9 @@ - { - /* 8 bits -> list 0 */ - /* 16 bits -> list 1 */ -+ if ((format->BitsPerPixel != 8) && (format->BitsPerPixel !=16)) { -+ return NULL; -+ - return(SDL_modelist[(format->BitsPerPixel)>>4]); - } - diff --git a/media-libs/libsdl/files/libsdl-1.2.8-gcc2.patch b/media-libs/libsdl/files/libsdl-1.2.8-gcc2.patch deleted file mode 100644 index 9b817803ef98..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.8-gcc2.patch +++ /dev/null @@ -1,343 +0,0 @@ -Index: src/video/SDL_yuv_mmx.c -=================================================================== -RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/video/SDL_yuv_mmx.c,v -retrieving revision 1.8 -retrieving revision 1.9 -diff -u -r1.8 -r1.9 ---- src/video/SDL_yuv_mmx.c 24 Aug 2004 07:40:14 -0000 1.8 -+++ src/video/SDL_yuv_mmx.c 13 Feb 2005 07:10:02 -0000 1.9 -@@ -30,29 +30,42 @@ - - #include "SDL_types.h" - --static unsigned int MMX_0080w[] = {0x00800080, 0x00800080}; --static unsigned int MMX_00FFw[] = {0x00ff00ff, 0x00ff00ff}; --static unsigned int MMX_FF00w[] = {0xff00ff00, 0xff00ff00}; -- --static unsigned short MMX_Ycoeff[] = {0x004a, 0x004a, 0x004a, 0x004a}; -- --static unsigned short MMX_UbluRGB[] = {0x0072, 0x0072, 0x0072, 0x0072}; --static unsigned short MMX_VredRGB[] = {0x0059, 0x0059, 0x0059, 0x0059}; --static unsigned short MMX_UgrnRGB[] = {0xffea, 0xffea, 0xffea, 0xffea}; --static unsigned short MMX_VgrnRGB[] = {0xffd2, 0xffd2, 0xffd2, 0xffd2}; -- --static unsigned short MMX_Ublu5x5[] = {0x0081, 0x0081, 0x0081, 0x0081}; --static unsigned short MMX_Vred5x5[] = {0x0066, 0x0066, 0x0066, 0x0066}; --static unsigned short MMX_Ugrn555[] = {0xffe7, 0xffe7, 0xffe7, 0xffe7}; --static unsigned short MMX_Vgrn555[] = {0xffcc, 0xffcc, 0xffcc, 0xffcc}; --static unsigned short MMX_Ugrn565[] = {0xffe8, 0xffe8, 0xffe8, 0xffe8}; --static unsigned short MMX_Vgrn565[] = {0xffcd, 0xffcd, 0xffcd, 0xffcd}; -- --static unsigned short MMX_red555[] = {0x7c00, 0x7c00, 0x7c00, 0x7c00}; --static unsigned short MMX_red565[] = {0xf800, 0xf800, 0xf800, 0xf800}; --static unsigned short MMX_grn555[] = {0x03e0, 0x03e0, 0x03e0, 0x03e0}; --static unsigned short MMX_grn565[] = {0x07e0, 0x07e0, 0x07e0, 0x07e0}; --static unsigned short MMX_blu5x5[] = {0x001f, 0x001f, 0x001f, 0x001f}; -+#if __GNUC__ > 2 -+# undef GCC2_HACK -+#else -+# define GCC2_HACK -+#endif -+ -+ -+#if defined(GCC2_HACK) && defined (__ELF__) -+#define ASM_VAR(X) _##X -+#else -+#define ASM_VAR(X) X -+#endif -+ -+static volatile unsigned int ASM_VAR(MMX_0080w)[] = {0x00800080, 0x00800080}; -+static volatile unsigned int ASM_VAR(MMX_00FFw)[] = {0x00ff00ff, 0x00ff00ff}; -+static volatile unsigned int ASM_VAR(MMX_FF00w)[] = {0xff00ff00, 0xff00ff00}; -+ -+static volatile unsigned short ASM_VAR(MMX_Ycoeff)[] = {0x004a, 0x004a, 0x004a, 0x004a}; -+ -+static volatile unsigned short ASM_VAR(MMX_UbluRGB)[] = {0x0072, 0x0072, 0x0072, 0x0072}; -+static volatile unsigned short ASM_VAR(MMX_VredRGB)[] = {0x0059, 0x0059, 0x0059, 0x0059}; -+static volatile unsigned short ASM_VAR(MMX_UgrnRGB)[] = {0xffea, 0xffea, 0xffea, 0xffea}; -+static volatile unsigned short ASM_VAR(MMX_VgrnRGB)[] = {0xffd2, 0xffd2, 0xffd2, 0xffd2}; -+ -+static volatile unsigned short ASM_VAR(MMX_Ublu5x5)[] = {0x0081, 0x0081, 0x0081, 0x0081}; -+static volatile unsigned short ASM_VAR(MMX_Vred5x5)[] = {0x0066, 0x0066, 0x0066, 0x0066}; -+static volatile unsigned short ASM_VAR(MMX_Ugrn555)[] = {0xffe7, 0xffe7, 0xffe7, 0xffe7}; -+static volatile unsigned short ASM_VAR(MMX_Vgrn555)[] = {0xffcc, 0xffcc, 0xffcc, 0xffcc}; -+static volatile unsigned short ASM_VAR(MMX_Ugrn565)[] = {0xffe8, 0xffe8, 0xffe8, 0xffe8}; -+static volatile unsigned short ASM_VAR(MMX_Vgrn565)[] = {0xffcd, 0xffcd, 0xffcd, 0xffcd}; -+ -+static volatile unsigned short ASM_VAR(MMX_red555)[] = {0x7c00, 0x7c00, 0x7c00, 0x7c00}; -+static volatile unsigned short ASM_VAR(MMX_red565)[] = {0xf800, 0xf800, 0xf800, 0xf800}; -+static volatile unsigned short ASM_VAR(MMX_grn555)[] = {0x03e0, 0x03e0, 0x03e0, 0x03e0}; -+static volatile unsigned short ASM_VAR(MMX_grn565)[] = {0x07e0, 0x07e0, 0x07e0, 0x07e0}; -+static volatile unsigned short ASM_VAR(MMX_blu5x5)[] = {0x001f, 0x001f, 0x001f, 0x001f}; - - /** - This MMX assembler is my first assembler/MMX program ever. -@@ -114,12 +127,21 @@ - "movd (%2), %%mm2\n" // 0 0 0 0 l3 l2 l1 l0 - "punpcklbw %%mm7,%%mm1\n" // 0 v3 0 v2 00 v1 00 v0 - "punpckldq %%mm1,%%mm1\n" // 00 v1 00 v0 00 v1 00 v0 -+#ifdef GCC2_HACK -+ "psubw _MMX_0080w,%%mm1\n" // mm1-128:r1 r1 r0 r0 r1 r1 r0 r0 -+#else - "psubw %[_MMX_0080w],%%mm1\n" // mm1-128:r1 r1 r0 r0 r1 r1 r0 r0 -+#endif - - // create Cr_g (result in mm0) - "movq %%mm1,%%mm0\n" // r1 r1 r0 r0 r1 r1 r0 r0 -+#ifdef GCC2_HACK -+ "pmullw _MMX_VgrnRGB,%%mm0\n"// red*-46dec=0.7136*64 -+ "pmullw _MMX_VredRGB,%%mm1\n"// red*89dec=1.4013*64 -+#else - "pmullw %[_MMX_VgrnRGB],%%mm0\n"// red*-46dec=0.7136*64 - "pmullw %[_MMX_VredRGB],%%mm1\n"// red*89dec=1.4013*64 -+#endif - "psraw $6, %%mm0\n" // red=red/64 - "psraw $6, %%mm1\n" // red=red/64 - -@@ -128,8 +150,13 @@ - "movq (%2,%4),%%mm3\n" // 0 0 0 0 L3 L2 L1 L0 - "punpckldq %%mm3,%%mm2\n" // L3 L2 L1 L0 l3 l2 l1 l0 - "movq %%mm2,%%mm4\n" // L3 L2 L1 L0 l3 l2 l1 l0 -+#ifdef GCC2_HACK -+ "pand _MMX_FF00w,%%mm2\n" // L3 0 L1 0 l3 0 l1 0 -+ "pand _MMX_00FFw,%%mm4\n" // 0 L2 0 L0 0 l2 0 l0 -+#else - "pand %[_MMX_FF00w],%%mm2\n" // L3 0 L1 0 l3 0 l1 0 - "pand %[_MMX_00FFw],%%mm4\n" // 0 L2 0 L0 0 l2 0 l0 -+#endif - "psrlw $8,%%mm2\n" // 0 L3 0 L1 0 l3 0 l1 - - // create R (result in mm6) -@@ -146,11 +173,20 @@ - "movd (%1), %%mm1\n" // 0 0 0 0 u3 u2 u1 u0 - "punpcklbw %%mm7,%%mm1\n" // 0 u3 0 u2 00 u1 00 u0 - "punpckldq %%mm1,%%mm1\n" // 00 u1 00 u0 00 u1 00 u0 -+#ifdef GCC2_HACK -+ "psubw _MMX_0080w,%%mm1\n" // mm1-128:u1 u1 u0 u0 u1 u1 u0 u0 -+#else - "psubw %[_MMX_0080w],%%mm1\n" // mm1-128:u1 u1 u0 u0 u1 u1 u0 u0 -+#endif - // create Cb_g (result in mm5) - "movq %%mm1,%%mm5\n" // u1 u1 u0 u0 u1 u1 u0 u0 -+#ifdef GCC2_HACK -+ "pmullw _MMX_UgrnRGB,%%mm5\n" // blue*-109dec=1.7129*64 -+ "pmullw _MMX_UbluRGB,%%mm1\n" // blue*114dec=1.78125*64 -+#else - "pmullw %[_MMX_UgrnRGB],%%mm5\n" // blue*-109dec=1.7129*64 - "pmullw %[_MMX_UbluRGB],%%mm1\n" // blue*114dec=1.78125*64 -+#endif - "psraw $6, %%mm5\n" // blue=red/64 - "psraw $6, %%mm1\n" // blue=blue/64 - -@@ -232,15 +268,17 @@ - "popl %%ebx\n" - : - : "m" (cr), "r"(cb),"r"(lum), -- "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod), -- [_MMX_0080w] "m" (*MMX_0080w), -- [_MMX_00FFw] "m" (*MMX_00FFw), -- [_MMX_FF00w] "m" (*MMX_FF00w), -- [_MMX_VgrnRGB] "m" (*MMX_VgrnRGB), -- [_MMX_VredRGB] "m" (*MMX_VredRGB), -- [_MMX_UgrnRGB] "m" (*MMX_UgrnRGB), -- [_MMX_UbluRGB] "m" (*MMX_UbluRGB) -- ); -+ "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod) -+#ifndef GCC2_HACK -+ ,[_MMX_0080w] "m" (*MMX_0080w), -+ [_MMX_00FFw] "m" (*MMX_00FFw), -+ [_MMX_FF00w] "m" (*MMX_FF00w), -+ [_MMX_VgrnRGB] "m" (*MMX_VgrnRGB), -+ [_MMX_VredRGB] "m" (*MMX_VredRGB), -+ [_MMX_UgrnRGB] "m" (*MMX_UgrnRGB), -+ [_MMX_UbluRGB] "m" (*MMX_UbluRGB) -+#endif -+ ); - } - - void Color565DitherYV12MMX1X( int *colortab, Uint32 *rgb_2_pix, -@@ -269,21 +307,48 @@ - "movd (%%ebx), %%mm1\n" // 4 Cr 0 0 0 0 v3 v2 v1 v0 - "punpcklbw %%mm7, %%mm0\n" // 4 W cb 0 u3 0 u2 0 u1 0 u0 - "punpcklbw %%mm7, %%mm1\n" // 4 W cr 0 v3 0 v2 0 v1 0 v0 -+#ifdef GCC2_HACK -+ "psubw _MMX_0080w, %%mm0\n" -+ "psubw _MMX_0080w, %%mm1\n" -+#else - "psubw %[_MMX_0080w], %%mm0\n" - "psubw %[_MMX_0080w], %%mm1\n" -+#endif - "movq %%mm0, %%mm2\n" // Cb 0 u3 0 u2 0 u1 0 u0 - "movq %%mm1, %%mm3\n" // Cr -+#ifdef GCC2_HACK -+ "pmullw _MMX_Ugrn565, %%mm2\n" // Cb2green 0 R3 0 R2 0 R1 0 R0 -+#else - "pmullw %[_MMX_Ugrn565], %%mm2\n" // Cb2green 0 R3 0 R2 0 R1 0 R0 -+#endif - "movq (%2), %%mm6\n" // L1 l7 L6 L5 L4 L3 L2 L1 L0 -+#ifdef GCC2_HACK -+ "pmullw _MMX_Ublu5x5, %%mm0\n" // Cb2blue -+ "pand _MMX_00FFw, %%mm6\n" // L1 00 L6 00 L4 00 L2 00 L0 -+ "pmullw _MMX_Vgrn565, %%mm3\n" // Cr2green -+#else - "pmullw %[_MMX_Ublu5x5], %%mm0\n" // Cb2blue - "pand %[_MMX_00FFw], %%mm6\n" // L1 00 L6 00 L4 00 L2 00 L0 - "pmullw %[_MMX_Vgrn565], %%mm3\n" // Cr2green -+#endif - "movq (%2), %%mm7\n" // L2 -+#ifdef GCC2_HACK -+ "pmullw _MMX_Vred5x5, %%mm1\n" // Cr2red -+#else - "pmullw %[_MMX_Vred5x5], %%mm1\n" // Cr2red -+#endif - "psrlw $8, %%mm7\n" // L2 00 L7 00 L5 00 L3 00 L1 -+#ifdef GCC2_HACK -+ "pmullw _MMX_Ycoeff, %%mm6\n" // lum1 -+#else - "pmullw %[_MMX_Ycoeff], %%mm6\n" // lum1 -+#endif - "paddw %%mm3, %%mm2\n" // Cb2green + Cr2green == green -+#ifdef GCC2_HACK -+ "pmullw _MMX_Ycoeff, %%mm7\n" // lum2 -+#else - "pmullw %[_MMX_Ycoeff], %%mm7\n" // lum2 -+#endif - - "movq %%mm6, %%mm4\n" // lum1 - "paddw %%mm0, %%mm6\n" // lum1 +blue 00 B6 00 B4 00 B2 00 B0 -@@ -301,11 +366,20 @@ - "punpcklbw %%mm4, %%mm4\n" - "punpcklbw %%mm5, %%mm5\n" - -+#ifdef GCC2_HACK -+ "pand _MMX_red565, %%mm4\n" -+#else - "pand %[_MMX_red565], %%mm4\n" -+#endif - "psllw $3, %%mm5\n" // GREEN 1 - "punpcklbw %%mm6, %%mm6\n" -+#ifdef GCC2_HACK -+ "pand _MMX_grn565, %%mm5\n" -+ "pand _MMX_red565, %%mm6\n" -+#else - "pand %[_MMX_grn565], %%mm5\n" - "pand %[_MMX_red565], %%mm6\n" -+#endif - "por %%mm5, %%mm4\n" // - "psrlw $11, %%mm6\n" // BLUE 1 - "movq %%mm3, %%mm5\n" // lum2 -@@ -319,23 +393,44 @@ - "packuswb %%mm3, %%mm3\n" - "packuswb %%mm5, %%mm5\n" - "packuswb %%mm7, %%mm7\n" -+#ifdef GCC2_HACK -+ "pand _MMX_00FFw, %%mm6\n" // L3 -+#else - "pand %[_MMX_00FFw], %%mm6\n" // L3 -+#endif - "punpcklbw %%mm3, %%mm3\n" - "punpcklbw %%mm5, %%mm5\n" -+#ifdef GCC2_HACK -+ "pmullw _MMX_Ycoeff, %%mm6\n" // lum3 -+#else - "pmullw %[_MMX_Ycoeff], %%mm6\n" // lum3 -+#endif - "punpcklbw %%mm7, %%mm7\n" - "psllw $3, %%mm5\n" // GREEN 2 -+#ifdef GCC2_HACK -+ "pand _MMX_red565, %%mm7\n" -+ "pand _MMX_red565, %%mm3\n" -+#else - "pand %[_MMX_red565], %%mm7\n" - "pand %[_MMX_red565], %%mm3\n" -+#endif - "psrlw $11, %%mm7\n" // BLUE 2 -+#ifdef GCC2_HACK -+ "pand _MMX_grn565, %%mm5\n" -+#else - "pand %[_MMX_grn565], %%mm5\n" -+#endif - "por %%mm7, %%mm3\n" - "movq (%2,%4), %%mm7\n" // L4 load lum2 - "por %%mm5, %%mm3\n" // - "psrlw $8, %%mm7\n" // L4 - "movq %%mm4, %%mm5\n" - "punpcklwd %%mm3, %%mm4\n" -+#ifdef GCC2_HACK -+ "pmullw _MMX_Ycoeff, %%mm7\n" // lum4 -+#else - "pmullw %[_MMX_Ycoeff], %%mm7\n" // lum4 -+#endif - "punpckhwd %%mm3, %%mm5\n" - - "movq %%mm4, (%3)\n" // write row1 -@@ -362,11 +457,20 @@ - "punpcklbw %%mm5, %%mm5\n" - "punpcklbw %%mm6, %%mm6\n" - "psllw $3, %%mm5\n" // GREEN 3 -+#ifdef GCC2_HACK -+ "pand _MMX_red565, %%mm4\n" -+#else - "pand %[_MMX_red565], %%mm4\n" -+#endif - "psraw $6, %%mm3\n" // psr 6 - "psraw $6, %%mm0\n" -+#ifdef GCC2_HACK -+ "pand _MMX_red565, %%mm6\n" // BLUE -+ "pand _MMX_grn565, %%mm5\n" -+#else - "pand %[_MMX_red565], %%mm6\n" // BLUE - "pand %[_MMX_grn565], %%mm5\n" -+#endif - "psrlw $11, %%mm6\n" // BLUE 3 - "por %%mm5, %%mm4\n" - "psraw $6, %%mm7\n" -@@ -377,11 +481,20 @@ - "punpcklbw %%mm3, %%mm3\n" - "punpcklbw %%mm0, %%mm0\n" - "punpcklbw %%mm7, %%mm7\n" -+#ifdef GCC2_HACK -+ "pand _MMX_red565, %%mm3\n" -+ "pand _MMX_red565, %%mm7\n" // BLUE -+#else - "pand %[_MMX_red565], %%mm3\n" - "pand %[_MMX_red565], %%mm7\n" // BLUE -+#endif - "psllw $3, %%mm0\n" // GREEN 4 - "psrlw $11, %%mm7\n" -+#ifdef GCC2_HACK -+ "pand _MMX_grn565, %%mm0\n" -+#else - "pand %[_MMX_grn565], %%mm0\n" -+#endif - "por %%mm7, %%mm3\n" - "por %%mm0, %%mm3\n" - -@@ -411,10 +524,11 @@ - "jl 1b\n" - "emms\n" - "popl %%ebx\n" -- : -- :"m" (cr), "r"(cb),"r"(lum), -- "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod), -- [_MMX_0080w] "m" (*MMX_0080w), -+ : -+ :"m" (cr), "r"(cb),"r"(lum), -+ "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod) -+#ifndef GCC2_HACK -+ ,[_MMX_0080w] "m" (*MMX_0080w), - [_MMX_Ugrn565] "m" (*MMX_Ugrn565), - [_MMX_Ublu5x5] "m" (*MMX_Ublu5x5), - [_MMX_00FFw] "m" (*MMX_00FFw), -@@ -423,7 +537,10 @@ - [_MMX_Ycoeff] "m" (*MMX_Ycoeff), - [_MMX_red565] "m" (*MMX_red565), - [_MMX_grn565] "m" (*MMX_grn565) -- ); -+#endif -+ ); - } - -+#undef GCC2_HACK -+ - #endif /* GCC i386 inline assembly */ diff --git a/media-libs/libsdl/files/libsdl-1.2.8-libcaca.patch b/media-libs/libsdl/files/libsdl-1.2.8-libcaca.patch deleted file mode 100644 index 2ae4feafac4f..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.8-libcaca.patch +++ /dev/null @@ -1,701 +0,0 @@ ---- SDL/configure.in -+++ SDL/configure.in -@@ -1004,6 +1004,32 @@ CheckAAlib() - 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() - { -@@ -1882,6 +1908,7 @@ case "$target" in - CheckGGI - CheckSVGA - CheckAAlib -+ CheckCaca - CheckQtopia - CheckPicoGUI - CheckOpenGL -@@ -1962,6 +1989,7 @@ case "$target" in - CheckDGA - CheckSVGA - CheckAAlib -+ CheckCaca - CheckOpenGL - CheckPTHREAD - CheckSIGACTION -@@ -2007,6 +2035,7 @@ case "$target" in - CheckDGA - CheckSVGA - CheckAAlib -+ CheckCaca - CheckOpenGL - CheckPTHREAD - CheckSIGACTION -@@ -2044,6 +2073,7 @@ case "$target" in - CheckNAS - CheckX11 - CheckAAlib -+ CheckCaca - CheckOpenGL - CheckPTHREAD - CheckSIGACTION -@@ -2085,6 +2115,7 @@ case "$target" in - CheckNAS - CheckX11 - CheckAAlib -+ CheckCaca - CheckOpenGL - CheckPTHREAD - CheckSIGACTION -@@ -2127,6 +2158,7 @@ case "$target" in - CheckNAS - CheckX11 - CheckAAlib -+ CheckCaca - CheckOpenGL - CheckPTHREAD - CheckSIGACTION -@@ -2169,6 +2201,7 @@ case "$target" in - CheckNAS - CheckX11 - CheckAAlib -+ CheckCaca - CheckOpenGL - CheckPTHREAD - CheckSIGACTION -@@ -2208,6 +2241,7 @@ case "$target" in - CheckNAS - CheckX11 - CheckAAlib -+ CheckCaca - CheckOpenGL - CheckPTHREAD - CheckSIGACTION -@@ -2259,6 +2293,7 @@ case "$target" in - CheckX11 - CheckGGI - CheckAAlib -+ CheckCaca - CheckOpenGL - CheckPTHREAD - CheckSIGACTION -@@ -2299,6 +2334,7 @@ case "$target" in - CheckX11 - CheckGGI - CheckAAlib -+ CheckCaca - CheckOpenGL - CheckPTHREAD - CheckSIGACTION -@@ -2336,6 +2372,7 @@ case "$target" in - CheckX11 - CheckGGI - CheckAAlib -+ CheckCaca - CheckOpenGL - CheckPTHREAD - CheckSIGACTION -@@ -2869,6 +2906,7 @@ 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 ---- SDL/src/video/Makefile.am -+++ SDL/src/video/Makefile.am -@@ -5,7 +5,7 @@ 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 \ -+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 \ ---- SDL/src/video/SDL_sysvideo.h -+++ SDL/src/video/SDL_sysvideo.h -@@ -359,6 +359,9 @@ extern VideoBootStrap SVGALIB_bootstrap; - #ifdef ENABLE_AALIB - extern VideoBootStrap AALIB_bootstrap; - #endif -+#ifdef ENABLE_CACA -+extern VideoBootStrap Caca_bootstrap; -+#endif - #ifdef ENABLE_WINDIB - extern VideoBootStrap WINDIB_bootstrap; - #endif ---- SDL/src/video/SDL_video.c -+++ SDL/src/video/SDL_video.c -@@ -78,6 +78,9 @@ static VideoBootStrap *bootstrap[] = { - #ifdef ENABLE_AALIB - &AALIB_bootstrap, - #endif -+#ifdef ENABLE_CACA -+ &Caca_bootstrap, -+#endif - #ifdef ENABLE_DIRECTX - &DIRECTX_bootstrap, - #endif ---- SDL/src/video/caca/Makefile.am -+++ SDL/src/video/caca/Makefile.am -@@ -0,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 -+ ---- SDL/src/video/caca/SDL_cacaevents.c -+++ SDL/src/video/caca/SDL_cacaevents.c -@@ -0,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: libsdl-1.2.8-libcaca.patch,v 1.1 2005/08/04 03:58:46 vapier 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; -+} -+ -+ ---- SDL/src/video/caca/SDL_cacaevents_c.h -+++ SDL/src/video/caca/SDL_cacaevents_c.h -@@ -0,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: libsdl-1.2.8-libcaca.patch,v 1.1 2005/08/04 03:58:46 vapier 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); -+ ---- SDL/src/video/caca/SDL_cacavideo.c -+++ SDL/src/video/caca/SDL_cacavideo.c -@@ -0,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: libsdl-1.2.8-libcaca.patch,v 1.1 2005/08/04 03:58:46 vapier 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); -+} -+ ---- SDL/src/video/caca/SDL_cacavideo.h -+++ SDL/src/video/caca/SDL_cacavideo.h -@@ -0,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: libsdl-1.2.8-libcaca.patch,v 1.1 2005/08/04 03:58:46 vapier 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/libsdl-1.2.8-no-cxx.patch b/media-libs/libsdl/files/libsdl-1.2.8-no-cxx.patch deleted file mode 100644 index 8689a46264a5..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.8-no-cxx.patch +++ /dev/null @@ -1,23 +0,0 @@ -A little hack to keep C++ crap out of libsdl. - -Problem is that autotools isn't smart enough to realize that libarch.la -should be linked as C++ only for TARGET_BEOS ... otherwise it should be -linked as a good old fashioned C library. - -Since Gentoo doesn't support BEOS [atm], this hack is acceptable considering -the gain (no more C++ crap !). - ---- src/main/Makefile.am -+++ src/main/Makefile.am -@@ -33,11 +33,7 @@ libSDLmain_a_SOURCES = $(MAINLIB_ARCH_SR - # Build an internal library of any special app setup functions - noinst_LTLIBRARIES = libarch.la - --if TARGET_BEOS --ARCH_SRCS = beos/SDL_BeApp.cc beos/SDL_BeApp.h --else - ARCH_SRCS = arch.c --endif - - libarch_la_SOURCES = $(ARCH_SRCS) - diff --git a/media-libs/libsdl/files/libsdl-1.2.8-sdl-config.patch b/media-libs/libsdl/files/libsdl-1.2.8-sdl-config.patch deleted file mode 100644 index 4457be2ffc88..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.8-sdl-config.patch +++ /dev/null @@ -1,19 +0,0 @@ -Only output -L -rpath cruft if using a non-standard install location. - -Makes ABI / cross-compiling easier on the soul. - ---- sdl-config.in -+++ sdl-config.in -@@ -51,7 +51,11 @@ - #echo $includes -I@includedir@/SDL @SDL_CFLAGS@ - ;; - @ENABLE_SHARED_TRUE@ --libs) --@ENABLE_SHARED_TRUE@ libdirs="-L@libdir@ @SDL_RLD_FLAGS@" -+@ENABLE_SHARED_TRUE@ if test x"${prefix}" != x"/usr" ; then -+@ENABLE_SHARED_TRUE@ libdirs="-L@libdir@ @SDL_RLD_FLAGS@" -+@ENABLE_SHARED_TRUE@ else -+@ENABLE_SHARED_TRUE@ libdirs="" -+@ENABLE_SHARED_TRUE@ fi - @ENABLE_SHARED_TRUE@ echo $libdirs @SDL_LIBS@ @SHARED_SYSTEM_LIBS@ - @ENABLE_SHARED_TRUE@ ;; - @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs) diff --git a/media-libs/libsdl/files/libsdl-1.2.9-DirectFB-updates.patch b/media-libs/libsdl/files/libsdl-1.2.9-DirectFB-updates.patch deleted file mode 100644 index 721ee78c18a2..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.9-DirectFB-updates.patch +++ /dev/null @@ -1,59 +0,0 @@ -DirectFB peeps changed their API again: - -http://www.directfb.org/index.php/viewcvs.cgi/DirectFB/include/directfb.h.diff?r1=1.266&r2=1.267 - ---- src/video/directfb/SDL_DirectFB_video.c -+++ src/video/directfb/SDL_DirectFB_video.c -@@ -40,6 +40,7 @@ static char rcsid = - #include <sys/mman.h> - - #include <directfb.h> -+#include <directfb_version.h> - - #include "SDL.h" - #include "SDL_error.h" -@@ -376,7 +376,11 @@ int DirectFB_VideoInit(_THIS, SDL_PixelF - { - int i; - DFBResult ret; -+#if (DIRECTFB_MAJOR_VERSION == 0) && (DIRECTFB_MINOR_VERSION == 9) && (DIRECTFB_MICRO_VERSION < 23) - DFBCardCapabilities caps; -+#else -+ DFBGraphicsDeviceDescription caps; -+#endif - DFBDisplayLayerConfig dlc; - struct DirectFBEnumRect *rect; - IDirectFB *dfb = NULL; -@@ -448,7 +452,11 @@ int DirectFB_VideoInit(_THIS, SDL_PixelF - - - /* Query card capabilities to get the video memory size */ -+#if (DIRECTFB_MAJOR_VERSION == 0) && (DIRECTFB_MINOR_VERSION == 9) && (DIRECTFB_MICRO_VERSION < 23) - dfb->GetCardCapabilities (dfb, &caps); -+#else -+ dfb->GetDeviceDescription (dfb, &caps); -+#endif - - this->info.wm_available = 1; - this->info.hw_available = 1; - -http://bugs.gentoo.org/132571 -And another change: - DIKI_ALTGR is gone. The key right to the space bar is the right alt key. - No matter which map is loaded, the identifiers are just named hardware keys, - where you really specify the physical entity on your keyboard. In this case - it's always DIKI_ALT_R, no matter if it's mapped to DIKS_ALTGR or DIKS_ALT. - On standard keyboards it's also always the same hardware key code, no matter - if you by a German keyboard with AltGr or a U.$. one with Alt. - ---- src/video/directfb/SDL_DirectFB_events.c -+++ src/video/directfb/SDL_DirectFB_events.c -@@ -155,7 +155,7 @@ void DirectFB_InitOSKeymap (_THIS) - keymap[DIKI_SHIFT_L - DIKI_UNKNOWN] = SDLK_LSHIFT; - keymap[DIKI_SHIFT_R - DIKI_UNKNOWN] = SDLK_RSHIFT; - keymap[DIKI_ALT_L - DIKI_UNKNOWN] = SDLK_LALT; -- keymap[DIKI_ALTGR - DIKI_UNKNOWN] = SDLK_RALT; -+ keymap[DIKI_ALT_R - DIKI_UNKNOWN] = SDLK_RALT; - keymap[DIKI_TAB - DIKI_UNKNOWN] = SDLK_TAB; - keymap[DIKI_ENTER - DIKI_UNKNOWN] = SDLK_RETURN; - keymap[DIKI_SPACE - DIKI_UNKNOWN] = SDLK_SPACE; diff --git a/media-libs/libsdl/files/libsdl-1.2.9-PIC-SDL_stretch.patch b/media-libs/libsdl/files/libsdl-1.2.9-PIC-SDL_stretch.patch deleted file mode 100644 index bff711205ff6..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.9-PIC-SDL_stretch.patch +++ /dev/null @@ -1,16 +0,0 @@ -Kill off TEXTREL in SDL_SoftStretch() - ---- src/video/SDL_stretch.c -+++ src/video/SDL_stretch.c -@@ -286,9 +286,9 @@ int SDL_SoftStretch(SDL_Surface *src, SD - default: - #ifdef __GNUC__ - __asm__ __volatile__ ( -- "call _copy_row" -+ "call *%4" - : "=&D" (u1), "=&S" (u2) -- : "0" (dstp), "1" (srcp) -+ : "0" (dstp), "1" (srcp), "r" (&_copy_row) - : "memory" ); - #else - #ifdef WIN32 diff --git a/media-libs/libsdl/files/libsdl-1.2.9-PIC-hermes-call-dont-jump.patch b/media-libs/libsdl/files/libsdl-1.2.9-PIC-hermes-call-dont-jump.patch deleted file mode 100644 index 6dc9aef38edf..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.9-PIC-hermes-call-dont-jump.patch +++ /dev/null @@ -1,350 +0,0 @@ -Fixes from PaX team to eliminate TEXTRELs in hermes code - ---- src/hermes/mmx_main.asm -+++ src/hermes/mmx_main.asm -@@ -10,7 +10,6 @@ - BITS 32 - - GLOBAL _ConvertMMX --GLOBAL _mmxreturn - - - SECTION .text -@@ -50,9 +49,8 @@ _ConvertMMX: - y_loop: - mov ecx,[ebp+4] - -- jmp [ebp+32] -+ call [ebp+32] - --_mmxreturn: - add esi,[ebp+12] - add edi,[ebp+28] - ---- src/hermes/x86_main.asm -+++ src/hermes/x86_main.asm -@@ -12,7 +12,6 @@ - BITS 32 - - GLOBAL _ConvertX86 --GLOBAL _x86return - - GLOBAL _Hermes_X86_CPU - -@@ -54,9 +53,8 @@ - y_loop: - mov ecx,[ebp+4] - -- jmp [ebp+32] -+ call [ebp+32] - --_x86return: - add esi,[ebp+12] - add edi,[ebp+28] - ---- src/hermes/x86p_16.asm -+++ src/hermes/x86p_16.asm -@@ -25,7 +25,6 @@ GLOBAL _ConvertX86p16_16BGR555 - GLOBAL _ConvertX86p16_8RGB332 - - EXTERN _ConvertX86 --EXTERN _x86return - - - SECTION .text -@@ -57,7 +56,7 @@ _ConvertX86p16_16BGR565: - dec ecx - jnz .L1 - .L2 -- jmp _x86return -+ retn - - .L3 ; head - mov eax,edi -@@ -135,7 +134,7 @@ _ConvertX86p16_16BGR565: - add edi,BYTE 2 - - .L7 -- jmp _x86return -+ retn - - - -@@ -164,7 +163,7 @@ _ConvertX86p16_16RGB555: - dec ecx - jnz .L1 - .L2 -- jmp _x86return -+ retn - - .L3 ; head - mov eax,edi -@@ -243,7 +242,7 @@ _ConvertX86p16_16RGB555: - jmp SHORT .L6 - - .L7 pop ebp -- jmp _x86return -+ retn - - - -@@ -277,7 +276,7 @@ _ConvertX86p16_16BGR555: - dec ecx - jnz .L1 - .L2 -- jmp _x86return -+ retn - - .L3 ; head - mov eax,edi -@@ -361,7 +360,7 @@ _ConvertX86p16_16BGR555: - add edi,BYTE 2 - - .L7 -- jmp _x86return -+ retn - - - -@@ -394,7 +393,7 @@ _ConvertX86p16_8RGB332: - dec ecx - jnz .L1 - .L2 -- jmp _x86return -+ retn - - .L3 mov eax,edi - and eax,BYTE 11b -@@ -492,5 +491,5 @@ _ConvertX86p16_8RGB332: - jnz .L6 - - .L7 pop ebp -- jmp _x86return -+ retn - ---- src/hermes/x86p_32.asm -+++ src/hermes/x86p_32.asm -@@ -23,8 +23,7 @@ GLOBAL _ConvertX86p32_16RGB555 - GLOBAL _ConvertX86p32_16BGR555 - GLOBAL _ConvertX86p32_8RGB332 - --EXTERN _x86return -- -+ - SECTION .text - - -@@ -53,7 +52,7 @@ _ConvertX86p32_32BGR888: - dec ecx - jnz .L1 - .L2 -- jmp _x86return -+ retn - - .L3 ; save ebp - push ebp -@@ -113,7 +112,7 @@ _ConvertX86p32_32BGR888: - jnz .L5 - - .L6 pop ebp -- jmp _x86return -+ retn - - - -@@ -133,7 +132,7 @@ _ConvertX86p32_32RGBA888: - dec ecx - jnz .L1 - .L2 -- jmp _x86return -+ retn - - .L3 ; save ebp - push ebp -@@ -184,7 +183,7 @@ _ConvertX86p32_32RGBA888: - jnz .L5 - - .L6 pop ebp -- jmp _x86return -+ retn - - - -@@ -204,7 +203,7 @@ _ConvertX86p32_32BGRA888: - dec ecx - jnz .L1 - .L2 -- jmp _x86return -+ retn - - .L3 ; save ebp - push ebp -@@ -257,7 +256,7 @@ _ConvertX86p32_32BGRA888: - jnz .L5 - - .L6 pop ebp -- jmp _x86return -+ retn - - - -@@ -282,7 +281,7 @@ _ConvertX86p32_24RGB888: - dec ecx - jnz .L1 - .L2 -- jmp _x86return -+ retn - - .L3 ; head - mov edx,edi -@@ -354,7 +353,7 @@ _ConvertX86p32_24RGB888: - jnz .L6 - - .L7 pop ebp -- jmp _x86return -+ retn - - - -@@ -380,7 +379,7 @@ _ConvertX86p32_24BGR888: - dec ecx - jnz .L1 - .L2 -- jmp _x86return -+ retn - - .L3 ; head - mov edx,edi -@@ -455,7 +454,7 @@ _ConvertX86p32_24BGR888: - - .L7 - pop ebp -- jmp _x86return -+ retn - - - -@@ -484,7 +483,7 @@ _ConvertX86p32_16RGB565: - jnz .L1 - - .L2: ; End of short loop -- jmp _x86return -+ retn - - - .L3 ; head -@@ -570,7 +569,7 @@ _ConvertX86p32_16RGB565: - add edi,BYTE 2 - - .L7: -- jmp _x86return -+ retn - - - -@@ -599,7 +598,7 @@ _ConvertX86p32_16BGR565: - dec ecx - jnz .L1 - .L2 -- jmp _x86return -+ retn - - .L3 ; head - mov ebx,edi -@@ -684,7 +683,7 @@ _ConvertX86p32_16BGR565: - add edi,BYTE 2 - - .L7 -- jmp _x86return -+ retn - - - -@@ -713,7 +712,7 @@ _ConvertX86p32_16RGB555: - dec ecx - jnz .L1 - .L2 -- jmp _x86return -+ retn - - .L3 ; head - mov ebx,edi -@@ -795,7 +794,7 @@ _ConvertX86p32_16RGB555: - add edi,BYTE 2 - - .L7 -- jmp _x86return -+ retn - - - -@@ -825,7 +824,7 @@ _ConvertX86p32_16BGR555: - dec ecx - jnz .L1 - .L2 -- jmp _x86return -+ retn - - .L3 ; head - mov ebx,edi -@@ -910,7 +909,7 @@ _ConvertX86p32_16BGR555: - add edi,BYTE 2 - - .L7 -- jmp _x86return -+ retn - - - -@@ -1040,5 +1039,5 @@ _ConvertX86p32_8RGB332: - jnz .L3 - - .L4: -- jmp _x86return -+ retn - ---- src/hermes/mmxp2_32.asm -+++ src/hermes/mmxp2_32.asm -@@ -27,8 +27,6 @@ GLOBAL _ConvertMMXpII32_16BGR565 - GLOBAL _ConvertMMXpII32_16RGB555 - GLOBAL _ConvertMMXpII32_16BGR555 - --EXTERN _mmxreturn -- - SECTION .data - - ALIGN 8 -@@ -108,7 +98,7 @@ _ConvertMMXpII32_24RGB888: - dec ecx - jnz .L3 - .L4: -- jmp _mmxreturn -+ return - - - -@@ -176,7 +173,7 @@ _ConvertMMXpII32_16RGB565: - jnz .L3 - - .L4: -- jmp _mmxreturn -+ retn - - - _ConvertMMXpII32_16BGR565: -@@ -245,7 +249,7 @@ _ConvertMMXpII32_16BGR565: - jnz .L3 - - .L4: -- jmp _mmxreturn -+ retn - - _ConvertMMXpII32_16BGR555: - -@@ -380,5 +384,5 @@ _convert_bgr555_cheat: - jnz .L3 - - .L4: -- jmp _mmxreturn -+ retn - diff --git a/media-libs/libsdl/files/libsdl-1.2.9-PIC-hermes-cpuid.patch b/media-libs/libsdl/files/libsdl-1.2.9-PIC-hermes-cpuid.patch deleted file mode 100644 index d7794881ddeb..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.9-PIC-hermes-cpuid.patch +++ /dev/null @@ -1,37 +0,0 @@ -Fixes from the PaX team to eliminate TEXTRELs - ---- src/hermes/x86_main.asm -+++ src/hermes/x86_main.asm -@@ -17,11 +17,6 @@ GLOBAL _x86return - GLOBAL _Hermes_X86_CPU - - --SECTION .data -- --cpu_flags dd 0 -- -- - SECTION .text - - ;; _ConvertX86: -@@ -110,16 +105,13 @@ _Hermes_X86_CPU: - xor eax,ecx - je .L1 - -- pusha -- -+ push ebx -+ - mov eax,1 - cpuid -+ mov eax,edx - -- mov [cpu_flags],edx -- -- popa -- -- mov eax,[cpu_flags] -+ pop ebx - - .L1: - ret diff --git a/media-libs/libsdl/files/libsdl-1.2.9-PIC-load-mmx-masks-from-stack.patch b/media-libs/libsdl/files/libsdl-1.2.9-PIC-load-mmx-masks-from-stack.patch deleted file mode 100644 index 961730114973..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.9-PIC-load-mmx-masks-from-stack.patch +++ /dev/null @@ -1,166 +0,0 @@ ---- src/hermes/mmxp2_32.asm -+++ src/hermes/mmxp2_32.asm -@@ -27,22 +27,37 @@ GLOBAL _ConvertMMXpII32_16BGR565 - GLOBAL _ConvertMMXpII32_16RGB555 - GLOBAL _ConvertMMXpII32_16BGR555 - --SECTION .data -- --ALIGN 8 -- --;; Constants for conversion routines -- --mmx32_rgb888_mask dd 00ffffffh,00ffffffh -- --mmx32_rgb565_b dd 000000f8h, 000000f8h --mmx32_rgb565_g dd 0000fc00h, 0000fc00h --mmx32_rgb565_r dd 00f80000h, 00f80000h -- --mmx32_rgb555_rb dd 00f800f8h,00f800f8h --mmx32_rgb555_g dd 0000f800h,0000f800h --mmx32_rgb555_mul dd 20000008h,20000008h --mmx32_bgr555_mul dd 00082000h,00082000h -+ -+;; Macros for conversion routines -+ -+%macro _push_immq_mask 1 -+ push dword %1 -+ push dword %1 -+%endmacro -+ -+%macro load_immq 2 -+ _push_immq_mask %2 -+ movq %1, [esp] -+%endmacro -+ -+%macro pand_immq 2 -+ _push_immq_mask %2 -+ pand %1, [esp] -+%endmacro -+ -+%define CLEANUP_IMMQ_LOADS(num) \ -+ add esp, byte 8 * num -+ -+%define mmx32_rgb888_mask 00ffffffh -+ -+%define mmx32_rgb565_b 000000f8h -+%define mmx32_rgb565_g 0000fc00h -+%define mmx32_rgb565_r 00f80000h -+ -+%define mmx32_rgb555_rb 00f800f8h -+%define mmx32_rgb555_g 0000f800h -+%define mmx32_rgb555_mul 20000008h -+%define mmx32_bgr555_mul 00082000h - - - -@@ -53,7 +66,8 @@ SECTION .text - _ConvertMMXpII32_24RGB888: - - ; set up mm6 as the mask, mm7 as zero -- movq mm6, qword [mmx32_rgb888_mask] -+ load_immq mm6, mmx32_rgb888_mask -+ CLEANUP_IMMQ_LOADS(1) - pxor mm7, mm7 - - mov edx, ecx ; save ecx -@@ -108,9 +122,10 @@ _ConvertMMXpII32_24RGB888: - _ConvertMMXpII32_16RGB565: - - ; set up masks -- movq mm5, [mmx32_rgb565_b] -- movq mm6, [mmx32_rgb565_g] -- movq mm7, [mmx32_rgb565_r] -+ load_immq mm5, mmx32_rgb565_b -+ load_immq mm6, mmx32_rgb565_g -+ load_immq mm7, mmx32_rgb565_r -+ CLEANUP_IMMQ_LOADS(3) - - mov edx, ecx - shr ecx, 2 -@@ -176,9 +191,10 @@ _ConvertMMXpII32_16RGB565: - - _ConvertMMXpII32_16BGR565: - -- movq mm5, [mmx32_rgb565_r] -- movq mm6, [mmx32_rgb565_g] -- movq mm7, [mmx32_rgb565_b] -+ load_immq mm5, mmx32_rgb565_r -+ load_immq mm6, mmx32_rgb565_g -+ load_immq mm7, mmx32_rgb565_b -+ CLEANUP_IMMQ_LOADS(3) - - mov edx, ecx - shr ecx, 2 -@@ -253,7 +269,7 @@ _ConvertMMXpII32_16BGR555: - ; except it uses a different multiplier for the pmaddwd - ; instruction. cool huh. - -- movq mm7, qword [mmx32_bgr555_mul] -+ load_immq mm7, mmx32_bgr555_mul - jmp _convert_bgr555_cheat - - ; This is the same as the Intel version.. they obviously went to -@@ -263,9 +279,10 @@ _ConvertMMXpII32_16BGR555: - ; (I think) a more accurate name.. - _ConvertMMXpII32_16RGB555: - -- movq mm7,qword [mmx32_rgb555_mul] -+ load_immq mm7, mmx32_rgb555_mul - _convert_bgr555_cheat: -- movq mm6,qword [mmx32_rgb555_g] -+ load_immq mm6, mmx32_rgb555_g -+ CLEANUP_IMMQ_LOADS(2) - - mov edx,ecx ; Save ecx - -@@ -280,12 +297,14 @@ _convert_bgr555_cheat: - movq mm0,[esi] - movq mm3,mm2 - -- pand mm3,qword [mmx32_rgb555_rb] -+ pand_immq mm3, mmx32_rgb555_rb - movq mm1,mm0 - -- pand mm1,qword [mmx32_rgb555_rb] -+ pand_immq mm1, mmx32_rgb555_rb - pmaddwd mm3,mm7 - -+ CLEANUP_IMMQ_LOADS(2) -+ - pmaddwd mm1,mm7 - pand mm2,mm6 - -@@ -302,13 +321,13 @@ _convert_bgr555_cheat: - movq mm0,mm4 - psrld mm1,6 - -- pand mm0,qword [mmx32_rgb555_rb] -+ pand_immq mm0, mmx32_rgb555_rb - packssdw mm1,mm3 - - movq mm3,mm5 - pmaddwd mm0,mm7 - -- pand mm3,qword [mmx32_rgb555_rb] -+ pand_immq mm3, mmx32_rgb555_rb - pand mm4,mm6 - - movq [edi],mm1 -@@ -329,12 +348,14 @@ _convert_bgr555_cheat: - movq mm3,mm2 - movq mm1,mm0 - -- pand mm3,qword [mmx32_rgb555_rb] -+ pand_immq mm3, mmx32_rgb555_rb - packssdw mm5,mm4 - -- pand mm1,qword [mmx32_rgb555_rb] -+ pand_immq mm1, mmx32_rgb555_rb - pand mm2,mm6 - -+ CLEANUP_IMMQ_LOADS(4) -+ - movq [edi+8],mm5 - pmaddwd mm3,mm7 - diff --git a/media-libs/libsdl/files/libsdl-1.2.9-PIC-yuv-mmx.patch b/media-libs/libsdl/files/libsdl-1.2.9-PIC-yuv-mmx.patch deleted file mode 100644 index 06f36f1fb243..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.9-PIC-yuv-mmx.patch +++ /dev/null @@ -1,231 +0,0 @@ ---- src/video/SDL_yuv_mmx.c -+++ src/video/SDL_yuv_mmx.c -@@ -29,32 +29,31 @@ static char rcsid = - #if defined(i386) && defined(__GNUC__) && defined(USE_ASMBLIT) - - #include "SDL_types.h" -+#include "mmx.h" - --#define ASM_ARRAY(x) x[] __asm__("_" #x) __attribute__((used)) -- --static unsigned int ASM_ARRAY(MMX_0080w) = {0x00800080, 0x00800080}; --static unsigned int ASM_ARRAY(MMX_00FFw) = {0x00ff00ff, 0x00ff00ff}; --static unsigned int ASM_ARRAY(MMX_FF00w) = {0xff00ff00, 0xff00ff00}; -- --static unsigned short ASM_ARRAY(MMX_Ycoeff) = {0x004a, 0x004a, 0x004a, 0x004a}; -- --static unsigned short ASM_ARRAY(MMX_UbluRGB) = {0x0072, 0x0072, 0x0072, 0x0072}; --static unsigned short ASM_ARRAY(MMX_VredRGB) = {0x0059, 0x0059, 0x0059, 0x0059}; --static unsigned short ASM_ARRAY(MMX_UgrnRGB) = {0xffea, 0xffea, 0xffea, 0xffea}; --static unsigned short ASM_ARRAY(MMX_VgrnRGB) = {0xffd2, 0xffd2, 0xffd2, 0xffd2}; -- --static unsigned short ASM_ARRAY(MMX_Ublu5x5) = {0x0081, 0x0081, 0x0081, 0x0081}; --static unsigned short ASM_ARRAY(MMX_Vred5x5) = {0x0066, 0x0066, 0x0066, 0x0066}; --static unsigned short ASM_ARRAY(MMX_Ugrn555) = {0xffe7, 0xffe7, 0xffe7, 0xffe7}; --static unsigned short ASM_ARRAY(MMX_Vgrn555) = {0xffcc, 0xffcc, 0xffcc, 0xffcc}; --static unsigned short ASM_ARRAY(MMX_Ugrn565) = {0xffe8, 0xffe8, 0xffe8, 0xffe8}; --static unsigned short ASM_ARRAY(MMX_Vgrn565) = {0xffcd, 0xffcd, 0xffcd, 0xffcd}; -- --static unsigned short ASM_ARRAY(MMX_red555) = {0x7c00, 0x7c00, 0x7c00, 0x7c00}; --static unsigned short ASM_ARRAY(MMX_red565) = {0xf800, 0xf800, 0xf800, 0xf800}; --static unsigned short ASM_ARRAY(MMX_grn555) = {0x03e0, 0x03e0, 0x03e0, 0x03e0}; --static unsigned short ASM_ARRAY(MMX_grn565) = {0x07e0, 0x07e0, 0x07e0, 0x07e0}; --static unsigned short ASM_ARRAY(MMX_blu5x5) = {0x001f, 0x001f, 0x001f, 0x001f}; -+static mmx_t MMX_0080w = { .ud = {0x00800080, 0x00800080} }; -+static mmx_t MMX_00FFw = { .ud = {0x00ff00ff, 0x00ff00ff} }; -+static mmx_t MMX_FF00w = { .ud = {0xff00ff00, 0xff00ff00} }; -+ -+static mmx_t MMX_Ycoeff = { .uw = {0x004a, 0x004a, 0x004a, 0x004a} }; -+ -+static mmx_t MMX_UbluRGB = { .uw = {0x0072, 0x0072, 0x0072, 0x0072} }; -+static mmx_t MMX_VredRGB = { .uw = {0x0059, 0x0059, 0x0059, 0x0059} }; -+static mmx_t MMX_UgrnRGB = { .uw = {0xffea, 0xffea, 0xffea, 0xffea} }; -+static mmx_t MMX_VgrnRGB = { .uw = {0xffd2, 0xffd2, 0xffd2, 0xffd2} }; -+ -+static mmx_t MMX_Ublu5x5 = { .uw = {0x0081, 0x0081, 0x0081, 0x0081} }; -+static mmx_t MMX_Vred5x5 = { .uw = {0x0066, 0x0066, 0x0066, 0x0066} }; -+static mmx_t MMX_Ugrn555 = { .uw = {0xffe7, 0xffe7, 0xffe7, 0xffe7} }; -+static mmx_t MMX_Vgrn555 = { .uw = {0xffcc, 0xffcc, 0xffcc, 0xffcc} }; -+static mmx_t MMX_Ugrn565 = { .uw = {0xffe8, 0xffe8, 0xffe8, 0xffe8} }; -+static mmx_t MMX_Vgrn565 = { .uw = {0xffcd, 0xffcd, 0xffcd, 0xffcd} }; -+ -+static mmx_t MMX_red555 = { .uw = {0x7c00, 0x7c00, 0x7c00, 0x7c00} }; -+static mmx_t MMX_red565 = { .uw = {0xf800, 0xf800, 0xf800, 0xf800} }; -+static mmx_t MMX_grn555 = { .uw = {0x03e0, 0x03e0, 0x03e0, 0x03e0} }; -+static mmx_t MMX_grn565 = { .uw = {0x07e0, 0x07e0, 0x07e0, 0x07e0} }; -+static mmx_t MMX_blu5x5 = { .uw = {0x001f, 0x001f, 0x001f, 0x001f} }; - - /** - This MMX assembler is my first assembler/MMX program ever. -@@ -116,12 +115,12 @@ void ColorRGBDitherYV12MMX1X( int *color - "movd (%2), %%mm2\n" // 0 0 0 0 l3 l2 l1 l0 - "punpcklbw %%mm7,%%mm1\n" // 0 v3 0 v2 00 v1 00 v0 - "punpckldq %%mm1,%%mm1\n" // 00 v1 00 v0 00 v1 00 v0 -- "psubw _MMX_0080w,%%mm1\n" // mm1-128:r1 r1 r0 r0 r1 r1 r0 r0 -+ "psubw %9,%%mm1\n" // mm1-128:r1 r1 r0 r0 r1 r1 r0 r0 - - // create Cr_g (result in mm0) - "movq %%mm1,%%mm0\n" // r1 r1 r0 r0 r1 r1 r0 r0 -- "pmullw _MMX_VgrnRGB,%%mm0\n"// red*-46dec=0.7136*64 -- "pmullw _MMX_VredRGB,%%mm1\n"// red*89dec=1.4013*64 -+ "pmullw %10,%%mm0\n" // red*-46dec=0.7136*64 -+ "pmullw %11,%%mm1\n" // red*89dec=1.4013*64 - "psraw $6, %%mm0\n" // red=red/64 - "psraw $6, %%mm1\n" // red=red/64 - -@@ -130,8 +129,8 @@ void ColorRGBDitherYV12MMX1X( int *color - "movq (%2,%4),%%mm3\n" // 0 0 0 0 L3 L2 L1 L0 - "punpckldq %%mm3,%%mm2\n" // L3 L2 L1 L0 l3 l2 l1 l0 - "movq %%mm2,%%mm4\n" // L3 L2 L1 L0 l3 l2 l1 l0 -- "pand _MMX_FF00w,%%mm2\n" // L3 0 L1 0 l3 0 l1 0 -- "pand _MMX_00FFw,%%mm4\n" // 0 L2 0 L0 0 l2 0 l0 -+ "pand %12,%%mm2\n" // L3 0 L1 0 l3 0 l1 0 -+ "pand %13,%%mm4\n" // 0 L2 0 L0 0 l2 0 l0 - "psrlw $8,%%mm2\n" // 0 L3 0 L1 0 l3 0 l1 - - // create R (result in mm6) -@@ -148,11 +147,11 @@ void ColorRGBDitherYV12MMX1X( int *color - "movd (%1), %%mm1\n" // 0 0 0 0 u3 u2 u1 u0 - "punpcklbw %%mm7,%%mm1\n" // 0 u3 0 u2 00 u1 00 u0 - "punpckldq %%mm1,%%mm1\n" // 00 u1 00 u0 00 u1 00 u0 -- "psubw _MMX_0080w,%%mm1\n" // mm1-128:u1 u1 u0 u0 u1 u1 u0 u0 -+ "psubw %9,%%mm1\n" // mm1-128:u1 u1 u0 u0 u1 u1 u0 u0 - // create Cb_g (result in mm5) - "movq %%mm1,%%mm5\n" // u1 u1 u0 u0 u1 u1 u0 u0 -- "pmullw _MMX_UgrnRGB,%%mm5\n" // blue*-109dec=1.7129*64 -- "pmullw _MMX_UbluRGB,%%mm1\n" // blue*114dec=1.78125*64 -+ "pmullw %14,%%mm5\n" // blue*-109dec=1.7129*64 -+ "pmullw %15,%%mm1\n" // blue*114dec=1.78125*64 - "psraw $6, %%mm5\n" // blue=red/64 - "psraw $6, %%mm1\n" // blue=blue/64 - -@@ -234,7 +233,10 @@ void ColorRGBDitherYV12MMX1X( int *color - "popl %%ebx\n" - : - : "m" (cr), "r"(cb),"r"(lum), -- "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod)); -+ "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod), -+ "m"(MMX_0080w),"m"(MMX_VgrnRGB),"m"(MMX_VredRGB), -+ "m"(MMX_FF00w),"m"(MMX_00FFw),"m"(MMX_UgrnRGB), -+ "m"(MMX_UbluRGB)); - } - - void Color565DitherYV12MMX1X( int *colortab, Uint32 *rgb_2_pix, -@@ -263,21 +265,21 @@ void Color565DitherYV12MMX1X( int *color - "movd (%%ebx), %%mm1\n" // 4 Cr 0 0 0 0 v3 v2 v1 v0 - "punpcklbw %%mm7, %%mm0\n" // 4 W cb 0 u3 0 u2 0 u1 0 u0 - "punpcklbw %%mm7, %%mm1\n" // 4 W cr 0 v3 0 v2 0 v1 0 v0 -- "psubw _MMX_0080w, %%mm0\n" -- "psubw _MMX_0080w, %%mm1\n" -+ "psubw %9, %%mm0\n" -+ "psubw %9, %%mm1\n" - "movq %%mm0, %%mm2\n" // Cb 0 u3 0 u2 0 u1 0 u0 - "movq %%mm1, %%mm3\n" // Cr -- "pmullw _MMX_Ugrn565, %%mm2\n" // Cb2green 0 R3 0 R2 0 R1 0 R0 -+ "pmullw %10, %%mm2\n" // Cb2green 0 R3 0 R2 0 R1 0 R0 - "movq (%2), %%mm6\n" // L1 l7 L6 L5 L4 L3 L2 L1 L0 -- "pmullw _MMX_Ublu5x5, %%mm0\n" // Cb2blue -- "pand _MMX_00FFw, %%mm6\n" // L1 00 L6 00 L4 00 L2 00 L0 -- "pmullw _MMX_Vgrn565, %%mm3\n" // Cr2green -+ "pmullw %11, %%mm0\n" // Cb2blue -+ "pand %12, %%mm6\n" // L1 00 L6 00 L4 00 L2 00 L0 -+ "pmullw %13, %%mm3\n" // Cr2green - "movq (%2), %%mm7\n" // L2 -- "pmullw _MMX_Vred5x5, %%mm1\n" // Cr2red -+ "pmullw %14, %%mm1\n" // Cr2red - "psrlw $8, %%mm7\n" // L2 00 L7 00 L5 00 L3 00 L1 -- "pmullw _MMX_Ycoeff, %%mm6\n" // lum1 -+ "pmullw %15, %%mm6\n" // lum1 - "paddw %%mm3, %%mm2\n" // Cb2green + Cr2green == green -- "pmullw _MMX_Ycoeff, %%mm7\n" // lum2 -+ "pmullw %15, %%mm7\n" // lum2 - - "movq %%mm6, %%mm4\n" // lum1 - "paddw %%mm0, %%mm6\n" // lum1 +blue 00 B6 00 B4 00 B2 00 B0 -@@ -295,11 +297,11 @@ void Color565DitherYV12MMX1X( int *color - "punpcklbw %%mm4, %%mm4\n" - "punpcklbw %%mm5, %%mm5\n" - -- "pand _MMX_red565, %%mm4\n" -+ "pand %16, %%mm4\n" - "psllw $3, %%mm5\n" // GREEN 1 - "punpcklbw %%mm6, %%mm6\n" -- "pand _MMX_grn565, %%mm5\n" -- "pand _MMX_red565, %%mm6\n" -+ "pand %17, %%mm5\n" -+ "pand %16, %%mm6\n" - "por %%mm5, %%mm4\n" // - "psrlw $11, %%mm6\n" // BLUE 1 - "movq %%mm3, %%mm5\n" // lum2 -@@ -313,23 +315,23 @@ void Color565DitherYV12MMX1X( int *color - "packuswb %%mm3, %%mm3\n" - "packuswb %%mm5, %%mm5\n" - "packuswb %%mm7, %%mm7\n" -- "pand _MMX_00FFw, %%mm6\n" // L3 -+ "pand %12, %%mm6\n" // L3 - "punpcklbw %%mm3, %%mm3\n" - "punpcklbw %%mm5, %%mm5\n" -- "pmullw _MMX_Ycoeff, %%mm6\n" // lum3 -+ "pmullw %15, %%mm6\n" // lum3 - "punpcklbw %%mm7, %%mm7\n" - "psllw $3, %%mm5\n" // GREEN 2 -- "pand _MMX_red565, %%mm7\n" -- "pand _MMX_red565, %%mm3\n" -+ "pand %16, %%mm7\n" -+ "pand %16, %%mm3\n" - "psrlw $11, %%mm7\n" // BLUE 2 -- "pand _MMX_grn565, %%mm5\n" -+ "pand %17, %%mm5\n" - "por %%mm7, %%mm3\n" - "movq (%2,%4), %%mm7\n" // L4 load lum2 - "por %%mm5, %%mm3\n" // - "psrlw $8, %%mm7\n" // L4 - "movq %%mm4, %%mm5\n" - "punpcklwd %%mm3, %%mm4\n" -- "pmullw _MMX_Ycoeff, %%mm7\n" // lum4 -+ "pmullw %15, %%mm7\n" // lum4 - "punpckhwd %%mm3, %%mm5\n" - - "movq %%mm4, (%3)\n" // write row1 -@@ -356,11 +358,11 @@ void Color565DitherYV12MMX1X( int *color - "punpcklbw %%mm5, %%mm5\n" - "punpcklbw %%mm6, %%mm6\n" - "psllw $3, %%mm5\n" // GREEN 3 -- "pand _MMX_red565, %%mm4\n" -+ "pand %16, %%mm4\n" - "psraw $6, %%mm3\n" // psr 6 - "psraw $6, %%mm0\n" -- "pand _MMX_red565, %%mm6\n" // BLUE -- "pand _MMX_grn565, %%mm5\n" -+ "pand %16, %%mm6\n" // BLUE -+ "pand %17, %%mm5\n" - "psrlw $11, %%mm6\n" // BLUE 3 - "por %%mm5, %%mm4\n" - "psraw $6, %%mm7\n" -@@ -371,11 +373,11 @@ void Color565DitherYV12MMX1X( int *color - "punpcklbw %%mm3, %%mm3\n" - "punpcklbw %%mm0, %%mm0\n" - "punpcklbw %%mm7, %%mm7\n" -- "pand _MMX_red565, %%mm3\n" -- "pand _MMX_red565, %%mm7\n" // BLUE -+ "pand %16, %%mm3\n" -+ "pand %16, %%mm7\n" // BLUE - "psllw $3, %%mm0\n" // GREEN 4 - "psrlw $11, %%mm7\n" -- "pand _MMX_grn565, %%mm0\n" -+ "pand %17, %%mm0\n" - "por %%mm7, %%mm3\n" - "por %%mm0, %%mm3\n" - -@@ -407,7 +409,10 @@ void Color565DitherYV12MMX1X( int *color - "popl %%ebx\n" - : - :"m" (cr), "r"(cb),"r"(lum), -- "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod)); -+ "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod), -+ "m"(MMX_0080w),"m"(MMX_Ugrn565),"m"(MMX_Ublu5x5), -+ "m"(MMX_00FFw),"m"(MMX_Vgrn565),"m"(MMX_Vred5x5), -+ "m"(MMX_Ycoeff),"m"(MMX_red565),"m"(MMX_grn565)); - } - - #endif /* GCC i386 inline assembly */ diff --git a/media-libs/libsdl/files/libsdl-1.2.9-dlvsym-check.patch b/media-libs/libsdl/files/libsdl-1.2.9-dlvsym-check.patch deleted file mode 100644 index 95ed1d40469e..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.9-dlvsym-check.patch +++ /dev/null @@ -1,26 +0,0 @@ -simply trying a compile to see if a func exists is not enough - -check to see if the dlvsym func exists in the dl library instead - ---- configure.in -+++ configure.in -@@ -313,18 +313,8 @@ CheckALSA() - CFLAGS="$CFLAGS -DALSA_SUPPORT -DALSA_DYNAMIC=\$(alsa_lib) $ALSA_CFLAGS" - AC_SUBST(alsa_lib) - -- AC_MSG_CHECKING(for dlvsym) - use_dlvsym=no -- AC_TRY_COMPILE([ -- #include <stdio.h> -- #define __USE_GNU -- #include <dlfcn.h> -- ],[ -- dlvsym(NULL,"",""); -- ],[ -- use_dlvsym=yes -- ]) -- AC_MSG_RESULT($use_dlvsym); -+ AC_CHECK_LIB(dl, dlvsym, [use_dlvsym=yes]) - if test x$use_dlvsym = xyes; then - CFLAGS="$CFLAGS -DUSE_DLVSYM" - fi diff --git a/media-libs/libsdl/files/libsdl-1.2.9-endian-cvs-updates.patch b/media-libs/libsdl/files/libsdl-1.2.9-endian-cvs-updates.patch deleted file mode 100644 index cd6121a6a091..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.9-endian-cvs-updates.patch +++ /dev/null @@ -1,48 +0,0 @@ -grab some updates from upstream cvs to support some more architectures - -Index: include/SDL_byteorder.h -=================================================================== -RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/include/SDL_byteorder.h,v -retrieving revision 1.9 -retrieving revision 1.11 -diff -u -p -r1.9 -r1.11 ---- include/SDL_byteorder.h 12 Nov 2004 22:09:17 -0000 1.9 -+++ include/SDL_byteorder.h 23 Nov 2005 07:29:53 -0000 1.11 -@@ -34,6 +34,16 @@ static char rcsid = - #define SDL_LIL_ENDIAN 1234 - #define SDL_BIG_ENDIAN 4321 - -+#ifdef __linux__ -+# include <endian.h> -+# if BYTE_ORDER == LITTLE_ENDIAN -+# define SDL_BYTEORDER SDL_LIL_ENDIAN -+# else -+# define SDL_BYTEORDER SDL_BIG_ENDIAN -+# endif -+ -+#else -+ - /* Pardon the mess, I'm trying to determine the endianness of this host. - I'm doing it by preprocessor defines rather than some sort of configure - script so that application code can use this too. The "right" way would -@@ -42,14 +52,16 @@ static char rcsid = - #if (defined(__i386__) || defined(__i386)) || \ - defined(__ia64__) || defined(WIN32) || \ - (defined(__alpha__) || defined(__alpha)) || \ -- defined(__arm__) || \ -+ (defined(__arm__) || defined(__thumb__)) || \ -+ (defined(__sh__) || defined(__sh64__)) || \ - (defined(__mips__) && defined(__MIPSEL__)) || \ -- defined(__SYMBIAN32__) || \ -- defined(__x86_64__) || \ -- defined(__LITTLE_ENDIAN__) -+ defined(__SYMBIAN32__) || defined(__x86_64__) || \ -+ defined(__OS2__) || defined(__LITTLE_ENDIAN__) - #define SDL_BYTEORDER SDL_LIL_ENDIAN - #else - #define SDL_BYTEORDER SDL_BIG_ENDIAN - #endif - -+#endif /* __linux__ */ -+ - #endif /* _SDL_byteorder_h */ diff --git a/media-libs/libsdl/files/libsdl-1.2.9-gcc-mmx.patch b/media-libs/libsdl/files/libsdl-1.2.9-gcc-mmx.patch deleted file mode 100644 index 2926577e2b75..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.9-gcc-mmx.patch +++ /dev/null @@ -1,335 +0,0 @@ -http://bugs.gentoo.org/104437 - -get this mmx stuff to build with gcc2/gcc3/gcc4 - -Index: src/video/SDL_yuv_mmx.c -=================================================================== -RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/src/video/SDL_yuv_mmx.c,v -retrieving revision 1.9 -retrieving revision 1.10 -diff -u -p -r1.9 -r1.10 ---- src/video/SDL_yuv_mmx.c 13 Feb 2005 07:10:02 -0000 1.9 -+++ src/video/SDL_yuv_mmx.c 28 Sep 2005 02:26:29 -0000 1.10 -@@ -30,42 +30,31 @@ static char rcsid = - - #include "SDL_types.h" - --#if __GNUC__ > 2 --# undef GCC2_HACK --#else --# define GCC2_HACK --#endif -- -- --#if defined(GCC2_HACK) && defined (__ELF__) --#define ASM_VAR(X) _##X --#else --#define ASM_VAR(X) X --#endif -+#define ASM_ARRAY(x) x[] __asm__("_" #x) __attribute__((used)) - --static volatile unsigned int ASM_VAR(MMX_0080w)[] = {0x00800080, 0x00800080}; --static volatile unsigned int ASM_VAR(MMX_00FFw)[] = {0x00ff00ff, 0x00ff00ff}; --static volatile unsigned int ASM_VAR(MMX_FF00w)[] = {0xff00ff00, 0xff00ff00}; -- --static volatile unsigned short ASM_VAR(MMX_Ycoeff)[] = {0x004a, 0x004a, 0x004a, 0x004a}; -- --static volatile unsigned short ASM_VAR(MMX_UbluRGB)[] = {0x0072, 0x0072, 0x0072, 0x0072}; --static volatile unsigned short ASM_VAR(MMX_VredRGB)[] = {0x0059, 0x0059, 0x0059, 0x0059}; --static volatile unsigned short ASM_VAR(MMX_UgrnRGB)[] = {0xffea, 0xffea, 0xffea, 0xffea}; --static volatile unsigned short ASM_VAR(MMX_VgrnRGB)[] = {0xffd2, 0xffd2, 0xffd2, 0xffd2}; -- --static volatile unsigned short ASM_VAR(MMX_Ublu5x5)[] = {0x0081, 0x0081, 0x0081, 0x0081}; --static volatile unsigned short ASM_VAR(MMX_Vred5x5)[] = {0x0066, 0x0066, 0x0066, 0x0066}; --static volatile unsigned short ASM_VAR(MMX_Ugrn555)[] = {0xffe7, 0xffe7, 0xffe7, 0xffe7}; --static volatile unsigned short ASM_VAR(MMX_Vgrn555)[] = {0xffcc, 0xffcc, 0xffcc, 0xffcc}; --static volatile unsigned short ASM_VAR(MMX_Ugrn565)[] = {0xffe8, 0xffe8, 0xffe8, 0xffe8}; --static volatile unsigned short ASM_VAR(MMX_Vgrn565)[] = {0xffcd, 0xffcd, 0xffcd, 0xffcd}; -- --static volatile unsigned short ASM_VAR(MMX_red555)[] = {0x7c00, 0x7c00, 0x7c00, 0x7c00}; --static volatile unsigned short ASM_VAR(MMX_red565)[] = {0xf800, 0xf800, 0xf800, 0xf800}; --static volatile unsigned short ASM_VAR(MMX_grn555)[] = {0x03e0, 0x03e0, 0x03e0, 0x03e0}; --static volatile unsigned short ASM_VAR(MMX_grn565)[] = {0x07e0, 0x07e0, 0x07e0, 0x07e0}; --static volatile unsigned short ASM_VAR(MMX_blu5x5)[] = {0x001f, 0x001f, 0x001f, 0x001f}; -+static unsigned int ASM_ARRAY(MMX_0080w) = {0x00800080, 0x00800080}; -+static unsigned int ASM_ARRAY(MMX_00FFw) = {0x00ff00ff, 0x00ff00ff}; -+static unsigned int ASM_ARRAY(MMX_FF00w) = {0xff00ff00, 0xff00ff00}; -+ -+static unsigned short ASM_ARRAY(MMX_Ycoeff) = {0x004a, 0x004a, 0x004a, 0x004a}; -+ -+static unsigned short ASM_ARRAY(MMX_UbluRGB) = {0x0072, 0x0072, 0x0072, 0x0072}; -+static unsigned short ASM_ARRAY(MMX_VredRGB) = {0x0059, 0x0059, 0x0059, 0x0059}; -+static unsigned short ASM_ARRAY(MMX_UgrnRGB) = {0xffea, 0xffea, 0xffea, 0xffea}; -+static unsigned short ASM_ARRAY(MMX_VgrnRGB) = {0xffd2, 0xffd2, 0xffd2, 0xffd2}; -+ -+static unsigned short ASM_ARRAY(MMX_Ublu5x5) = {0x0081, 0x0081, 0x0081, 0x0081}; -+static unsigned short ASM_ARRAY(MMX_Vred5x5) = {0x0066, 0x0066, 0x0066, 0x0066}; -+static unsigned short ASM_ARRAY(MMX_Ugrn555) = {0xffe7, 0xffe7, 0xffe7, 0xffe7}; -+static unsigned short ASM_ARRAY(MMX_Vgrn555) = {0xffcc, 0xffcc, 0xffcc, 0xffcc}; -+static unsigned short ASM_ARRAY(MMX_Ugrn565) = {0xffe8, 0xffe8, 0xffe8, 0xffe8}; -+static unsigned short ASM_ARRAY(MMX_Vgrn565) = {0xffcd, 0xffcd, 0xffcd, 0xffcd}; -+ -+static unsigned short ASM_ARRAY(MMX_red555) = {0x7c00, 0x7c00, 0x7c00, 0x7c00}; -+static unsigned short ASM_ARRAY(MMX_red565) = {0xf800, 0xf800, 0xf800, 0xf800}; -+static unsigned short ASM_ARRAY(MMX_grn555) = {0x03e0, 0x03e0, 0x03e0, 0x03e0}; -+static unsigned short ASM_ARRAY(MMX_grn565) = {0x07e0, 0x07e0, 0x07e0, 0x07e0}; -+static unsigned short ASM_ARRAY(MMX_blu5x5) = {0x001f, 0x001f, 0x001f, 0x001f}; - - /** - This MMX assembler is my first assembler/MMX program ever. -@@ -127,21 +116,12 @@ void ColorRGBDitherYV12MMX1X( int *color - "movd (%2), %%mm2\n" // 0 0 0 0 l3 l2 l1 l0 - "punpcklbw %%mm7,%%mm1\n" // 0 v3 0 v2 00 v1 00 v0 - "punpckldq %%mm1,%%mm1\n" // 00 v1 00 v0 00 v1 00 v0 --#ifdef GCC2_HACK - "psubw _MMX_0080w,%%mm1\n" // mm1-128:r1 r1 r0 r0 r1 r1 r0 r0 --#else -- "psubw %[_MMX_0080w],%%mm1\n" // mm1-128:r1 r1 r0 r0 r1 r1 r0 r0 --#endif - - // create Cr_g (result in mm0) - "movq %%mm1,%%mm0\n" // r1 r1 r0 r0 r1 r1 r0 r0 --#ifdef GCC2_HACK - "pmullw _MMX_VgrnRGB,%%mm0\n"// red*-46dec=0.7136*64 - "pmullw _MMX_VredRGB,%%mm1\n"// red*89dec=1.4013*64 --#else -- "pmullw %[_MMX_VgrnRGB],%%mm0\n"// red*-46dec=0.7136*64 -- "pmullw %[_MMX_VredRGB],%%mm1\n"// red*89dec=1.4013*64 --#endif - "psraw $6, %%mm0\n" // red=red/64 - "psraw $6, %%mm1\n" // red=red/64 - -@@ -150,13 +130,8 @@ void ColorRGBDitherYV12MMX1X( int *color - "movq (%2,%4),%%mm3\n" // 0 0 0 0 L3 L2 L1 L0 - "punpckldq %%mm3,%%mm2\n" // L3 L2 L1 L0 l3 l2 l1 l0 - "movq %%mm2,%%mm4\n" // L3 L2 L1 L0 l3 l2 l1 l0 --#ifdef GCC2_HACK - "pand _MMX_FF00w,%%mm2\n" // L3 0 L1 0 l3 0 l1 0 - "pand _MMX_00FFw,%%mm4\n" // 0 L2 0 L0 0 l2 0 l0 --#else -- "pand %[_MMX_FF00w],%%mm2\n" // L3 0 L1 0 l3 0 l1 0 -- "pand %[_MMX_00FFw],%%mm4\n" // 0 L2 0 L0 0 l2 0 l0 --#endif - "psrlw $8,%%mm2\n" // 0 L3 0 L1 0 l3 0 l1 - - // create R (result in mm6) -@@ -173,20 +148,11 @@ void ColorRGBDitherYV12MMX1X( int *color - "movd (%1), %%mm1\n" // 0 0 0 0 u3 u2 u1 u0 - "punpcklbw %%mm7,%%mm1\n" // 0 u3 0 u2 00 u1 00 u0 - "punpckldq %%mm1,%%mm1\n" // 00 u1 00 u0 00 u1 00 u0 --#ifdef GCC2_HACK - "psubw _MMX_0080w,%%mm1\n" // mm1-128:u1 u1 u0 u0 u1 u1 u0 u0 --#else -- "psubw %[_MMX_0080w],%%mm1\n" // mm1-128:u1 u1 u0 u0 u1 u1 u0 u0 --#endif - // create Cb_g (result in mm5) - "movq %%mm1,%%mm5\n" // u1 u1 u0 u0 u1 u1 u0 u0 --#ifdef GCC2_HACK - "pmullw _MMX_UgrnRGB,%%mm5\n" // blue*-109dec=1.7129*64 - "pmullw _MMX_UbluRGB,%%mm1\n" // blue*114dec=1.78125*64 --#else -- "pmullw %[_MMX_UgrnRGB],%%mm5\n" // blue*-109dec=1.7129*64 -- "pmullw %[_MMX_UbluRGB],%%mm1\n" // blue*114dec=1.78125*64 --#endif - "psraw $6, %%mm5\n" // blue=red/64 - "psraw $6, %%mm1\n" // blue=blue/64 - -@@ -268,17 +234,7 @@ void ColorRGBDitherYV12MMX1X( int *color - "popl %%ebx\n" - : - : "m" (cr), "r"(cb),"r"(lum), -- "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod) --#ifndef GCC2_HACK -- ,[_MMX_0080w] "m" (*MMX_0080w), -- [_MMX_00FFw] "m" (*MMX_00FFw), -- [_MMX_FF00w] "m" (*MMX_FF00w), -- [_MMX_VgrnRGB] "m" (*MMX_VgrnRGB), -- [_MMX_VredRGB] "m" (*MMX_VredRGB), -- [_MMX_UgrnRGB] "m" (*MMX_UgrnRGB), -- [_MMX_UbluRGB] "m" (*MMX_UbluRGB) --#endif -- ); -+ "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod)); - } - - void Color565DitherYV12MMX1X( int *colortab, Uint32 *rgb_2_pix, -@@ -307,48 +263,21 @@ void Color565DitherYV12MMX1X( int *color - "movd (%%ebx), %%mm1\n" // 4 Cr 0 0 0 0 v3 v2 v1 v0 - "punpcklbw %%mm7, %%mm0\n" // 4 W cb 0 u3 0 u2 0 u1 0 u0 - "punpcklbw %%mm7, %%mm1\n" // 4 W cr 0 v3 0 v2 0 v1 0 v0 --#ifdef GCC2_HACK - "psubw _MMX_0080w, %%mm0\n" - "psubw _MMX_0080w, %%mm1\n" --#else -- "psubw %[_MMX_0080w], %%mm0\n" -- "psubw %[_MMX_0080w], %%mm1\n" --#endif - "movq %%mm0, %%mm2\n" // Cb 0 u3 0 u2 0 u1 0 u0 - "movq %%mm1, %%mm3\n" // Cr --#ifdef GCC2_HACK - "pmullw _MMX_Ugrn565, %%mm2\n" // Cb2green 0 R3 0 R2 0 R1 0 R0 --#else -- "pmullw %[_MMX_Ugrn565], %%mm2\n" // Cb2green 0 R3 0 R2 0 R1 0 R0 --#endif - "movq (%2), %%mm6\n" // L1 l7 L6 L5 L4 L3 L2 L1 L0 --#ifdef GCC2_HACK - "pmullw _MMX_Ublu5x5, %%mm0\n" // Cb2blue - "pand _MMX_00FFw, %%mm6\n" // L1 00 L6 00 L4 00 L2 00 L0 - "pmullw _MMX_Vgrn565, %%mm3\n" // Cr2green --#else -- "pmullw %[_MMX_Ublu5x5], %%mm0\n" // Cb2blue -- "pand %[_MMX_00FFw], %%mm6\n" // L1 00 L6 00 L4 00 L2 00 L0 -- "pmullw %[_MMX_Vgrn565], %%mm3\n" // Cr2green --#endif - "movq (%2), %%mm7\n" // L2 --#ifdef GCC2_HACK - "pmullw _MMX_Vred5x5, %%mm1\n" // Cr2red --#else -- "pmullw %[_MMX_Vred5x5], %%mm1\n" // Cr2red --#endif - "psrlw $8, %%mm7\n" // L2 00 L7 00 L5 00 L3 00 L1 --#ifdef GCC2_HACK - "pmullw _MMX_Ycoeff, %%mm6\n" // lum1 --#else -- "pmullw %[_MMX_Ycoeff], %%mm6\n" // lum1 --#endif - "paddw %%mm3, %%mm2\n" // Cb2green + Cr2green == green --#ifdef GCC2_HACK - "pmullw _MMX_Ycoeff, %%mm7\n" // lum2 --#else -- "pmullw %[_MMX_Ycoeff], %%mm7\n" // lum2 --#endif - - "movq %%mm6, %%mm4\n" // lum1 - "paddw %%mm0, %%mm6\n" // lum1 +blue 00 B6 00 B4 00 B2 00 B0 -@@ -366,20 +295,11 @@ void Color565DitherYV12MMX1X( int *color - "punpcklbw %%mm4, %%mm4\n" - "punpcklbw %%mm5, %%mm5\n" - --#ifdef GCC2_HACK - "pand _MMX_red565, %%mm4\n" --#else -- "pand %[_MMX_red565], %%mm4\n" --#endif - "psllw $3, %%mm5\n" // GREEN 1 - "punpcklbw %%mm6, %%mm6\n" --#ifdef GCC2_HACK - "pand _MMX_grn565, %%mm5\n" - "pand _MMX_red565, %%mm6\n" --#else -- "pand %[_MMX_grn565], %%mm5\n" -- "pand %[_MMX_red565], %%mm6\n" --#endif - "por %%mm5, %%mm4\n" // - "psrlw $11, %%mm6\n" // BLUE 1 - "movq %%mm3, %%mm5\n" // lum2 -@@ -393,44 +313,23 @@ void Color565DitherYV12MMX1X( int *color - "packuswb %%mm3, %%mm3\n" - "packuswb %%mm5, %%mm5\n" - "packuswb %%mm7, %%mm7\n" --#ifdef GCC2_HACK - "pand _MMX_00FFw, %%mm6\n" // L3 --#else -- "pand %[_MMX_00FFw], %%mm6\n" // L3 --#endif - "punpcklbw %%mm3, %%mm3\n" - "punpcklbw %%mm5, %%mm5\n" --#ifdef GCC2_HACK - "pmullw _MMX_Ycoeff, %%mm6\n" // lum3 --#else -- "pmullw %[_MMX_Ycoeff], %%mm6\n" // lum3 --#endif - "punpcklbw %%mm7, %%mm7\n" - "psllw $3, %%mm5\n" // GREEN 2 --#ifdef GCC2_HACK - "pand _MMX_red565, %%mm7\n" - "pand _MMX_red565, %%mm3\n" --#else -- "pand %[_MMX_red565], %%mm7\n" -- "pand %[_MMX_red565], %%mm3\n" --#endif - "psrlw $11, %%mm7\n" // BLUE 2 --#ifdef GCC2_HACK - "pand _MMX_grn565, %%mm5\n" --#else -- "pand %[_MMX_grn565], %%mm5\n" --#endif - "por %%mm7, %%mm3\n" - "movq (%2,%4), %%mm7\n" // L4 load lum2 - "por %%mm5, %%mm3\n" // - "psrlw $8, %%mm7\n" // L4 - "movq %%mm4, %%mm5\n" - "punpcklwd %%mm3, %%mm4\n" --#ifdef GCC2_HACK - "pmullw _MMX_Ycoeff, %%mm7\n" // lum4 --#else -- "pmullw %[_MMX_Ycoeff], %%mm7\n" // lum4 --#endif - "punpckhwd %%mm3, %%mm5\n" - - "movq %%mm4, (%3)\n" // write row1 -@@ -457,20 +356,11 @@ void Color565DitherYV12MMX1X( int *color - "punpcklbw %%mm5, %%mm5\n" - "punpcklbw %%mm6, %%mm6\n" - "psllw $3, %%mm5\n" // GREEN 3 --#ifdef GCC2_HACK - "pand _MMX_red565, %%mm4\n" --#else -- "pand %[_MMX_red565], %%mm4\n" --#endif - "psraw $6, %%mm3\n" // psr 6 - "psraw $6, %%mm0\n" --#ifdef GCC2_HACK - "pand _MMX_red565, %%mm6\n" // BLUE - "pand _MMX_grn565, %%mm5\n" --#else -- "pand %[_MMX_red565], %%mm6\n" // BLUE -- "pand %[_MMX_grn565], %%mm5\n" --#endif - "psrlw $11, %%mm6\n" // BLUE 3 - "por %%mm5, %%mm4\n" - "psraw $6, %%mm7\n" -@@ -481,20 +371,11 @@ void Color565DitherYV12MMX1X( int *color - "punpcklbw %%mm3, %%mm3\n" - "punpcklbw %%mm0, %%mm0\n" - "punpcklbw %%mm7, %%mm7\n" --#ifdef GCC2_HACK - "pand _MMX_red565, %%mm3\n" - "pand _MMX_red565, %%mm7\n" // BLUE --#else -- "pand %[_MMX_red565], %%mm3\n" -- "pand %[_MMX_red565], %%mm7\n" // BLUE --#endif - "psllw $3, %%mm0\n" // GREEN 4 - "psrlw $11, %%mm7\n" --#ifdef GCC2_HACK - "pand _MMX_grn565, %%mm0\n" --#else -- "pand %[_MMX_grn565], %%mm0\n" --#endif - "por %%mm7, %%mm3\n" - "por %%mm0, %%mm3\n" - -@@ -526,21 +407,7 @@ void Color565DitherYV12MMX1X( int *color - "popl %%ebx\n" - : - :"m" (cr), "r"(cb),"r"(lum), -- "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod) --#ifndef GCC2_HACK -- ,[_MMX_0080w] "m" (*MMX_0080w), -- [_MMX_Ugrn565] "m" (*MMX_Ugrn565), -- [_MMX_Ublu5x5] "m" (*MMX_Ublu5x5), -- [_MMX_00FFw] "m" (*MMX_00FFw), -- [_MMX_Vgrn565] "m" (*MMX_Vgrn565), -- [_MMX_Vred5x5] "m" (*MMX_Vred5x5), -- [_MMX_Ycoeff] "m" (*MMX_Ycoeff), -- [_MMX_red565] "m" (*MMX_red565), -- [_MMX_grn565] "m" (*MMX_grn565) --#endif -- ); -+ "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod)); - } - --#undef GCC2_HACK -- - #endif /* GCC i386 inline assembly */ diff --git a/media-libs/libsdl/files/libsdl-1.2.9-no-exec-stack.patch b/media-libs/libsdl/files/libsdl-1.2.9-no-exec-stack.patch deleted file mode 100644 index 5be3c81664d5..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.9-no-exec-stack.patch +++ /dev/null @@ -1,54 +0,0 @@ -Fixes from the PaX team to eliminate executable stack markings - ---- src/hermes/mmx_main.asm -+++ src/hermes/mmx_main.asm -@@ -70,5 +68,6 @@ endconvert: - - ret - -- -- -+%ifidn __OUTPUT_FORMAT__,elf -+section .note.GNU-stack noalloc noexec nowrite progbits -+%endif ---- src/hermes/mmxp2_32.asm -+++ src/hermes/mmxp2_32.asm -@@ -381,6 +381,7 @@ _convert_bgr555_cheat: - - .L4: - jmp _mmxreturn - -- -- -+%ifidn __OUTPUT_FORMAT__,elf -+section .note.GNU-stack noalloc noexec nowrite progbits -+%endif ---- src/hermes/x86_main.asm -+++ src/hermes/x86_main.asm -@@ -123,3 +123,7 @@ _Hermes_X86_CPU: - - .L1: - ret -+ -+%ifidn __OUTPUT_FORMAT__,elf -+section .note.GNU-stack noalloc noexec nowrite progbits -+%endif ---- src/hermes/x86p_16.asm -+++ src/hermes/x86p_16.asm -@@ -494,3 +494,6 @@ _ConvertX86p16_8RGB332: - .L7 pop ebp - jmp _x86return - -+%ifidn __OUTPUT_FORMAT__,elf -+section .note.GNU-stack noalloc noexec nowrite progbits -+%endif ---- src/hermes/x86p_32.asm -+++ src/hermes/x86p_32.asm -@@ -1041,3 +1041,7 @@ _ConvertX86p32_8RGB332: - - .L4: - jmp _x86return -+ -+%ifidn __OUTPUT_FORMAT__,elf -+section .note.GNU-stack noalloc noexec nowrite progbits -+%endif diff --git a/media-libs/libsdl/files/libsdl-1.2.9-sdl-blit-mmx-check.patch b/media-libs/libsdl/files/libsdl-1.2.9-sdl-blit-mmx-check.patch deleted file mode 100644 index 041269d9ccfc..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.9-sdl-blit-mmx-check.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix segfaults when playing games like bomberclone - -http://bugs.gentoo.org/104533 - ---- src/video/SDL_blit_N.c -+++ src/video/SDL_blit_N.c -@@ -2245,7 +2245,7 @@ - MASKOK(dstfmt->Bmask, table[which].dstB) && - dstfmt->BytesPerPixel == table[which].dstbpp && - (a_need & table[which].alpha) == a_need && -- ((table[which].blit_features & GetBlitFeatures()) == table[which].blit_features) ) -+ ((table[which].blit_features & GetBlitFeatures()) == GetBlitFeatures()) ) - break; - } - sdata->aux_data = table[which].aux_data; diff --git a/media-libs/libsdl/libsdl-1.2.7-r3.ebuild b/media-libs/libsdl/libsdl-1.2.7-r3.ebuild deleted file mode 100644 index 17fcbfe3e11b..000000000000 --- a/media-libs/libsdl/libsdl-1.2.7-r3.ebuild +++ /dev/null @@ -1,148 +0,0 @@ -# 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.7-r3.ebuild,v 1.16 2007/01/05 10:04:26 flameeyes Exp $ - -inherit toolchain-funcs fixheadtails eutils flag-o-matic - -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="!noaudio? ( >=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 - || ( ( - x11-libs/libXt - x11-libs/libXext - x11-libs/libX11 ) - virtual/x11 ) ) - X? ( - || ( ( - x11-libs/libXt - x11-libs/libXext - x11-libs/libX11 ) - 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} - nas? ( - || ( ( - x11-proto/xextproto - x11-proto/xproto ) - virtual/x11 ) ) - X? ( - || ( ( - x11-proto/xextproto - x11-proto/xproto ) - virtual/x11 ) ) - 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}"/1.2.8-nobuggy-X.patch #30089 - epatch "${FILESDIR}"/${PN}-1.2.8-libcaca.patch #40224 - [ "$(gcc-major-version)" != "2" ] \ - && epatch "${FILESDIR}"/${PV}-gcc34.patch #48947 - epatch "${FILESDIR}"/${PV}-joystick2.patch #52833 - epatch "${FILESDIR}"/${PV}-26headers.patch #58192 - epatch "${FILESDIR}"/1.2.8-keyrepeat.patch #76448 - - ht_fix_file configure.in - - 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" - epunt_cxx -} - -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}" - - # filter -fomit-frame-pointer as per bug #82618 - filter-flags -fomit-frame-pointer - - econf \ - --enable-events \ - --enable-cdrom \ - --enable-threads \ - --enable-timers \ - --enable-endian \ - --enable-file \ - $(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) \ - ${myconf} || die - emake || die "emake failed" -} - -src_install() { - make DESTDIR="${D}" install || die "make install failed" - # 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 ./ -} diff --git a/media-libs/libsdl/libsdl-1.2.8-r1.ebuild b/media-libs/libsdl/libsdl-1.2.8-r1.ebuild deleted file mode 100644 index a9d64d3ea036..000000000000 --- a/media-libs/libsdl/libsdl-1.2.8-r1.ebuild +++ /dev/null @@ -1,176 +0,0 @@ -# Copyright 1999-2006 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-r1.ebuild,v 1.27 2006/01/30 05:58:28 mr_bones_ Exp $ - -inherit flag-o-matic toolchain-funcs eutils - -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 mips ppc ~ppc-macos ppc64 sh sparc x86" -# WARNING: -# if you have the noaudio, novideo, nojoystick, or noflagstrip use flags -# in USE and something breaks, you pick up the pieces. Be prepared for -# bug reports to be marked INVALID. -IUSE="oss alsa esd arts nas X dga xv xinerama fbcon directfb ggi svga aalib opengl libcaca pic noaudio novideo nojoystick noflagstrip" - -RDEPEND="!noaudio? ( >=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 - || ( ( - x11-libs/libXt - x11-libs/libXext - x11-libs/libX11 ) - virtual/x11 ) ) - X? ( - || ( ( - x11-libs/libXt - x11-libs/libXext - x11-libs/libX11 ) - 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} - nas? ( - || ( ( - x11-proto/xextproto - x11-proto/xproto ) - virtual/x11 ) ) - X? ( - || ( ( - x11-proto/xextproto - x11-proto/xproto ) - virtual/x11 ) ) - 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 - if use noflagstrip ; then - ewarn "Since you've chosen to use possibly unsafe CFLAGS," - ewarn "don't bother filing libsdl-related bugs until trying to remerge" - ewarn "libsdl without the noflagstrip use flag in USE." - epause 10 - fi -} - -src_unpack() { - unpack ${A} - cd "${S}" - - epatch "${FILESDIR}"/${PV}-nobuggy-X.patch #30089 - epatch "${FILESDIR}"/${P}-libcaca.patch #40224 - epatch "${FILESDIR}"/${PV}-gcc2.patch #75392 - epatch "${FILESDIR}"/${P}-sdl-config.patch - epatch "${FILESDIR}"/${P}-no-cxx.patch - epatch "${FILESDIR}"/libsdl-1.2.9-dlvsym-check.patch #105160 - epatch "${FILESDIR}"/libsdl-1.2.9-endian-cvs-updates.patch - - # This patch breaks compiling >-O0 on gcc4 ; bug #87809 - [ "`gcc-major-version`" -lt "4" ] && epatch "${FILESDIR}"/${P}-gcc2.patch #86481 - epatch "${FILESDIR}"/${PV}-keyrepeat.patch #76448 - epatch "${FILESDIR}"/${PV}-linux26.patch #74608 - #epatch "${FILESDIR}"/${PV}-direct-8bit-color.patch #76946 - epatch "${FILESDIR}"/${PV}-amd64-endian.patch #77300 - #fix for building with gcc4 (within bounds - here I need to - #build with -O0 to get it done) - epatch "${FILESDIR}"/${PV}-gcc4.patch - epatch "${FILESDIR}"/${PN}-1.2.9-DirectFB-updates.patch - - ./autogen.sh || die "autogen failed" - epunt_cxx -} - -src_compile() { - local myconf= - # silly bundled asm triggers TEXTREL ... maybe someday - # i'll fix this properly, but for now hide with USE=pic - if [[ $(tc-arch) != "x86" ]] || use pic ; then - myconf="${myconf} --disable-nasm" - else - myconf="${myconf} $(use_enable x86 nasm)" - fi - use noflagstrip || strip-flags - 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 - - if use ppc-macos ; then - append-flags -fno-common -undefined dynamic_lookup -framework OpenGL - # fix for gcc-apple >3.3 - if [ -e libgcc_s.1.dylib ] ; then - append-ldflags -lgcc_s - fi - 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 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" - # 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 ./ -} diff --git a/media-libs/libsdl/libsdl-1.2.9-r1.ebuild b/media-libs/libsdl/libsdl-1.2.9-r1.ebuild deleted file mode 100644 index c8bf2fb24ed1..000000000000 --- a/media-libs/libsdl/libsdl-1.2.9-r1.ebuild +++ /dev/null @@ -1,162 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.9-r1.ebuild,v 1.12 2006/04/08 00:19:15 flameeyes Exp $ - -inherit flag-o-matic toolchain-funcs eutils libtool - -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 ~mips ~ppc ppc-macos ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" -# WARNING: -# if you have the noaudio, novideo, nojoystick, or noflagstrip use flags -# in USE and something breaks, you pick up the pieces. Be prepared for -# bug reports to be marked INVALID. -IUSE="oss alsa esd arts nas X dga xv xinerama fbcon directfb ggi svga aalib opengl libcaca noaudio novideo nojoystick noflagstrip" - -RDEPEND="!noaudio? ( >=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 - || ( ( - x11-libs/libXt - x11-libs/libXext - x11-libs/libX11 ) - virtual/x11 ) ) - X? ( - || ( ( - x11-libs/libXt - x11-libs/libXext - x11-libs/libX11 ) - 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} - nas? ( - || ( ( - x11-proto/xextproto - x11-proto/xproto ) - virtual/x11 ) ) - X? ( - || ( ( - x11-proto/xextproto - x11-proto/xproto ) - virtual/x11 ) ) - 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 - if use noflagstrip ; then - ewarn "Since you've chosen to use possibly unsafe CFLAGS," - ewarn "don't bother filing libsdl-related bugs until trying to remerge" - ewarn "libsdl without the noflagstrip use flag in USE." - epause 10 - fi -} - -src_unpack() { - unpack ${A} - cd "${S}" - - epatch "${FILESDIR}"/1.2.8-nobuggy-X.patch #30089 - epatch "${FILESDIR}"/libsdl-1.2.8-libcaca.patch #40224 - epatch "${FILESDIR}"/libsdl-1.2.8-sdl-config.patch - epatch "${FILESDIR}"/libsdl-1.2.8-no-cxx.patch - epatch "${FILESDIR}"/libsdl-1.2.9-dlvsym-check.patch #105160 - epatch "${FILESDIR}"/1.2.8-gcc4.patch - epatch "${FILESDIR}"/${P}-gcc-mmx.patch #104437 - epatch "${FILESDIR}"/libsdl-1.2.9-no-exec-stack.patch - epatch "${FILESDIR}"/libsdl-1.2.9-PIC-hermes-cpuid.patch - epatch "${FILESDIR}"/libsdl-1.2.9-PIC-SDL_stretch.patch - epatch "${FILESDIR}"/libsdl-1.2.9-PIC-hermes-call-dont-jump.patch - epatch "${FILESDIR}"/libsdl-1.2.9-PIC-load-mmx-masks-from-stack.patch - [[ $(gcc-major-version) != "2" ]] && epatch "${FILESDIR}"/libsdl-1.2.9-PIC-yuv-mmx.patch - epatch "${FILESDIR}"/${P}-sdl-blit-mmx-check.patch #104533 - epatch "${FILESDIR}"/${P}-DirectFB-updates.patch - epatch "${FILESDIR}"/${P}-endian-cvs-updates.patch - - ./autogen.sh || die "autogen failed" - elibtoolize - epunt_cxx -} - -src_compile() { - local myconf= - if [[ $(tc-arch) != "x86" ]] ; then - myconf="${myconf} --disable-nasm" - else - myconf="${myconf} $(use_enable x86 nasm)" - fi - use noflagstrip || strip-flags - 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 \ - --disable-rpath \ - --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 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" - dodoc BUGS CREDITS README README-SDL.txt README.CVS TODO WhatsNew - dohtml -r ./ -} diff --git a/media-libs/libsdl/libsdl-1.2.9.ebuild b/media-libs/libsdl/libsdl-1.2.9.ebuild deleted file mode 100644 index a9b0917bf985..000000000000 --- a/media-libs/libsdl/libsdl-1.2.9.ebuild +++ /dev/null @@ -1,155 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.9.ebuild,v 1.10 2006/01/30 05:58:28 mr_bones_ Exp $ - -inherit flag-o-matic toolchain-funcs eutils - -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 ~mips ~ppc ~ppc-macos ~ppc64 ~sh ~sparc ~x86" -# WARNING: -# if you have the noaudio, novideo, nojoystick, or noflagstrip use flags -# in USE and something breaks, you pick up the pieces. Be prepared for -# bug reports to be marked INVALID. -IUSE="oss alsa esd arts nas X dga xv xinerama fbcon directfb ggi svga aalib opengl libcaca pic noaudio novideo nojoystick noflagstrip" - -RDEPEND="!noaudio? ( >=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 - || ( ( - x11-libs/libXt - x11-libs/libXext - x11-libs/libX11 ) - virtual/x11 ) ) - X? ( - || ( ( - x11-libs/libXt - x11-libs/libXext - x11-libs/libX11 ) - 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} - nas? ( - || ( ( - x11-proto/xextproto - x11-proto/xproto ) - virtual/x11 ) ) - X? ( - || ( ( - x11-proto/xextproto - x11-proto/xproto ) - virtual/x11 ) ) - 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 - if use noflagstrip ; then - ewarn "Since you've chosen to use possibly unsafe CFLAGS," - ewarn "don't bother filing libsdl-related bugs until trying to remerge" - ewarn "libsdl without the noflagstrip use flag in USE." - epause 10 - fi -} - -src_unpack() { - unpack ${A} - cd "${S}" - - epatch "${FILESDIR}"/1.2.8-nobuggy-X.patch #30089 - epatch "${FILESDIR}"/libsdl-1.2.8-libcaca.patch #40224 - epatch "${FILESDIR}"/libsdl-1.2.8-sdl-config.patch - epatch "${FILESDIR}"/libsdl-1.2.8-no-cxx.patch - epatch "${FILESDIR}"/libsdl-1.2.9-dlvsym-check.patch #105160 - epatch "${FILESDIR}"/1.2.8-gcc4.patch - epatch "${FILESDIR}"/${P}-DirectFB-updates.patch - epatch "${FILESDIR}"/${P}-endian-cvs-updates.patch - - ./autogen.sh || die "autogen failed" - epunt_cxx -} - -src_compile() { - local myconf= - # silly bundled asm triggers TEXTREL ... maybe someday - # i'll fix this properly, but for now hide with USE=pic - if [[ $(tc-arch) != "x86" ]] || use pic ; then - myconf="${myconf} --disable-nasm" - else - myconf="${myconf} $(use_enable x86 nasm)" - fi - use noflagstrip || strip-flags - 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 \ - --disable-rpath \ - --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 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" - dodoc BUGS CREDITS README README-SDL.txt README.CVS TODO WhatsNew - dohtml -r ./ -} |