Fixed bug #67863. -fstack-protector and -fPIC filtration no longer needed.
authorChris White <chriswhite@gentoo.org>
Thu, 21 Oct 2004 06:22:42 +0000 (06:22 +0000)
committerChris White <chriswhite@gentoo.org>
Thu, 21 Oct 2004 06:22:42 +0000 (06:22 +0000)
media-libs/xine-lib/ChangeLog
media-libs/xine-lib/files/xine-lib-1_rc6-mmx.patch [new file with mode: 0644]
media-libs/xine-lib/files/xine-lib-1_rc6-pic.patch [new file with mode: 0644]
media-libs/xine-lib/xine-lib-1_rc6.ebuild

index 67f3947375d972419187cf23519f1200bf55ec9b..7312ad85eec88261320a97be012f32540e8c21b8 100644 (file)
@@ -1,6 +1,6 @@
 # ChangeLog for media-libs/xine-lib
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/xine-lib/ChangeLog,v 1.152 2004/10/20 15:40:56 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/xine-lib/ChangeLog,v 1.153 2004/10/21 06:22:42 chriswhite Exp $
 
   20 Oct 2004; Luca Barbato <lu_zero@gentoo.org> xine-lib-1_rc6.ebuild:
   Made sure the ppc workaround is applied on ppc64 too
   Big cleanup.
   Removing xvid and divx4linux dependencies, see bug #56179
 
+  21 Oct 2004; Chris White <chriswhite@gentoo.org>
+  +files/xine-lib-1_rc6-mmx.patch, +files/xine-lib-1_rc6-pic.patch,
+  xine-lib-1_rc6.ebuild:
+  Fixed -fPIC and -fstack-protector via patches provided by Kevin F. Quinn
+  <co@kevquinn.com> in bug #67863. Added an mmx patch in to further fix the
+  issues.
+
   26 Sep 2004; Tom Gall <tgall@gentoo.org> xine-lib-1_rc5-r3.ebuild
   stable on ppc64, bug #59948
 
