# New ports collection makefile for: ffmpeg # Date created: Tue Sep 25 15:52:09 BRT 2001 # Whom: Mario Sergio Fujikawa Ferreira # # $FreeBSD$ # PORTNAME= ffmpeg PORTVERSION= 0.4.8 PORTREVISION= 5 CATEGORIES= multimedia audio net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ffmpeg MAINTAINER= lioux@FreeBSD.org COMMENT= Hyper fast realtime audio/video encoder/converter, streaming server USE_GETOPT_LONG= yes HAS_CONFIGURE= yes USE_GMAKE= yes USE_REINPLACE= yes USE_SIZE= yes WANT_SDL= yes CONFIGURE_ARGS= --cc="${CC}" --prefix="${PREFIX}" \ --make="${GMAKE}" --enable-shared \ --extra-ldflags="-L${LOCALBASE}/lib -L${X11BASE}/lib" \ --extra-libs"-lm" \ --disable-debug MAKE_ENV+= LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib" PLIST_SUB= SHLIB_VERSION=${SHLIB_VERSION} INSTALLS_SHLIB= yes SHLIB_VERSION= 0 # DOC_FILES= COPYING Changelog README # under subdir doc DOC_DOCFILES= TODO \ faq.html faq.texi \ ffmpeg-doc.html ffmpeg-doc.texi \ ffserver-doc.html ffserver-doc.texi HEADER_FILES= libavcodec/avcodec.h libavcodec/common.h \ libavcodec/dsputil.h LIB_FILES= libavcodec/libavcodec.a libavformat/libavformat.a MAN1= ffmpeg.1 ffplay.1 ffserver.1 .include ## ## arch detection ## .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 . endif .endif ## lib detection ## ## ## SDL .if ${HAVE_SDL:Msdl} WITH_SDL=yes .endif ## freetype2 .if exists(${LOCALBASE}/lib/libfreetype.so) WITH_FREETYPE2=yes .endif ## imlib2 .if exists(${X11BASE}/lib/libImlib2.so) WITH_IMLIB2=yes .endif ## lame mp3 .if exists(${LOCALBASE}/lib/libmp3lame.so.0) WITH_MP3=yes .endif ## vorbis .if exists(${LOCALBASE}/lib/libvorbisenc.so.2) WITH_VORBIS=yes .endif .if exists(${LOCALBASE}/lib/libfaad.so.0) WITH_FAAD=yes .endif ## support activation ## ## 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 ## enable freetype2 .if defined(WITH_FREETYPE2) LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2 PLIST_SUB+= DRAWTEXT="" .else PLIST_SUB+= DRAWTEXT="@comment " .endif ## enable imlib2 .if !defined(WITHOUT_VHOOK) && defined(WITH_IMLIB2) LIB_DEPENDS+= Imlib2.2:${PORTSDIR}/graphics/imlib2 PLIST_SUB+= IMLIB2="" .else PLIST_SUB+= IMLIB2="@comment " .endif ## disable mmx .ifdef(WITHOUT_MMX) CONFIGURE_ARGS+= --disable-mmx .endif ## SDL .ifdef(WITH_SDL) USE_SDL= sdl PLIST_SUB+= SDL="" .else PLIST_SUB+= SDL="@comment " .endif ## mp3 .ifdef(WITH_MP3) LIB_DEPENDS+= mp3lame.0:${PORTSDIR}/audio/lame CONFIGURE_ARGS+= --enable-mp3lame .endif ## optimization .ifdef(WITH_OPTIMIZED_CFLAGS) CONFIGURE_ARGS+= --extra-cflags="-fPIC -DPIC -I${LOCALBASE}/include \ -I${X11BASE}/include \ -ffast-math -fomit-frame-pointer" \ --extra-ldflags="-L${LOCALBASE}/lib -L${X11BASE}/lib -lm" .else CONFIGURE_ARGS+= --extra-cflags="-fPIC -DPIC -I${LOCALBASE}/include \ -I${X11BASE}/include" \ --disable-opts \ --extra-ldflags="-L${LOCALBASE}/lib -L${X11BASE}/lib -lm " .endif ## vhook .ifndef(WITHOUT_VHOOK) PLIST_SUB+= VHOOK="" .else CONFIGURE_ARGS+= -disable-vhook PLIST_SUB+= VHOOK="@comment " .endif ## vorbis .ifdef(WITH_VORBIS) LIB_DEPENDS+= vorbisenc.2:${PORTSDIR}/audio/libvorbis CONFIGURE_ARGS+= --enable-vorbis .endif ## faad .ifdef(WITH_FAAD) LIB_DEPENDS+= faad.0:${PORTSDIR}/audio/faad CONFIGURE_ARGS+= --enable-faad .endif ## post processing .ifndef(WITHOUT_POSTPROCESS) CONFIGURE_ARGS+= --enable-shared-pp PLIST_FILES+= include/ffmpeg/postproc/postprocess.h PLIST_DIRS+= include/ffmpeg/postproc .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" @${ECHO_MSG} .endif .ifndef(WITHOUT_MMX) @${ECHO_MSG} "Define WITHOUT_MMX if your system does not support MMX" @${ECHO_MSG} .endif .ifndef(WITH_SDL) @${ECHO_MSG} 'Define WITH_SDL to enable ffplay SDL version' @${ECHO_MSG} .endif .ifndef(WITH_MP3) @${ECHO_MSG} 'Define WITH_MP3 to enable lame MP3 codec' @${ECHO_MSG} .endif .ifndef(WITH_OPTIMIZED_CFLAGS) @${ECHO_MSG} 'You can enable additional compilation optimizations' @${ECHO_MSG} 'by defining WITH_OPTIMIZED_CFLAGS' @${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' @${ECHO_MSG} .endif .ifndef(WITHOUT_VHOOK) @${ECHO_MSG} 'You can disable vhook support by defining WITHOUT_VHOOK' @${ECHO_MSG} .endif .ifndef(WITH_VORBIS) @${ECHO_MSG} 'Define WITH_VORBIS to enable libvorbisenc VORBIS codec' @${ECHO_MSG} .endif .ifndef(WITH_FAAD) @${ECHO_MSG} 'Define WITH_FAAD to enable libfaad 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' @${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: @${REINPLACE_CMD} -e "s!/etc/ffserver.conf!${PREFIX}/etc/ffserver.conf!g" \ ${WRKSRC}/ffserver.c .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) @${REINPLACE_CMD} -e 's|-ldl||' \ ${WRKSRC}/configure .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 |; \ s|"avcodec.h"||' \ ${WRKSRC}/${file} @${INSTALL_DATA} ${WRKSRC}/${file} \ ${PREFIX}/include/ffmpeg/${file:T} # change headers back so reinstall target works @${REINPLACE_CMD} -e 's||"common.h"|; \ s||"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 .endif .include eebsd-ports-gnome/commit/www/hiawatha?h=gstreamer0.10-removal&id=e598d34341b62529b9ef63db27d571f9bcb8c766'>Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1 * - Remove MAKE_JOBS_SAFE variableak2013-08-151-1/+0 * Give my maintainership to Chris Petrikcs2013-07-291-1/+1 * Update to 9.2cs2013-06-273-4/+4 * Convert the 2 last USE_CMAKE to USES= cmakebapt2013-04-251-2/+1 * - Update to 9.1cs2013-04-183-25/+10 * Update to 9.0cs2013-03-293-4/+4 * Update to 8.8.1cs2013-03-253-5/+5 * - convert USE_CMAKE to USESmakc2013-03-231-1/+1 * - Update to 8.7cs2013-01-155-53/+10 * - Update to 8.6:cs2012-11-043-9/+6 * - Update to 8.5cs2012-09-212-4/+4 * Update to 8.4cs2012-06-082-3/+3 * Switch to OptionsNGcs2012-06-051-27/+60 * - Update to 8.3.2cs2012-05-313-57/+83 * In the rc.d scripts, change assignments to rcvar to use thedougb2012-01-142-2/+2 * Update to 7.8.2cs2011-11-192-3/+3 * Update to 7.8.1cs2011-11-102-3/+3 * Update to 7.7cs2011-10-072-3/+3 * - Add LDFLAGS to CONFIGURE_ENV and MAKE_ENV (as it was done with LDFLAGS)amdmi32011-09-241-3/+2 * Change maintainer address to my FreeBSD addresscs2011-09-151-1/+1 * I made a slightly incorrect suggestion about the pidfile optimization,dougb2011-08-251-1/+1 * - Updated to 7.6glarkin2011-08-254-10/+6 * - Added rc.d file for php-fcgi (Hiawatha FastCGI daemon)glarkin2011-08-244-7/+59 * - Updated to 7.5glarkin2011-07-072-3/+3 * - Updated to 7.4.1glarkin2011-04-233-23/+3 * - Added patch to circumvent integer overflow in Content-Length headerglarkin2011-03-182-0/+20 * - Updated to 7.4 (http://www.hiawatha-webserver.org/changelog) [1]glarkin2010-11-123-8/+8 * - Added the "largefile" option to be passed to the configure scriptglarkin2010-09-162-10/+28 * - Update to 7.3sahil2010-06-082-6/+7 * - Reset maintainer to ports@FreeBSD.orgsahil2010-06-051-1/+1 * - Update to 7.2 [1]sahil2010-05-273-21/+12 * - Update to 7.1sylvio2010-04-063-7/+7 * Begin the process of deprecating sysutils/rc_subr bydougb2010-03-271-1/+1 * Update to 7.0.tobez2010-03-162-8/+14 * - Update to 6.19wen2009-12-272-4/+4 * - Update to 6.18wen2009-11-162-4/+4 * - Update to 6.17amdmi32009-10-063-8/+9 * - Don't overwrite configuration files, or index.html.wxs2009-08-013-11/+32