aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2009-08-12 16:43:17 +0800
committermm <mm@FreeBSD.org>2009-08-12 16:43:17 +0800
commit57f5ab0a7b4e8ac2064d99797a7bce89531d585e (patch)
tree368c3d68bef7f2bcb8ad4a010e36f586efc6aa26 /multimedia
parent33d3a142e56aaafa09ad655489e16f1d21705d54 (diff)
downloadfreebsd-ports-gnome-57f5ab0a7b4e8ac2064d99797a7bce89531d585e.tar.gz
freebsd-ports-gnome-57f5ab0a7b4e8ac2064d99797a7bce89531d585e.tar.zst
freebsd-ports-gnome-57f5ab0a7b4e8ac2064d99797a7bce89531d585e.zip
- Update ffmpeg to 0.5
- Include parts of [1] - Take maintainership PR: ports/134632 [1]
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/ffmpeg/Makefile301
-rw-r--r--multimedia/ffmpeg/distinfo6
-rw-r--r--multimedia/ffmpeg/files/patch-configure60
-rw-r--r--multimedia/ffmpeg/files/patch-libavcodec_Makefile12
-rw-r--r--multimedia/ffmpeg/files/patch-libavcodec_imgconvert.c18
-rw-r--r--multimedia/ffmpeg/files/patch-libavcodec_libx264.c37
-rw-r--r--multimedia/ffmpeg/files/patch-libavdevice-bktr.c14
-rw-r--r--multimedia/ffmpeg/files/patch-libavdevice-oss_audio.c14
-rw-r--r--multimedia/ffmpeg/files/patch-libavformat-udp.c11
-rw-r--r--multimedia/ffmpeg/files/patch-libavutil__bswap.h21
-rw-r--r--multimedia/ffmpeg/files/patch-subdir.mak14
-rw-r--r--multimedia/ffmpeg/files/patch-tkadv2009-00417
-rw-r--r--multimedia/ffmpeg/pkg-plist69
13 files changed, 254 insertions, 340 deletions
diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile
index 6114f8e76569..bd42f0922c8f 100644
--- a/multimedia/ffmpeg/Makefile
+++ b/multimedia/ffmpeg/Makefile
@@ -6,14 +6,15 @@
# $Id: Makefile 77 2008-07-27 21:50:37Z buhnux $
PORTNAME= ffmpeg
-DISTVERSION= 2008-07-27
-PORTREVISION= 11
+PORTVERSION= 0.5
+PORTEPOCH= 1
CATEGORIES= multimedia audio ipv6 net
-MASTER_SITES= ${MASTER_SITE_LOCAL}
-MASTER_SITE_SUBDIR= ahze
+MASTER_SITES= http://ffmpeg.org/releases/
-MAINTAINER= multimedia@FreeBSD.org
-COMMENT= Hyper fast realtime audio/video encoder/converter, streaming server
+MAINTAINER= mm@FreeBSD.org
+COMMENT= Realtime audio/video encoder/converter and streaming server
+
+BUILD_DEPENDS= yasm:${PORTSDIR}/devel/yasm
HAS_CONFIGURE= yes
CONFIGURE_LOG= config.err
@@ -22,29 +23,35 @@ USE_GMAKE= yes
MAKE_JOBS_SAFE= yes
WANT_SDL= yes
-OPTIONS= AMR_NB "AMR narrowband encoder" off \
- AMR_WB "AMR wideband encoder" off \
+OPTIONS= AMR_NB "AMR Narrow Band encoder" off \
+ AMR_WB "AMR Wide Band encoder" off \
+ DIRAC "Dirac codec via libdirac" off \
FAAC "FAAC mp4/aac audio encoder" off \
FAAD "FAAD mp4/aac audio decoder" on \
- GSM "gsm audio codec" off \
+ FFSERVER "Build and install ffserver" on \
+ GSM "GSM audio codec" off \
IPV6 "IPV6 network support" on \
- LAME "lame MP3 codec" off \
- LIBA52 "liba52 support" on \
+ LAME "LAME MP3 encoder" off \
+ OPENJPEG "JPEG 2000 decoder" off \
OPTIMIZED_CFLAGS "Additional optimizations" off \
+ SCHROEDINGER "Dirac codec via libschroedinger" on \
SDL "SDL support (build ffplay)" off \
- THEORA "libtheora support (implies OGG)" on \
- VORBIS "libvorbisenc support (implies OGG)" on \
- X264 "X.264 codec" on \
- XVID "XVID codec" off
-
-COMPAT_HEADERS= libavcodec/avcodec.h \
+ SPEEX "Speex audio decoder" off \
+ THEORA "Theora encoder (implies OGG)" on \
+ VHOOK "Video hook support" off \
+ VORBIS "Vorbis encoder via libvorbis (implies OGG)" on \
+ X264 "H.264 encoder" on \
+ XVID "Xvid encoder via xvidcore" on
+
+COMPAT_HEADERS=libavcodec/avcodec.h \
libavcodec/opt.h \
+ libavcodec/vdpau.h \
+ libavcodec/xvmc.h \
libavdevice/avdevice.h \
+ libavfilter/avfilter.h \
libavformat/avformat.h \
libavformat/avio.h \
- libavformat/rtsp.h \
- libavformat/rtspcodes.h \
- libavutil/adler32.h \
+ libavutil/adler32.h \
libavutil/avstring.h \
libavutil/avutil.h \
libavutil/base64.h \
@@ -57,128 +64,181 @@ COMPAT_HEADERS= libavcodec/avcodec.h \
libavutil/mathematics.h \
libavutil/md5.h \
libavutil/mem.h \
- libavutil/random.h \
+ libavutil/pixfmt.h \
libavutil/rational.h \
libavutil/sha1.h \
libpostproc/postprocess.h \
- libswscale/rgb2rgb.h \
libswscale/swscale.h
.include <bsd.port.pre.mk>
-CONFIGURE_ARGS+=--cc="${CC}" --prefix="${PREFIX}" \
- --disable-debug \
- --enable-memalign-hack \
+CONFIGURE_ARGS+=--prefix="${PREFIX}" \
+ --mandir="${PREFIX}/man" \
--enable-shared \
+ --enable-gpl \
+ --enable-swscale \
--enable-postproc \
+ --enable-avfilter \
+ --enable-avfilter-lavf \
+ --enable-pthreads \
+ --enable-x11grab \
+ --enable-memalign-hack \
+ --cc="${CC}" \
--extra-cflags="${FFMPEG_CFLAGS} -I${LOCALBASE}/include" \
--extra-ldflags="-L${LOCALBASE}/lib ${FFMPEG_LDFLAGS}" \
--extra-libs="${PTHREAD_LIBS}" \
- --enable-gpl \
- --enable-pthreads \
- --enable-swscale \
- --mandir=${PREFIX}/man
-CONFIGURE_ENV+= LANG=C
-MAKE_ENV+= INSTALL="${INSTALL}"
+ --disable-debug
SHLIB_VER= 1
PLIST_SUB= SHLIB_VER=${SHLIB_VER}
USE_LDCONFIG= yes
-##
-DOC_FILES= Changelog README
-# under subdir doc
-DOC_DOCFILES= TODO faq.html ffmpeg-doc.html \
- ffplay-doc.html ffserver-doc.html \
- hooks.html optimization.txt
+DOC_FILES= Changelog COPYING.GPL COPYING.LGPL \
+ CREDITS INSTALL MAINTAINERS README
+# under doc subdirectory
+DOC_DOCFILES= APIchanges avutil.txt faq.html ffmpeg-doc.html \
+ ffmpeg_powerpc_performance_evaluation_howto.txt \
+ ffplay-doc.html ffserver-doc.html general.html \
+ issue_tracker.txt optimization.txt \
+ snow.txt soc.txt swscale.txt TODO
PORTDOCS= *
-## sse hardware vector support
+.ifndef(WITHOUT_FFSERVER)
+USE_RC_SUBR= ffserver
+.endif
+
+# sse hardware vector support
.if (defined(MACHINE_CPU) && ${MACHINE_CPU:Msse} == "sse")
WITH_BUILTIN_VECTOR= yes
+.else
+CONFIGURE_ARGS+= --disable-sse
+.endif
+
+# mmx support
+.if ${MACHINE_CPU:Mmmx} == ""
+CONFIGURE_ARGS+= --disable-mmx
+WITHOUT_BUILTIN_VECTOR= yes
.endif
-##
-## support activation
-##
-## PORTDOCS
+# builtin vector, requires mmx
+.if !defined(WITHOUT_BUILTIN_VECTOR) && defined(WITH_BUILTIN_VECTOR)
+FFMPEG_CFLAGS+= -msse
+.endif
+
+# PORTDOCS
.ifndef(NOPORTDOCS)
-BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html
-MAN1+= ffmpeg.1 ffserver.1
+BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html
+MAN1+= ffmpeg.1
+. ifndef(WITHOUT_FFSERVER)
+MAN1+= ffserver.1
+. endif
.endif
+# optimizations
.ifdef(WITH_OPTIMIZED_CFLAGS)
-CFLAGS:= ${CFLAGS:N-O*} -O3 -ffast-math -fno-finite-math-only -fomit-frame-pointer
+CFLAGS:= ${CFLAGS:N-O*} -O3 -ffast-math -fno-finite-math-only -fomit-frame-pointer
.else
-CFLAGS:= ${CFLAGS:N-O0} -O2
-DEBUG_FLAGS+= -O2
+CFLAGS:= ${CFLAGS:N-O0} -O2
+DEBUG_FLAGS+= -O2
.endif
-## a52
-.if !defined(WITHOUT_LIBA52) && !defined(WITHOUT_A52)
-LIB_DEPENDS+= a52.0:${PORTSDIR}/audio/liba52
+# amr
+.ifdef(WITH_AMR_NB)
+LIB_DEPENDS+= amrnb.3:${PORTSDIR}/audio/libamrnb
+CONFIGURE_ARGS+= --enable-libamr-nb --enable-nonfree
+.else
+CONFIGURE_ARGS+= --disable-libamr-nb
+.endif
-CONFIGURE_ARGS+= --enable-liba52 \
- --enable-liba52bin
-FFMPEG_LDFLAGS+= -la52
+.ifdef(WITH_AMR_WB)
+LIB_DEPENDS+= amrwb.3:${PORTSDIR}/audio/libamrwb
+CONFIGURE_ARGS+= --enable-libamr-wb --enable-nonfree
.else
-CONFIGURE_ARGS+= --disable-liba52
+CONFIGURE_ARGS+= --disable-libamr-wb
.endif
+# dirac
+.ifdef(WITH_DIRAC)
+LIB_DEPENDS+= dirac_encoder.1:${PORTSDIR}/multimedia/dirac
+CONFIGURE_ARGS+= --enable-libdirac
+.else
+CONFIGURE_ARGS+= --disable-libdirac
+.endif
+
+# faac
.ifdef(WITH_FAAC)
-LIB_DEPENDS+= faac.0:${PORTSDIR}/audio/faac
+LIB_DEPENDS+= faac.0:${PORTSDIR}/audio/faac
CONFIGURE_ARGS+= --enable-libfaac
.else
CONFIGURE_ARGS+= --disable-libfaac
.endif
-## faad
+# faad
.ifndef(WITHOUT_FAAD)
-LIB_DEPENDS+= faad.2:${PORTSDIR}/audio/faad
+LIB_DEPENDS+= faad.2:${PORTSDIR}/audio/faad
CONFIGURE_ARGS+= --enable-libfaad \
--enable-libfaadbin
.else
CONFIGURE_ARGS+= --disable-libfaad
.endif
-## amr
-.ifdef(WITH_AMR_NB)
-LIB_DEPENDS+= amrnb.3:${PORTSDIR}/audio/libamrnb
-CONFIGURE_ARGS+= --enable-libamr-nb --enable-nonfree
+# ffserver
+.ifndef(WITHOUT_FFSERVER)
+PLIST_SUB+= FFSERVER=""
.else
-CONFIGURE_ARGS+= --disable-libamr-nb
+PLIST_SUB+= FFSERVER="@comment "
+CONFIGURE_ARGS+= --disable-ffserver
.endif
-.ifdef(WITH_AMR_WB)
-LIB_DEPENDS+= amrwb.3:${PORTSDIR}/audio/libamrwb
-CONFIGURE_ARGS+= --enable-libamr-wb --enable-nonfree
+# gsm
+.ifdef(WITH_GSM)
+LIB_DEPENDS+= gsm.1:${PORTSDIR}/audio/gsm
+CONFIGURE_ARGS+= --enable-libgsm
.else
-CONFIGURE_ARGS+= --disable-libamr-wb
+CONFIGURE_ARGS+= --disable-libgsm
.endif
-USE_RC_SUBR= ffserver
-
-.if ${MACHINE_CPU:Mmmx}==""
-CONFIGURE_ARGS+= --disable-mmx
-
-WITHOUT_BUILTIN_VECTOR= yes
+# vhook
+.if defined(WITH_VHOOK)
+USE_EFL= imlib2
+LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2
+PLIST_SUB+= VHOOK=""
+.else
+CONFIGURE_ARGS+= --disable-vhook
+PLIST_SUB+= VHOOK="@comment "
.endif
-## gsm
-.ifdef(WITH_GSM)
-LIB_DEPENDS+= gsm.1:${PORTSDIR}/audio/gsm
-CONFIGURE_ARGS+= --enable-libgsm
+# ipv6
+.ifndef(WITHOUT_IPV6)
+CONFIGURE_ARGS+= --enable-ipv6
.else
-CONFIGURE_ARGS+= --disable-libgsm
+CONFIGURE_ARGS+= --disable-ipv6
.endif
-## mp3
+
+# mp3
.ifdef(WITH_LAME)
-LIB_DEPENDS+= mp3lame.0:${PORTSDIR}/audio/lame
+LIB_DEPENDS+= mp3lame.0:${PORTSDIR}/audio/lame
CONFIGURE_ARGS+= --enable-libmp3lame
.else
CONFIGURE_ARGS+= --disable-libmp3lame
.endif
-## SDL
+# openjpeg
+.ifdef(WITH_OPENJPEG)
+LIB_DEPENDS+= openjpeg.2:${PORTSDIR}/graphics/openjpeg
+CONFIGURE_ARGS+= --enable-libopenjpeg
+.else
+CONFIGURE_ARGS+= --disable-libopenjpeg
+.endif
+
+# schroedinger
+.ifndef(WITHOUT_SCHROEDINGER)
+LIB_DEPENDS+= schroedinger-1.0.2:${PORTSDIR}/multimedia/schroedinger
+CONFIGURE_ARGS+= --enable-libschroedinger
+.else
+CONFIGURE_ARGS+= --disable-libschroedinger
+.endif
+
+# sdl
.ifdef(WITH_SDL)
USE_SDL+= sdl
PLIST_FILES+= bin/ffplay
@@ -189,19 +249,25 @@ MAN1+= ffplay.1
CONFIGURE_ARGS+= --disable-ffplay
.endif
-## theora
-.if !defined(WITHOUT_THEORA)
-LIB_DEPENDS+= theora.0:${PORTSDIR}/multimedia/libtheora
+# speex
+.ifdef(WITH_SPEEX)
+LIB_DEPENDS+= speex.1:${PORTSDIR}/audio/speex
+CONFIGURE_ARGS+= --enable-libspeex
+.else
+CONFIGURE_ARGS+= --disable-libspeex
+.endif
+# theora
+.ifndef(WITHOUT_THEORA)
+LIB_DEPENDS+= theora.0:${PORTSDIR}/multimedia/libtheora
CONFIGURE_ARGS+= --enable-libtheora
.else
CONFIGURE_ARGS+= --disable-libtheora
.endif
-## vorbis
-.if !defined(WITHOUT_VORBIS)
-LIB_DEPENDS+= vorbisenc.2:${PORTSDIR}/audio/libvorbis
-
+# vorbis
+.ifndef(WITHOUT_VORBIS)
+LIB_DEPENDS+= vorbisenc.2:${PORTSDIR}/audio/libvorbis
CONFIGURE_ARGS+= --enable-libvorbis
FFMPEG_CFLAGS+= -I${LOCALBASE}/include/vorbis
.else
@@ -210,20 +276,15 @@ CONFIGURE_ARGS+= --disable-libvorbis
# x264
.ifndef(WITHOUT_X264)
-LIB_DEPENDS+= x264.65:${PORTSDIR}/multimedia/x264
-
+LIB_DEPENDS+= x264.65:${PORTSDIR}/multimedia/x264
CONFIGURE_ARGS+= --enable-libx264
.else
CONFIGURE_ARGS+= --disable-libx264
.endif
-## builtin vector, requires mmx
-.if !defined(WITHOUT_BUILTIN_VECTOR) && defined(WITH_BUILTIN_VECTOR)
-FFMPEG_CFLAGS+= -msse
-.endif
-## xvid
-.ifdef(WITH_XVID)
-LIB_DEPENDS+= xvidcore.4:${PORTSDIR}/multimedia/xvid
+# xvid
+.ifndef(WITHOUT_XVID)
+LIB_DEPENDS+= xvidcore.4:${PORTSDIR}/multimedia/xvid
CONFIGURE_ARGS+= --enable-libxvid
.else
CONFIGURE_ARGS+= --disable-libxvid
@@ -233,47 +294,22 @@ pre-configure:
.if defined(WITHOUT_OGG) && (!defined(WITHOUT_VORBIS) || !defined(WITHOUT_THEORA))
@${ECHO_MSG} WITH_VORBIS or WITH_THEORA defined, libogg will be built
.endif
-.if defined(WITHOUT_VHOOK) && (defined(WITH_VHOOK_FREETYPE2) || defined(WITH_VHOOK_IMLIB2))
- @${ECHO_MSG} WITH_VHOOK_FREETYPE2 or WITH_VHOOK_IMLIB2 defined, video hooks will be built
-.endif
post-patch:
-# Faad compat
+# faad compat
@${REINPLACE_CMD} -e 's|faacD|NeAACD|' ${WRKSRC}/libavcodec/libfaad.c
# {C,LD}FLAGS safeness
-# fix x264 math, use correct log base 2 from math(3)
-.if ${OSVERSION} <= 601000
- @${REINPLACE_CMD} -E \
- -e 's| log2| log|' \
- ${WRKSRC}/libavcodec/libx264.c
-.endif
- @${REINPLACE_CMD} -e 's|$$(libdir)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
- ${WRKSRC}/common.mak
+ @${REINPLACE_CMD} -e 's|$$(LIBDIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
+ ${WRKSRC}/subdir.mak
@${REINPLACE_CMD} -e 's|/etc/ffserver.conf|${PREFIX}/etc/ffserver.conf|' \
${WRKSRC}/ffserver.c
@${REINPLACE_CMD} -E \
-e "s|(EXTRALIBS[[:space:]]*=)|\1-L${LOCALBASE}/lib |g; \
- s|%%LOCALBASE%%|${LOCALBASE}|g; s|%%SHLIB_VER%%|${SHLIB_VER}|g; \
+ s|%%LOCALBASE%%|${LOCALBASE}|g; \
s|-pthread|${PTHREAD_LIBS}|g" \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
-# force detection of texi2html
-.ifndef(NOPORTDOCS)
- @${REINPLACE_CMD} -E \
- -e 's|^(texi2html=)no|\1yes|' \
- ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
-.endif
- @${REINPLACE_CMD} -e 's|-ldl||' \
- ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
-.if defined(WITH_IMLIB2) && !defined(WITHOUT_IMLIB2)
- @${REINPLACE_CMD} -E \
- -e 's|^(imlib2).*$$|\1=yes|' \
- ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
-.endif
-.if !defined(WITHOUT_IPV6)
- @${REINPLACE_CMD} -E \
- -e 's|^(ipv6).*$$|\1=yes|' \
+ @${REINPLACE_CMD} -e 's|-ldl||; s|$$(LIBMAJOR)|${SHLIB_VER}|g;' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
-.endif
.ifdef(WITH_SDL)
@${REINPLACE_CMD} -E \
-e 's|sdl-config|${SDL_CONFIG}|g' \
@@ -282,17 +318,6 @@ post-patch:
${XARGS} -n 10 ${REINPLACE_CMD} -E \
-e 's|#include <SDL|#include <SDL/SDL|'
.endif
-.if !defined(WITHOUT_BUILTIN_VECTOR) && defined(WITH_BUILTIN_VECTOR)
- @${REINPLACE_CMD} -E \
- -e 's|^([[:space:]]+builtin_vector).*$$|\1=yes|' \
- ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
-.else
- @${REINPLACE_CMD} -E \
- -e 's|^([[:space:]]+builtin_vector).*$$|\1=no|' \
- ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
-.endif
- @${REINPLACE_CMD} -e 's|$$(LIBDIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
- ${WRKSRC}/common.mak
post-configure:
.ifdef(WITHOUT_THEORA)
@@ -302,10 +327,12 @@ post-configure:
.endif
post-install:
+.ifndef(WITHOUT_FFSERVER)
${INSTALL_DATA} ${WRKSRC}/doc/ffserver.conf ${PREFIX}/etc/ffserver.conf-dist
if [ ! -f ${PREFIX}/etc/ffserver.conf ]; then \
${INSTALL_DATA} ${WRKSRC}/doc/ffserver.conf ${PREFIX}/etc; \
fi
+.endif
.ifndef(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
.for FILE in ${DOC_FILES}
diff --git a/multimedia/ffmpeg/distinfo b/multimedia/ffmpeg/distinfo
index d2b1fba2c7ac..69b9b8d7b5ac 100644
--- a/multimedia/ffmpeg/distinfo
+++ b/multimedia/ffmpeg/distinfo
@@ -1,3 +1,3 @@
-MD5 (ffmpeg-2008-07-27.tar.bz2) = 777351947a51778a165ec0559f827387
-SHA256 (ffmpeg-2008-07-27.tar.bz2) = 492a20be1a60910aa1fd1538a56f25ef5b0ecbbd588906d4eb28b3a0bcf004ba
-SIZE (ffmpeg-2008-07-27.tar.bz2) = 2581976
+MD5 (ffmpeg-0.5.tar.bz2) = be8503f15c3b81ba00eb8379ca8dcf33
+SHA256 (ffmpeg-0.5.tar.bz2) = 16de61d7426b1df7aee54b48c16aa728de1ed82f95db5fc4d8886d5d2702d90a
+SIZE (ffmpeg-0.5.tar.bz2) = 2744768
diff --git a/multimedia/ffmpeg/files/patch-configure b/multimedia/ffmpeg/files/patch-configure
deleted file mode 100644
index ce62c6afcb10..000000000000
--- a/multimedia/ffmpeg/files/patch-configure
+++ /dev/null
@@ -1,60 +0,0 @@
---- configure.orig 2008-07-24 06:53:32.000000000 -0400
-+++ configure 2008-08-11 00:23:15.000000000 -0400
-@@ -1596,8 +1596,8 @@ od -A n -t x1 $TMPO | grep -q '42 *49 *4
-
- if check_func dlopen; then
- ldl=
--elif check_func dlopen -ldl; then
-- ldl=-ldl
-+elif check_func dlopen ; then
-+ ldl=
- fi
-
- check_func fork
-@@ -1718,10 +1718,17 @@ fi
- if enabled vhook; then
- check_ldflags -rdynamic
- check_ldflags -export-dynamic
-+ if enabled imlib2; then
-+ check_foo_config imlib2 imlib2 Imlib2.h imlib_load_font
-+ fi
-+ if enabled freetype2; then
-+ check_foo_config freetype2 freetype ft2build.h FT_Init_FreeType
-+ fi
-+else
-+ disable imlib2
-+ disable freetype2
- fi
-
--check_foo_config imlib2 imlib2 Imlib2.h imlib_load_font
--check_foo_config freetype2 freetype ft2build.h FT_Init_FreeType
-
- ##########################################
- # SDL check
-@@ -2072,7 +2079,7 @@ get_version(){
- eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
- lcname=$(tolower $name)
- eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
-- eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
-+ eval echo "${lcname}_VERSION_MAJOR=1" >> config.mak
- }
-
- get_version LIBSWSCALE libswscale/swscale.h
-@@ -2096,7 +2103,7 @@ if enabled shared; then
- echo "SLIB_UNINSTALL_EXTRA_CMD=${SLIB_UNINSTALL_EXTRA_CMD}" >> config.mak
- fi
- echo "LIB_INSTALL_EXTRA_CMD=${LIB_INSTALL_EXTRA_CMD}" >> config.mak
--echo "EXTRALIBS=$extralibs" >> config.mak
-+echo "EXTRALIBS=-L/usr/local/lib -L/usr/local/lib -L/usr/local/lib $extralibs" >> config.mak
-
- print_config ARCH_ $TMPH config.mak $ARCH_LIST
- print_config HAVE_ $TMPH config.mak $HAVE_LIST
-@@ -2206,7 +2213,7 @@ Requires.private: $(enabled shared && ec
- Conflicts:
- Libs: -L\${libdir} -l${shortname} $(disabled shared && echo $libs)
- Libs.private: $(enabled shared && echo $libs)
--Cflags: -I\${includedir}
-+Cflags: -I\${includedir} -I\${includedir}/ffmpeg
- EOF
- cat <<EOF > $name/$name-uninstalled.pc
- prefix=
diff --git a/multimedia/ffmpeg/files/patch-libavcodec_Makefile b/multimedia/ffmpeg/files/patch-libavcodec_Makefile
deleted file mode 100644
index 178aebe3d41a..000000000000
--- a/multimedia/ffmpeg/files/patch-libavcodec_Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
---- libavcodec/Makefile.orig 2008-08-14 14:31:06.000000000 -0400
-+++ libavcodec/Makefile 2008-08-14 14:31:16.000000000 -0400
-@@ -373,9 +373,7 @@ OBJS-$(HAVE_W32THREADS) +
-
- OBJS-$(HAVE_XVMC) += xvmcvideo.o
-
--ifndef CONFIG_SWSCALE
- OBJS += imgresample.o
--endif
-
- # processor-specific code
- ifdef HAVE_MMX
diff --git a/multimedia/ffmpeg/files/patch-libavcodec_imgconvert.c b/multimedia/ffmpeg/files/patch-libavcodec_imgconvert.c
deleted file mode 100644
index 426fd546ffd7..000000000000
--- a/multimedia/ffmpeg/files/patch-libavcodec_imgconvert.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- libavcodec/imgconvert.c.orig 2008-08-14 14:31:37.000000000 -0400
-+++ libavcodec/imgconvert.c 2008-08-14 14:31:54.000000000 -0400
-@@ -2108,7 +2108,6 @@ int img_pad(AVPicture *dst, const AVPict
- }
- #endif
-
--#ifndef CONFIG_SWSCALE
- static uint8_t y_ccir_to_jpeg[256];
- static uint8_t y_jpeg_to_ccir[256];
- static uint8_t c_ccir_to_jpeg[256];
-@@ -2628,7 +2627,6 @@ int img_convert(AVPicture *dst, int dst_
- avpicture_free(tmp);
- return ret;
- }
--#endif
-
- /* NOTE: we scan all the pixels to have an exact information */
- static int get_alpha_info_pal8(const AVPicture *src, int width, int height)
diff --git a/multimedia/ffmpeg/files/patch-libavcodec_libx264.c b/multimedia/ffmpeg/files/patch-libavcodec_libx264.c
deleted file mode 100644
index 5c7de00067b5..000000000000
--- a/multimedia/ffmpeg/files/patch-libavcodec_libx264.c
+++ /dev/null
@@ -1,37 +0,0 @@
---- ./libavcodec/libx264.c.orig 2008-06-12 23:50:13.000000000 +0200
-+++ ./libavcodec/libx264.c 2008-10-13 15:47:05.000000000 +0200
-@@ -124,6 +124,8 @@
- {
- X264Context *x4 = avctx->priv_data;
-
-+ av_freep(&avctx->extradata);
-+
- if(x4->enc)
- x264_encoder_close(x4->enc);
-
-@@ -162,7 +164,7 @@
-
- x4->params.i_bframe = avctx->max_b_frames;
- x4->params.b_cabac = avctx->coder_type == FF_CODER_TYPE_AC;
-- x4->params.b_bframe_adaptive = avctx->b_frame_strategy;
-+ x4->params.i_bframe_adaptive = avctx->b_frame_strategy;
- x4->params.i_bframe_bias = avctx->bframebias;
- x4->params.b_bframe_pyramid = avctx->flags2 & CODEC_FLAG2_BPYRAMID;
- avctx->has_b_frames= avctx->flags2 & CODEC_FLAG2_BPYRAMID ? 2 : !!avctx->max_b_frames;
-@@ -227,8 +229,6 @@
- x4->params.analyse.i_me_range = avctx->me_range;
- x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality;
-
-- x4->params.analyse.b_bidir_me = avctx->bidir_refine > 0;
-- x4->params.analyse.b_bframe_rdo = avctx->flags2 & CODEC_FLAG2_BRDO;
- x4->params.analyse.b_mixed_references =
- avctx->flags2 & CODEC_FLAG2_MIXED_REFS;
- x4->params.analyse.b_chroma_me = avctx->me_cmp & FF_CMP_CHROMA;
-@@ -253,7 +253,6 @@
- x4->params.rc.f_ip_factor = 1/fabs(avctx->i_quant_factor);
- x4->params.rc.f_pb_factor = avctx->b_quant_factor;
- x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
-- x4->params.rc.psz_rc_eq = avctx->rc_eq;
-
- x4->params.analyse.b_psnr = avctx->flags & CODEC_FLAG_PSNR;
- x4->params.i_log_level = X264_LOG_DEBUG;
diff --git a/multimedia/ffmpeg/files/patch-libavdevice-bktr.c b/multimedia/ffmpeg/files/patch-libavdevice-bktr.c
new file mode 100644
index 000000000000..8ed9552eba79
--- /dev/null
+++ b/multimedia/ffmpeg/files/patch-libavdevice-bktr.c
@@ -0,0 +1,14 @@
+--- libavdevice/bktr.c.orig 2009-05-15 17:34:55.000000000 +0200
++++ libavdevice/bktr.c 2009-05-15 17:38:01.000000000 +0200
+@@ -24,6 +24,11 @@
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++typedef unsigned char u_char;
++typedef unsigned short u_short;
++typedef unsigned int u_int;
++typedef unsigned long u_long;
++
+ #define _BSD_SOURCE 1
+ #include "libavformat/avformat.h"
+ #if HAVE_DEV_BKTR_IOCTL_METEOR_H && HAVE_DEV_BKTR_IOCTL_BT848_H
diff --git a/multimedia/ffmpeg/files/patch-libavdevice-oss_audio.c b/multimedia/ffmpeg/files/patch-libavdevice-oss_audio.c
new file mode 100644
index 000000000000..d3428dd5cefc
--- /dev/null
+++ b/multimedia/ffmpeg/files/patch-libavdevice-oss_audio.c
@@ -0,0 +1,14 @@
+--- libavdevice/oss_audio.c.orig 2009-05-15 17:38:35.000000000 +0200
++++ libavdevice/oss_audio.c 2009-05-15 17:41:27.000000000 +0200
+@@ -19,6 +19,11 @@
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
++typedef unsigned char u_char;
++typedef unsigned short u_short;
++typedef unsigned int u_int;
++typedef unsigned long u_long;
++
+ #include "config.h"
+ #include <stdlib.h>
+ #include <stdio.h>
diff --git a/multimedia/ffmpeg/files/patch-libavformat-udp.c b/multimedia/ffmpeg/files/patch-libavformat-udp.c
new file mode 100644
index 000000000000..0042372ae7b5
--- /dev/null
+++ b/multimedia/ffmpeg/files/patch-libavformat-udp.c
@@ -0,0 +1,11 @@
+--- libavformat/udp.c.orig 2009-05-15 17:24:45.000000000 +0200
++++ libavformat/udp.c 2009-05-15 17:27:17.000000000 +0200
+@@ -45,6 +45,8 @@
+ #define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *) (a))[0] == 0xff)
+ #endif
+
++#define IPPROTO_IPV6 41
++
+ typedef struct {
+ int udp_fd;
+ int ttl;
diff --git a/multimedia/ffmpeg/files/patch-libavutil__bswap.h b/multimedia/ffmpeg/files/patch-libavutil__bswap.h
deleted file mode 100644
index 7cbce43f6018..000000000000
--- a/multimedia/ffmpeg/files/patch-libavutil__bswap.h
+++ /dev/null
@@ -1,21 +0,0 @@
---- libavutil/bswap.h.orig Mon Nov 28 22:16:18 2005
-+++ libavutil/bswap.h Mon Nov 28 22:21:22 2005
-@@ -6,8 +6,18 @@
- #ifndef __BSWAP_H__
- #define __BSWAP_H__
-
-+/* to detect __FreeBSD_version */
-+#if (defined(__unix__) || defined(unix)) && !defined(USG)
-+#include <sys/param.h>
-+#endif
-+
- #ifdef HAVE_BYTESWAP_H
- #include <byteswap.h>
-+#elif (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
-+# include <sys/endian.h>
-+# define bswap_16(x) bswap16(x)
-+# define bswap_32(x) bswap32(x)
-+# define bswap_64(x) bswap64(x)
- #else
-
- #ifdef ARCH_X86_64
diff --git a/multimedia/ffmpeg/files/patch-subdir.mak b/multimedia/ffmpeg/files/patch-subdir.mak
deleted file mode 100644
index 873abcc91fb9..000000000000
--- a/multimedia/ffmpeg/files/patch-subdir.mak
+++ /dev/null
@@ -1,14 +0,0 @@
---- subdir.mak.orig 2008-07-27 15:57:37.873013462 -0500
-+++ subdir.mak 2008-07-27 15:58:54.041106334 -0500
-@@ -54,9 +54,9 @@
-
- install-headers::
- install -d "$(INCINSTDIR)"
-- install -d "$(LIBDIR)/pkgconfig"
-+ install -d "$(prefix)/libdata/pkgconfig"
- install -m 644 $(addprefix "$(SRC_DIR)"/,$(HEADERS)) "$(INCINSTDIR)"
-- install -m 644 $(BUILD_ROOT)/lib$(NAME)/lib$(NAME).pc "$(LIBDIR)/pkgconfig"
-+ install -m 644 $(BUILD_ROOT)/lib$(NAME)/lib$(NAME).pc "$(prefix)/libdata/pkgconfig"
-
- uninstall-libs::
- -rm -f "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR)" \
diff --git a/multimedia/ffmpeg/files/patch-tkadv2009-004 b/multimedia/ffmpeg/files/patch-tkadv2009-004
deleted file mode 100644
index 9aeb49b8ee8e..000000000000
--- a/multimedia/ffmpeg/files/patch-tkadv2009-004
+++ /dev/null
@@ -1,17 +0,0 @@
---- libavformat/4xm.c.orig 2008-06-03 20:20:54.000000000 +0400
-+++ libavformat/4xm.c 2009-03-08 23:38:44.000000000 +0300
-@@ -163,10 +163,12 @@
- return AVERROR_INVALIDDATA;
- }
- current_track = AV_RL32(&header[i + 8]);
-+ if((unsigned)current_track >= UINT_MAX / sizeof(AudioTrack) - 1){
-+ av_log(s, AV_LOG_ERROR, "current_track too large\n");
-+ return -1;
-+ }
- if (current_track + 1 > fourxm->track_count) {
- fourxm->track_count = current_track + 1;
-- if((unsigned)fourxm->track_count >= UINT_MAX / sizeof(AudioTrack))
-- return -1;
- fourxm->tracks = av_realloc(fourxm->tracks,
- fourxm->track_count * sizeof(AudioTrack));
- if (!fourxm->tracks) {
diff --git a/multimedia/ffmpeg/pkg-plist b/multimedia/ffmpeg/pkg-plist
index d82870b21498..d624df1b0445 100644
--- a/multimedia/ffmpeg/pkg-plist
+++ b/multimedia/ffmpeg/pkg-plist
@@ -1,10 +1,12 @@
bin/ffmpeg
-bin/ffserver
-etc/ffserver.conf
-etc/ffserver.conf-dist
+%%FFSERVER%%bin/ffserver
+%%FFSERVER%%@unexec if cmp -s %D/etc/ffserver.conf %D/etc/ffserver.conf-dist; then rm -f %D/etc/ffserver.conf; fi
+%%FFSERVER%%etc/ffserver.conf-dist
+%%FFSERVER%%@exec [ -f %B/ffserver.conf ] || cp %B/%f %B/ffserver.conf
include/ffmpeg/adler32.h
include/ffmpeg/avcodec.h
include/ffmpeg/avdevice.h
+include/ffmpeg/avfilter.h
include/ffmpeg/avformat.h
include/ffmpeg/avio.h
include/ffmpeg/avstring.h
@@ -20,21 +22,21 @@ include/ffmpeg/mathematics.h
include/ffmpeg/md5.h
include/ffmpeg/mem.h
include/ffmpeg/opt.h
+include/ffmpeg/pixfmt.h
include/ffmpeg/postprocess.h
-include/ffmpeg/random.h
include/ffmpeg/rational.h
-include/ffmpeg/rgb2rgb.h
-include/ffmpeg/rtsp.h
-include/ffmpeg/rtspcodes.h
include/ffmpeg/sha1.h
include/ffmpeg/swscale.h
+include/ffmpeg/vdpau.h
+include/ffmpeg/xvmc.h
include/libavcodec/avcodec.h
include/libavcodec/opt.h
+include/libavcodec/vdpau.h
+include/libavcodec/xvmc.h
include/libavdevice/avdevice.h
+include/libavfilter/avfilter.h
include/libavformat/avformat.h
include/libavformat/avio.h
-include/libavformat/rtsp.h
-include/libavformat/rtspcodes.h
include/libavutil/adler32.h
include/libavutil/avstring.h
include/libavutil/avutil.h
@@ -48,53 +50,78 @@ include/libavutil/lzo.h
include/libavutil/mathematics.h
include/libavutil/md5.h
include/libavutil/mem.h
+include/libavutil/pixfmt.h
include/libavutil/random.h
include/libavutil/rational.h
include/libavutil/sha1.h
include/libpostproc/postprocess.h
include/postproc/postprocess.h
-include/libswscale/rgb2rgb.h
include/libswscale/swscale.h
lib/libavcodec.a
lib/libavcodec.so
lib/libavcodec.so.1
-lib/libavcodec.so.51.61.0
+lib/libavcodec.so.52.20.0
lib/libavdevice.a
lib/libavdevice.so
lib/libavdevice.so.1
-lib/libavdevice.so.52.0.0
+lib/libavdevice.so.52.1.0
+lib/libavfilter.a
+lib/libavfilter.so
+lib/libavfilter.so.0.4.0
+lib/libavfilter.so.1
lib/libavformat.a
lib/libavformat.so
lib/libavformat.so.1
-lib/libavformat.so.52.18.0
+lib/libavformat.so.52.31.0
lib/libavutil.a
lib/libavutil.so
lib/libavutil.so.1
-lib/libavutil.so.49.7.0
+lib/libavutil.so.49.15.0
lib/libpostproc.a
lib/libpostproc.so
lib/libpostproc.so.1
-lib/libpostproc.so.51.1.0
+lib/libpostproc.so.51.2.0
lib/libswscale.a
lib/libswscale.so
-lib/libswscale.so.0.5.1
+lib/libswscale.so.0.7.1
lib/libswscale.so.1
-lib/vhook/fish.so
-lib/vhook/null.so
-lib/vhook/ppm.so
-lib/vhook/watermark.so
+%%VHOOK%%lib/vhook/drawtext.so
+%%VHOOK%%lib/vhook/fish.so
+%%VHOOK%%lib/vhook/ppm.so
+%%VHOOK%%lib/vhook/imlib2.so
+%%VHOOK%%lib/vhook/null.so
+%%VHOOK%%lib/vhook/watermark.so
libdata/pkgconfig/libavcodec.pc
libdata/pkgconfig/libavdevice.pc
+libdata/pkgconfig/libavfilter.pc
libdata/pkgconfig/libavformat.pc
libdata/pkgconfig/libavutil.pc
libdata/pkgconfig/libpostproc.pc
libdata/pkgconfig/libswscale.pc
-@dirrm lib/vhook
+%%DATADIR%%/libx264-baseline.ffpreset
+%%DATADIR%%/libx264-default.ffpreset
+%%DATADIR%%/libx264-fastfirstpass.ffpreset
+%%DATADIR%%/libx264-hq.ffpreset
+%%DATADIR%%/libx264-ipod320.ffpreset
+%%DATADIR%%/libx264-ipod640.ffpreset
+%%DATADIR%%/libx264-lossless_fast.ffpreset
+%%DATADIR%%/libx264-lossless_max.ffpreset
+%%DATADIR%%/libx264-lossless_medium.ffpreset
+%%DATADIR%%/libx264-lossless_slow.ffpreset
+%%DATADIR%%/libx264-lossless_slower.ffpreset
+%%DATADIR%%/libx264-lossless_ultrafast.ffpreset
+%%DATADIR%%/libx264-main.ffpreset
+%%DATADIR%%/libx264-max.ffpreset
+%%DATADIR%%/libx264-normal.ffpreset
+%%DATADIR%%/libx264-slowfirstpass.ffpreset
+@dirrm %%DATADIR%%
+%%VHOOK%%@dirrm lib/vhook
@dirrm include/postproc
@dirrm include/libswscale
@dirrm include/libpostproc
@dirrm include/libavutil
@dirrm include/libavformat
+@dirrm include/libavfilter
@dirrm include/libavdevice
@dirrm include/libavcodec
@dirrm include/ffmpeg