Add patches from upstream to fix asm errors on amd64 #77300 and direct 8bit color...
authorMike Frysinger <vapier@gentoo.org>
Fri, 14 Jan 2005 00:59:42 +0000 (00:59 +0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 14 Jan 2005 00:59:42 +0000 (00:59 +0000)
media-libs/libsdl/ChangeLog
media-libs/libsdl/Manifest
media-libs/libsdl/files/1.2.8-amd64-endian.patch [new file with mode: 0644]
media-libs/libsdl/files/1.2.8-direct-8bit-color.patch [new file with mode: 0644]
media-libs/libsdl/files/digest-libsdl-1.2.8-r1 [moved from media-libs/libsdl/files/digest-libsdl-1.2.8 with 100% similarity]
media-libs/libsdl/libsdl-1.2.6-r3.ebuild
media-libs/libsdl/libsdl-1.2.7-r3.ebuild
media-libs/libsdl/libsdl-1.2.8-r1.ebuild [moved from media-libs/libsdl/libsdl-1.2.8.ebuild with 95% similarity]

index db1d623f825af51f082c34773fe8f0a9044fdae7..877bc1500210396ad50479729446c97c0354ef0f 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for media-libs/libsdl
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.73 2005/01/09 21:03:31 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.74 2005/01/14 00:59:42 vapier Exp $
+
+*libsdl-1.2.8-r1 (13 Jan 2005)
+
+  13 Jan 2005; Mike Frysinger <vapier@gentoo.org>
+  +files/1.2.8-amd64-endian.patch, +files/1.2.8-direct-8bit-color.patch,
+  libsdl-1.2.6-r3.ebuild, libsdl-1.2.7-r3.ebuild, +libsdl-1.2.8-r1.ebuild:
+  Add patches from upstream to fix asm errors on amd64 #77300 and direct 8bit
+  color #76946. Also punt useless C++ checks #74492.
 
   09 Jan 2005; Mike Frysinger <vapier@gentoo.org>
   +files/1.2.8-linux26.patch, libsdl-1.2.8.ebuild:
index 508632ddea6fc6ba07d0b7a1bb8a4163927bc327..d44f901f64f0e7be826ae80e12bdd89403de3536 100644 (file)
@@ -1,11 +1,11 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-MD5 ba9543364078a4cc2e887cec1eeaf81d ChangeLog 10936
-MD5 114ce0cde41698cd48fe7f21f8c95c7c libsdl-1.2.6-r3.ebuild 2897
-MD5 d1354ee11e24509f444f75566c12a58b libsdl-1.2.7-r3.ebuild 3846
+MD5 45ae682dfaaf5fe69a86542cf117fea9 ChangeLog 11298
+MD5 3d739d8898abbd33680c2b5ef990eac3 libsdl-1.2.6-r3.ebuild 2908
+MD5 600292a19b154118feaa18b5281b5d51 libsdl-1.2.7-r3.ebuild 3857
 MD5 baaaa69f33ef9027dac84ee4ff02773b metadata.xml 974
-MD5 d91b8e5b54c9e4739f1f5cc7d7d66bf9 libsdl-1.2.8.ebuild 4030
+MD5 9dbd35eeb938ee50f16789d7a9556634 libsdl-1.2.8-r1.ebuild 4157
 MD5 0c2020ec3ce37ea0612064c52d1014b1 files/1.2.6-alsa-1.0.0.patch 557
 MD5 60ecfde6cc7b734ef03b93357c537674 files/1.2.8-keyrepeat.patch 598
 MD5 803844293dc7df2bb7d2323c03977b71 files/1.2.7-libcaca.patch 23266
@@ -17,17 +17,19 @@ MD5 4f1ce33c931d461bed06277f60341085 files/1.2.6-nobuggy-X.patch 568
 MD5 4f1ce33c931d461bed06277f60341085 files/1.2.7-nobuggy-X.patch 568
 MD5 e0c6c6ffc15475282fc864b8f52f0abf files/1.2.8-linux26.patch 1268
 MD5 abf0c6fe9d93e5b0cc9a4dbb6d93ad87 files/1.2.7-joystick2.patch 16196
+MD5 4a2d1ec0616ac20777043a1341e7f04b files/1.2.8-amd64-endian.patch 943
 MD5 71a857d2bbcc34c4807638eb5d710f2e files/1.2.7-26headers.patch 1017
 MD5 323ad5b1e83521630dd4d54819c5efbd files/1.2.8-gcc2.patch 743
 MD5 2e9d99f7ab858b5a64d124abea4565b9 files/digest-libsdl-1.2.7-r3 62
 MD5 88437c556d9b4571f08de4a4e2d9323a files/1.2.8-libcaca.patch 23278
 MD5 4f1ce33c931d461bed06277f60341085 files/1.2.8-nobuggy-X.patch 568
-MD5 4ce5ec18eafcf0b1c6caf31c9f67cb1d files/digest-libsdl-1.2.8 62
+MD5 4ce5ec18eafcf0b1c6caf31c9f67cb1d files/digest-libsdl-1.2.8-r1 62
 MD5 22c541533c3c588f430b62440053071f files/1.2.8-gcc2-asm.patch 10160
+MD5 8de3272b60b93842b7b87949620de869 files/1.2.8-direct-8bit-color.patch 7727
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.9.14 (GNU/Linux)
 
-iD8DBQFB4Zw3roRuSHgZdywRAmVbAJsFOA4esNkWYPhderAu/svqCEzSPQCfez+q
-e5dDkRY3RQ0VAu1k8JYMbBE=
-=sJMg
+iD8DBQFB5xmgroRuSHgZdywRAiCYAKCHsZJKdcMIJT6zxijUcNPH0a73oACfZ6/R
+ihFbYqa13uG9bSTbTqzK6F8=
+=Fjsc
 -----END PGP SIGNATURE-----
diff --git a/media-libs/libsdl/files/1.2.8-amd64-endian.patch b/media-libs/libsdl/files/1.2.8-amd64-endian.patch
new file mode 100644 (file)
index 0000000..dd5cc00
--- /dev/null
@@ -0,0 +1,26 @@
+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
+@@ -22,7 +22,7 @@
+ 
+ #ifdef SAVE_RCSID
+ static char rcsid =
+- "@(#) $Id: 1.2.8-amd64-endian.patch,v 1.1 2005/01/14 00:59:42 vapier Exp $";
++ "@(#) $Id: 1.2.8-amd64-endian.patch,v 1.1 2005/01/14 00:59:42 vapier Exp $";
+ #endif
+ 
+ /* Functions for reading and writing endian-specific values */
+@@ -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
new file mode 100644 (file)
index 0000000..230c909
--- /dev/null
@@ -0,0 +1,270 @@
+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
+@@ -22,7 +22,7 @@
+ 
+ #ifdef SAVE_RCSID
+ static char rcsid =
+- "@(#) $Id: 1.2.8-direct-8bit-color.patch,v 1.1 2005/01/14 00:59:42 vapier Exp $";
++ "@(#) $Id: 1.2.8-direct-8bit-color.patch,v 1.1 2005/01/14 00:59:42 vapier Exp $";
+ #endif
+ 
+ /* General (mostly internal) pixel/color manipulation routines for SDL */
+@@ -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);
+ }
index afe924ca6c6676523663f604cb0587754345bf4b..2b9764fd131ceee70c22216751e0685aea963210 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.6-r3.ebuild,v 1.13 2005/01/04 09:53:42 hardave Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.6-r3.ebuild,v 1.14 2005/01/14 00:59:42 vapier Exp $
 
 inherit eutils
 
