gcc-3.4 fix
authorLuca Barbato <lu_zero@gentoo.org>
Sat, 15 Jan 2005 11:08:24 +0000 (11:08 +0000)
committerLuca Barbato <lu_zero@gentoo.org>
Sat, 15 Jan 2005 11:08:24 +0000 (11:08 +0000)
media-video/cinelerra-cvs/ChangeLog
media-video/cinelerra-cvs/Manifest
media-video/cinelerra-cvs/cinelerra-cvs-20050102.ebuild
media-video/cinelerra-cvs/files/libmpeg3-20050102-gcc3.4.patch [new file with mode: 0644]

index 6f5615359897b5e2145071468fdb2cd545420cc2..b0544a1c607a90372b19378465ef80135b9624a1 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for media-video/cinelerra-cvs
 # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/cinelerra-cvs/ChangeLog,v 1.3 2005/01/11 23:15:46 kugelfang Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/cinelerra-cvs/ChangeLog,v 1.4 2005/01/15 11:08:24 lu_zero Exp $
+
+  15 Jan 2005; Luca Barbato <lu_zero@gentoo.org>
+  +files/libmpeg3-20050102-gcc3.4.patch, cinelerra-cvs-20050102.ebuild:
+  Fix asm statement problem
 
   12 Jan 2005; Danny van Dyk <kugelfang@gentoo.org>
   cinelerra-cvs-20040917.ebuild, cinelerra-cvs-20050102.ebuild:
index dbaaa202f22d99cdb69e81dc0886afe013dadc22..5a15175f17004db8880576ec096c7f41499ac42d 100644 (file)
@@ -1,6 +1,7 @@
-MD5 4610a0e9b0cd7f2f3aeb43e2669ab767 ChangeLog 682
-MD5 e06d71de0a01bcda83f64454a1bcb5f7 cinelerra-cvs-20040917.ebuild 1659
+MD5 efab52a0d3cadcd452d699c8bfda0c17 ChangeLog 830
 MD5 955f56e990f8c32d705708b4cc4db089 metadata.xml 251
-MD5 4661b9bddfe6064a410c1f301de2451d cinelerra-cvs-20050102.ebuild 1670
-MD5 a56da7b2ea792c89025790c53a2ed2c0 files/digest-cinelerra-cvs-20040917 77
+MD5 e06d71de0a01bcda83f64454a1bcb5f7 cinelerra-cvs-20040917.ebuild 1659
+MD5 3f38c89a58447d4d6a2fc0dbf16b5a76 cinelerra-cvs-20050102.ebuild 1799
 MD5 7405c9ce7abe2c26ad273a6da17789d2 files/digest-cinelerra-cvs-20050102 77
+MD5 a56da7b2ea792c89025790c53a2ed2c0 files/digest-cinelerra-cvs-20040917 77
+MD5 6a608309dd1406724b18475452d2e410 files/libmpeg3-20050102-gcc3.4.patch 6060
index e9d4424444ef1345626957f45261fd889223e032..5e4c63af64a14bd83eece43e4560817c00753c7a 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-video/cinelerra-cvs/cinelerra-cvs-20050102.ebuild,v 1.3 2005/01/11 23:15:46 kugelfang Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/cinelerra-cvs/cinelerra-cvs-20050102.ebuild,v 1.4 2005/01/15 11:08:24 lu_zero Exp $
 
 inherit gcc eutils flag-o-matic
 
@@ -30,7 +30,12 @@ DEPEND="!media-video/cinelerra
        >=media-libs/openexr-1.2.1
        !media-video/cinelerra
        x86? ( dev-lang/nasm )"
