From b1e669cc51556e0aef7357b15d44505113a2f4bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20Paul=20K=C3=BChne?= Date: Fri, 20 Feb 2009 14:32:47 +0100 Subject: [PATCH] contribs: compilation fixes --- extras/contrib/src/Makefile | 4 +- .../src/Patches/ffmpeg-macosx-intel-mmx.patch | 29 ++-- .../contrib/src/Patches/live-uselocale.patch | 137 +++++++++--------- 3 files changed, 90 insertions(+), 80 deletions(-) diff --git a/extras/contrib/src/Makefile b/extras/contrib/src/Makefile index 71bc1fcc38..394bdd3ebf 100644 --- a/extras/contrib/src/Makefile +++ b/extras/contrib/src/Makefile @@ -723,7 +723,7 @@ libvorbis: libvorbis-$(VORBIS_VERSION).tar.gz patch -d libvorbis -p0 < Patches/libvorbis-r14598-CVE-2008-1420.patch patch -d libvorbis -p0 < Patches/libvorbis-r14602-CVE-2008-1419.patch patch -d libvorbis -p0 < Patches/libvorbis-r14602-CVE-2008-1423.patch - (cd $@; autoconf) + (cd $@; sh autogen.sh) .vorbis: libvorbis .ogg (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install) @@ -902,7 +902,7 @@ faad2-$(FAAD2_VERSION).tar.gz: faad2: faad2-$(FAAD2_VERSION).tar.gz $(EXTRACT_GZ) - (cd $@; ./bootstrap) + (cd $@; sh ./bootstrap) .faad: faad2 (cd $< && $(HOSTCC) ./configure $(HOSTCONF) --disable-shared --prefix=$(PREFIX) CFLAGS="-O3" && sed -i.orig "s/shrext_cmds/shrext/g" libtool && make -C libfaad && make -C libfaad install) diff --git a/extras/contrib/src/Patches/ffmpeg-macosx-intel-mmx.patch b/extras/contrib/src/Patches/ffmpeg-macosx-intel-mmx.patch index ee2dd6806e..97d9387180 100644 --- a/extras/contrib/src/Patches/ffmpeg-macosx-intel-mmx.patch +++ b/extras/contrib/src/Patches/ffmpeg-macosx-intel-mmx.patch @@ -1,6 +1,6 @@ Index: libavcodec/x86/motion_est_mmx.c =================================================================== ---- libavcodec/x86/motion_est_mmx.c (revision 16251) +--- libavcodec/x86/motion_est_mmx.c (revision 17470) +++ libavcodec/x86/motion_est_mmx.c (working copy) @@ -168,7 +168,7 @@ static inline void sad8_4_mmx2(uint8_t *blk1, uint8_t *blk2, int stride, int h) @@ -37,12 +37,12 @@ Index: libavcodec/x86/motion_est_mmx.c + : "r" (blk1 - len), "r" (blk1 -len + stride), "r" (blk2 - len), "r" ((x86_reg)stride), "m" (round_tab[0]) ); } - + Index: libavcodec/x86/simple_idct_mmx.c =================================================================== ---- libavcodec/x86/simple_idct_mmx.c (revision 16251) +--- libavcodec/x86/simple_idct_mmx.c (revision 17470) +++ libavcodec/x86/simple_idct_mmx.c (working copy) -@@ -363,7 +363,7 @@ +@@ -364,7 +364,7 @@ "movq " #src4 ", %%mm1 \n\t" /* R6 R2 r6 r2 */\ "movq " #src1 ", %%mm2 \n\t" /* R3 R1 r3 r1 */\ "movq " #src5 ", %%mm3 \n\t" /* R7 R5 r7 r5 */\ @@ -51,7 +51,7 @@ Index: libavcodec/x86/simple_idct_mmx.c "pand %%mm0, %%mm4 \n\t"\ "por %%mm1, %%mm4 \n\t"\ "por %%mm2, %%mm4 \n\t"\ -@@ -437,7 +437,7 @@ +@@ -438,7 +438,7 @@ "jmp 2f \n\t"\ "1: \n\t"\ "pslld $16, %%mm0 \n\t"\ @@ -60,7 +60,7 @@ Index: libavcodec/x86/simple_idct_mmx.c "psrad $13, %%mm0 \n\t"\ "packssdw %%mm0, %%mm0 \n\t"\ "movq %%mm0, " #dst " \n\t"\ -@@ -471,7 +471,7 @@ +@@ -472,7 +472,7 @@ "movq " #src4 ", %%mm1 \n\t" /* R6 R2 r6 r2 */\ "movq " #src1 ", %%mm2 \n\t" /* R3 R1 r3 r1 */\ "movq " #src5 ", %%mm3 \n\t" /* R7 R5 r7 r5 */\ @@ -69,7 +69,7 @@ Index: libavcodec/x86/simple_idct_mmx.c "pand %%mm0, %%mm4 \n\t"\ "por %%mm1, %%mm4 \n\t"\ "por %%mm2, %%mm4 \n\t"\ -@@ -545,7 +545,7 @@ +@@ -546,7 +546,7 @@ "jmp 2f \n\t"\ "1: \n\t"\ "pslld $16, %%mm0 \n\t"\ @@ -78,7 +78,7 @@ Index: libavcodec/x86/simple_idct_mmx.c "psrad $13, %%mm0 \n\t"\ "packssdw %%mm0, %%mm0 \n\t"\ "movq %%mm0, " #dst " \n\t"\ -@@ -1270,7 +1270,7 @@ +@@ -1271,7 +1271,7 @@ */ "9: \n\t" @@ -89,7 +89,7 @@ Index: libavcodec/x86/simple_idct_mmx.c } Index: libavcodec/x86/cavsdsp_mmx.c =================================================================== ---- libavcodec/x86/cavsdsp_mmx.c (revision 16251) +--- libavcodec/x86/cavsdsp_mmx.c (revision 17470) +++ libavcodec/x86/cavsdsp_mmx.c (working copy) @@ -25,8 +25,30 @@ #include "libavutil/common.h" @@ -123,9 +123,18 @@ Index: libavcodec/x86/cavsdsp_mmx.c /***************************************************************************** * * inverse transform +@@ -148,7 +170,7 @@ + } + + for(i=0; i<2; i++){ +- cavs_idct8_1d(b2+4*i, ff_pw_64.a); ++ cavs_idct8_1d(b2+4*i, ff_pw_64); + + __asm__ volatile( + "psraw $7, %%mm7 \n\t" Index: libavcodec/x86/flacdsp_mmx.c =================================================================== ---- libavcodec/x86/flacdsp_mmx.c (revision 16251) +--- libavcodec/x86/flacdsp_mmx.c (revision 17470) +++ libavcodec/x86/flacdsp_mmx.c (working copy) @@ -27,7 +27,6 @@ double c = 2.0 / (len-1.0); diff --git a/extras/contrib/src/Patches/live-uselocale.patch b/extras/contrib/src/Patches/live-uselocale.patch index 07f391ee97..197a724ced 100644 --- a/extras/contrib/src/Patches/live-uselocale.patch +++ b/extras/contrib/src/Patches/live-uselocale.patch @@ -1,45 +1,17 @@ -Copyright (C) 2008 Rémi Denis-Courmont. +Copyright (C) 2008 Rémi Denis-Courmont, adaptation by Felix Kühne (C) 2009. Licensed under GNU General Public License version 2 or higher. -diff -ru live.old/liveMedia/include/Locale.hh live/liveMedia/include/Locale.hh ---- live.old/liveMedia/include/Locale.hh 2008-07-06 04:10:57.000000000 +0300 -+++ live/liveMedia/include/Locale.hh 2008-07-13 12:54:21.000000000 +0300 -@@ -27,23 +27,26 @@ - - #ifndef LOCALE_NOT_USED - #include -+#ifdef __APPLE__ -+#include -+#endif - #else --#ifndef LC_ALL --#define LC_ALL 0 -+#ifndef LC_ALL_MASK -+#define LC_ALL_MASK 0 - #endif --#ifndef LC_NUMERIC --#define LC_NUMERIC 4 -+#ifndef LC_NUMERIC_MASK -+#define LC_NUMERIC_MASK 0 - #endif -+typedef int locale_t; - #endif - - class Locale { - public: -- Locale(char const* newLocale, int category = LC_ALL); -+ Locale(char const* newLocale, int category = LC_ALL_MASK); - virtual ~Locale(); - - private: -- int fCategory; -- char* fPrevLocale; -+ locale_t fLocale, fPrevLocale; - }; - - #endif -diff -ru live.old/liveMedia/Locale.cpp live/liveMedia/Locale.cpp ---- live.old/liveMedia/Locale.cpp 2008-07-06 04:10:57.000000000 +0300 -+++ live/liveMedia/Locale.cpp 2008-07-13 12:55:32.000000000 +0300 +diff -ru live-orig/config.mingw live/config.mingw +--- live-orig/config.mingw 2009-02-13 09:09:42.000000000 +0100 ++++ live/config.mingw 2009-02-20 14:17:20.000000000 +0100 +@@ -1,4 +1,4 @@ +-COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=int ++COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=int -DLOCALE_NOT_USED + C = c + C_COMPILER = $(CC) + C_FLAGS = $(COMPILE_OPTS) -DUSE_OUR_BZERO=1 -D__MINGW32__ +diff -ru live-orig/liveMedia/Locale.cpp live/liveMedia/Locale.cpp +--- live-orig/liveMedia/Locale.cpp 2009-02-13 09:09:42.000000000 +0100 ++++ live/liveMedia/Locale.cpp 2009-02-20 14:17:20.000000000 +0100 @@ -22,19 +22,18 @@ #include "Locale.hh" #include @@ -66,58 +38,87 @@ diff -ru live.old/liveMedia/Locale.cpp live/liveMedia/Locale.cpp } #endif } -diff -ru live.old/liveMedia/RTSPClient.cpp live/liveMedia/RTSPClient.cpp ---- live.old/liveMedia/RTSPClient.cpp 2008-07-06 04:10:57.000000000 +0300 -+++ live/liveMedia/RTSPClient.cpp 2008-07-13 12:53:35.000000000 +0300 -@@ -1017,7 +1017,7 @@ +diff -ru live-orig/liveMedia/RTSPClient.cpp live/liveMedia/RTSPClient.cpp +--- live-orig/liveMedia/RTSPClient.cpp 2009-02-13 09:09:42.000000000 +0100 ++++ live/liveMedia/RTSPClient.cpp 2009-02-20 14:27:06.000000000 +0100 +@@ -1019,7 +1019,7 @@ // This is the default value; we don't need a "Scale:" header: buf[0] = '\0'; } else { -- Locale("C", LC_NUMERIC); -+ Locale("C", LC_NUMERIC_MASK); +- Locale l("C", LC_NUMERIC); ++ Locale l("C", LC_NUMERIC_MASK); sprintf(buf, "Scale: %f\r\n", scale); } -@@ -1031,11 +1031,11 @@ +@@ -1033,11 +1033,11 @@ buf[0] = '\0'; } else if (end < 0) { // There's no end time: -- Locale("C", LC_NUMERIC); -+ Locale("C", LC_NUMERIC_MASK); +- Locale l("C", LC_NUMERIC); ++ Locale l("C", LC_NUMERIC_MASK); sprintf(buf, "Range: npt=%.3f-\r\n", start); } else { // There's both a start and an end time; include them both in the "Range:" hdr -- Locale("C", LC_NUMERIC); -+ Locale("C", LC_NUMERIC_MASK); +- Locale l("C", LC_NUMERIC); ++ Locale l("C", LC_NUMERIC_MASK); sprintf(buf, "Range: npt=%.3f-%.3f\r\n", start, end); } -@@ -2306,7 +2306,7 @@ +@@ -2342,7 +2342,7 @@ if (_strncasecmp(line, "Scale: ", 7) != 0) return False; line += 7; -- Locale("C", LC_NUMERIC); -+ Locale("C", LC_NUMERIC_MASK); +- Locale l("C", LC_NUMERIC); ++ Locale l("C", LC_NUMERIC_MASK); return sscanf(line, "%f", &scale) == 1; } -diff -ru live.old/liveMedia/RTSPCommon.cpp live/liveMedia/RTSPCommon.cpp ---- live.old/liveMedia/RTSPCommon.cpp 2008-11-03 23:28:14.000000000 -1000 -+++ live/liveMedia/RTSPCommon.cpp 2008-11-06 09:05:19.000000000 -1000 +diff -ru live-orig/liveMedia/RTSPCommon.cpp live/liveMedia/RTSPCommon.cpp +--- live-orig/liveMedia/RTSPCommon.cpp 2009-02-13 09:09:42.000000000 +0100 ++++ live/liveMedia/RTSPCommon.cpp 2009-02-20 14:26:01.000000000 +0100 @@ -146,7 +146,7 @@ char const* fields = buf + 7; while (*fields == ' ') ++fields; double start, end; -- Locale("C", LC_NUMERIC); -+ Locale("C", LC_NUMERIC_MASK); +- Locale l("C", LC_NUMERIC); ++ Locale l("C", LC_NUMERIC_MASK); if (sscanf(fields, "npt = %lf - %lf", &start, &end) == 2) { rangeStart = start; rangeEnd = end; ---- live/config.mingw.old 2008-07-27 17:13:52.000000000 +0100 -+++ live/config.mingw 2008-07-27 17:19:04.000000000 +0100 -@@ -1,4 +1,4 @@ --COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=int -+COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=int -DLOCALE_NOT_USED - C = c - C_COMPILER = $(CC) - C_FLAGS = $(COMPILE_OPTS) -DUSE_OUR_BZERO=1 -D__MINGW32__ +diff -ru live-orig/liveMedia/include/Locale.hh live/liveMedia/include/Locale.hh +--- live-orig/liveMedia/include/Locale.hh 2009-02-13 09:09:42.000000000 +0100 ++++ live/liveMedia/include/Locale.hh 2009-02-20 14:17:20.000000000 +0100 +@@ -27,23 +27,26 @@ + + #ifndef LOCALE_NOT_USED + #include ++#ifdef __APPLE__ ++#include ++#endif + #else +-#ifndef LC_ALL +-#define LC_ALL 0 ++#ifndef LC_ALL_MASK ++#define LC_ALL_MASK 0 + #endif +-#ifndef LC_NUMERIC +-#define LC_NUMERIC 4 ++#ifndef LC_NUMERIC_MASK ++#define LC_NUMERIC_MASK 0 + #endif ++typedef int locale_t; + #endif + + class Locale { + public: +- Locale(char const* newLocale, int category = LC_ALL); ++ Locale(char const* newLocale, int category = LC_ALL_MASK); + virtual ~Locale(); + + private: +- int fCategory; +- char* fPrevLocale; ++ locale_t fLocale, fPrevLocale; + }; + + #endif -- 2.39.2