- update to 0.4.9p1 patch for vlc also. I bumped SHLIB because ffmpeg will not compile with 0.4.8 installed. Fix: ====> START patch-ffmpeg ====> END patch-ffmpeg ====> START patch-vlc ====> END patch-vlc--FmE8X2O8xUR6TR6Fo8huzQOIr36VTGDe1PA7BAyqc5E15rPO Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" diff -ruN --exclude=CVS /usr/ports/multimedia/ffmpeg.orig/Makefile /usr/ports/multimedia/ffmpeg/Makefile --- /usr/ports/multimedia/ffmpeg.orig/Makefile Sat Jul 17 14:49:10 2004 +++ /usr/ports/multimedia/ffmpeg/Makefile Sat Jul 17 15:12:56 2004 @@ -6,11 +6,11 @@ # PORTNAME= ffmpeg -PORTVERSION= 0.4.8 -PORTREVISION= 5 +PORTVERSION= 0.4.9p1 CATEGORIES= multimedia audio net -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTRNDED} MASTER_SITE_SUBDIR= ffmpeg +DISTNAME= ${PORTNAME}-${PORTVERSION:S/p/-pre/} MAINTAINER= lioux@FreeBSD.org COMMENT= Hyper fast realtime audio/video encoder/converter, streaming server @@ -19,33 +19,35 @@ 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 +SHLIB_VERSION= 1 # 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 +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 ffplay.1 ffserver.1 +MAN1= ffmpeg.1 ffplay.1 .include <bsd.port.pre.mk> +.if exists(${LOCALBASE}/lib/libavformat.so.0) +BROKEN= Please remove previous version of ${PORTNAME} to continue build +.endif + ## ## arch detection ## @@ -55,7 +57,7 @@ # 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 .endif @@ -82,21 +84,25 @@ .if exists(${LOCALBASE}/lib/libvorbisenc.so.2) WITH_VORBIS=yes .endif +.if exists(${LOCALBASE}/lib/libfaac.so.0) +WITH_FAAC=yes +.endif .if exists(${LOCALBASE}/lib/libfaad.so.0) WITH_FAAD=yes .endif ## support activation ## +## PORTDOCS +.ifndef(NOPORTDOCS) +BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html +.endif ## disable a52 .ifndef(WITHOUT_LIBA52) +GPLLIBS= yes LIB_DEPENDS+= a52.0:${PORTSDIR}/audio/liba52 -CONFIGURE_ARGS+= --enable-a52 \ - --enable-a52bin -.else -CONFIGURE_ARGS+= --enable-a52 \ - --disable-a52bin +CONFIGURE_ARGS+= --enable-a52 # --enable-a52bin < breaks build .endif ## enable freetype2 .if defined(WITH_FREETYPE2) @@ -109,10 +115,6 @@ ## 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) @@ -142,7 +144,7 @@ CONFIGURE_ARGS+= --extra-cflags="-fPIC -DPIC -I${LOCALBASE}/include \ -I${X11BASE}/include" \ --disable-opts \ - --extra-ldflags="-L${LOCALBASE}/lib -L${X11BASE}/lib -lm " + --extra-ldflags="-L${WRKSRC}/libavcodec -L${LOCALBASE}/lib -L${X11BASE}/lib -lm " .endif ## vhook @@ -159,11 +161,22 @@ CONFIGURE_ARGS+= --enable-vorbis .endif +## faac +.ifdef(WITH_FAAC) +LIB_DEPENDS+= faac.0:${PORTSDIR}/audio/faac + +CONFIGURE_ARGS+= --enable-faac +.endif ## faad .ifdef(WITH_FAAD) +GPLLIBS= yes LIB_DEPENDS+= faad.0:${PORTSDIR}/audio/faad -CONFIGURE_ARGS+= --enable-faad +CONFIGURE_ARGS+= --enable-faad --enable-faadbin +.endif +## GPLLIBS +.ifdef(GPLLIBS) +CONFIGURE_ARGS+= --enable-gpl .endif ## post processing .ifndef(WITHOUT_POSTPROCESS) @@ -171,6 +184,17 @@ PLIST_FILES+= include/ffmpeg/postproc/postprocess.h PLIST_DIRS+= include/ffmpeg/postproc .endif +## ffserver +.ifdef(WITHOUT_FFMPEG_FFSERVER) +CONFIGURE_ARGS+= --disable-ffserver + +PLIST_SUB+= FFSERVER="@comment " +.else +USE_RC_SUBR= yes +MAN1+= ffserver.1 + +PLIST_SUB+= FFSERVER="" +.endif PLIST_DIRS+= include/ffmpeg pre-everything:: @@ -213,10 +237,18 @@ @${ECHO_MSG} 'Define WITH_VORBIS to enable libvorbisenc VORBIS codec' @${ECHO_MSG} .endif +.ifndef(WITH_FAAC) + @${ECHO_MSG} 'Define WITH_FAAC to enable libfaac' + @${ECHO_MSG} +.endif .ifndef(WITH_FAAD) @${ECHO_MSG} 'Define WITH_FAAD to enable libfaad codec' @${ECHO_MSG} .endif +.ifndef(WITHOUT_FFMPEG_FFSERVER) + @${ECHO_MSG} 'Define WITHOUT_FFMPEG_FFSERVER to disable ffserver build' + @${ECHO_MSG} +.endif .if ${ARCH} == "i386" .if !(defined(WITH_BKTR_FORMAT) && defined(WITH_BKTR_DEV)) @${ECHO_MSG} @@ -238,8 +270,14 @@ .endif # ${ARCH} == i386 post-patch: +.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}/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 @@ -284,8 +322,11 @@ @${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>|; \ diff -ruN --exclude=CVS /usr/ports/multimedia/ffmpeg.orig/distinfo /usr/ports/multimedia/ffmpeg/distinfo --- /usr/ports/multimedia/ffmpeg.orig/distinfo Sat Feb 7 20:13:53 2004 +++ /usr/ports/multimedia/ffmpeg/distinfo Sat Jul 17 13:11:36 2004 @@ -1,2 +1,2 @@ -MD5 (ffmpeg-0.4.8.tar.gz) = e00d47614ba1afd99ad2ea387e782dd9 -SIZE (ffmpeg-0.4.8.tar.gz) = 1352874 +MD5 (ffmpeg-0.4.9-pre1.tar.gz) = ea5587e3c66d50b1503b82ac4179c303 +SIZE (ffmpeg-0.4.9-pre1.tar.gz) = 1611332 diff -ruN --exclude=CVS /usr/ports/multimedia/ffmpeg.orig/files/ffserver.sh /usr/ports/multimedia/ffmpeg/files/ffserver.sh --- /usr/ports/multimedia/ffmpeg.orig/files/ffserver.sh Wed Dec 31 19:00:00 1969 +++ /usr/ports/multimedia/ffmpeg/files/ffserver.sh Sat Jul 17 17:36:07 2004 @@ -0,0 +1,26 @@ +#!/bin/sh +# +# $FreeBSD: ports/net/minisapserver/files/sapserver.sh,v 1.1 2004/05/25 09:17:51 krion Exp $ +# + +# PROVIDE: ffserver +# REQUIRE: NETWORKING +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable ffserver: +# +#ffserver_enable="YES" +# +ffserver_enable="NO" + +. %%RC_SUBR%% + +name=ffserver +rcvar=`set_rcvar` + +command=%%PREFIX%%/bin/${name} +required_files=%%PREFIX%%/etc/ffserver.conf + +load_rc_config ${name} +run_rc_command "$1" diff -ruN --exclude=CVS /usr/ports/multimedia/ffmpeg.orig/files/patch-Makefile /usr/ports/multimedia/ffmpeg/files/patch-Makefile --- /usr/ports/multimedia/ffmpeg.orig/files/patch-Makefile Sat Dec 27 20:05:16 2003 +++ /usr/ports/multimedia/ffmpeg/files/patch-Makefile Sat Jul 17 13:11:36 2004 @@ -1,36 +1,14 @@ ---- Makefile.orig Sun Dec 28 09:52:46 2003 -+++ Makefile Sun Dec 28 10:00:38 2003 -@@ -6,8 +6,7 @@ - - VPATH=$(SRC_PATH) - --CFLAGS= $(OPTFLAGS) -Wall -g -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE --LDFLAGS+= -g -+CFLAGS= $(OPTFLAGS) -Wall -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE - - ifeq ($(TARGET_GPROF),yes) - CFLAGS+=-p -@@ -33,10 +32,11 @@ - DEP_LIBS=libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF) - else - DEP_LIBS=libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF) -+endif -+ - ifeq ($(CONFIG_MP3LAME),yes) - EXTRALIBS+=-lmp3lame - endif --endif - - ifeq ($(CONFIG_VORBIS),yes) - EXTRALIBS+=-logg -lvorbis -lvorbisenc -@@ -69,8 +69,8 @@ - all: lib $(PROG) $(PROGTEST) $(VHOOK) +--- 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 -ruN --exclude=CVS /usr/ports/multimedia/ffmpeg.orig/files/patch-configure /usr/ports/multimedia/ffmpeg/files/patch-configure --- /usr/ports/multimedia/ffmpeg.orig/files/patch-configure Sun Dec 7 22:26:41 2003 +++ /usr/ports/multimedia/ffmpeg/files/patch-configure Sat Jul 17 13:11:36 2004 @@ -1,6 +1,6 @@ ---- configure.orig Sun Sep 28 17:26:39 2003 -+++ configure Sat Dec 6 03:41:29 2003 -@@ -22,7 +22,7 @@ +--- configure.orig Sat Jul 17 11:06:03 2004 ++++ configure Sat Jul 17 11:07:04 2004 +@@ -88,7 +88,7 @@ mandir="" bindir="" cross_prefix="" @@ -9,47 +9,12 @@ ar="ar" ranlib="ranlib" make="make" -@@ -111,7 +111,7 @@ +@@ -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-)" + gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`" case "$gcc_version" in -@@ -177,13 +177,13 @@ - gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)" - case "$gcc_version" in - *2.95*) --CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer" -+CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer" - ;; - *3.3*) --CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic -force_cpusubtype_ALL" -+CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic -force_cpusubtype_ALL" - ;; - *) --CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic" -+CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic" - ;; - esac - ;; -@@ -276,7 +276,7 @@ - ;; - --make=*) make=`echo $opt | cut -d '=' -f 2` - ;; -- --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}" -+ --extra-cflags=*) CFLAGS="$CFLAGS ${opt#--extra-cflags=}" - ;; - --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=} - ;; -@@ -682,7 +682,7 @@ - EOF - - imlib2=no --if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then -+if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -lImlib2 2> /dev/null ; then - imlib2=yes - fi - diff -ruN --exclude=CVS /usr/ports/multimedia/ffmpeg.orig/files/patch-libavcodec::Makefile /usr/ports/multimedia/ffmpeg/files/patch-libavcodec::Makefile --- /usr/ports/multimedia/ffmpeg.orig/files/patch-libavcodec::Makefile Sun Dec 7 22:26:41 2003 +++ /usr/ports/multimedia/ffmpeg/files/patch-libavcodec::Makefile Sat Jul 17 15:11:46 2004 @@ -1,22 +1,22 @@ ---- libavcodec/Makefile.orig Sat Dec 6 02:32:47 2003 -+++ libavcodec/Makefile Sat Dec 6 03:00:14 2003 -@@ -162,7 +162,7 @@ +--- 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) +- $(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) $(LDFLAGS) + $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) endif dsputil.o: dsputil.c dsputil.h -@@ -230,8 +230,8 @@ +@@ -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.0 -+ cd $(prefix)/lib && ln -s libavcodec.so.0 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 -ruN --exclude=CVS /usr/ports/multimedia/ffmpeg.orig/files/patch-libavformat::Makefile /usr/ports/multimedia/ffmpeg/files/patch-libavformat::Makefile --- /usr/ports/multimedia/ffmpeg.orig/files/patch-libavformat::Makefile Sun Dec 7 22:26:41 2003 +++ /usr/ports/multimedia/ffmpeg/files/patch-libavformat::Makefile Sat Jul 17 15:11:28 2004 @@ -6,8 +6,8 @@ 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.0 -+ ln -sf libavformat.so.0 $(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 -ruN --exclude=CVS /usr/ports/multimedia/ffmpeg.orig/pkg-plist /usr/ports/multimedia/ffmpeg/pkg-plist --- /usr/ports/multimedia/ffmpeg.orig/pkg-plist Sat Mar 20 20:32:37 2004 +++ /usr/ports/multimedia/ffmpeg/pkg-plist Sat Jul 17 14:21:31 2004 @@ -1,12 +1,14 @@ bin/ffmpeg %%SDL%%bin/ffplay -bin/ffserver -etc/ffserver.conf.sample +%%FFSERVER%%bin/ffserver +%%FFSERVER%%etc/ffserver.conf.sample +%%FFSERVER%%etc/rc.d/ffserver.sh include/ffmpeg/avcodec.h include/ffmpeg/avformat.h include/ffmpeg/avio.h include/ffmpeg/common.h include/ffmpeg/dsputil.h +include/ffmpeg/rational.h include/ffmpeg/rtp.h include/ffmpeg/rtsp.h include/ffmpeg/rtspcodes.h @@ -18,17 +20,6 @@ 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 -%%PORTDOCS%%share/doc/ffmpeg/COPYING -%%PORTDOCS%%share/doc/ffmpeg/Changelog -%%PORTDOCS%%share/doc/ffmpeg/README -%%PORTDOCS%%share/doc/ffmpeg/TODO -%%PORTDOCS%%share/doc/ffmpeg/faq.html -%%PORTDOCS%%share/doc/ffmpeg/faq.texi -%%PORTDOCS%%share/doc/ffmpeg/ffmpeg-doc.html -%%PORTDOCS%%share/doc/ffmpeg/ffmpeg-doc.texi -%%PORTDOCS%%share/doc/ffmpeg/ffserver-doc.html -%%PORTDOCS%%share/doc/ffmpeg/ffserver-doc.texi -%%PORTDOCS%%@dirrm share/doc/ffmpeg +%%VHOOK%%lib/vhook/ppm.so %%VHOOK%%@dirrm lib/vhook
Responsible Changed From-To: freebsd-ports-bugs->lioux Over to maintainer.
State Changed From-To: open->feedback Various issues: - PORTVERSION should be X.Y.p1 *** - Typo in MASTER_SITES - Does not build on 4.10: i386/dsputil_mmx.c: In function `h263_h_loop_filter_mmx': i386/dsputil_mmx.c:667: Invalid `asm' statement: i386/dsputil_mmx.c:667: fixed or forbidden register 3 (bx) was spilled for class GENERAL_REGS. i386/dsputil_mmx.c: In function `dsputil_init_mmx': i386/dsputil_mmx.c:2540: warning: assignment from incompatible pointer type i386/dsputil_mmx.c:2541: warning: assignment from incompatible pointer type gmake[1]: *** [i386/dsputil_mmx.o] Error 1 gmake[1]: Leaving directory `/usr/ports/multimedia/ffmpeg/work/ffmpeg-0.4.9-pre1/libavcodec' gmake: *** [lib] Error 2 *** Error code 2 Stop in /usr/ports/multimedia/ffmpeg.
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTRNDED} ^^^^^^^^--> EXTENDED -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://weblog.barnet.com.au/edwin/
here is a more up to date, I found a work around so you don't have delete ffmpeg 0.4.8 before building and you don't have to bump shlib version =) Michael
State Changed From-To: feedback->closed Committed, thanks!