-
+src_unpack() {
+       unpack ${A}
+       cd ${S}/libmpeg3
+       [ "`gcc-version`" == "3.4" ] && \
+               epatch ${FILESDIR}/libmpeg3-${PV}-gcc3.4.patch
+}
 src_compile() {
        cd ${S}
        export WANT_AUTOMAKE=1.7
diff --git a/media-video/cinelerra-cvs/files/libmpeg3-20050102-gcc3.4.patch b/media-video/cinelerra-cvs/files/libmpeg3-20050102-gcc3.4.patch
new file mode 100644 (file)
index 0000000..41084a0
--- /dev/null
@@ -0,0 +1,105 @@
+diff -ruN libmpeg3.orig/mpeg3private.h libmpeg3/mpeg3private.h
+--- libmpeg3.orig/mpeg3private.h       2004-10-19 21:58:45.000000000 +0200
++++ libmpeg3/mpeg3private.h    2005-01-14 18:06:56.000000000 +0100
+@@ -877,7 +877,12 @@
+       int64_t byte_pts;
+ } mpeg3_t;
+ 
+-
+-
++#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
++#    define attribute_used __attribute__((used))
++#    define always_inline __attribute__((always_inline)) inline
++#else
++#    define attribute_used
++#    define always_inline inline
++#endif
+ 
+ #endif
+diff -ruN libmpeg3.orig/video/output.c libmpeg3/video/output.c
+--- libmpeg3.orig/video/output.c       2003-12-05 23:22:34.000000000 +0100
++++ libmpeg3/video/output.c    2005-01-14 18:10:10.000000000 +0100
+@@ -4,25 +4,25 @@
+ 
+ #define CLIP(x)  ((x) >= 0 ? ((x) < 255 ? (x) : 255) : 0)
+ 
+-static long long mpeg3_MMX_0 = 0L;
+-static unsigned long  mpeg3_MMX_10w[]         = {0x00100010, 0x00100010};                     /*dd    00010 0010h, 000100010h */
+-static unsigned long  mpeg3_MMX_80w[]         = {0x00800080, 0x00800080};                     /*dd    00080 0080h, 000800080h */
++static long long attribute_used mpeg3_MMX_0 = 0L;
++static unsigned long attribute_used mpeg3_MMX_10w[]         = {0x00100010, 0x00100010};                     /*dd    00010 0010h, 000100010h */
++static unsigned long attribute_used mpeg3_MMX_80w[]         = {0x00800080, 0x00800080};                     /*dd    00080 0080h, 000800080h */
+ 
+-static unsigned long  mpeg3_MMX_00FFw[]       = {0x00ff00ff, 0x00ff00ff};                     /*dd    000FF 00FFh, 000FF00FFh */
++static unsigned long attribute_used mpeg3_MMX_00FFw[]       = {0x00ff00ff, 0x00ff00ff};                     /*dd    000FF 00FFh, 000FF00FFh */
+ 
+-static unsigned short mpeg3_MMX_Ublucoeff[]   = {0x81, 0x81, 0x81, 0x81};                     /*dd    00081 0081h, 000810081h */
+-static unsigned short mpeg3_MMX_Vredcoeff[]   = {0x66, 0x66, 0x66, 0x66};                     /*dd    00066 0066h, 000660066h */
++static unsigned short attribute_used mpeg3_MMX_Ublucoeff[]   = {0x81, 0x81, 0x81, 0x81};                     /*dd    00081 0081h, 000810081h */
++static unsigned short attribute_used mpeg3_MMX_Vredcoeff[]   = {0x66, 0x66, 0x66, 0x66};                     /*dd    00066 0066h, 000660066h */
+ 
+-static unsigned short mpeg3_MMX_Ugrncoeff[]   = {0xffe8, 0xffe8, 0xffe8, 0xffe8};             /*dd    0FFE7 FFE7h, 0FFE7FFE7h */
+-static unsigned short mpeg3_MMX_Vgrncoeff[]   = {0xffcd, 0xffcd, 0xffcd, 0xffcd};             /*dd    0FFCC FFCCh, 0FFCCFFCCh */
++static unsigned short attribute_used mpeg3_MMX_Ugrncoeff[]   = {0xffe8, 0xffe8, 0xffe8, 0xffe8};             /*dd    0FFE7 FFE7h, 0FFE7FFE7h */
++static unsigned short attribute_used mpeg3_MMX_Vgrncoeff[]   = {0xffcd, 0xffcd, 0xffcd, 0xffcd};             /*dd    0FFCC FFCCh, 0FFCCFFCCh */
+ 
+-static unsigned short mpeg3_MMX_Ycoeff[]      = {0x4a, 0x4a, 0x4a, 0x4a};                     /*dd    0004A 004Ah, 0004A004Ah */
++static unsigned short attribute_used mpeg3_MMX_Ycoeff[]      = {0x4a, 0x4a, 0x4a, 0x4a};                     /*dd    0004A 004Ah, 0004A004Ah */
+ 
+-static unsigned short mpeg3_MMX_redmask[]     = {0xf800, 0xf800, 0xf800, 0xf800};             /*dd    07c00 7c00h, 07c007c00h */
++static unsigned short attribute_used mpeg3_MMX_redmask[]     = {0xf800, 0xf800, 0xf800, 0xf800};             /*dd    07c00 7c00h, 07c007c00h */
+ 
+-static unsigned short mpeg3_MMX_grnmask[]     = {0x7e0, 0x7e0, 0x7e0, 0x7e0};                 /*dd    003e0 03e0h, 003e003e0h */
++static unsigned short attribute_used mpeg3_MMX_grnmask[]     = {0x7e0, 0x7e0, 0x7e0, 0x7e0};                 /*dd    003e0 03e0h, 003e003e0h */
+ 
+-static unsigned char mpeg3_601_to_rgb[256];
++static unsigned char attribute_used mpeg3_601_to_rgb[256];
+ 
+ /* Algorithm */
+ /*                    r = (int)(*y + 1.371 * (*cr - 128)); */
+@@ -211,12 +211,12 @@
+               );
+ }
+ 
+-static unsigned long long  mpeg3_MMX_U_80 = 0x0000008000800000LL;
+-static unsigned long long  mpeg3_MMX_V_80 = 0x0000000000800080LL;
+-static long long  mpeg3_MMX_U_COEF        = 0x00000058ffd30000LL;
+-static long long  mpeg3_MMX_V_COEF        = 0x00000000ffea006fLL;
+-static long long  mpeg3_MMX_601_Y_COEF    = 0x0000004800480048LL;
+-static long long  mpeg3_MMX_601_Y_DIFF    = 0x0000000000000010LL;
++static unsigned long long attribute_used mpeg3_MMX_U_80 = 0x0000008000800000LL;
++static unsigned long long attribute_used mpeg3_MMX_V_80 = 0x0000000000800080LL;
++static long long attribute_used mpeg3_MMX_U_COEF        = 0x00000058ffd30000LL;
++static long long attribute_used mpeg3_MMX_V_COEF        = 0x00000000ffea006fLL;
++static long long attribute_used mpeg3_MMX_601_Y_COEF    = 0x0000004800480048LL;
++static long long attribute_used mpeg3_MMX_601_Y_DIFF    = 0x0000000000000010LL;
+ 
+ inline void mpeg3_bgra32_mmx(unsigned long y, 
+               unsigned long u, 
+@@ -301,10 +301,10 @@
+ : "r" (&y), "r" (&u), "r" (&v), "r" (output));
+ }
+ 
+-static unsigned long long  mpeg3_MMX_U_80_RGB    = 0x0000000000800080LL;
+-static unsigned long long  mpeg3_MMX_V_80_RGB    = 0x0000008000800000LL;
+-static long long  mpeg3_MMX_U_COEF_RGB    = 0x00000000ffd30058LL;
+-static long long  mpeg3_MMX_V_COEF_RGB    = 0x0000006fffea0000LL;
++static unsigned long long attribute_used mpeg3_MMX_U_80_RGB    = 0x0000000000800080LL;
++static unsigned long long attribute_used mpeg3_MMX_V_80_RGB    = 0x0000008000800000LL;
++static long long attribute_used mpeg3_MMX_U_COEF_RGB    = 0x00000000ffd30058LL;
++static long long attribute_used mpeg3_MMX_V_COEF_RGB    = 0x0000006fffea0000LL;
+ 
+ inline void mpeg3_rgba32_mmx(unsigned long y, 
+               unsigned long u, 
+diff -ruN libmpeg3.orig/video/slice.c libmpeg3/video/slice.c
+--- libmpeg3.orig/video/slice.c        2003-12-05 23:22:34.000000000 +0100
++++ libmpeg3/video/slice.c     2005-01-14 18:07:15.000000000 +0100
+@@ -6,7 +6,7 @@
+ 
+ #define CLIP(x)  ((x) >= 0 ? ((x) < 255 ? (x) : 255) : 0)
+ 
+-static unsigned long long MMX_128 = 0x80008000800080LL;
++static unsigned long long attribute_used MMX_128 = 0x80008000800080LL;
+ 
+ int mpeg3_new_slice_buffer(mpeg3_slice_buffer_t *slice_buffer)
+ {