diff --git a/media-libs/xine-lib/files/xine-lib-1_rc6-mmx.patch b/media-libs/xine-lib/files/xine-lib-1_rc6-mmx.patch
new file mode 100644 (file)
index 0000000..7e8f284
--- /dev/null
@@ -0,0 +1,20 @@
+--- configure.old      2004-10-21 04:50:30.189310168 +0900
++++ configure  2004-10-21 04:51:02.455404976 +0900
+@@ -41676,7 +41676,7 @@
+ 
+ 
+     enable_w32dll="yes"
+-    enable_ffmmx="yes"
++    enable_ffmmx="no"
+     no_fpic="yes"
+     ;;
+ 
+@@ -41995,7 +41995,7 @@
+ #define FPM_INTEL 1
+ _ACEOF
+ 
+-      enable_ffmmx="yes"
++      enable_ffmmx="no"
+       enable_w32dll="yes"
+ 
+         case "$host_or_hostalias" in
diff --git a/media-libs/xine-lib/files/xine-lib-1_rc6-pic.patch b/media-libs/xine-lib/files/xine-lib-1_rc6-pic.patch
new file mode 100644 (file)
index 0000000..2d59d3f
--- /dev/null
@@ -0,0 +1,57 @@
+diff -ur src.orig/libffmpeg/libavcodec/i386/dsputil_mmx.c src/libffmpeg/libavcodec/i386/dsputil_mmx.c
+--- src.orig/libffmpeg/libavcodec/i386/dsputil_mmx.c   2004-10-17 12:17:07.406331880 +0200
++++ src/libffmpeg/libavcodec/i386/dsputil_mmx.c        2004-10-17 12:17:57.600701176 +0200
+@@ -56,7 +56,7 @@
+     "pcmpeqd %%" #regd ", %%" #regd " \n\t"\
+     "paddb %%" #regd ", %%" #regd " \n\t" ::)
+ 
+-#ifndef PIC
++#ifndef __PIC__
+ #define MOVQ_BONE(regd)  __asm __volatile ("movq %0, %%" #regd " \n\t" ::"m"(mm_bone))
+ #define MOVQ_WTWO(regd)  __asm __volatile ("movq %0, %%" #regd " \n\t" ::"m"(mm_wtwo))
+ #else
+diff -ur src.orig/libffmpeg/libavcodec/i386/dsputil_mmx_rnd.h src/libffmpeg/libavcodec/i386/dsputil_mmx_rnd.h
+--- src.orig/libffmpeg/libavcodec/i386/dsputil_mmx_rnd.h       2004-10-17 12:17:07.405332032 +0200
++++ src/libffmpeg/libavcodec/i386/dsputil_mmx_rnd.h    2004-10-17 12:17:52.989402200 +0200
+@@ -96,7 +96,7 @@
+       "addl   %5, %3                  \n\t"
+       "subl   $4, %0                  \n\t"
+       "jnz    1b                      \n\t"
+-#ifdef PIC //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cant be used
++#ifdef __PIC__ //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cant be used
+         :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
+ #else
+         :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
+@@ -191,7 +191,7 @@
+       "addl   $32, %2                 \n\t"
+       "subl   $2, %0                  \n\t"
+       "jnz    1b                      \n\t"
+-#ifdef PIC //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cant be used
++#ifdef __PIC__ //Note "+bm" and "+mb" are buggy too (with gcc 3.2.2 at least) and cant be used
+       :"+m"(h), "+a"(src1), "+c"(src2), "+d"(dst)
+ #else
+       :"+b"(h), "+a"(src1), "+c"(src2), "+d"(dst)
+diff -ur src.orig/libffmpeg/libavcodec/msmpeg4.c src/libffmpeg/libavcodec/msmpeg4.c
+--- src.orig/libffmpeg/libavcodec/msmpeg4.c    2004-10-17 12:17:07.419329904 +0200
++++ src/libffmpeg/libavcodec/msmpeg4.c 2004-10-17 12:18:06.573337128 +0200
+@@ -837,7 +837,7 @@
+        necessitate to modify mpegvideo.c. The problem comes from the
+        fact they decided to store the quantized DC (which would lead
+        to problems if Q could vary !) */
+-#if defined ARCH_X86 && !defined PIC
++#if defined ARCH_X86 && !defined __PIC__
+     asm volatile(
+         "movl %3, %%eax               \n\t"
+       "shrl $1, %%eax         \n\t"
+diff -ur src.orig/xine-utils/cpu_accel.c src/xine-utils/cpu_accel.c
+--- src.orig/xine-utils/cpu_accel.c    2004-10-17 12:17:07.577305888 +0200
++++ src/xine-utils/cpu_accel.c 2004-10-17 12:18:14.393148336 +0200
+@@ -63,7 +63,7 @@
+   int AMD;
+ 
+   caps = 0;
+-#ifndef PIC
++#ifndef __PIC__
+ #define cpuid(op,eax,ebx,ecx,edx)       \
+     __asm__ ("cpuid"                    \
+          : "=a" (eax),                  \
index 9bdcd161a3bf1ee690a887b06726a1da61aeacd9..4de7241993545fe5ac65592440597101246e8bbc 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/xine-lib/xine-lib-1_rc6.ebuild,v 1.11 2004/10/20 15:40:56 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/xine-lib/xine-lib-1_rc6.ebuild,v 1.12 2004/10/21 06:22:42 chriswhite Exp $
 
 inherit eutils flag-o-matic gcc libtool
 
@@ -62,13 +62,18 @@ src_unpack() {
 
        elibtoolize #40317
 
+       # Fix building on amd64, #49569
+       #use amd64 && epatch ${FILESDIR}/configure-64bit-define.patch
+
+       epatch ${FILESDIR}/${P}-pic.patch
+       use pic && epatch ${FILESDIR}/${P}-mmx.patch
+
        # Fix detection of hppa2.0 and hppa1.1 CHOST
        use hppa && sed -e 's/hppa-/hppa*-linux-/' -i ${S}/configure
 }
 
 src_compile() {
        filter-flags -maltivec -mabi=altivec
-       filter-flags -fstack-protector -fPIC
        filter-flags -fforce-addr
        filter-flags -momit-leaf-frame-pointer #46339
        filter-flags -funroll-all-loops #55420