diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-10-04 23:33:43 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-10-04 23:33:43 +0000 |
commit | c92cdb7bbe29102ca2c5b4f044e0db2afddd93db (patch) | |
tree | 3cf95a54fcd0bd2cd3c634c588ec06d1bd3a10f6 /media-libs | |
parent | only enable gnu stacks when generating ELF object code (diff) | |
download | historical-c92cdb7bbe29102ca2c5b4f044e0db2afddd93db.tar.gz historical-c92cdb7bbe29102ca2c5b4f044e0db2afddd93db.tar.bz2 historical-c92cdb7bbe29102ca2c5b4f044e0db2afddd93db.zip |
Add another patch to fix PIC breakage in the SDL_yuv_mmx code.
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/libsdl/ChangeLog | 6 | ||||
-rw-r--r-- | media-libs/libsdl/Manifest | 10 | ||||
-rw-r--r-- | media-libs/libsdl/files/libsdl-1.2.9-PIC-yuv-mmx.patch | 231 | ||||
-rw-r--r-- | media-libs/libsdl/libsdl-1.2.9-r1.ebuild | 11 |
4 files changed, 251 insertions, 7 deletions
diff --git a/media-libs/libsdl/ChangeLog b/media-libs/libsdl/ChangeLog index 00e4470f9cb9..466a7694f82d 100644 --- a/media-libs/libsdl/ChangeLog +++ b/media-libs/libsdl/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-libs/libsdl # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.89 2005/09/29 09:47:26 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/ChangeLog,v 1.90 2005/10/04 23:33:43 vapier Exp $ + + 04 Oct 2005; Mike Frysinger <vapier@gentoo.org> + +files/libsdl-1.2.9-PIC-yuv-mmx.patch, libsdl-1.2.9-r1.ebuild: + Add another patch to fix PIC breakage in the SDL_yuv_mmx code. *libsdl-1.2.9-r1 (29 Sep 2005) diff --git a/media-libs/libsdl/Manifest b/media-libs/libsdl/Manifest index 8512b33ec576..21639face904 100644 --- a/media-libs/libsdl/Manifest +++ b/media-libs/libsdl/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + MD5 baaaa69f33ef9027dac84ee4ff02773b metadata.xml 974 MD5 a7bcf0ea25253af8bba0031c22f14e5b libsdl-1.2.9.ebuild 4215 MD5 7f079469132865bdd25780277639f098 libsdl-1.2.7-r3.ebuild 3960 @@ -39,3 +42,10 @@ MD5 60ecfde6cc7b734ef03b93357c537674 files/1.2.8-keyrepeat.patch 598 MD5 5b76156f2699a03a798bd4ed9b0f4233 files/libsdl-1.2.8-sdl-config.patch 738 MD5 7fd44027d68e34cfdd399e23931caa94 files/libsdl-1.2.9-dlvsym-check.patch 907 MD5 206ddd08dd3e33819d03245d11af3014 files/1.2.7-gcc34.patch 8196 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.2 (GNU/Linux) + +iD8DBQFDQxGugIKl8Uu19MoRAonUAJ9qaRBOPmP5mik9DU5GNfuNM0Mg6ACeIMQP +dUbNhOjZOlmpqsvlV6/aC9A= +=QaKb +-----END PGP SIGNATURE----- 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 new file mode 100644 index 000000000000..06f36f1fb243 --- /dev/null +++ b/media-libs/libsdl/files/libsdl-1.2.9-PIC-yuv-mmx.patch @@ -0,0 +1,231 @@ +--- 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/libsdl-1.2.9-r1.ebuild b/media-libs/libsdl/libsdl-1.2.9-r1.ebuild index 772796e59dab..b8793430d4a9 100644 --- a/media-libs/libsdl/libsdl-1.2.9-r1.ebuild +++ b/media-libs/libsdl/libsdl-1.2.9-r1.ebuild @@ -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.9-r1.ebuild,v 1.1 2005/09/29 09:47:26 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/libsdl/libsdl-1.2.9-r1.ebuild,v 1.2 2005/10/04 23:33:43 vapier Exp $ inherit flag-o-matic toolchain-funcs eutils @@ -10,12 +10,12 @@ 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 ~sparc ~x86" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc-macos ~ppc64 ~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" +IUSE="oss alsa esd arts nas X dga xv xinerama fbcon directfb ggi svga aalib opengl libcaca noaudio novideo nojoystick noflagstrip" RDEPEND=">=media-libs/audiofile-0.1.9 alsa? ( media-libs/alsa-lib ) @@ -67,6 +67,7 @@ src_unpack() { 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 + epatch "${FILESDIR}"/libsdl-1.2.9-PIC-yuv-mmx.patch epatch "${FILESDIR}"/${P}-sdl-blit-mmx-check.patch #104533 ./autogen.sh || die "autogen failed" @@ -75,9 +76,7 @@ src_unpack() { 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 + if [[ $(tc-arch) != "x86" ]] ; then myconf="${myconf} --disable-nasm" else myconf="${myconf} $(use_enable x86 nasm)" |