diff --git a/multimedia/avifile/Makefile b/multimedia/avifile/Makefile index 5bfa8399c6cc..fce121462e36 100644 --- a/multimedia/avifile/Makefile +++ b/multimedia/avifile/Makefile @@ -1,335 +1,350 @@ # New ports collection makefile for: avifile # Date created: 16 September 2000 # Whom: Holger Lamm # # $FreeBSD$ # PORTNAME= avifile PORTVERSION= 0.7.38 PORTREVISION= 4 PORTEPOCH= 2 CATEGORIES= multimedia MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} DISTNAME= ${PORTNAME}-0.7-${PORTVERSION} MAINTAINER= holger@e-gitt.net COMMENT= AVI player/converter with numerous codecs, including MPEG-4(DivX ;-)) BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm USE_SUBMAKE= yes USE_REINPLACE= yes USE_XLIB= yes USE_GMAKE= yes USE_LIBTOOL_VER=13 INSTALLS_SHLIB= yes LIBTOOLFILES= acinclude.m4 CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include -L${LOCALBASE}/lib" \ CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" \ LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib ${PTHREAD_LIBS}" CONFIGURE_ARGS= --with-gnu-ld --enable-iconv \ --disable-v4l \ --disable-divx4 CONFIGURE_TARGET= PLIST_SUB= LIB_VERSION="${LIB_VERSION}" VERSION="${VERSION}" MAN1= avibench.1 avicap.1 avicat.1 avifile-config.1 avimake.1 \ aviplay.1 avirec.1 avirecompress.1 avitype.1 #CODEC_PORT= ${PORTSDIR}/multimedia/win32-codecs CODEC_PORT= ${.CURDIR}/../win32-codecs CODEC_DETECTION_FILE!= ${MAKE} -f ${CODEC_PORT}/Makefile -V CODEC_DETECTION_FILE LIB_VERSION= 3 VERSION= 0.7 DIFF?= /usr/bin/diff FMT?= /usr/bin/fmt # qt -- USE_QT_VER has to happen befor bsd.port.pre.mk .if !defined(WITHOUT_QT) . if exists(${X11BASE}/include/qt2/qapp.h) USE_QT_VER= 2 . else USE_QT_VER= 3 . endif PLIST_SUB+= QT="" .else CONFIGURE_ARGS+= --without-qt PLIST_SUB+= QT="@comment " .endif .include +# fix compile with gcc-3.4.x +.if ${OSVERSION} >= 502126 +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-include::aviplay.h \ + ${FILESDIR}/extra-patch-include::avm_map.h \ + ${FILESDIR}/extra-patch-include::avm_stl.h \ + ${FILESDIR}/extra-patch-lib::aviread::AsfNetworkInputStream.cpp \ + ${FILESDIR}/extra-patch-lib::common::image.cpp \ + ${FILESDIR}/extra-patch-plugins::libvorbis::libvorbis.cpp \ + ${FILESDIR}/extra-patch-ffmpeg::libavcodec::i386::dsputil_mmx.c \ + ${FILESDIR}/extra-patch-ffmpeg::libavcodec::i386::motion_est_mmx.c \ + ${FILESDIR}/extra-patch-ffmpeg::libavcodec::i386::simple_idct_mmx.c \ + ${FILESDIR}/extra-patch-ffmpeg::libavcodec::liba52::resample_mmx.c \ + ${FILESDIR}/extra-patch-plugins::libmp3lame_audioenc::lame3.70::quantize-pvt.c +.endif + WITHOUT_XVID=yes # Does not support xvid 1.0.x .if (${ARCH} != "i386") && (${ARCH} != "amd64") WITHOUT_A52=yes WITHOUT_XVID=yes BROKEN= "Does not compile on !i386" .endif # compilation optimizations .if defined(WITH_OPTIMIZED_CFLAGS) CONFIGURE_ARGS+= --enable-release . if ${ARCH} == "i386" CONFIGURE_ARGS+= --enable-x86opt . endif .else CONFIGURE_ARGS+= --disable-release .endif # soundblaster can be passed ac3 instead of letting avifile decode # it .if defined(WITH_AC3_PASSTHROUGH) CONFIGURE_ARGS+= --enable-ac3passthrough PLIST_SUB+= AC3_PASS="" .else CONFIGURE_ARGS+= --disable-ac3passthrough PLIST_SUB+= AC3_PASS="@comment " .endif # liba52 .if !defined(WITHOUT_A52) LIB_DEPENDS+= a52.0:${PORTSDIR}/audio/liba52 CONFIGURE_ARGS+= --enable-a52 \ --enable-ffmpeg-a52bin \ --with-a52-prefix=${LOCALBASE} PLIST_SUB+= A52="" .else CONFIGURE_ARGS+= --disable-a52 PLIST_SUB+= A52="@comment " .endif # faad .if !defined(WITHOUT_FAAD) LIB_DEPENDS+= faad.0:${PORTSDIR}/audio/faad CONFIGURE_ARGS+= --with-faad-prefix=${LOCALBASE} .else CONFIGURE_ARGS+= --disable-faad .endif # libmad .if !defined(WITHOUT_MAD) LIB_DEPENDS+= mad.2:${PORTSDIR}/audio/libmad CONFIGURE_ARGS+= --enable-libmad PLIST_SUB+= MAD="" .else CONFIGURE_ARGS+= --disable-mad PLIST_SUB+= MAD="@comment " .endif # sdl .if !defined(WITHOUT_SDL) USE_SDL= sdl CONFIGURE_ARGS+= --with-sdl-prefix=${LOCALBASE} \ --with-sdl-exec-prefix=${LOCALBASE} .else CONFIGURE_ARGS+= --without-sdl .endif # vidix support: requires root privileges .if defined(WITH_VIDIX) CONFIGURE_ARGS+= --enable-vidix PLIST_SUB+= VIDIX="" .else CONFIGURE_ARGS+= --disable-vidix PLIST_SUB+= VIDIX="@comment " .endif # libvorbis; thus, libogg .if !defined(WITHOUT_VORBIS) LIB_DEPENDS+= vorbis.3:${PORTSDIR}/audio/libvorbis CONFIGURE_ARGS+= --with-vorbis-prefix=${LOCALBASE} \ --with-ogg-prefix=${LOCALBASE} PLIST_SUB+= VORBIS="" .else CONFIGURE_ARGS+= --disable-vorbis PLIST_SUB+= VORBIS="@comment " .endif # xvid .if !defined(WITHOUT_XVID) LIB_DEPENDS+= xvidcore.4:${PORTSDIR}/multimedia/xvid CONFIGURE_ARGS+= --with-xvid-prefix=${LOCALBASE} PLIST_SUB+= XVID="" .else CONFIGURE_ARGS+= --disable-xvid PLIST_SUB+= XVID="@comment " .endif pre-everything:: .if !defined(WITH_OPTIMIZED_CFLAGS) @${ECHO_MSG} "You can enable compilation optimizations by defining" @${ECHO_MSG} " WITH_OPTIMIZED_CFLAGS." .endif .if !defined(WITH_AC3_PASSTHROUGH) @${ECHO_MSG} "You can enable soundblaster ac3 passthrough support by" @${ECHO_MSG} " defining WITH_AC3_PASSTHROUGH." .endif .if !defined(WITHOUT_A52) @${ECHO_MSG} "You can disable ac3 (liba52) support by defining WITHOUT_A52." .endif .if !defined(WITHOUT_FAAD) @${ECHO_MSG} "You can disable faad support by defining WITHOUT_FAAD." .endif .if !defined(WITHOUT_MAD) @${ECHO_MSG} "You can disable mad support by defining WITHOUT_MAD." .endif .if !defined(WITHOUT_QT) @${ECHO_MSG} "You can disable QT supported tools by defining WITHOUT_QT." .endif .if !defined(WITHOUT_SDL) @${ECHO_MSG} "You can disable SDL supported tools by defining WITHOUT_SDL." .endif .if !defined(WITH_VIDIX) @${ECHO_MSG} "You can enable VIDIX support by defining WITH_VIDIX." .endif .if !defined(WITHOUT_VORBIS) @${ECHO_MSG} "You can disable vorbis support by defining WITHOUT_VORBIS." .endif .if !defined(WITHOUT_XVID) @${ECHO_MSG} "You can disable xvid support by defining WITHOUT_XVID." .endif pre-extract: @if [ -f ${LOCALBASE}/lib/libpth.so ]; then \ ${ECHO_MSG} "Error: This packet does not compile when the \ packet 'pth' is installed.";\ ${FALSE};\ fi post-extract: # grab does not work outside Linux for now @${RM} -f ${WRKSRC}/ffmpeg/libavformat/grab.c @${TOUCH} ${WRKSRC}/ffmpeg/libavformat/grab.c post-patch: # linux/ioctl.h -> sys/ioctl.h @${REINPLACE_CMD} -e 's|linux/ioctl.h|sys/ioctl.h|' \ ${WRKSRC}/drivers/libdha/kernelhelper/dhahelper.h # FreeBSD does not support Video4Linux or equivalent # therefore, do not build qtvidcap @${REINPLACE_CMD} -E -e 's|^(SUBDIRS.+)qtvidcap|\1|' \ ${WRKSRC}/samples/Makefile.in .if !defined(WITHOUT_MAD) @${REINPLACE_CMD} -e 's|"mad.h"||' \ ${WRKSRC}/plugins/libmad/libmad.cpp @${REINPLACE_CMD} -e 's|@AMM_USE_LIBMAD_FALSE@CUSTOMFLAGS = -I$(SUBDIRS)||' \ ${WRKSRC}/plugins/libmad/Makefile.in .endif .if !defined(WITHOUT_QT) . if exists(${X11BASE}/include/qt2/qapp.h) @${REINPLACE_CMD} -e 's|qt-mt|qt2-mt|' ${WRKSRC}/configure . endif @${REINPLACE_CMD} -e 's|QT_CFLAGS = \@QT_CFLAGS\@|QT_CFLAGS = -I${X11BASE}/include \@QT_CFLAGS\@|; \ s|QT_LIBS = \@QT_LIBS\@|QT_LIBS = -L${X11BASE}/lib \@QT_LIBS\@|' \ ${WRKSRC}/libavqt/Makefile.in .endif .if !defined(WITHOUT_XVID) @${REINPLACE_CMD} -e 's|XVID_LIBS = \@XVID_LIBS\@|XVID_LIBS = -L${LOCALBASE}/lib \@XVID_LIBS\@|' \ ${WRKSRC}/plugins/libxvid/Makefile.in .endif @${REINPLACE_CMD} -e 's|__THROW||' \ ${WRKSRC}/plugins/libwin32/loader/dshow/DS_Filter.h @${REINPLACE_CMD} -e 's|-ljpeg|-L${LOCALBASE}/lib -ljpeg|' \ ${WRKSRC}/samples/mjpeg_plugin/Makefile.in # if we have LAME @${REINPLACE_CMD} -e 's|-lmp3lame|-L${LOCALBASE}/lib -lmp3lame|' \ ${WRKSRC}/configure # use portname without version to build dir names @${REINPLACE_CMD} -E -e 's|(PACKAGE[:space:]*=[:space:]*avifile).*|\1|' \ ${WRKSRC}/configure # fix build in -CURRENT @${FIND} ${WRKSRC} -type f | ${XARGS} -n 10 ${REINPLACE_CMD} -e \ 's|#include |#include |g' # use correct signal type @${REINPLACE_CMD} -e 's|sighandler_t|sig_t|' \ ${WRKSRC}/samples/misc/benchmark.cpp # fix breakage if either auto{conf,make} are installed # CFLAGS safeness # do not version library names # fix incorrect behavior of configure script # make doc follow our hier @${FIND} ${WRKSRC} \( -name Makefile.in -o -name configure \) | \ ${XARGS} -n 10 ${REINPLACE_CMD} -E -e \ 's|INSTALL = \@INSTALL\@|INSTALL = ${INSTALL}|; \ s!-O4!${CFLAGS}!; \ s!-release[[:space:]]+\$$\([^\)]+\)!!; \ s!ACLOCAL =!ACLOCAL = ${TRUE} || !; \ s!AUTOCONF =!AUTOCONF = ${TRUE} || !; \ s!AUTOHEADER =!AUTOHEADER = ${TRUE} || !; \ s!AUTOMAKE =!AUTOMAKE = ${TRUE} || !; \ s|[(]datadir[)]/[$$][(]PACKAGE[)]/doc|(prefix)/share/doc/$$(PACKAGE)|' # fix location of pkgconfig dir @${REINPLACE_CMD} -E \ -e 's|^(pkgconfigdir).*|\1=${PREFIX}/libdata/pkgconfig|' \ ${WRKSRC}/Makefile.in # do not install man page for v4l @${REINPLACE_CMD} -E \ -e 's|kv4lsetup.1||' ${WRKSRC}/doc/Makefile.in # libmad's configure script has problems in this release # therefore, we avoid it since we do not need it anyway @${REINPLACE_CMD} -E \ -e 's|^subdirs[[:space:]]*=.*libmad.*$$||' \ ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} post-configure: @${LN} -sf ${LIBTOOL} ${WRKSRC}/libtool post-install: @${FMT} < ${PKGMESSAGE} .if (${ARCH} == "i386") RUN_DEPENDS+= ${CODEC_DETECTION_FILE}:${CODEC_PORT} CONFIGURE_ARGS+= --enable-win32 \ --with-win32-path=${LOCALBASE}/lib/win32 PLIST_SUB+= WIN32="" .else CONFIGURE_ARGS+= --disable-win32 PLIST_SUB+= WIN32="@comment " .endif .if (${ARCH} == "i386") || (${ARCH} == "amd64") CONFIGURE_ARGS+= --enable-x86opt PLIST_SUB+= FFMPEG="" .else CONFIGURE_ARGS+= --disable-x86opt \ --disable-ffmpeg PLIST_SUB+= FFMPEG="@comment " .endif # hack taken from ogle to make it work with liba52 + djbfft .if exists(${LOCALBASE}/lib/liba52.la) LIBA52_DEP_LIBS!= ${GREP} dependency_libs ${LOCALBASE}/lib/liba52.la | ${CUT} -d \' -f 2 .else LIBA52_DEP_LIBS= .endif # if we have LAME .if exists(${LOCALBASE}/lib/libmp3lame.so) LIB_DEPENDS+= mp3lame.0:${PORTSDIR}/audio/lame CONFIGURE_ARGS+= --enable-lame-bin PLIST_SUB+= NOLAME="@comment " LAME="" .else PLIST_SUB+= NOLAME="" LAME="@comment " .endif .include diff --git a/multimedia/avifile/files/extra-patch-ffmpeg::libavcodec::i386::dsputil_mmx.c b/multimedia/avifile/files/extra-patch-ffmpeg::libavcodec::i386::dsputil_mmx.c new file mode 100644 index 000000000000..e1a56d291c6c --- /dev/null +++ b/multimedia/avifile/files/extra-patch-ffmpeg::libavcodec::i386::dsputil_mmx.c @@ -0,0 +1,13 @@ +--- ffmpeg/libavcodec/i386/dsputil_mmx.c.orig Fri Aug 6 13:59:15 2004 ++++ ffmpeg/libavcodec/i386/dsputil_mmx.c Fri Aug 6 14:07:13 2004 +@@ -29,8 +29,8 @@ + static const uint64_t mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001ULL; + static const uint64_t mm_wtwo __attribute__ ((aligned(8))) = 0x0002000200020002ULL; + +-static const uint64_t ff_pw_20 __attribute__ ((aligned(8))) = 0x0014001400140014ULL; +-static const uint64_t ff_pw_3 __attribute__ ((aligned(8))) = 0x0003000300030003ULL; ++static const uint64_t ff_pw_20 __attribute__ ((aligned(8))) __attribute__((used)) = 0x0014001400140014ULL; ++static const uint64_t ff_pw_3 __attribute__ ((aligned(8))) __attribute__((used)) = 0x0003000300030003ULL; + static const uint64_t ff_pw_16 __attribute__ ((aligned(8))) = 0x0010001000100010ULL; + static const uint64_t ff_pw_15 __attribute__ ((aligned(8))) = 0x000F000F000F000FULL; + diff --git a/multimedia/avifile/files/extra-patch-ffmpeg::libavcodec::i386::motion_est_mmx.c b/multimedia/avifile/files/extra-patch-ffmpeg::libavcodec::i386::motion_est_mmx.c new file mode 100644 index 000000000000..038802efa574 --- /dev/null +++ b/multimedia/avifile/files/extra-patch-ffmpeg::libavcodec::i386::motion_est_mmx.c @@ -0,0 +1,11 @@ +--- ffmpeg/libavcodec/i386/motion_est_mmx.c.orig Fri Aug 6 13:59:15 2004 ++++ ffmpeg/libavcodec/i386/motion_est_mmx.c Fri Aug 6 14:08:21 2004 +@@ -26,7 +26,7 @@ + 0x0002000200020002, + }; + +-static __attribute__ ((aligned(8))) uint64_t bone= 0x0101010101010101LL; ++static __attribute__((aligned(8))) __attribute__((used)) uint64_t bone= 0x0101010101010101LL; + + static inline void sad8_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h) + { diff --git a/multimedia/avifile/files/extra-patch-ffmpeg::libavcodec::i386::simple_idct_mmx.c b/multimedia/avifile/files/extra-patch-ffmpeg::libavcodec::i386::simple_idct_mmx.c new file mode 100644 index 000000000000..3d88914c4b1f --- /dev/null +++ b/multimedia/avifile/files/extra-patch-ffmpeg::libavcodec::i386::simple_idct_mmx.c @@ -0,0 +1,13 @@ +--- ffmpeg/libavcodec/i386/simple_idct_mmx.c.orig Fri Aug 6 13:59:15 2004 ++++ ffmpeg/libavcodec/i386/simple_idct_mmx.c Fri Aug 6 14:09:00 2004 +@@ -45,8 +45,8 @@ + #define ROW_SHIFT 11 + #define COL_SHIFT 20 // 6 + +-static const uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000ULL; +-static const uint64_t __attribute__((aligned(8))) d40000= 0x0000000000040000ULL; ++static const uint64_t __attribute__((aligned(8))) __attribute__((used)) wm1010= 0xFFFF0000FFFF0000ULL; ++static const uint64_t __attribute__((aligned(8))) __attribute__((used)) d40000= 0x0000000000040000ULL; + static int16_t __attribute__((aligned(8))) temp[64]; + static int16_t __attribute__((aligned(8))) coeffs[]= { + 1<<(ROW_SHIFT-1), 0, 1<<(ROW_SHIFT-1), 0, diff --git a/multimedia/avifile/files/extra-patch-ffmpeg::libavcodec::liba52::resample_mmx.c b/multimedia/avifile/files/extra-patch-ffmpeg::libavcodec::liba52::resample_mmx.c new file mode 100644 index 000000000000..d4b176eac503 --- /dev/null +++ b/multimedia/avifile/files/extra-patch-ffmpeg::libavcodec::liba52::resample_mmx.c @@ -0,0 +1,17 @@ +--- ffmpeg/libavcodec/liba52/resample_mmx.c.orig Fri Aug 6 13:59:15 2004 ++++ ffmpeg/libavcodec/liba52/resample_mmx.c Fri Aug 6 14:09:51 2004 +@@ -7,10 +7,10 @@ + and it would mean (C / MMX2 / MMX / 3DNOW) versions + */ + +-static uint64_t __attribute__((aligned(8))) magicF2W= 0x43c0000043c00000LL; +-static uint64_t __attribute__((aligned(8))) wm1010= 0xFFFF0000FFFF0000LL; +-static uint64_t __attribute__((aligned(8))) wm0101= 0x0000FFFF0000FFFFLL; +-static uint64_t __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL; ++static uint64_t __attribute__((aligned(8))) __attribute__((used)) magicF2W= 0x43c0000043c00000LL; ++static uint64_t __attribute__((aligned(8))) __attribute__((used)) wm1010= 0xFFFF0000FFFF0000LL; ++static uint64_t __attribute__((aligned(8))) __attribute__((used)) wm0101= 0x0000FFFF0000FFFFLL; ++static uint64_t __attribute__((aligned(8))) __attribute__((used)) wm1100= 0xFFFFFFFF00000000LL; + + static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){ + int32_t * f = (int32_t *) _f; diff --git a/multimedia/avifile/files/extra-patch-include::aviplay.h b/multimedia/avifile/files/extra-patch-include::aviplay.h new file mode 100644 index 000000000000..b2894f4f3d84 --- /dev/null +++ b/multimedia/avifile/files/extra-patch-include::aviplay.h @@ -0,0 +1,13 @@ +--- include/aviplay.h.orig Fri Aug 6 12:35:41 2004 ++++ include/aviplay.h Fri Aug 6 12:36:36 2004 +@@ -12,8 +12,8 @@ + #include "image.h" + #include "avm_args.h" + +-typedef void (*KILLHANDLER)(int, void* p = 0); +-typedef int (*AUDIOFUNC)(void* srcdata, unsigned int size, void* p = 0); ++typedef void (*KILLHANDLER)(int, void* p); ++typedef int (*AUDIOFUNC)(void* srcdata, unsigned int size, void* p); + + AVM_BEGIN_NAMESPACE; + diff --git a/multimedia/avifile/files/extra-patch-include::avm_map.h b/multimedia/avifile/files/extra-patch-include::avm_map.h new file mode 100644 index 000000000000..521dc866da7f --- /dev/null +++ b/multimedia/avifile/files/extra-patch-include::avm_map.h @@ -0,0 +1,12 @@ +--- include/avm_map.h.orig Fri Aug 6 12:35:41 2004 ++++ include/avm_map.h Fri Aug 6 12:37:10 2004 +@@ -198,7 +198,8 @@ + { + // cast to the needed type - used to prevent internal compiler error + // for old egcc +- avm_map::_Tnode* node = (avm_map::_Tnode*) n; ++ //avm_map::_Tnode* node = (avm_map::_Tnode*) n; ++ _Tnode* node = (_Tnode*) n; + + if(node->entry) + { diff --git a/multimedia/avifile/files/extra-patch-include::avm_stl.h b/multimedia/avifile/files/extra-patch-include::avm_stl.h new file mode 100644 index 000000000000..bc54511d2072 --- /dev/null +++ b/multimedia/avifile/files/extra-patch-include::avm_stl.h @@ -0,0 +1,61 @@ +--- include/avm_stl.h.orig Fri Aug 6 12:35:41 2004 ++++ include/avm_stl.h Fri Aug 6 12:41:47 2004 +@@ -74,6 +74,10 @@ + m_Type = new Type[m_uiCapacity]; + } + ~qring() { delete[] m_Type; } ++ qring(const qring& t) : m_Type(0) ++ { ++ operator=(t); ++ } + qring& operator=(const qring& t) + { + if (this != &t) +@@ -149,7 +153,6 @@ + + // disabled for now + qring() {} +- qring(const qring& t) {} + + uint_t bpos() const { return (m_uiPos > 0) ? m_uiPos - 1 : m_uiCapacity - 1; } + uint_t fpos() const { return (m_uiSize > m_uiPos) ? m_uiPos + m_uiCapacity - m_uiSize: m_uiPos - m_uiSize; } +@@ -167,9 +170,21 @@ + static const uint_t invalid=(uint_t)(~0); + typedef Type* iterator; + typedef const Type* const_iterator; +- vector(int prealloc = 0); ++ vector() ++ :m_Type(0), m_uiCapacity(0), m_uiSize(0) ++ { ++ } ++ ++ vector(int prealloc) ++ :m_Type(0), m_uiCapacity(prealloc), m_uiSize(prealloc) ++ { ++ if (m_uiCapacity > 0 ) ++ m_Type = new Type[m_uiCapacity]; ++ //printf("vector %p (%d)\n", this, m_uiSize); ++ } ++ + // we will not count references - we have to program with this in mind! +- vector(const vector& t) :m_Type(0), m_uiCapacity(0), m_uiSize(0) ++ vector(const vector& t) :m_Type(0) + { + operator=(t); + } +@@ -270,15 +285,6 @@ + uint_t m_uiSize; + void copy(const Type* in, uint_t size, uint_t alloc); + }; +- +-template +-vector::vector(int prealloc) +- :m_Type(0), m_uiCapacity(prealloc), m_uiSize(prealloc) +-{ +- if (m_uiCapacity > 0 ) +- m_Type = new Type[m_uiCapacity]; +- //printf("vector %p (%d)\n", this, m_uiSize); +-} + + template + void vector::remove(const Type& t) diff --git a/multimedia/avifile/files/extra-patch-lib::aviread::AsfNetworkInputStream.cpp b/multimedia/avifile/files/extra-patch-lib::aviread::AsfNetworkInputStream.cpp new file mode 100644 index 000000000000..cabd09eac7f5 --- /dev/null +++ b/multimedia/avifile/files/extra-patch-lib::aviread::AsfNetworkInputStream.cpp @@ -0,0 +1,39 @@ +--- lib/aviread/AsfNetworkInputStream.cpp.orig Fri Aug 6 12:35:40 2004 ++++ lib/aviread/AsfNetworkInputStream.cpp Fri Aug 6 12:46:32 2004 +@@ -793,22 +793,24 @@ + return -1; + } + +-int AsfNetworkInputStream::write(const void* buffer, uint_t size) ++int AsfNetworkInputStream::write(const void* b, uint_t size) + { ++ const char* buffer = (const char*) b; + int wsize = size; + while (wsize > 0) + { + int i = ::write(m_iSocket, buffer, wsize); + if (i <= 0) + return i; +- (const char*)buffer += i; ++ buffer += i; + wsize -= i; + } + return size; + } + +-int AsfNetworkInputStream::dwrite(const void* buffer, uint_t size) ++int AsfNetworkInputStream::dwrite(const void* b, uint_t size) + { ++ const char* buffer = (const char*) b; + if (m_lfd < 0) + { + if (m_lfd == -12345) +@@ -843,7 +845,7 @@ + int i = ::write(m_lfd, buffer, size); + if (i < 0) + return i; +- (const char*)buffer += i; ++ buffer += i; + size -= i; + } + fsync(m_lfd); diff --git a/multimedia/avifile/files/extra-patch-lib::common::image.cpp b/multimedia/avifile/files/extra-patch-lib::common::image.cpp new file mode 100644 index 000000000000..78fc2071406f --- /dev/null +++ b/multimedia/avifile/files/extra-patch-lib::common::image.cpp @@ -0,0 +1,11 @@ +--- lib/common/image.cpp.orig Fri Aug 6 12:35:40 2004 ++++ lib/common/image.cpp Fri Aug 6 12:47:59 2004 +@@ -954,7 +954,7 @@ + fillMembers(); + if (!copy) + { +- (const uint8_t*) m_pPlane[0] = data; ++ m_pPlane[0] = (uint8_t*) data; + } + else + { diff --git a/multimedia/avifile/files/extra-patch-plugins::libmp3lame_audioenc::lame3.70::quantize-pvt.c b/multimedia/avifile/files/extra-patch-plugins::libmp3lame_audioenc::lame3.70::quantize-pvt.c new file mode 100644 index 000000000000..cab500a52c3b --- /dev/null +++ b/multimedia/avifile/files/extra-patch-plugins::libmp3lame_audioenc::lame3.70::quantize-pvt.c @@ -0,0 +1,45 @@ +--- plugins/libmp3lame_audioenc/lame3.70/quantize-pvt.c.orig Fri Aug 6 13:59:16 2004 ++++ plugins/libmp3lame_audioenc/lame3.70/quantize-pvt.c Fri Aug 6 14:11:28 2004 +@@ -976,6 +976,7 @@ + { + int rx[4]; + __asm__ __volatile__( ++ "\n\npush %%edx\n\t" + "\n\nloop1:\n\t" + + "fld" F8type " 0(%1)\n\t" +@@ -1007,18 +1008,18 @@ + "dec %4\n\t" + + "movl %5, %%eax\n\t" +- "movl 4+%5, %%ebx\n\t" ++ "movl 4+%5, %%edx\n\t" + "fxch %%st(1)\n\t" + "fadd" F8type " (%2,%%eax," F8size ")\n\t" + "fxch %%st(3)\n\t" +- "fadd" F8type " (%2,%%ebx," F8size ")\n\t" ++ "fadd" F8type " (%2,%%edx," F8size ")\n\t" + + "movl 8+%5, %%eax\n\t" +- "movl 12+%5, %%ebx\n\t" ++ "movl 12+%5, %%edx\n\t" + "fxch %%st(2)\n\t" + "fadd" F8type " (%2,%%eax," F8size ")\n\t" + "fxch %%st(1)\n\t" +- "fadd" F8type " (%2,%%ebx," F8size ")\n\t" ++ "fadd" F8type " (%2,%%edx," F8size ")\n\t" + + "fxch %%st(3)\n\t" + "fistpl -16(%3)\n\t" +@@ -1028,9 +1029,10 @@ + "fistpl -4(%3)\n\t" + + "jnz loop1\n\n" ++ "pop %%edx\n\n" + : /* no outputs */ + : "t" (istep), "r" (xr), "r" (adj43asm), "r" (ix), "r" (576 / 4), "m" (rx) +- : "%eax", "%ebx", "memory", "cc" ++ : "%eax", "memory", "cc" + ); + } + #elif defined (USE_MSC_ASM) diff --git a/multimedia/avifile/files/extra-patch-plugins::libvorbis::libvorbis.cpp b/multimedia/avifile/files/extra-patch-plugins::libvorbis::libvorbis.cpp new file mode 100644 index 000000000000..ab93f1242631 --- /dev/null +++ b/multimedia/avifile/files/extra-patch-plugins::libvorbis::libvorbis.cpp @@ -0,0 +1,29 @@ +--- plugins/libvorbis/libvorbis.cpp.orig Fri Aug 6 12:35:41 2004 ++++ plugins/libvorbis/libvorbis.cpp Fri Aug 6 12:49:27 2004 +@@ -96,7 +96,7 @@ + op.packet = NULL; + op.b_o_s = 1; /* beginning of stream for first packet */ + op.bytes = hdrsizes[0]; +- (const void*) op.packet = vorbishdr; ++ op.packet = (unsigned char*) vorbishdr; + vorbishdr += op.bytes; + if (vorbis_synthesis_headerin(&vi, &vc, &op) < 0) + { +@@ -106,7 +106,7 @@ + + op.b_o_s = 0; + op.bytes = hdrsizes[1]; +- (const void*) op.packet = vorbishdr; ++ op.packet = (unsigned char*) vorbishdr; + vorbishdr += op.bytes; + if (vorbis_synthesis_headerin(&vi, &vc, &op) < 0) + { +@@ -115,7 +115,7 @@ + } + + op.bytes = hdrsizes[2]; +- (const void*) op.packet = vorbishdr; ++ op.packet = (unsigned char*) vorbishdr; + vorbishdr += op.bytes; + if (vorbis_synthesis_headerin(&vi, &vc, &op) < 0) + {