summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-libs/jpeg-mmx/ChangeLog6
-rw-r--r--media-libs/jpeg-mmx/files/1.1.2-gcc34.patch255
-rw-r--r--media-libs/jpeg-mmx/files/jpeg-mmx-gcc33fix.gzbin1756 -> 0 bytes
-rw-r--r--media-libs/jpeg-mmx/jpeg-mmx-1.1.2-r1.ebuild19
4 files changed, 270 insertions, 10 deletions
diff --git a/media-libs/jpeg-mmx/ChangeLog b/media-libs/jpeg-mmx/ChangeLog
index 9cecaec7a3f0..0406cf15c86b 100644
--- a/media-libs/jpeg-mmx/ChangeLog
+++ b/media-libs/jpeg-mmx/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-libs/jpeg-mmx
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/jpeg-mmx/ChangeLog,v 1.8 2004/04/27 21:52:56 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/jpeg-mmx/ChangeLog,v 1.9 2004/05/17 03:26:59 vapier Exp $
+
+ 16 May 2004; Mike Frysinger <vapier@gentoo.org> +files/1.1.2-gcc34.patch,
+ -files/jpeg-mmx-gcc33fix.gz, jpeg-mmx-1.1.2-r1.ebuild:
+ Add a patch to fix gcc-3.4 issues #49375 by Jonathan Adamczewski
27 Apr 2004; Aron Griffis <agriffis@gentoo.org> jpeg-mmx-1.1.2-r1.ebuild:
Add inherit eutils
diff --git a/media-libs/jpeg-mmx/files/1.1.2-gcc34.patch b/media-libs/jpeg-mmx/files/1.1.2-gcc34.patch
new file mode 100644
index 000000000000..48b30306e075
--- /dev/null
+++ b/media-libs/jpeg-mmx/files/1.1.2-gcc34.patch
@@ -0,0 +1,255 @@
+diff -ur jpeg-mmx/jdapimin.c jpeg-mmx-gcc34/jdapimin.c
+--- jpeg-mmx/jdapimin.c 2000-09-19 12:04:22.000000000 -0400
++++ jpeg-mmx-gcc34/jdapimin.c 2004-05-16 23:18:44.629857496 -0400
+@@ -412,7 +412,9 @@
+ }
+
+
++#ifdef HAVE_MMX_INTEL_MNEMONICS
+ static int mmx_supported = 0;
++#endif
+ int mmxsupport()
+ {
+
+@@ -460,7 +462,9 @@
+ #endif
+
+ #if defined(HAVE_MMX_ATT_MNEMONICS)
++ register unsigned int mmx_supported __asm__ ("eax") = 0; //we set this to be a register, eax, so we can get to it once we exit the ASM
+ __asm__ (
++ "movl %%ebx,%%edi \n\t" //Make sure we don't clobber ebx through this whole deal
+ "pushfl \n\t" //Save Eflag to stack
+ "popl %%eax \n\t" //Get Eflag from stack into eax
+ "movl %%eax,%%ecx \n\t" //Make another copy of Eflag in ecx
+@@ -479,29 +483,28 @@
+
+ "cpuid \n\t" //CPUID instruction (two bytes opcode)
+
+- "cmpl $1,%%eax \n\t" //make sure eax return non-zero value
++ "cmpl $0,%%eax \n\t" //make sure eax return non-zero value
+ "jl NOT_SUPPORTED \n\t" //If eax is zero, mmx not supported
+
+- "xorl %%eax,%%eax \n\t" //set eax to zero
+- "incl %%eax \n\t" //Now increment eax to 1. This instruction is
+- //faster than the instruction "mov eax, 1"
++ "movl $1,%%eax \n\t" //set eax to 1
++
+ "cpuid \n\t"
+
+ "andl $0x00800000,%%edx \n\t" //mask out all bits but mmx bit(24)
+ "cmpl $0,%%edx \n\t" // 0 = mmx not supported
+ "jz NOT_SUPPORTED \n\t" // non-zero = Yes, mmx IS supported
+
+- "movl $1, mmx_supported \n\t"
++ "movl $1, %[ret_flag] \n\t"
+
+ "NOT_SUPPORTED: \n\t"
+- "movl $mmx_supported, %%eax" //move return value to eax
++ "movl %%edi,%%ebx \n\t" //Make sure we don't clobber ebx through this whole deal
+
+
+- : "=m" (mmx_supported) // FIXASM: output regs/vars go here, e.g.: "=m" (memory_var)
++ : [ret_flag] "=r" (mmx_supported) // "r" => (register_var) NB: this is actually the eax register... so we don't clobber it below
+
+ : // FIXASM: input regs, e.g.: "c" (count), "S" (src), "D" (dest)
+
+- : "eax", "ebx", "ecx", "edx", "cc", "memory");
++ : "ecx", "edx", "cc", "memory");
+ #endif
+
+ return mmx_supported;
+diff -ur jpeg-mmx/jdcolor.c jpeg-mmx-gcc34/jdcolor.c
+--- jpeg-mmx/jdcolor.c 2000-09-19 12:04:41.000000000 -0400
++++ jpeg-mmx-gcc34/jdcolor.c 2004-05-16 23:20:21.381149064 -0400
+@@ -123,9 +123,9 @@
+ #if defined(__GNUC__)
+ #define int64 unsigned long long
+ #endif
+-static const int64 te0 = 0x0200020002000200; // -128 << 2
+-static const int64 te1 = 0xe9fa7168e9fa7168; // for cb
+-static const int64 te2 = 0x59bad24d59bad24d; // for cr
++const int64 te0 = 0x0200020002000200; // -128 << 2
++const int64 te1 = 0xe9fa7168e9fa7168; // for cb
++const int64 te2 = 0x59bad24d59bad24d; // for cr
+ //static const int64 te2 = 0x59ba524b59ba524b; // for cr
+ /* How to calculate the constants (see constants from above for YCbCr->RGB):
+ trunc(-0.34414*16384) << 16 + trunc(1.772 * 16348) || mind that negative numbers are in 2-complement form (2^32+x+1) */
+@@ -160,10 +160,10 @@
+ #if defined(HAVE_MMX_ATT_MNEMONICS)
+ __asm__(
+ "mov %1, %%eax\n"
+- "mov %2, %%ebx\n"
++ "mov %2, %%edx\n"
+ "mov %3, %%ecx\n"
+ "movd (%%eax),%%mm0\n" // mm0: 0 0 0 0 y3 y2 y1 y0 - 8 bit
+- "movd (%%ebx),%%mm1\n" // mm1: 0 0 0 0 cb3 cb2 cb1 cb0
++ "movd (%%edx),%%mm1\n" // mm1: 0 0 0 0 cb3 cb2 cb1 cb0
+ "movd (%%ecx),%%mm2\n" // mm2: 0 0 0 0 cr3 cr2 cr1 cr0
+ "pxor %%mm7,%%mm7\n" // mm7 = 0
+ "punpcklbw %%mm7,%%mm0\n" // mm0: y3 y2 y1 y0 - expand to 16 bit
+@@ -247,7 +247,7 @@
+
+ :"=m"(outptr[0])
+ :"m"(inptr0),"m"(inptr1),"m"(inptr2) //y cb cr
+- :"eax", "ebx", "ecx", "st");
++ :"eax", "edx", "ecx", "st");
+ #endif
+
+ outptr+=12;
+diff -ur jpeg-mmx/jdmerge.c jpeg-mmx-gcc34/jdmerge.c
+--- jpeg-mmx/jdmerge.c 2000-09-19 12:04:25.000000000 -0400
++++ jpeg-mmx-gcc34/jdmerge.c 2004-05-16 23:18:44.635856584 -0400
+@@ -816,6 +816,7 @@
+ fprintf(stderr, "Using accelerated MMX code for merge !\n");
+
+ __asm__ (
++ "pushl %%ebx \n\t"
+ "movl %0, %%esi \n\t"
+
+ "movl %1, %%eax \n\t"
+@@ -1173,12 +1174,13 @@
+ "jnz do_next16 \n\t"
+
+ "emms \n\t"
++ "popl %%ebx \n\t"
+
+ : //"=m"(&cols_asm)
+
+ : "m"(inptr00), "m"(inptr01), "m"(inptr2), "m"(inptr1), "m"(outptr1),
+ "m"(outptr0),"m"(cols_asm) /* was (&cols_asm) */
+- : "eax", "ebx", "ecx", "edx", "edi", "esi", "st", "cc", "memory"
++ : "eax", "ecx", "edx", "edi", "esi", "st", "cc", "memory"
+ );
+ #if 0
+ "movl $inptr00, %%esi \n\t"
+diff -ur jpeg-mmx/jdsample.c jpeg-mmx-gcc34/jdsample.c
+--- jpeg-mmx/jdsample.c 2000-09-19 12:04:26.000000000 -0400
++++ jpeg-mmx-gcc34/jdsample.c 2004-05-16 23:18:44.638856128 -0400
+@@ -713,7 +713,7 @@
+ // %0 %1 %2 %3 %4
+ : "m"(hsize), "m"(inptr), "m"(outptr)
+
+- : "eax", "ebx", "ecx", "edx", "esi", "edi", "memory", "cc", "st"
++ : "eax", "ecx", "edx", "esi", "edi", "memory", "cc", "st"
+ );
+ #endif
+ }
+@@ -1732,7 +1732,7 @@
+ : "m"(dsamp), "m"(inptr0), "m"(inptr1), "m"(outptr), "m"(save_val), "m"(inptr2),
+ "m"(outptr2) /* %6 */
+
+- : "eax", "ebx", "ecx", "edx", "esi", "edi", "memory", "cc", "st"
++ : "eax", "ecx", "edx", "esi", "edi", "memory", "cc", "st"
+ );
+ #endif
+ inrow++;
+diff -ur jpeg-mmx/jidctfst.c jpeg-mmx-gcc34/jidctfst.c
+--- jpeg-mmx/jidctfst.c 2000-09-19 12:04:40.000000000 -0400
++++ jpeg-mmx-gcc34/jidctfst.c 2004-05-16 23:18:44.642855520 -0400
+@@ -1445,6 +1445,7 @@
+
+ __asm__ (
+
++ "pushl %%ebx \n\t"
+ "movl %0, %%edi \n\t"
+ "movl %1, %%ebx \n\t"
+ "movl %2, %%esi \n\t"
+@@ -2467,12 +2468,13 @@
+ "movq %%mm3,(%%ebx) \n\t"
+
+ "emms \n\t"
++ "popl %%ebx \n\t"
+
+ : // no output regs
+ // %0 %1 %2 %3 %4
+ : "m"(quantptr), "m"(inptr), "m"(wsptr), "m"(outptr), "m"(output_col)
+
+- : "eax", "ebx", "ecx", "edx", "esi", "edi", "memory", "cc", "st"
++ : "eax", "ecx", "edx", "esi", "edi", "memory", "cc", "st"
+ );
+
+ #endif
+diff -ur jpeg-mmx/jidctint.c jpeg-mmx-gcc34/jidctint.c
+--- jpeg-mmx/jidctint.c 2000-09-19 12:04:20.000000000 -0400
++++ jpeg-mmx-gcc34/jidctint.c 2004-05-16 23:20:03.636846608 -0400
+@@ -173,32 +173,32 @@
+ * Perform dequantization and inverse DCT on one block of coefficients.
+ */
+ #define __int64 unsigned long long
+- static __int64 fix_029_n089n196 = 0x098ea46e098ea46e;
+- static __int64 fix_n196_n089 = 0xc13be333c13be333;
+- static __int64 fix_205_n256n039 = 0x41b3a18141b3a181;
+- static __int64 fix_n039_n256 = 0xf384adfdf384adfd;
+- static __int64 fix_307n256_n196 = 0x1051c13b1051c13b;
+- static __int64 fix_n256_n196 = 0xadfdc13badfdc13b;
+- static __int64 fix_150_n089n039 = 0x300bd6b7300bd6b7;
+- static __int64 fix_n039_n089 = 0xf384e333f384e333;
+- static __int64 fix_117_117 = 0x25a125a125a125a1;
+- static __int64 fix_054_054p076 = 0x115129cf115129cf;
+- static __int64 fix_054n184_054 = 0xd6301151d6301151;
+-
+- static __int64 fix_054n184 = 0xd630d630d630d630;
+- static __int64 fix_054 = 0x1151115111511151;
+- static __int64 fix_054p076 = 0x29cf29cf29cf29cf;
+- static __int64 fix_n196p307n256 = 0xd18cd18cd18cd18c;
+- static __int64 fix_n089n039p150 = 0x06c206c206c206c2;
+- static __int64 fix_n256 = 0xadfdadfdadfdadfd;
+- static __int64 fix_n039 = 0xf384f384f384f384;
+- static __int64 fix_n256n039p205 = 0xe334e334e334e334;
+- static __int64 fix_n196 = 0xc13bc13bc13bc13b;
+- static __int64 fix_n089 = 0xe333e333e333e333;
+- static __int64 fixn089n196p029 = 0xadfcadfcadfcadfc;
++ __int64 fix_029_n089n196 = 0x098ea46e098ea46e;
++ __int64 fix_n196_n089 = 0xc13be333c13be333;
++ __int64 fix_205_n256n039 = 0x41b3a18141b3a181;
++ __int64 fix_n039_n256 = 0xf384adfdf384adfd;
++ __int64 fix_307n256_n196 = 0x1051c13b1051c13b;
++ __int64 fix_n256_n196 = 0xadfdc13badfdc13b;
++ __int64 fix_150_n089n039 = 0x300bd6b7300bd6b7;
++ __int64 fix_n039_n089 = 0xf384e333f384e333;
++ __int64 fix_117_117 = 0x25a125a125a125a1;
++ __int64 fix_054_054p076 = 0x115129cf115129cf;
++ __int64 fix_054n184_054 = 0xd6301151d6301151;
++
++ __int64 fix_054n184 = 0xd630d630d630d630;
++ __int64 fix_054 = 0x1151115111511151;
++ __int64 fix_054p076 = 0x29cf29cf29cf29cf;
++ __int64 fix_n196p307n256 = 0xd18cd18cd18cd18c;
++ __int64 fix_n089n039p150 = 0x06c206c206c206c2;
++ __int64 fix_n256 = 0xadfdadfdadfdadfd;
++ __int64 fix_n039 = 0xf384f384f384f384;
++ __int64 fix_n256n039p205 = 0xe334e334e334e334;
++ __int64 fix_n196 = 0xc13bc13bc13bc13b;
++ __int64 fix_n089 = 0xe333e333e333e333;
++ __int64 fixn089n196p029 = 0xadfcadfcadfcadfc;
+
+- static __int64 const_0x2xx8 = 0x0000010000000100;
+- static __int64 const_0x0808 = 0x0808080808080808;
++ __int64 const_0x2xx8 = 0x0000010000000100;
++ __int64 const_0x0808 = 0x0808080808080808;
+
+ __inline void domidct8x8llmW(short *inptr, short *quantptr, int *wsptr,
+ JSAMPARRAY outptr, int output_col);
+@@ -1535,6 +1535,7 @@
+ #if defined(HAVE_MMX_ATT_MNEMONICS)
+ __asm__ (
+
++ "pushl %%ebx \n\t"
+ "movl %0, %%edi \n\t"
+ "movl %1, %%ebx \n\t"
+ "movl %2, %%esi \n\t"
+@@ -2837,11 +2838,13 @@
+
+ "emms \n\t"
+
++ "popl %%ebx \n\t"
++
+ :
+ // %0 %1 %2 %3 %4
+ : "m"(quantptr), "m"(inptr), "m"(wsptr), "m"(outptr), "g"(output_col)
+
+- : "eax", "ebx", "ecx", "edx", "edi", "esi", "cc", "memory", "st"
++ : "eax", "ecx", "edx", "edi", "esi", "cc", "memory", "st"
+ );
+ #endif /* ATT style assembler */
+ }
diff --git a/media-libs/jpeg-mmx/files/jpeg-mmx-gcc33fix.gz b/media-libs/jpeg-mmx/files/jpeg-mmx-gcc33fix.gz
deleted file mode 100644
index 5d46bf506685..000000000000
--- a/media-libs/jpeg-mmx/files/jpeg-mmx-gcc33fix.gz
+++ /dev/null
Binary files differ
diff --git a/media-libs/jpeg-mmx/jpeg-mmx-1.1.2-r1.ebuild b/media-libs/jpeg-mmx/jpeg-mmx-1.1.2-r1.ebuild
index 56888a02e6be..2f8f0a74e77a 100644
--- a/media-libs/jpeg-mmx/jpeg-mmx-1.1.2-r1.ebuild
+++ b/media-libs/jpeg-mmx/jpeg-mmx-1.1.2-r1.ebuild
@@ -1,23 +1,26 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/jpeg-mmx/jpeg-mmx-1.1.2-r1.ebuild,v 1.14 2004/04/27 21:52:56 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/jpeg-mmx/jpeg-mmx-1.1.2-r1.ebuild,v 1.15 2004/05/17 03:26:59 vapier Exp $
-inherit libtool flag-o-matic gnuconfig eutils
+inherit libtool flag-o-matic eutils
-S=${WORKDIR}/jpeg-mmx
DESCRIPTION="JPEG library with mmx enhancements"
-SRC_URI="mirror://sourceforge/mjpeg/${P}.tar.gz"
HOMEPAGE="http://mjpeg.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mjpeg/${P}.tar.gz"
-SLOT="0"
LICENSE="as-is"
-KEYWORDS="x86 -ppc -sparc -amd64"
+SLOT="0"
+KEYWORDS="-* x86"
IUSE=""
+
DEPEND="virtual/glibc"
+S=${WORKDIR}/jpeg-mmx
+
src_unpack() {
unpack ${P}.tar.gz
- epatch ${FILESDIR}/jpeg-mmx-gcc33fix.gz
+ cd ${S}
+ epatch ${FILESDIR}/${PV}-gcc34.patch
}
src_compile() {
@@ -35,7 +38,6 @@ src_compile() {
}
src_install() {
-
dodir /usr/{include/jpeg-mmx,lib}
make \
includedir=${D}/usr/include/jpeg-mmx \
@@ -49,5 +51,4 @@ src_install() {
rm ${D}/usr/lib/libjpeg.so.62
ln -s /usr/lib/libjpeg-mmx.so.62.0.0 ${D}/usr/lib/libjpeg-mmx.so.62
dodoc README change.log structure.doc libjpeg.doc
-
}