From 9ff2dfd6cbe32353208356170d2f312c4fe1f8b6 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 29 May 2010 13:04:29 +0000 Subject: This version builds ffmpeg-r23357 without errors --- ffmpeg/build/ffmpeg.SlackBuild | 54 ++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 21 deletions(-) (limited to 'ffmpeg/build/ffmpeg.SlackBuild') diff --git a/ffmpeg/build/ffmpeg.SlackBuild b/ffmpeg/build/ffmpeg.SlackBuild index f2bad3c5..dd8744d3 100755 --- a/ffmpeg/build/ffmpeg.SlackBuild +++ b/ffmpeg/build/ffmpeg.SlackBuild @@ -85,7 +85,7 @@ # snapshot (x264 can now produce blu-ray compliant video), # and updated the lame and dc1394 versions. Added support for # RTMP(E) - flash - streams through librtmp. -# r23349-1: 27/may/2010 by Eric Hameleers +# r23357-1: 28/may/2010 by Eric Hameleers # * New snapshot. Added libvpx plus patches for ffmpeg which # enable support for WebM/VP8 (google-donated new video format). # @@ -111,7 +111,7 @@ USE_PATENTS=${USE_PATENTS:-"YES"} PRGNAM=ffmpeg -VERSION=${VERSION:-r23349} +VERSION=${VERSION:-r23357} BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:--j7} TAG=${TAG:-"alien"} @@ -138,7 +138,7 @@ DC1394=2.1.2 FAAC=1.28 FAAD2=2.7 FFMPEG=$VERSION -FFMPEG_VPX=r2 # patches to add vp8 codec to ffmpeg +FFMPEG_VPX=r3 # patches to add vp8 codec to ffmpeg GSM=1.0.13 LAME=3.98.4 ORC=0.4.4 @@ -148,8 +148,9 @@ SCHROEDINGER=1.0.9 SPEEX=1.2rc1 SWSCALE="" # Set SWSCALE="" to checkout a version of ffmpeg's swscale # that matches the date of the FFMPEG snapshot. -VPX=0.9.0 -X264=20100526-2245 # Needs yasm installed +#VPX=0.9.0 +VPX=20100528 +X264=20100527-2245 # Needs yasm installed # Where do we look for sources? SRCDIR=$(cd $(dirname $0); pwd) @@ -243,7 +244,8 @@ SRCPAT[12]="NO" # libvpx library, containing the VP8 codec SOURCE[13]="$SRCDIR/libvpx-${VPX}.tar.bz2" -SRCURL[13]="http://webm.googlecode.com/files/libvpx-${VPX}.tar.bz2" +#SRCURL[13]="http://webm.googlecode.com/files/libvpx-${VPX}.tar.bz2" +SRCURL[13]="" SRCPAT[13]="NO" # Patches from the web-project for ffmpeg @@ -293,6 +295,16 @@ src_checkout() { rm -rf ffmpeg-${FFMPEG} unset SVNURL ;; + 13) # We clone the git of libvpx at a certain date: + mkdir libvpx-${VPX} \ + && cd libvpx-${VPX} \ + && git clone git://review.webmproject.org/libvpx.git . \ + && git checkout $(git rev-list -n 1 --before="`date -d $VPX`" master) \ + && chown -R root:root . \ + && cd .. \ + && tar --exclude .git -${TARCOMP}cf ${2} libvpx-${VPX} + rm -rf libvpx-${VPX} + ;; *) # Do nothing ;; esac @@ -823,10 +835,9 @@ make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_vpx.log # Install libvpx into a temp location so ffmpeg can pickup the library make install 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_vpx.log # The build system vor libvpx is not yet mature: -cp -a vp8/*.h vpx_codec/*.h vpx_ports/*.h vpx_scale/*.h ${FFMPEGDEPSDIR}/usr/include -rm -f ${FFMPEGDEPSDIR}/usr/include/config.h -ranlib libvpx.a && cp -a libvpx.a ${FFMPEGDEPSDIR}/usr/lib${LIBDIRSUFFIX} -ranlib libvpx_g.a && cp -a libvpx_g.a ${FFMPEGDEPSDIR}/usr/lib${LIBDIRSUFFIX} +cp -a --parents vpx/*.h ${FFMPEGDEPSDIR}/usr/include/ +cp -a libvpx.a ${FFMPEGDEPSDIR}/usr/lib${LIBDIRSUFFIX} +cp -a libvpx_g.a ${FFMPEGDEPSDIR}/usr/lib${LIBDIRSUFFIX} # Add DOCS to the ffmpegdeps to have it added to ffmpeg package later: mkdir -p $FFMPEGDEPSDIR/doc/vpx cp -a $DOCS_VPX $FFMPEGDEPSDIR/doc/vpx/ || true @@ -873,20 +884,16 @@ else ARCHOPTS="" fi -# Apply WebM (VP8 codec format) patches - some patches will FAIL to apply -# because ffmpeg is slowly adding this new functionality: -( - for PF in $(find ../mplayer-vp8-encdec-support -name "*.diff" | grep -v mplayer-only) ; do - echo "VP8 patch: $PF" - cat $PF | patch -p0 --verbose || true - done -) 2>&1 | tee $OUTPUT/patch-${PRGNAM}_vpx.log +# Apply WebM (VP8 codec format) patch - some hunks will FAIL to apply +# because ffmpeg is slowly absorbing this new functionality: + cat ../ffmpeg*libvpx*.diff | patch -p0 --verbose \ + 2>&1 | tee $OUTPUT/patch-${PRGNAM}_vpx.log # Final patch to fix the problem that we are using a "too new" ffmpeg: # Prefer a specific versioned patch over the version-less patch: if [ -f $SRCDIR/ffmpeg-${FFMPEG}_webm_fix.diff ]; then FFMPEGWEBMFIX=ffmpeg-${FFMPEG}_webm_fix else - FFMPEGASM=ffmpeg_webm_fix + FFMPEGWEBMFIX=ffmpeg_webm_fix fi cat $SRCDIR/$FFMPEGWEBMFIX.diff | patch -p1 --verbose 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}_vpx.log @@ -918,6 +925,7 @@ PKG_CONFIG_PATH="$FFMPEGDEPSDIR/usr/lib${LIBDIRSUFFIX}/pkgconfig" \ --enable-libspeex \ --enable-libtheora \ --enable-libx264 \ + --enable-libvpx \ --enable-memalign-hack \ --enable-pthreads \ --enable-x11grab \ @@ -978,19 +986,23 @@ else fi # Add x264vpx presets. See 'Preset files' in the man pages. +echo "** Adding ffmpeg presets:" mkdir -p $PKG/usr/share/ffmpeg cp -a ffpresets/*.ffpreset $PKG/usr/share/ffmpeg/ # The pkg-config files are full of library dependencies which we built # statically, so we need to edit those out so that programs that try to link # against our ffmpeg will not get confused: +echo "** Fixing up pkgconfig files:" for PCFILE in $(ls $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/*.pc) ; do sed -i -e 's/libraw1394//' -e 's/-lspeex//' -e 's/-lgsm//' \ -e 's/-lopencore-amrnb//' -e 's/-lopencore-amrwb//' \ -e 's/-lfaac//' -e 's/-lfaad//' \ - -e 's/-lmp3lame//' -e 's/-lschroedinger-[^ ]*//' -e 's/-loil-[^ ]*//' \ + -e 's/-lmp3lame//' -e 's/-lschroedinger-[^ ]*//' -e 's/-lorc-[^ ]*//' \ -e 's/-lx264//' -e 's/-lvpx//' \ - -e 's/-ldc1394_control//' -e 's/-lraw1394//' $PCFILE + -e 's/-lrtmp//' \ + -e "s#-L/tmp/build/tmp-ffmpeg/ffmpegdeps/usr/lib${LIBDIRSUFFIX}##" \ + -e 's/-ldc1394//' -e 's/-lraw1394//' $PCFILE done # Add a configuration file for the ffserver: -- cgit v1.2.3-65-gdbad