summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2005-04-26 08:34:14 +0000
committerMartin Schlemmer <azarah@gentoo.org>2005-04-26 08:34:14 +0000
commit5317601161de8b511415380d8110d8dbec01662e (patch)
treefa4f9f734a7afb50a7b733cd93a6a8dae78b63c2 /media-video/avifile
parentFixed broken Manifest. (diff)
downloadgentoo-2-5317601161de8b511415380d8110d8dbec01662e.tar.gz
gentoo-2-5317601161de8b511415380d8110d8dbec01662e.tar.bz2
gentoo-2-5317601161de8b511415380d8110d8dbec01662e.zip
Fix building with gcc4. Patch from Debian.
(Portage version: 2.0.51.20-r4)
Diffstat (limited to 'media-video/avifile')
-rw-r--r--media-video/avifile/ChangeLog7
-rw-r--r--media-video/avifile/avifile-0.7.43.20050224-r1.ebuild6
-rw-r--r--media-video/avifile/files/avifile-0.7.43.20050224-1.0.0.1.gcc4.patch149
3 files changed, 160 insertions, 2 deletions
diff --git a/media-video/avifile/ChangeLog b/media-video/avifile/ChangeLog
index a48d1eda7ced..0cc0e240b06f 100644
--- a/media-video/avifile/ChangeLog
+++ b/media-video/avifile/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-video/avifile
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/avifile/ChangeLog,v 1.101 2005/04/25 00:15:35 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/avifile/ChangeLog,v 1.102 2005/04/26 08:34:14 azarah Exp $
+
+ 25 Apr 2005; Martin Schlemmer <azarah@gentoo.org>
+ +files/avifile-0.7.43.20050224-1.0.0.1.gcc4.patch,
+ avifile-0.7.43.20050224-r1.ebuild:
+ Fix building with gcc4. Patch from Debian.
25 Apr 2005; Diego Pettenò <flameeyes@gentoo.org>
avifile-0.7.43.20050224-r1.ebuild:
diff --git a/media-video/avifile/avifile-0.7.43.20050224-r1.ebuild b/media-video/avifile/avifile-0.7.43.20050224-r1.ebuild
index fa2cfdfeaf20..c21e380869f5 100644
--- a/media-video/avifile/avifile-0.7.43.20050224-r1.ebuild
+++ b/media-video/avifile/avifile-0.7.43.20050224-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-video/avifile/avifile-0.7.43.20050224-r1.ebuild,v 1.4 2005/04/25 00:15:35 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/avifile/avifile-0.7.43.20050224-r1.ebuild,v 1.5 2005/04/26 08:34:14 azarah Exp $
inherit eutils flag-o-matic
@@ -56,6 +56,7 @@ pkg_setup() {
src_unpack() {
unpack ${A}
+ cd ${S}
# fixes mad FPM detection
epatch ${FILESDIR}/${PN}-mad.patch
@@ -64,6 +65,9 @@ src_unpack() {
epatch ${FILESDIR}/avifile-0.7.43.20050224-sdllibs.patch
# fixes bug #86320
epatch ${FILESDIR}/${P}-fixlabels.patch
+ # fix building with gcc4
+ # http://debian-amd64.alioth.debian.org/gcc-3.4/patches/avifile_0.7.43.20050224-1.0.0.1.gcc4.patch
+ epatch ${FILESDIR}/${P}-1.0.0.1.gcc4.patch
if ! use qt ; then
sed -i -e 's/qtvidcap\ qtrecompress//g' \
diff --git a/media-video/avifile/files/avifile-0.7.43.20050224-1.0.0.1.gcc4.patch b/media-video/avifile/files/avifile-0.7.43.20050224-1.0.0.1.gcc4.patch
new file mode 100644
index 000000000000..a00595bccbf9
--- /dev/null
+++ b/media-video/avifile/files/avifile-0.7.43.20050224-1.0.0.1.gcc4.patch
@@ -0,0 +1,149 @@
+diff -urN avifile-0.7.43.20050224/ffmpeg/libavcodec/avcodec.h ./ffmpeg/libavcodec/avcodec.h
+--- avifile-0.7.43.20050224/ffmpeg/libavcodec/avcodec.h 2005-02-24 12:31:10.000000000 +0100
++++ avifile-0.7.43.20050224.gcc4/ffmpeg/libavcodec/avcodec.h 2005-03-18 09:29:44.849987503 +0100
+@@ -1813,6 +1813,14 @@
+ #define FF_OPT_MAX_DEPTH 10
+ } AVOption;
+
++#ifdef HAVE_MMX
++extern const struct AVOption avoptions_common[3 + 5];
++#else
++extern const struct AVOption avoptions_common[3];
++#endif
++extern const struct AVOption avoptions_workaround_bug[11];
++
++
+ /**
+ * Parse option(s) and sets fields in passed structure
+ * @param strct structure where the parsed results will be written
+diff -urN avifile-0.7.43.20050224/ffmpeg/libavcodec/common.h ./ffmpeg/libavcodec/common.h
+--- avifile-0.7.43.20050224/ffmpeg/libavcodec/common.h 2005-02-15 13:33:33.000000000 +0100
++++ avifile-0.7.43.20050224.gcc4/ffmpeg/libavcodec/common.h 2005-03-18 09:34:02.595215479 +0100
+@@ -53,15 +53,6 @@
+ { name, help, offsetof(AVCodecContext, field), FF_OPT_TYPE_RCOVERRIDE, .defval = 0, .defstr = NULL }
+ #define AVOPTION_SUB(ptr) { .name = NULL, .help = (const char*)ptr }
+ #define AVOPTION_END() AVOPTION_SUB(NULL)
+-
+-struct AVOption;
+-#ifdef HAVE_MMX
+-extern const struct AVOption avoptions_common[3 + 5];
+-#else
+-extern const struct AVOption avoptions_common[3];
+-#endif
+-extern const struct AVOption avoptions_workaround_bug[11];
+-
+ #endif /* HAVE_AV_CONFIG_H */
+
+ /* Suppress restrict if it was not defined in config.h. */
+diff -urN avifile-0.7.43.20050224/ffmpeg/libavcodec/dsputil.h ./ffmpeg/libavcodec/dsputil.h
+--- avifile-0.7.43.20050224/ffmpeg/libavcodec/dsputil.h 2005-02-15 13:33:34.000000000 +0100
++++ avifile-0.7.43.20050224.gcc4/ffmpeg/libavcodec/dsputil.h 2005-03-18 09:24:45.732740888 +0100
+@@ -604,33 +604,6 @@
+ return score;\
+ }
+
+-#ifndef HAVE_LRINTF
+-/* XXX: add ISOC specific test to avoid specific BSD testing. */
+-/* better than nothing implementation. */
+-/* btw, rintf() is existing on fbsd too -- alex */
+-static always_inline long int lrintf(float x)
+-{
+-#ifdef CONFIG_WIN32
+-# ifdef ARCH_X86
+- int32_t i;
+- asm volatile(
+- "fistpl %0\n\t"
+- : "=m" (i) : "t" (x) : "st"
+- );
+- return i;
+-# else
+- /* XXX: incorrect, but make it compile */
+- return (int)(x + (x < 0 ? -0.5 : 0.5));
+-# endif
+-#else
+- return (int)(rint(x));
+-#endif
+-}
+-#else
+-#ifndef _ISOC9X_SOURCE
+-#define _ISOC9X_SOURCE
+-#endif
+ #include <math.h>
+-#endif
+
+ #endif
+diff -urN avifile-0.7.43.20050224/lib/aviplay/AudioQueue.h ./lib/aviplay/AudioQueue.h
+--- avifile-0.7.43.20050224/lib/aviplay/AudioQueue.h 2004-08-25 18:29:06.000000000 +0200
++++ avifile-0.7.43.20050224.gcc4/lib/aviplay/AudioQueue.h 2005-03-18 09:32:07.258488382 +0100
+@@ -16,10 +16,11 @@
+ virtual int Mix(void* data, const void* src, uint_t n) const = 0;
+ };
+
++#define MAX_BUFFER_TIME 1.0;
++
+ class AudioQueue
+ {
+ public:
+- static const double MAX_BUFFER_TIME = 1.0;
+ AudioQueue(WAVEFORMATEX& Iwf, WAVEFORMATEX& Owf);
+ ~AudioQueue();
+
+diff -urN avifile-0.7.43.20050224/lib/aviplay/aviplay_impl.h ./lib/aviplay/aviplay_impl.h
+--- avifile-0.7.43.20050224/lib/aviplay/aviplay_impl.h 2003-12-17 21:37:54.000000000 +0100
++++ avifile-0.7.43.20050224.gcc4/lib/aviplay/aviplay_impl.h 2005-03-18 09:32:07.260487996 +0100
+@@ -136,8 +136,6 @@
+ void createAudioRenderer();
+ int restartVideoStreaming(const char* codec = 0);
+
+- static const float m_fDropLimit = -0.015;
+-
+ mutable int AviPlayer::propertyRead[LAST_PROPERTY]; // have we read at least once from Registry::
+
+ avm::vector<IVideoRenderer*> m_VideoRenderers; // we could draw image to more places
+diff -urN avifile-0.7.43.20050224/lib/aviplay/aviplayth.cpp ./lib/aviplay/aviplayth.cpp
+--- avifile-0.7.43.20050224/lib/aviplay/aviplayth.cpp 2004-10-25 12:27:42.000000000 +0200
++++ avifile-0.7.43.20050224.gcc4/lib/aviplay/aviplayth.cpp 2005-03-18 09:32:07.261487803 +0100
+@@ -31,6 +31,7 @@
+ // preffer video playing thread
+ static const int PRIORITY_ADD_VIDEO = 0;
+ static const int PRIORITY_ADD_AUDIO = 0;
++static const float m_fDropLimit = -0.015;
+
+ float AviPlayer::getVideoAsync()
+ {
+diff -urN avifile-0.7.43.20050224/lib/aviread/ReadFile.cpp ./lib/aviread/ReadFile.cpp
+--- avifile-0.7.43.20050224/lib/aviread/ReadFile.cpp 2004-03-10 18:00:09.000000000 +0100
++++ avifile-0.7.43.20050224.gcc4/lib/aviread/ReadFile.cpp 2005-03-18 09:32:07.273485486 +0100
+@@ -125,7 +125,7 @@
+ };
+
+
+-avm::IReadFile* avm::CreateReadFile(const char* name, unsigned int flags)
++IReadFile* CreateReadFile(const char* name, unsigned int flags)
+ {
+ ReadFile* r = new ReadFile(name, flags);
+ return r;
+diff -urN avifile-0.7.43.20050224/samples/qtvidcap/kv4lsetup.cpp ./samples/qtvidcap/kv4lsetup.cpp
+--- avifile-0.7.43.20050224/samples/qtvidcap/kv4lsetup.cpp 2004-11-04 14:43:49.000000000 +0100
++++ avifile-0.7.43.20050224.gcc4/samples/qtvidcap/kv4lsetup.cpp 2005-03-18 09:32:07.283483556 +0100
+@@ -311,7 +311,7 @@
+ fbuf.depth = set_bpp;
+ fbuf.bytesperline = set_bpl;
+ if (set_base != NULL)
+- fbuf.base = (void*)((unsigned int)set_base+(unsigned int)shift);
++ fbuf.base = (void*)((unsigned long)set_base+(unsigned long)shift);
+
+ /* XXX bttv confuses color depth and bits/pixel */
+ #ifndef X_DISPLAY_MISSING
+diff -urN avifile-0.7.43.20050224/samples/qtvidcap/v4lxif.cpp ./samples/qtvidcap/v4lxif.cpp
+--- avifile-0.7.43.20050224/samples/qtvidcap/v4lxif.cpp 2004-11-04 14:43:50.000000000 +0100
++++ avifile-0.7.43.20050224.gcc4/samples/qtvidcap/v4lxif.cpp 2005-03-18 09:32:07.291482011 +0100
+@@ -1118,7 +1118,7 @@
+ XF86DGAGetVideoLL(disp, DefaultScreen(disp), (int *)&base, &width, &bank, &ram );
+ if (!base)
+ avml(AVML_WARN,
+- "v4l1: can not allocate frame buffer base: 0x%x\n",(int)base);
++ "v4l1: can not allocate frame buffer base: 0x%lx\n",(long)base);
+ }
+ }
+ }