@@ -48,6 +48,8 @@ src_unpack() {
                        -e 's:-laudio:-laudio -L/usr/X11R6/lib:' \
                        configure || die "nas sed hack failed"
        fi
+
+       epunt_cxx
 }
 
 src_compile() {
index a81a149819dbdc66e7773bb23c08789a3a9b8a30..c565a1055a9963547d92001eeb24b5427e7d8805 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 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.8 2005/01/03 02:19:12 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.7-r3.ebuild,v 1.9 2005/01/14 00:59:42 vapier Exp $
 
 inherit toolchain-funcs fixheadtails eutils gnuconfig
 
@@ -62,6 +62,7 @@ src_unpack() {
        fi
 
        ./autogen.sh || die "autogen failed"
+       epunt_cxx
        gnuconfig_update
 }
 
similarity index 95%
rename from media-libs/libsdl/libsdl-1.2.8.ebuild
rename to media-libs/libsdl/libsdl-1.2.8-r1.ebuild
index 9208128734f00e90e9e7e64a4091278096f069fb..8a693c1ae5384d004a2052caf072be418160e2e2 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.8.ebuild,v 1.9 2005/01/09 21:03:31 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.8-r1.ebuild,v 1.1 2005/01/14 00:59:42 vapier Exp $
 
 inherit flag-o-matic toolchain-funcs eutils gnuconfig
 
@@ -51,6 +51,8 @@ src_unpack() {
        epatch "${FILESDIR}"/${PV}-gcc2.patch #75392
        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
        [[ $(gcc-major-version) -eq 2 ]] && \
                epatch "${FILESDIR}"/${PV}-gcc2-asm.patch #75392
 
@@ -61,6 +63,7 @@ src_unpack() {
        fi
 
        ./autogen.sh || die "autogen failed"
+       epunt_cxx
        gnuconfig_update
 }