diff options
Diffstat (limited to 'multimedia')
19 files changed, 481 insertions, 848 deletions
diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index f2021ee2a02e..ca2a97b66a67 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -1,378 +1,318 @@ -# New ports collection makefile for: ffmpeg -# Date created: Tue Sep 25 15:52:09 BRT 2001 +# New ports collection makefile for: ffmpeg cvs +# Date created: Sun May 1 20:46:59 UTC 2005 # Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> # # $FreeBSD$ # PORTNAME= ffmpeg -DISTVERSION= 0.4.9-pre1 -PORTREVISION= 7 -CATEGORIES= multimedia audio net -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED} -MASTER_SITE_SUBDIR= ffmpeg +DISTVERSION= 2007-04-29 +PORTREVISION= 2 +CATEGORIES= multimedia audio ipv6 net +MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= ahze MAINTAINER= multimedia@FreeBSD.org COMMENT= Hyper fast realtime audio/video encoder/converter, streaming server -USE_GETOPT_LONG= yes HAS_CONFIGURE= yes +USE_BZIP2= yes USE_GMAKE= yes WANT_SDL= yes CONFIGURE_ARGS= --cc="${CC}" --prefix="${PREFIX}" \ - --make="${GMAKE}" --enable-shared \ - --extra-ldflags="-L${WRKSRC}/libavcodec -L${WRKSRC}/libavcodec/libpostproc \ - -L${LOCALBASE}/lib -L${X11BASE}/lib " \ - --extra-libs="-lm" \ - --disable-debug + --make="${GMAKE}" \ + --disable-debug \ + --enable-memalign-hack \ + --enable-shared \ + --enable-pp \ + --extra-cflags="-fPIC -DPIC ${CFLAGS} -I${LOCALBASE}/include" \ + --extra-ldflags="-L${LOCALBASE}/lib" \ + --extra-libs="${PTHREAD_LIBS}" \ + --disable-bktr \ + --enable-gpl \ + --enable-pthreads \ + --enable-swscaler +CONFIGURE_ENV+= LANG=C +MAKE_ENV= INSTALL="${INSTALL}" +SHLIB_VER= 1 +PLIST_SUB= SHLIB_VER=${SHLIB_VER} +USE_LDCONFIG= yes -PLIST_SUB= SHLIB_VERSION=${SHLIB_VERSION} -INSTALLS_SHLIB= yes -CONFLICTS= ffmpeg-devel* +CONFLICTS= ffmpeg-[0-9]* -SHLIB_VERSION= 1 -# +MAN1= ffmpeg.1 + +## DOC_FILES= COPYING Changelog README # under subdir doc DOC_DOCFILES= TODO faq.html ffmpeg-doc.html \ ffplay-doc.html ffserver-doc.html \ hooks.html optimization.txt -PORTDOCS= ${DOC_FILES} ${DOC_DOCFILES} -HEADER_FILES= libavcodec/avcodec.h libavcodec/common.h \ - libavcodec/dsputil.h -LIB_FILES= libavcodec/libavcodec.a libavformat/libavformat.a -MAN1= ffmpeg.1 +PORTDOCS= * .include <bsd.port.pre.mk> -.if ${ARCH} == "alpha" -BROKEN= "Does not compile on alpha" +.if ${ARCH}=="amd64" +EXTRA_PATCHES= ${PATCHDIR}/amd64-patch .endif -.if exists(${LOCALBASE}/lib/libavformat.so.0) -BROKEN= Please remove previous version of ${PORTNAME} to continue build +## sse hardware vector support +.if (defined(MACHINE_CPU) && ${MACHINE_CPU:Msse} == "sse") +WITH_BUILTIN_VECTOR= yes .endif ## -## arch detection +## support activation ## -.if ${ARCH} != "i386" -WITHOUT_MMX= yes -.else -# only for i386 -EXTRA_PATCHES+= ${FILESDIR}/extra-bktr-patch-libavformat::Makefile -#. if ${OSVERSION} >= 502000 && !defined(WITH_OPTIMIZED_CFLAGS) -#CFLAGS+=-fomit-frame-pointer -#WITH_OPTIMIZED_CFLAGS=yes -#. endif +## PORTDOCS +.ifndef(NOPORTDOCS) +BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html .endif -## -## system version -## -.if ${OSVERSION} < 500000 -# postprocess libraries cannot be built -OSVERSION4_DONT_WORK=yes +.ifdef(WITH_OPTIMIZED_CFLAGS) +FFMPEG_CFLAGS+= -O3 -ffast-math -fomit-frame-pointer .endif -## lib detection -## -## -## SDL -.if ${HAVE_SDL:Msdl} -WITH_SDL=yes -.endif -## faac -.if exists(${LOCALBASE}/lib/libfaac.so.0) -WITH_FAAC=yes -.endif -## freetype2 -.if exists(${LOCALBASE}/lib/libfreetype.so) -WITH_FREETYPE2=yes -.endif -## imlib2 -.if exists(${X11BASE}/lib/libImlib2.so) -WITH_IMLIB2=yes +## a52 +.if !defined(WITHOUT_LIBA52) && !defined(WITHOUT_A52) +LIB_DEPENDS+= a52.0:${PORTSDIR}/audio/liba52 + +CONFIGURE_ARGS+= --enable-liba52 \ + --enable-liba52bin +FFMPEG_LDFLAGS+= -la52 +.else +CONFIGURE_ARGS+= --disable-liba52 .endif -## lame mp3 -.if exists(${LOCALBASE}/lib/libmp3lame.so.0) -WITH_MP3=yes +## dts +.ifdef(WITH_DTS) || exists(${LOCALBASE}/lib/libdca.a) +LIB_DEPENDS+= dca.0:${PORTSDIR}/multimedia/libdca +CONFIGURE_ARGS+= --enable-libdts .endif -## vorbis -.if exists(${LOCALBASE}/lib/libvorbisenc.so.2) -WITH_VORBIS=yes +## faac +.ifdef(WITH_FAAC) || exists(${LOCALBASE}/lib/libfaac.so) +LIB_DEPENDS+= faac.0:${PORTSDIR}/audio/faac + +CONFIGURE_ARGS+= --enable-libfaac .endif -.if exists(${LOCALBASE}/lib/libfaad.so.0) -WITH_FAAD=yes +## faad +.ifdef(WITH_FAAD) || exists(${LOCALBASE}/lib/libfaad.so) +LIB_DEPENDS+= faad.0:${PORTSDIR}/audio/faad + +CONFIGURE_ARGS+= --enable-libfaad \ + --enable-libfaadbin .endif +USE_RC_SUBR= ffserver +MAN1+= ffserver.1 -## support activation -## -## PORTDOCS -.ifndef(NOPORTDOCS) -BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html +#### BROKEN LIST ##### +WITHOUT_THEORA= yes + +.if ${MACHINE_CPU:Mmmx}=="" +CONFIGURE_ARGS+= --disable-mmx + +WITHOUT_BUILTIN_VECTOR= yes .endif -## disable a52 -#.ifndef(WITHOUT_LIBA52) -#LIB_DEPENDS+= a52.0:${PORTSDIR}/audio/liba52 -# -#CONFIGURE_ARGS+= --enable-a52 \ -# --enable-a52bin -#.else -#CONFIGURE_ARGS+= --enable-a52 \ -# --disable-a52bin -#.endif -GPLLIBS= yes -# --enable-a52bin breaks build -CONFIGURE_ARGS+= --enable-a52 -## enable freetype2 -.if defined(WITH_FREETYPE2) -LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2 +## gsm +.ifdef(WITH_GSM) || exists(${LOCALBASE}/lib/libgsm.so) +LIB_DEPENDS+= gsm.1:${PORTSDIR}/audio/gsm -PLIST_SUB+= DRAWTEXT="" -.else -PLIST_SUB+= DRAWTEXT="@comment " +CONFIGURE_ARGS+= --enable-libgsm .endif -## enable imlib2 -.if !defined(WITHOUT_VHOOK) && defined(WITH_IMLIB2) -LIB_DEPENDS+= Imlib2.4:${PORTSDIR}/graphics/imlib2 +## mp3 +.ifdef(WITH_LAME) || exists(${LOCALBASE}/lib/libmp3lame.so) || defined(WITH_MP3) +LIB_DEPENDS+= mp3lame.0:${PORTSDIR}/audio/lame -PLIST_SUB+= IMLIB2="" -.else -PLIST_SUB+= IMLIB2="@comment " +CONFIGURE_ARGS+= --enable-libmp3lame .endif -## disable mmx -.ifdef(WITHOUT_MMX) -CONFIGURE_ARGS+= --disable-mmx +## ogg +.ifndef(WITHOUT_OGG) || exists(${LOCALBASE}/lib/libogg.so) +LIB_DEPENDS+= ogg.5:${PORTSDIR}/audio/libogg + +CONFIGURE_ARGS+= --enable-libogg .endif + ## SDL -.ifdef(WITH_SDL) -USE_SDL= sdl +.ifdef(WITH_SDL) || ${HAVE_SDL:Msdl} +USE_SDL+= sdl MAN1+= ffplay.1 -PLIST_SUB+= SDL="" +PLIST_FILES+= bin/ffplay .else -PLIST_SUB+= SDL="@comment " +CONFIGURE_ARGS+= --disable-ffplay .endif -## mp3 -.ifdef(WITH_MP3) -LIB_DEPENDS+= mp3lame.0:${PORTSDIR}/audio/lame - -CONFIGURE_ARGS+= --enable-mp3lame -.endif -## optimization -# breaks ffmpeg build if defined -CFLAGS+= -fno-force-addr -.if ${OSVERSION} > 502124 -. ifdef(WITH_OPTIMIZED_CFLAGS) -CONFIGURE_ARGS+= --extra-cflags="-fPIC -DPIC -I${LOCALBASE}/include \ - ${CFLAGS} \ - -I${X11BASE}/include \ - -ffast-math -fomit-frame-pointer -fno-unit-at-a-time" -. else -CONFIGURE_ARGS+= --extra-cflags="-fPIC -DPIC -I${LOCALBASE}/include \ - -I${X11BASE}/include \ - -fomit-frame-pointer -fno-unit-at-a-time" -. endif -.else -. ifdef(WITH_OPTIMIZED_CFLAGS) -CONFIGURE_ARGS+= --extra-cflags="-fPIC -DPIC -I${LOCALBASE}/include \ - ${CFLAGS} \ - -I${X11BASE}/include \ - -ffast-math -fomit-frame-pointer" -. else -CONFIGURE_ARGS+= --extra-cflags="-fPIC -DPIC -I${LOCALBASE}/include \ - -I${X11BASE}/include" -. endif -.endif - -## vhook -.ifndef(WITHOUT_VHOOK) -PLIST_SUB+= VHOOK="" -.else -CONFIGURE_ARGS+= -disable-vhook +.if !defined(WITHOUT_THEORA) +WITH_OGG= yes +LIB_DEPENDS+= theora.2:${PORTSDIR}/multimedia/libtheora -PLIST_SUB+= VHOOK="@comment " +CONFIGURE_ARGS+= --enable-libtheora .endif ## vorbis -.ifdef(WITH_VORBIS) +.if !defined(WITHOUT_VORBIS) +WITH_OGG= yes LIB_DEPENDS+= vorbisenc.2:${PORTSDIR}/audio/libvorbis -CONFIGURE_ARGS+= --enable-vorbis +CONFIGURE_ARGS+= --enable-libvorbis +FFMPEG_CFLAGS+= -I${LOCALBASE}/include/vorbis .endif -## faac -.ifdef(WITH_FAAC) -LIB_DEPENDS+= faac.0:${PORTSDIR}/audio/faac +# x264 +.ifdef(WITH_X264) || exists(${LOCALBASE}/lib/libx264.so) +LIB_DEPENDS+= x264.50:${PORTSDIR}/multimedia/x264 -CONFIGURE_ARGS+= --enable-faac +CONFIGURE_ARGS+= --enable-x264 .endif -## faad -.ifdef(WITH_FAAD) -LIB_DEPENDS+= faad.0:${PORTSDIR}/audio/faad +## builtin vector, requires mmx +.if !defined(WITHOUT_BUILTIN_VECTOR) && defined(WITH_BUILTIN_VECTOR) +FFMPEG_CFLAGS+= -msse +.endif +. ifdef(WITH_FREETYPE2) || exists(${LOCALBASE}/lib/libfreetype.so) +LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2 -CONFIGURE_ARGS+= --enable-faad --enable-faadbin -GPLLIBS= yes -.endif -## GPLLIBS -.ifdef(GPLLIBS) -CONFIGURE_ARGS+= --enable-gpl -.endif -## post processing -.ifndef(WITHOUT_POSTPROCESS) -CONFIGURE_ARGS+= --enable-shared-pp -PLIST_FILES+= include/ffmpeg/postproc/postprocess.h -PLIST_DIRS+= include/ffmpeg/postproc -. ifdef(GPLLIBS) -. ifndef(OSVERSION4_DONT_WORK) -CONFIGURE_ARGS+= --enable-pp - -LIB_POSTPROC= lib/libpostproc.a \ - lib/libpostproc.so \ - lib/libpostproc.so.0 \ - lib/libpostproc.so.${SHLIB_VERSION} -PLIST_FILES+= ${LIB_POSTPROC} -. endif # OSVERSION4_DONT_WORK -. endif -.endif -## ffserver -.ifdef(WITHOUT_FFMPEG_FFSERVER) -CONFIGURE_ARGS+= --disable-ffserver - -PLIST_SUB+= FFSERVER="@comment " -.else -USE_RC_SUBR= yes -MAN1+= ffserver.1 +PLIST_FILES+= lib/vhook/drawtext.so +. endif # freetype2 +. ifdef(WITH_IMLIB2) || exists(${LOCALBASE}/lib/libImlib2.so) +LIB_DEPENDS+= Imlib2.4:${PORTSDIR}/graphics/imlib2 + +PLIST_FILES+= lib/vhook/imlib2.so +. else +WITHOUT_IMLIB2= yes +. endif # imlib2 -PLIST_SUB+= FFSERVER="" +## xvid +.ifdef(WITH_XVID) || exists(${LOCALBASE}/lib/libxvidcore.so) +LIB_DEPENDS+= xvidcore.4:${PORTSDIR}/multimedia/xvid + +CONFIGURE_ARGS+= --enable-xvid .endif -PLIST_DIRS+= include/ffmpeg pre-everything:: -.ifndef(WITH_FREETYPE2) - @${ECHO_MSG} 'Define WITH_FREETYPE2 to enable drawtext FREETYPE2 codec' - @${ECHO_MSG} -.endif -.ifndef(WITHOUT_LIBA52) - @${ECHO_MSG} "You can disable liba52 support by defining WITHOUT_LIBA52" +.ifndef(WITHOUT_A52) + @${ECHO_MSG} 'You can disable liba52 support by defining WITHOUT_LIBA52' @${ECHO_MSG} .endif -.ifndef(WITHOUT_MMX) - @${ECHO_MSG} "Define WITHOUT_MMX if your system does not support MMX" +.ifndef(WITH_DTS) + @${ECHO_MSG} 'Define WITH_DTS to enable DTS codec' @${ECHO_MSG} .endif -.ifndef(WITH_SDL) - @${ECHO_MSG} 'Define WITH_SDL to enable ffplay SDL version' +.ifndef(WITH_FAAC) + @${ECHO_MSG} 'Define WITH_FAAC to enable FAAC codec' @${ECHO_MSG} .endif -.ifndef(WITH_MP3) - @${ECHO_MSG} 'Define WITH_MP3 to enable lame MP3 codec' +.ifndef(WITH_FAAD) + @${ECHO_MSG} 'Define WITH_FAAD to enable FAAD codec' @${ECHO_MSG} .endif -.ifndef(WITH_OPTIMIZED_CFLAGS) - @${ECHO_MSG} 'You can enable additional compilation optimizations' - @${ECHO_MSG} 'by defining WITH_OPTIMIZED_CFLAGS' +.ifndef(WITH_FREETYPE2) + @${ECHO_MSG} 'Define WITH_FREETYPE2 to enable VHOOK drawtext FREETYPE2 codec' @${ECHO_MSG} .endif -.ifndef(WITHOUT_POSTPROCESS) - @${ECHO_MSG} 'You can disable post process support by defining' - @${ECHO_MSG} 'WITHOUT_POSTPROCESS' - @${ECHO_MSG} 'Beware that this might break some ports that require it' +.ifndef(WITHOUT_IPV6) + @${ECHO_MSG} 'Define WITHOUT_IPV6 to disable IPV6 network support' @${ECHO_MSG} .endif -.ifndef(WITHOUT_VHOOK) - @${ECHO_MSG} 'You can disable vhook support by defining WITHOUT_VHOOK' +.ifndef(WITH_LAME) + @${ECHO_MSG} 'Define WITH_LAME to enable lame MP3 codec' @${ECHO_MSG} .endif -.ifndef(WITH_VORBIS) - @${ECHO_MSG} 'Define WITH_VORBIS to enable libvorbisenc VORBIS codec' +.ifndef(WITH_OGG) + @${ECHO_MSG} 'Define WITH_OGG to enable OGG codec' @${ECHO_MSG} .endif -.ifndef(WITH_FAAC) - @${ECHO_MSG} 'Define WITH_FAAC to enable libfaac' +.ifndef(WITH_OPTIMIZED_CFLAGS) + @${ECHO_MSG} 'You can enable additional compilation optimizations' + @${ECHO_MSG} 'by defining WITH_OPTIMIZED_CFLAGS' @${ECHO_MSG} .endif -.ifndef(WITH_FAAD) - @${ECHO_MSG} 'Define WITH_FAAD to enable libfaad codec' +.ifndef(WITH_VORBIS) + @${ECHO_MSG} 'Define WITH_VORBIS to enable libvorbisenc VORBIS codec' @${ECHO_MSG} .endif -.ifndef(WITHOUT_FFMPEG_FFSERVER) - @${ECHO_MSG} 'Define WITHOUT_FFMPEG_FFSERVER to disable ffserver build' +.ifndef(WITH_X264) + @${ECHO_MSG} 'Define WITH_X264 to enable X264 codec' @${ECHO_MSG} .endif -.if ${ARCH} == "i386" -.if !(defined(WITH_BKTR_FORMAT) && defined(WITH_BKTR_DEV)) - @${ECHO_MSG} - @${ECHO_MSG} 'If you want to capture from a bktr(4) supported card' - @${ECHO_MSG} 'you will probably need to set the input device and format' - @${ECHO_MSG} 'You can set WITH_BKTR_FORMAT to NTSC or PAL and you can set' - @${ECHO_MSG} 'WITH_BKTR_DEV to 0, 1, 2 or 3 (1 is usually the tuner)' - @${ECHO_MSG} 'so for a PAL tuner make WITH_BKTR_FORMAT=PAL WITH_BKTR_DEV=1' - @${ECHO_MSG} - @${ECHO_MSG} 'Warning: invalid settings will probably dump cores' +.ifndef(WITH_XVID) + @${ECHO_MSG} 'Define WITH_XVID to enable XVID codec' @${ECHO_MSG} .endif -.endif # ${ARCH} == i386 - -post-extract: -.if ${ARCH} == "i386" -# install booktree extension - @${CP} ${FILESDIR}/grab_bsdbktr.c ${WRKSRC}/libavformat/ -.endif # ${ARCH} == i386 post-patch: +# Faad compat + @${REINPLACE_CMD} -e 's|faacD|NeAACD|' ${WRKSRC}/libavcodec/faad.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/x264.c +.endif + @${REINPLACE_CMD} -e 's|$$(libdir)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \ + ${WRKSRC}/common.mak + @${REINPLACE_CMD} -E \ + -e "s|(EXTRALIBS[[:space:]]*=)|\1-L${LOCALBASE}/lib |g; \ + s|%%LOCALBASE%%|${LOCALBASE}|g; s|%%SHLIB_VER%%|${SHLIB_VER}|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 -.ifndef(WITHOUT_FFMPEG_FFSERVER) - @${SED} -e 's|%%PREFIX%%|${PREFIX}|; s|%%RC_SUBR%%|${RC_SUBR}|' \ - ${FILESDIR}/ffserver.sh >${WRKDIR}/ffserver.sh - @${REINPLACE_CMD} -e "s!/etc/ffserver.conf!${PREFIX}/etc/ffserver.conf!g" \ - ${WRKSRC}/ffserver.c ${WRKSRC}/doc/ffserver-doc.texi - @${REINPLACE_CMD} -e 's!NoDaemon!# NoDaemon!g' \ - ${WRKSRC}/doc/ffserver.conf -.endif -.if ${ARCH} == "i386" -# we support "v4l" per default through Steve O'Hara-Smith's bktr(4) -# patch - @${REINPLACE_CMD} -E -e \ - 's|^(v4l).*$$|\1="yes"|' \ - ${WRKSRC}/configure -.ifdef(WITH_BKTR_FORMAT) - @${REINPLACE_CMD} -e \ - "s!VIDEO_FORMAT NTSC!VIDEO_FORMAT ${WITH_BKTR_FORMAT}!" \ - ${WRKSRC}/libavformat/grab_bsdbktr.c -.endif -.ifdef(WITH_BKTR_DEV) - @${REINPLACE_CMD} -e \ - "s!idev = 0!idev = ${WITH_BKTR_DEV}!" \ - ${WRKSRC}/libavformat/grab_bsdbktr.c -.endif -.endif # ${ARCH} == i386 -# malloc.h was deprecated in favor of stdlib.h - @${FIND} ${WRKSRC} -type f | \ - ${XARGS} -n 10 ${REINPLACE_CMD} -e \ - 's|malloc\.h|stdlib\.h|' -.ifndef(WITHOUT_LIBA52) + @${FIND} ${WRKSRC} -type f -print0 | \ + ${XARGS} -0 -n 5 -x ${REINPLACE_CMD} -E \ + -e 's|malloc\.h|stdlib\.h|' \ + -e 's|^.*please_use_av_log.*$$||' @${REINPLACE_CMD} -e 's|-ldl||' \ - ${WRKSRC}/configure + ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} +.if defined(WITH_IMLIB2) && !defined(WITHOUT_IMLIB2) + @${REINPLACE_CMD} -E \ + -e 's|^(imlib2).*$$|\1=yes|' \ + ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} + @${REINPLACE_CMD} -E \ + -e 's|(-lImlib2)|-L ${LOCALBASE}/lib \1|' \ + ${WRKSRC}/vhook/Makefile +.endif +.if defined(WITH_IPV6) + @${REINPLACE_CMD} -E \ + -e 's|^(ipv6).*$$|\1=yes|' \ + ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} .endif .ifdef(WITH_SDL) @${REINPLACE_CMD} -E \ -e 's|sdl-config|${SDL_CONFIG}|g' \ ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} + @${FIND} ${WRKSRC} -type f | \ + ${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 -pre-build: -.ifndef(WITHOUT_POSTPROCESS) -. ifndef(OSVERSION4_DONT_WORK) - @cd ${WRKSRC}/libavcodec/libpostproc && ${GMAKE} -. endif # OSVERSION4_DONT_WORK +post-configure: +.ifdef(WITH_DTS) + @${REINPLACE_CMD} -E \ + -e 's|-ldts|${LOCALBASE}/lib/libdts_pic.a|' \ + -e 's|(-lx264)|-L${LOCALBASE}/lib \1|' \ + ${WRKSRC}/config.mak \ + ${WRKSRC}/libavcodec/Makefile .endif - +.ifndef(WITH_THEORA) + @${REINPLACE_CMD} -E \ + -e 's|^(CONFIG_LIBTHEORA).*$$|\1=no|' \ + ${WRKSRC}/config.mak +.endif +# shared libraries PIC + @${REINPLACE_CMD} -E \ + -e 's|^(PIC[[:space:]]*=.*)$$|\1 -fpic -fPIC -DPIC|' \ + ${WRKSRC}/config.mak post-install: .ifndef(NOPORTDOCS) @${MKDIR} ${DOCSDIR} @@ -383,40 +323,5 @@ post-install: @${INSTALL_DATA} ${WRKSRC}/doc/${file} ${DOCSDIR} .endfor .endif -.ifndef(WITHOUT_FFMPEG_FFSERVER) - @${INSTALL_DATA} ${WRKSRC}/doc/ffserver.conf \ - ${PREFIX}/etc/ffserver.conf.sample - @${INSTALL_SCRIPT} ${WRKDIR}/ffserver.sh ${PREFIX}/etc/rc.d -.endif -.for file in ${HEADER_FILES} -# fix header references prior to installation - @${REINPLACE_CMD} -e 's|"common.h"|<ffmpeg/common.h>|; \ - s|"avcodec.h"|<ffmpeg/avcodec.h>|' \ - ${WRKSRC}/${file} - @${INSTALL_DATA} ${WRKSRC}/${file} \ - ${PREFIX}/include/ffmpeg/${file:T} -# change headers back so reinstall target works - @${REINPLACE_CMD} -e 's|<ffmpeg/common.h>|"common.h"|; \ - s|<ffmpeg/avcodec.h>|"avcodec.h"|' \ - ${WRKSRC}/${file} -.endfor -.for file in ${LIB_FILES} - @${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/lib/${file:T} -.endfor -.ifndef(WITHOUT_POSTPROCESS) - @${MKDIR} ${PREFIX}/include/ffmpeg/postproc - @${INSTALL_DATA} ${WRKSRC}/libavcodec/libpostproc/postprocess.h \ - ${PREFIX}/include/ffmpeg/postproc/postprocess.h -. ifdef(GPLLIBS) -. ifndef(OSVERSION4_DONT_WORK) -. for lib in libpostproc.a libpostproc.so - @${INSTALL_DATA} ${WRKSRC}/libavcodec/libpostproc/${lib} \ - ${PREFIX}/lib -. endfor - @${LN} -sf libpostproc.so ${PREFIX}/lib/libpostproc.so.0 - @${LN} -sf libpostproc.so ${PREFIX}/lib/libpostproc.so.${SHLIB_VERSION} -. endif # OSVERSION4_DONT_WORK -. endif -.endif .include <bsd.port.post.mk> diff --git a/multimedia/ffmpeg/distinfo b/multimedia/ffmpeg/distinfo index 1331137e7c6d..7d108db8ef8a 100644 --- a/multimedia/ffmpeg/distinfo +++ b/multimedia/ffmpeg/distinfo @@ -1,3 +1,3 @@ -MD5 (ffmpeg-0.4.9-pre1.tar.gz) = ea5587e3c66d50b1503b82ac4179c303 -SHA256 (ffmpeg-0.4.9-pre1.tar.gz) = 0e9e771114a75c461e813538f129eb05a251b8fc6591a5563420700b8e312da0 -SIZE (ffmpeg-0.4.9-pre1.tar.gz) = 1611332 +MD5 (ffmpeg-2007-04-29.tar.bz2) = ba24faba9b09397a241ec7bac52282f5 +SHA256 (ffmpeg-2007-04-29.tar.bz2) = 708dcb08e4aaad7e66a803caaca22af1fa1572749bd8c398a0a1871a48c5ee03 +SIZE (ffmpeg-2007-04-29.tar.bz2) = 2234128 diff --git a/multimedia/ffmpeg/files/amd64-patch b/multimedia/ffmpeg/files/amd64-patch new file mode 100644 index 000000000000..db2116a39116 --- /dev/null +++ b/multimedia/ffmpeg/files/amd64-patch @@ -0,0 +1,55 @@ +$OpenBSD: patch-libavcodec_mpegvideo_c,v 1.1 2007/01/23 09:34:45 robert Exp $ +--- libavcodec/mpegvideo.c.orig Sat Dec 23 05:05:36 2006 ++++ libavcodec/mpegvideo.c Tue Jan 2 18:22:01 2007 +@@ -4837,7 +4837,7 @@ static int pre_estimate_motion_thread(AV + static int estimate_motion_thread(AVCodecContext *c, void *arg){ + MpegEncContext *s= arg; + +- ff_check_alignment(); ++ /*ff_check_alignment();*/ + + s->me.dia_size= s->avctx->dia_size; + s->first_slice_line=1; +@@ -4865,7 +4865,7 @@ static int mb_var_thread(AVCodecContext + MpegEncContext *s= arg; + int mb_x, mb_y; + +- ff_check_alignment(); ++ /*ff_check_alignment();*/ + + for(mb_y=s->start_mb_y; mb_y < s->end_mb_y; mb_y++) { + for(mb_x=0; mb_x < s->mb_width; mb_x++) { +@@ -4914,7 +4914,7 @@ static int encode_thread(AVCodecContext + PutBitContext pb[2], pb2[2], tex_pb[2]; + //printf("%d->%d\n", s->resync_mb_y, s->end_mb_y); + +- ff_check_alignment(); ++ /*ff_check_alignment();*/ + + for(i=0; i<2; i++){ + init_put_bits(&pb [i], bit_buf [i], MAX_MB_BYTES); +--- libavcodec/dsputil.c.orig Wed Apr 18 09:42:55 2007 ++++ libavcodec/dsputil.c Wed Apr 18 10:16:01 2007 +@@ -3814,6 +3814,7 @@ + for(i=0; i<64; i++) inv_zigzag_direct16[ff_zigzag_direct[i]]= i+1; + } + ++/* + int ff_check_alignment(void){ + static int did_fail=0; + DECLARE_ALIGNED_16(int, aligned); +@@ -3832,12 +3833,12 @@ + } + return 0; + } +- ++*/ + void dsputil_init(DSPContext* c, AVCodecContext *avctx) + { + int i; + +- ff_check_alignment(); ++ /*ff_check_alignment();*/ + + #ifdef CONFIG_ENCODERS + if(avctx->dct_algo==FF_DCT_FASTINT) { diff --git a/multimedia/ffmpeg/files/extra-bktr-patch-libavformat::Makefile b/multimedia/ffmpeg/files/extra-bktr-patch-libavformat::Makefile deleted file mode 100644 index 25f7c23de3a0..000000000000 --- a/multimedia/ffmpeg/files/extra-bktr-patch-libavformat::Makefile +++ /dev/null @@ -1,11 +0,0 @@ ---- libavformat/Makefile.orig Wed Jan 1 21:00:22 2003 -+++ libavformat/Makefile Wed Jan 1 21:01:27 2003 -@@ -21,7 +21,7 @@ - endif - - ifeq ($(CONFIG_VIDEO4LINUX),yes) --OBJS+= grab.o -+OBJS+= grab_bsdbktr.o - endif - - ifeq ($(CONFIG_AUDIO_OSS),yes) diff --git a/multimedia/ffmpeg/files/ffserver.sh b/multimedia/ffmpeg/files/ffserver.in index 8313b678a546..32faeb58296d 100644 --- a/multimedia/ffmpeg/files/ffserver.sh +++ b/multimedia/ffmpeg/files/ffserver.in @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/multimedia/ffmpeg/files/Attic/ffserver.sh,v 1.3 2006-02-20 20:47:17 dougb Exp $ +# $FreeBSD$ # # PROVIDE: ffserver @@ -8,7 +8,7 @@ # KEYWORD: shutdown # -# Add the following lines to /etc/rc.conf to enable ffserver: +# Add the following lines to /etc/rc.conf to enable ffserver: # #ffserver_enable="YES" # diff --git a/multimedia/ffmpeg/files/grab_bsdbktr.c b/multimedia/ffmpeg/files/grab_bsdbktr.c deleted file mode 100644 index 21111c827e44..000000000000 --- a/multimedia/ffmpeg/files/grab_bsdbktr.c +++ /dev/null @@ -1,328 +0,0 @@ -/* - * FreeBSD video grab interface - * Copyright (c) 2002,2003,2004,2005 Steve O'Hara-Smith - * based on - * Linux video grab interface - * Copyright (c) 2000,2001 Gerard Lantau. - * and - * simple_grab.c Copyright (c) 1999 Roger Hardiman - * - * GPL virus inherited: - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#include "avformat.h" -#if defined __DragonFly__ -#include <dev/video/meteor/ioctl_meteor.h> -#include <dev/video/bktr/ioctl_bt848.h> -#else -#if __FreeBSD__ >= 502100 -#include <dev/bktr/ioctl_meteor.h> -#include <dev/bktr/ioctl_bt848.h> -#else -#include <machine/ioctl_meteor.h> -#include <machine/ioctl_bt848.h> -#endif -#endif -#include <unistd.h> -#include <fcntl.h> -#include <sys/ioctl.h> -#include <sys/mman.h> -#include <sys/time.h> -#include <signal.h> - -typedef struct { - int fd; - int tuner_fd; - int frame_format; /* see VIDEO_PALETTE_xxx */ - int width, height; - int frame_rate; - int frame_rate_base; - int64_t per_frame; -} VideoData; - -const char *video_device = "/dev/bktr0"; - -#define PAL 1 -#define PALBDGHI 1 -#define NTSC 2 -#define NTSCM 2 -#define SECAM 3 -#define PALN 4 -#define PALM 5 -#define NTSCJ 6 - -/* PAL is 768 x 576. NTSC is 640 x 480 */ -#define PAL_HEIGHT 576 -#define SECAM_HEIGHT 576 -#define NTSC_HEIGHT 480 - -#ifndef VIDEO_FORMAT -#define VIDEO_FORMAT NTSC -#endif - -static int bktr_dev[] = { METEOR_DEV0, METEOR_DEV1, METEOR_DEV2, - METEOR_DEV3, METEOR_DEV_SVIDEO }; - -static u_int8_t *video_buf; -static int nsignals = 0; -static void catchsignal(int signal) -{ - nsignals++; - return; -} - -static int bktr_init (const char *video_device, int width, int height, - int format, u_int8_t **video_buf, int *video_fd, int *tuner_fd, - int idev, double frequency) -{ - struct meteor_geomet geo; - int h_max; - long ioctl_frequency; - char *arg; - int c; - struct sigaction act,old; - - if (idev < 0 || idev > 4) - { - arg = getenv ("BKTR_DEV"); - if (arg) - idev = atoi (arg); - if (idev < 0 || idev > 4) - idev = 0; - } - - if (format < 1 || format > 6) - { - arg = getenv ("BKTR_FORMAT"); - if (arg) - format = atoi (arg); - if (format < 1 || format > 6) - format = VIDEO_FORMAT; - } - - if (frequency <= 0) - { - arg = getenv ("BKTR_FREQUENCY"); - if (arg) - frequency = atof (arg); - if (frequency <= 0) - frequency = 0.0; - } - - memset(&act,0,sizeof(act)); - sigemptyset(&act.sa_mask); - act.sa_handler = catchsignal; - sigaction(SIGUSR1,&act,&old); - - *tuner_fd = open ("/dev/tuner0", O_RDONLY); - if (*tuner_fd < 0) { - perror("Warning: Tuner not opened continuing"); - } - - *video_fd = open (video_device, O_RDONLY); - if (*video_fd < 0) { - perror (video_device); - return -1; - } - - geo.rows = height; - geo.columns = width; - geo.frames = 1; - geo.oformat = METEOR_GEO_YUV_PACKED; - - switch (format) { - case PAL: h_max = PAL_HEIGHT; c = BT848_IFORM_F_PALBDGHI; break; - case PALN: h_max = PAL_HEIGHT; c = BT848_IFORM_F_PALN; break; - case PALM: h_max = PAL_HEIGHT; c = BT848_IFORM_F_PALM; break; - case SECAM: h_max = SECAM_HEIGHT; c = BT848_IFORM_F_SECAM; break; - case NTSC: h_max = NTSC_HEIGHT; c = BT848_IFORM_F_NTSCM; break; - case NTSCJ: h_max = NTSC_HEIGHT; c = BT848_IFORM_F_NTSCJ; break; - default: h_max = PAL_HEIGHT; c = BT848_IFORM_F_PALBDGHI; break; - } - if (height <= h_max/2) { - geo.oformat |= METEOR_GEO_EVEN_ONLY; - } - - if (ioctl(*video_fd, METEORSETGEO, &geo) < 0) { - perror ("METEORSETGEO"); - return -1; - } - - if (ioctl(*video_fd, BT848SFMT, &c) < 0) { - perror ("BT848SFMT"); - return -1; - } - - c = bktr_dev[idev]; - if (ioctl(*video_fd, METEORSINPUT, &c) < 0) { - perror ("METEORSINPUT"); - return -1; - } - *video_buf = (u_int8_t *) mmap((void *) 0, width*height*2, - PROT_READ, MAP_SHARED, *video_fd, (off_t) 0); - if (*video_buf == MAP_FAILED) { - perror ("mmap"); - return -1; - } - if (frequency != 0.0) { - ioctl_frequency = (unsigned long)(frequency*16); - if (*tuner_fd > 0) - { - if (ioctl(*tuner_fd, TVTUNER_SETFREQ, &ioctl_frequency)<0) - perror("TVTUNER_SETFREQ"); - } - } - c = METEOR_CAP_CONTINOUS; - ioctl(*video_fd, METEORCAPTUR, &c); - c = SIGUSR1; - ioctl (*video_fd, METEORSSIGNAL, &c); - return 0; -} - -static void bktr_getframe(u_int64_t per_frame) -{ - u_int64_t curtime; - static u_int64_t last_frame_time = 0; - - curtime = av_gettime(); - if (!last_frame_time) - last_frame_time = curtime; - - if (!last_frame_time - || ((last_frame_time + per_frame) > curtime)) { - if (!usleep (last_frame_time + per_frame + per_frame/2 + per_frame/4 - curtime)) { - if (!nsignals) - printf ("\nSLEPT NO signals - %d microseconds late\n", - (int) (av_gettime() - last_frame_time - per_frame)); - } - } - nsignals = 0; - - last_frame_time = curtime; -} - -void bf_memcpy (char *dest, char *src, int size) -{ - while (size -= 2) - { - dest[0] = src[1]; - dest[1] = src[0]; - dest += 2; - src += 2; - } -} - -/* note: we support only one picture read at a time */ -static int grab_read_packet(AVFormatContext *s1, AVPacket *pkt) -{ - VideoData *s = s1->priv_data; - int size, halfsize; - - size = s->width * s->height; - halfsize = size << 1; - - if (av_new_packet(pkt, size + size) < 0) - return -AVERROR_IO; - - bktr_getframe (s->per_frame); - pkt->pts = av_gettime() & ((1LL << 48) - 1); - bf_memcpy (pkt->data, video_buf, size + size); - - return size + size; -} - -static int grab_read_header (AVFormatContext *s1, AVFormatParameters *ap) -{ - VideoData *s = s1->priv_data; - AVStream *st; - int width, height; - int frame_rate; - int frame_rate_base; - int format = -1; - - if (!ap || ap->width <= 0 || ap->height <= 0 || ap->frame_rate <= 0) - return -1; - - width = ap->width; - height = ap->height; - frame_rate = ap->frame_rate; - frame_rate_base = ap->frame_rate_base; - - st = av_new_stream(s1, 0); - if (!st) - return -ENOMEM; - - s->width = width; - s->height = height; - s->frame_rate = frame_rate; - s->frame_rate_base = frame_rate_base; - s->per_frame = ((int64_t)1000000 * s->frame_rate_base) / s->frame_rate; - - st->codec.codec_type = CODEC_TYPE_VIDEO; - st->codec.pix_fmt = PIX_FMT_YUV422; - st->codec.codec_id = CODEC_ID_RAWVIDEO; - st->codec.width = width; - st->codec.height = height; - st->codec.frame_rate = frame_rate; - st->codec.frame_rate_base = frame_rate_base; - - av_set_pts_info(st, 48, 1, 1000000); /* 48 bits pts in use */ - - if (ap->standard) { - if (!strcasecmp(ap->standard, "pal")) - format = PAL; - if (!strcasecmp(ap->standard, "secam")) - format = SECAM; - if (!strcasecmp(ap->standard, "ntsc")) - format = NTSC; - } - - if (bktr_init (video_device, width, height, format, &video_buf, - &(s->fd), &(s->tuner_fd), -1, 0.0) < 0) - return -AVERROR_IO; - return 0; -} - -static int grab_read_close (AVFormatContext *s1) -{ - VideoData *s = s1->priv_data; - - int c = METEOR_CAP_STOP_CONT; - ioctl(s->fd, METEORCAPTUR, &c); - c = METEOR_SIG_MODE_MASK; - ioctl(s->fd, METEORSSIGNAL, &c); - close(s->fd); - close(s->tuner_fd); - munmap((void *)video_buf, sizeof(video_buf)); - return 0; -} - -AVInputFormat video_grab_device_format = { - "video4linux", - "video grab", - sizeof(VideoData), - NULL, - grab_read_header, - grab_read_packet, - grab_read_close, - flags: AVFMT_NOFILE, -}; - -int video_grab_init(void) -{ - av_register_input_format(&video_grab_device_format); - return 0; -} diff --git a/multimedia/ffmpeg/files/patch-Makefile b/multimedia/ffmpeg/files/patch-Makefile deleted file mode 100644 index a04053123a5f..000000000000 --- a/multimedia/ffmpeg/files/patch-Makefile +++ /dev/null @@ -1,14 +0,0 @@ ---- Makefile.orig Sat Jul 17 11:05:15 2004 -+++ Makefile Sat Jul 17 11:04:42 2004 -@@ -81,8 +81,9 @@ - all: lib $(PROG) $(PROGTEST) $(VHOOK) $(QTFASTSTART) $(DOC) - - lib: -- $(MAKE) -C libavcodec all -- $(MAKE) -C libavformat all -+ $(MAKE) LDFLAGS="$(LDFLAGS)" -C libavcodec all -+ $(MAKE) LDFLAGS="$(LDFLAGS)" -C libavformat all -+ - - ffmpeg_g$(EXESUF): ffmpeg.o cmdutils.o .libs - $(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(FFLIBS) $(EXTRALIBS) diff --git a/multimedia/ffmpeg/files/patch-configure b/multimedia/ffmpeg/files/patch-configure index 8aa0caaa7940..1aca92796ad9 100644 --- a/multimedia/ffmpeg/files/patch-configure +++ b/multimedia/ffmpeg/files/patch-configure @@ -1,29 +1,117 @@ ---- configure.orig Mon Jul 5 15:05:54 2004 -+++ configure Sun Dec 5 15:49:57 2004 -@@ -88,7 +88,7 @@ - mandir="" - bindir="" - cross_prefix="" --cc="gcc" -+cc="$CC" - ar="ar" - ranlib="ranlib" - make="make" -@@ -187,7 +187,7 @@ - BeOS) - prefix="/boot/home/config" - # helps building libavcodec --CFLAGS="-DPIC -fomit-frame-pointer" -+CFLAGS="$CFLAGS -DPIC -fomit-frame-pointer" - # 3 gcc releases known for BeOS, each with ugly bugs - gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`" - case "$gcc_version" in -@@ -857,7 +857,7 @@ +--- configure.orig Fri Apr 27 03:13:50 2007 ++++ configure Thu May 3 09:28:33 2007 +@@ -208,11 +208,11 @@ + + # "tr '[a-z]' '[A-Z]'" is a workaround for Solaris tr not grokking "tr a-z A-Z" + toupper(){ +- echo "$@" | tr '[a-z]' '[A-Z]' ++ echo "$@" | tr '[:lower:]' '[:upper:]' + } + + tolower(){ +- echo "$@" | tr '[A-Z]' '[a-z]' ++ echo "$@" | tr '[:upper:]' '[:lower:]' + } + + set_all(){ +@@ -986,15 +986,9 @@ + enable fast_unaligned + ;; + x86_64|amd64) +- arch="x86_32" + enable fast_unaligned +- canon_arch="`$cc -dumpmachine | sed -e 's,\([^-]*\)-.*,\1,'`" +- if [ x"$canon_arch" = x"x86_64" -o x"$canon_arch" = x"amd64" ]; then +- if [ -z "`echo $CFLAGS | grep -- -m32`" ]; then +- arch="x86_64" +- enable fast_64bit +- fi +- fi ++ arch="x86_64" ++ enable fast_64bit + ;; + # armv4l is a subset of armv[567]*l + arm|armv[4567]*l) +@@ -1591,7 +1585,7 @@ + enabled amr_nb && require libamrnb amrnb/interf_dec.h Speech_Decode_Frame_init -lamrnb -lm + enabled amr_wb && require libamrwb amrwb/dec_if.h D_IF_init -lamrwb -lm + enabled liba52 && require liba52 a52dec/a52.h a52_init -la52 +-enabled libdts && require libdts dts.h dts_init -ldts -lm ++enabled libdts && require libdca dca.h dca_init -ldca -lm + enabled libgsm && require libgsm gsm.h gsm_create -lgsm + enabled libmp3lame && require LAME lame/lame.h lame_init -lmp3lame -lm + enabled libtheora && require libtheora theora/theora.h theora_info_init -ltheora -logg +@@ -1749,14 +1743,14 @@ + # not all compilers support -Os + test "$optimize" = "small" && check_cflags -Os + +-if enabled optimize; then +- if test -n "`$cc -v 2>&1 | grep xlc`"; then +- add_cflags "-O5" +- add_ldflags "-O5" +- else +- add_cflags "-O3" +- fi +-fi ++#if enabled optimize; then ++# if test -n "`$cc -v 2>&1 | grep xlc`"; then ++# add_cflags "-O5" ++# add_ldflags "-O5" ++# else ++# add_cflags "-O3" ++# fi ++#fi + + # PIC flags for shared library objects where they are needed + if enabled shared; then +@@ -1965,15 +1959,15 @@ + if enabled shared; then + echo "BUILD_SHARED=yes" >> config.mak + echo "PIC=-fPIC -DPIC" >> config.mak +- echo "SPPMAJOR=${pp_version%%.*}" >> config.mak ++ echo "SPPMAJOR=1" >> config.mak + echo "SPPVERSION=$pp_version" >> config.mak +- echo "LAVCMAJOR=${lavc_version%%.*}" >> config.mak ++ echo "LAVCMAJOR=%%SHLIB_VER%%" >> config.mak + echo "LAVCVERSION=$lavc_version" >> config.mak +- echo "LAVFMAJOR=${lavf_version%%.*}" >> config.mak ++ echo "LAVFMAJOR=%%SHLIB_VER%%" >> config.mak + echo "LAVFVERSION=$lavf_version" >> config.mak +- echo "LAVUMAJOR=${lavu_version%%.*}" >> config.mak ++ echo "LAVUMAJOR=%%SHLIB_VER%%" >> config.mak + echo "LAVUVERSION=$lavu_version" >> config.mak +- echo "SWSMAJOR=${sws_version%%.*}" >> config.mak ++ echo "SWSMAJOR=%%SHLIB_VER%%" >> config.mak + echo "SWSVERSION=$sws_version" >> config.mak + echo "SLIBNAME=${SLIBNAME}" >> config.mak + echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak +@@ -2001,7 +1995,7 @@ + + echo "SRC_PATH=\"$source_path\"" >> config.mak + echo "SRC_PATH_BARE=$source_path" >> config.mak +-echo "BUILD_ROOT=\"$PWD\"" >> config.mak ++echo "BUILD_ROOT=\"$(pwd)\"" >> config.mak + + # Apparently it's not possible to portably echo a backslash. + if enabled asmalign_pot; then +@@ -2095,8 +2089,8 @@ + Version: $version + Requires: $requires + Conflicts: +-Libs: -L\${libdir} $libs +-Cflags: -I\${includedir} -I\${includedir}/$include ++Libs: -L\${libdir} $libs -L%%LOCALBASE%%/lib ++Cflags: -I\${includedir} -I\${includedir}/$include -I%%LOCALBASE%%/include EOF + } - imlib2=no --if $cc -o $TMPE $TMPC -lImlib2 -lm > /dev/null 2>&1 ; then -+if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -lImlib2 -lm > /dev/null 2>&1 ; then - imlib2=yes - fi +@@ -2119,7 +2113,8 @@ + Requires: $requires + Conflicts: + Libs: \${libdir}/${LIBPREF}${shortname}${LIBSUF} $libs +-Cflags: -I\${includedir} ++Ldflags: -L%%LOCALBASE%%/lib ++Cflags: -I\${includedir} -I%%LOCALBASE%%/include + EOF + } diff --git a/multimedia/ffmpeg/files/patch-libavcode_imgconvert.c b/multimedia/ffmpeg/files/patch-libavcode_imgconvert.c new file mode 100644 index 000000000000..5a985ae7be0f --- /dev/null +++ b/multimedia/ffmpeg/files/patch-libavcode_imgconvert.c @@ -0,0 +1,18 @@ +--- libavcodec/imgconvert.c.orig Thu May 3 09:07:28 2007 ++++ libavcodec/imgconvert.c Thu May 3 09:08:25 2007 +@@ -2319,7 +2319,6 @@ + } + #endif + +-#ifndef CONFIG_SWSCALER + /* XXX: always use linesize. Return -1 if not supported */ + int img_convert(AVPicture *dst, int dst_pix_fmt, + const AVPicture *src, int src_pix_fmt, +@@ -2561,7 +2560,6 @@ + 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::Makefile b/multimedia/ffmpeg/files/patch-libavcodec::Makefile deleted file mode 100644 index 4ed42ea46e9d..000000000000 --- a/multimedia/ffmpeg/files/patch-libavcodec::Makefile +++ /dev/null @@ -1,22 +0,0 @@ ---- libavcodec/Makefile.orig Sat Jul 17 11:07:57 2004 -+++ libavcodec/Makefile Sat Jul 17 11:09:21 2004 -@@ -197,7 +197,7 @@ - $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) - -lib /machine:i386 /def:$(@:.dll=.def) - else -- $(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) $(LDFLAGS) -+ $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) - endif - - dsputil.o: dsputil.c dsputil.h -@@ -269,8 +269,8 @@ - install -s -m 755 $(SLIB) "$(prefix)" - else - install -d $(prefix)/lib -- install -s -m 755 $(SLIB) $(prefix)/lib/libavcodec-$(VERSION).so -- ln -sf libavcodec-$(VERSION).so $(prefix)/lib/libavcodec.so -+ install -s -m 755 $(SLIB) $(prefix)/lib/libavcodec.so.1 -+ cd $(prefix)/lib && ln -s libavcodec.so.1 libavcodec.so - ldconfig || true - endif - else diff --git a/multimedia/ffmpeg/files/patch-libavcodec::alpha::simple_idct_alpha.c b/multimedia/ffmpeg/files/patch-libavcodec::alpha::simple_idct_alpha.c deleted file mode 100644 index 9595454fd081..000000000000 --- a/multimedia/ffmpeg/files/patch-libavcodec::alpha::simple_idct_alpha.c +++ /dev/null @@ -1,19 +0,0 @@ ---- libavcodec/alpha/simple_idct_alpha.c.bak Fri Dec 27 12:35:23 2002 -+++ libavcodec/alpha/simple_idct_alpha.c Tue May 13 21:21:42 2003 -@@ -24,8 +24,16 @@ - * and Falk Hueffner <falk@debian.org> - */ - -+#if (defined(__unix__) || defined(unix)) && !defined(USG) -+#include <sys/param.h> -+#endif -+ - #include "asm.h" - #include "../dsputil.h" -+ -+#if defined(__FreeBSD__) && __FreeBSD_version < 500000 -+typedef __int32_t int_fast32_t; -+#endif - - extern void (*put_pixels_clamped_axp_p)(const DCTELEM *block, uint8_t *pixels, - int line_size); diff --git a/multimedia/ffmpeg/files/patch-libavcodec::bswap.h b/multimedia/ffmpeg/files/patch-libavcodec::bswap.h deleted file mode 100644 index 8bef16c36abc..000000000000 --- a/multimedia/ffmpeg/files/patch-libavcodec::bswap.h +++ /dev/null @@ -1,53 +0,0 @@ ---- libavcodec/bswap.h.orig Sun Dec 5 16:03:35 2004 -+++ libavcodec/bswap.h Sun Dec 5 16:06:48 2004 -@@ -10,6 +10,14 @@ - #include <byteswap.h> - #else - -+#if (defined(__unix__) || defined(unix)) && !defined(USG) -+#include <sys/param.h> -+#endif -+ -+#if defined(__FreeBSD__) && __FreeBSD_version >= 470000 -+#include <sys/endian.h> -+#endif -+ - #ifdef ARCH_X86 - static inline unsigned short ByteSwap16(unsigned short x) - { -@@ -18,7 +26,11 @@ - "0" (x)); - return x; - } -+#if defined(__FreeBSD__) && __FreeBSD_version >= 470000 -+#define bswap_16(x) (be16toh(x)) -+#else - #define bswap_16(x) ByteSwap16(x) -+#endif - - static inline unsigned int ByteSwap32(unsigned int x) - { -@@ -34,7 +46,11 @@ - "0" (x)); - return x; - } -+#if defined(__FreeBSD__) && __FreeBSD_version >= 470000 -+#define bswap_32(x) (be32toh(x)) -+#else - #define bswap_32(x) ByteSwap32(x) -+#endif - - static inline unsigned long long int ByteSwap64(unsigned long long int x) - { -@@ -45,7 +61,11 @@ - "0"(bswap_32((unsigned long)x)),"1"(bswap_32((unsigned long)(x>>32)))); - return __x.__ll; - } -+#if defined(__FreeBSD__) && __FreeBSD_version >= 510000 -+#define bswap_64(x) (be64toh(x)) -+#else - #define bswap_64(x) ByteSwap64(x) -+#endif - - #elif defined(ARCH_SH4) - diff --git a/multimedia/ffmpeg/files/patch-libavcodec_Makefile b/multimedia/ffmpeg/files/patch-libavcodec_Makefile new file mode 100644 index 000000000000..e48db852bb7d --- /dev/null +++ b/multimedia/ffmpeg/files/patch-libavcodec_Makefile @@ -0,0 +1,12 @@ +--- libavcodec/Makefile.orig Thu May 3 08:50:33 2007 ++++ libavcodec/Makefile Thu May 3 08:50:42 2007 +@@ -293,9 +293,7 @@ + + OBJS-$(HAVE_XVMC_ACCEL) += xvmcvideo.o + +-ifneq ($(CONFIG_SWSCALER),yes) + OBJS += imgresample.o +-endif + + # processor-specific code + ifeq ($(TARGET_MMX),yes) diff --git a/multimedia/ffmpeg/files/patch-libavcodec__utils.c b/multimedia/ffmpeg/files/patch-libavcodec__utils.c deleted file mode 100644 index aec320fbf281..000000000000 --- a/multimedia/ffmpeg/files/patch-libavcodec__utils.c +++ /dev/null @@ -1,19 +0,0 @@ ---- libavcodec/utils.c.orig Tue Dec 6 17:51:14 2005 -+++ libavcodec/utils.c Tue Dec 6 17:53:17 2005 -@@ -249,6 +249,16 @@ - const int h_shift= i==0 ? 0 : h_chroma_shift; - const int v_shift= i==0 ? 0 : v_chroma_shift; - -+ if(s->pix_fmt == PIX_FMT_PAL8 && i == 1) -+ { -+ buf->base[i] = av_malloc(256 * 4); -+ if(buf->base[i] == NULL) -+ return -1; -+ buf->data[i] = buf->base[i]; -+ continue; -+ } -+ -+ - //FIXME next ensures that linesize= 2^x uvlinesize, thats needed because some MC code assumes it - buf->linesize[i]= ALIGN(pixel_size*w>>h_shift, s_align<<(h_chroma_shift-h_shift)); - diff --git a/multimedia/ffmpeg/files/patch-libavformat::Makefile b/multimedia/ffmpeg/files/patch-libavformat::Makefile deleted file mode 100644 index 36a7674c28e5..000000000000 --- a/multimedia/ffmpeg/files/patch-libavformat::Makefile +++ /dev/null @@ -1,13 +0,0 @@ ---- libavformat/Makefile.orig Thu Sep 11 22:55:10 2003 -+++ libavformat/Makefile Thu Sep 11 23:12:50 2003 -@@ -88,8 +88,8 @@ - install: all - ifeq ($(BUILD_SHARED),yes) - install -d $(prefix)/lib -- install -s -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so -- ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so -+ install -s -m 755 $(SLIB) $(prefix)/lib/libavformat.so.1 -+ ln -sf libavformat.so.1 $(prefix)/lib/libavformat.so - ldconfig || true - mkdir -p $(prefix)/include/ffmpeg - install -m 644 $(VPATH)/avformat.h $(prefix)/include/ffmpeg/avformat.h diff --git a/multimedia/ffmpeg/files/patch-libavutil__bswap.h b/multimedia/ffmpeg/files/patch-libavutil__bswap.h new file mode 100644 index 000000000000..7cbce43f6018 --- /dev/null +++ b/multimedia/ffmpeg/files/patch-libavutil__bswap.h @@ -0,0 +1,21 @@ +--- 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-vhook::Makefile b/multimedia/ffmpeg/files/patch-vhook::Makefile deleted file mode 100644 index cea89f3f74e5..000000000000 --- a/multimedia/ffmpeg/files/patch-vhook::Makefile +++ /dev/null @@ -1,19 +0,0 @@ ---- vhook/Makefile.orig Fri Dec 5 20:07:04 2003 -+++ vhook/Makefile Fri Dec 5 20:07:55 2003 -@@ -29,13 +29,13 @@ - install -s -m 755 $(HOOKS) $(INSTDIR) - - imlib2.so: imlib2.o -- $(CC) -g -o $@ $(SHFLAGS) $< -lImlib2 -+ $(CC) -o $@ $(LDFLAGS) $(SHFLAGS) $< -lImlib2 - - drawtext.so: drawtext.o -- $(CC) -g -o $@ $(SHFLAGS) $< `freetype-config --libs` -+ $(CC) -o $@ $(LDFLAGS) $(SHFLAGS) $< `freetype-config --libs` - - %.so: %.o -- $(CC) -g -o $@ $(SHFLAGS) $< -+ $(CC) -o $@ $(LDFLAGS) $(SHFLAGS) $< - - clean: - rm -f *.o *.d .depend *.so *~ diff --git a/multimedia/ffmpeg/pkg-descr b/multimedia/ffmpeg/pkg-descr index cdb037459048..a57c13b8945e 100644 --- a/multimedia/ffmpeg/pkg-descr +++ b/multimedia/ffmpeg/pkg-descr @@ -21,4 +21,4 @@ ffmpeg is made of two programs: * ffserver: high performance live broadcast streaming server based on the ffmpeg core encoders. -WWW: http://ffmpeg.sourceforge.net/ +WWW: http://ffmpeg.mplayerhq.hu/ diff --git a/multimedia/ffmpeg/pkg-plist b/multimedia/ffmpeg/pkg-plist index 6bad3c0fbd6c..673ea74d02d7 100644 --- a/multimedia/ffmpeg/pkg-plist +++ b/multimedia/ffmpeg/pkg-plist @@ -1,26 +1,58 @@ bin/ffmpeg -%%SDL%%bin/ffplay -%%FFSERVER%%bin/ffserver -%%FFSERVER%%etc/ffserver.conf.sample -%%FFSERVER%%etc/rc.d/ffserver.sh +bin/ffserver +include/ffmpeg/adler32.h include/ffmpeg/avcodec.h include/ffmpeg/avformat.h include/ffmpeg/avio.h +include/ffmpeg/avutil.h +include/ffmpeg/base64.h include/ffmpeg/common.h -include/ffmpeg/dsputil.h +include/ffmpeg/fifo.h +include/ffmpeg/integer.h +include/ffmpeg/intfloat_readwrite.h +include/ffmpeg/log.h +include/ffmpeg/lzo.h +include/ffmpeg/mathematics.h +include/ffmpeg/md5.h +include/ffmpeg/mem.h +include/ffmpeg/opt.h +include/ffmpeg/random.h include/ffmpeg/rational.h +include/ffmpeg/rgb2rgb.h include/ffmpeg/rtp.h include/ffmpeg/rtsp.h include/ffmpeg/rtspcodes.h +include/ffmpeg/swscale.h +include/postproc/postprocess.h lib/libavcodec.a lib/libavcodec.so -lib/libavcodec.so.%%SHLIB_VERSION%% +lib/libavcodec.so.%%SHLIB_VER%% +lib/libavcodec.so.51.40.4 lib/libavformat.a lib/libavformat.so -lib/libavformat.so.%%SHLIB_VERSION%% -%%VHOOK%%%%DRAWTEXT%%lib/vhook/drawtext.so -%%VHOOK%%lib/vhook/fish.so -%%VHOOK%%%%IMLIB2%%lib/vhook/imlib2.so -%%VHOOK%%lib/vhook/null.so -%%VHOOK%%lib/vhook/ppm.so -%%VHOOK%%@dirrm lib/vhook +lib/libavformat.so.%%SHLIB_VER%% +lib/libavformat.so.51.12.1 +lib/libavutil.a +lib/libavutil.so +lib/libavutil.so.%%SHLIB_VER%% +lib/libavutil.so.49.4.0 +lib/libpostproc.a +lib/libpostproc.so +lib/libpostproc.so.%%SHLIB_VER%% +lib/libpostproc.so.51.1.0 +lib/libswscale.a +lib/libswscale.so +lib/libswscale.so.%%SHLIB_VER%% +lib/libswscale.so.0.5.0 +lib/vhook/fish.so +lib/vhook/null.so +lib/vhook/ppm.so +lib/vhook/watermark.so +libdata/pkgconfig/libavcodec.pc +libdata/pkgconfig/libavformat.pc +libdata/pkgconfig/libavutil.pc +libdata/pkgconfig/libpostproc.pc +libdata/pkgconfig/libswscale.pc +@dirrm lib/vhook +@dirrm include/postproc +@dirrm include/ffmpeg |