diff options
author | Eric Hameleers <alien@slackware.com> | 2008-12-09 15:14:23 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2008-12-09 15:14:23 +0000 |
commit | 7f1b0584b9df27b012406e14bb2b4d6e4650b7ef (patch) | |
tree | b4fabd283d1d61cb599dcdb5411ed00f46f2af80 /ffmpeg/build/ffmpeg.SlackBuild | |
parent | bc13b645ad6f5e47818ba796d37f0965096eeac1 (diff) | |
download | asb-7f1b0584b9df27b012406e14bb2b4d6e4650b7ef.tar.gz asb-7f1b0584b9df27b012406e14bb2b4d6e4650b7ef.tar.xz |
Updated to r16039 (20081209)
Diffstat (limited to 'ffmpeg/build/ffmpeg.SlackBuild')
-rwxr-xr-x | ffmpeg/build/ffmpeg.SlackBuild | 113 |
1 files changed, 59 insertions, 54 deletions
diff --git a/ffmpeg/build/ffmpeg.SlackBuild b/ffmpeg/build/ffmpeg.SlackBuild index 62daa197..e938841d 100755 --- a/ffmpeg/build/ffmpeg.SlackBuild +++ b/ffmpeg/build/ffmpeg.SlackBuild @@ -62,6 +62,10 @@ # If you install yasm, the SlackBuild will be able to use a # very recent version of the x264 library, else it will fallback # to a version that compiles with Slackware's 'asm'. +# r16039-1: 09/dec/2008 by Eric Hameleers <alien@slackware.com> +# * Updated to the 20081209 snapshot. Also updated x264 and lame +# codecs, removed liba52 (because ffmpeg now has it's own native +# implementation) and added speex codec. # # Run 'sh ffmpeg.SlackBuild --cleanup' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . @@ -92,14 +96,14 @@ USE_PATENTS=${USE_PATENTS:-"YES"} REQUIRE_YASM=${REQUIRE_YASM:-"YES"} PRGNAM=ffmpeg -VERSION=${VERSION:-r14080} +VERSION=${VERSION:-r16039} ARCH=${ARCH:-i486} BUILD=${BUILD:-1} +NUMJOBS=${NUMJOBS:--j7} TAG=${TAG:-"alien"} DOCS="COPYING* CREDITS Changelog MAINTAINERS README* \ doc/TODO doc/*.txt doc/*.html" -DOCS_A52="AUTHORS COPYING* ChangeLog HISTORY NEWS README* TODO" DOCS_AMRNB="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO" DOCS_AMRWB="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO" DOCS_DC1394="AUTHORS COPYING ChangeLog INSTALL NEWS README" @@ -110,27 +114,25 @@ DOCS_LAME="API COPYING ChangeLog HACKING LICENSE README STYLEGUIDE TODO USAGE" DOCS_OIL="AUTHORS BUG-REPORTING COPYING HACKING NEWS README" DOCS_RAW1394="AUTHORS COPYING ChangeLog INSTALL NEWS README" DOCS_SCHROEDINGER="AUTHORS COPYING* NEWS TODO" +DOCS_SPEEX=" AUTHORS COPYING ChangeLog NEWS README* TODO" DOCS_X264="AUTHORS COPYING" # Support libraries: -A52=0.7.4 AMRNB=7.0.0.2 AMRWB=7.0.0.3 DC1394=1.2.2 FAAC=1.26 FAAD2=2.6.1 -FFMPEG=r14080 +FFMPEG=r16039 GSM=1.0.12 -LAME=398 +LAME=398-2 OIL=0.3.15 RAW1394=1.3.0 SCHROEDINGER=1.0.5 +SPEEX=1.2rc1 X264_SAFE=20080301-2245 # In later versions nasm complains # about 'function hidden' -X264=20080804-2245 # Needs yasm installed -#X264=20080618-2245 # Never snapshots show "fatal: ambiguous argument - # 'origin/master': unknown revision or path not in - # the working tree." +X264=20081208-2245 # Needs yasm installed # Where do we look for sources? SRCDIR=$(cd $(dirname $0); pwd) @@ -182,10 +184,11 @@ SOURCE[2]="$SRCDIR/schroedinger-${SCHROEDINGER}.tar.gz" SRCURL[2]="http://www.diracvideo.org/download/schroedinger/schroedinger-${SCHROEDINGER}.tar.gz" SRCPAT[2]="NO" -# The A52 decoder - aka AC3, will be statically linked -SOURCE[3]="$SRCDIR/a52dec-$A52.tar.gz" -SRCURL[3]="http://liba52.sourceforge.net/files/a52dec-$A52.tar.gz" +# SPEEX audio codec: +SOURCE[3]="$SRCDIR/speex-${SPEEX}.tar.gz" +SRCURL[3]="http://downloads.us.xiph.org/releases/speex/speex-${SPEEX}.tar.gz" SRCPAT[3]="NO" +USE[3]="YES" # X264 encoder - for H264/AVC video streams, for static linking SOURCE[4]="$SRCDIR/x264-snapshot-${X264}.tar.bz2" @@ -269,8 +272,8 @@ src_checkout() { && find . -type d -name '.svn' -depth | xargs rm -rf \ && chown -R root:root . \ && cd .. \ - && tar -${TARCOMP}cf ${2} ffmpeg-${FFMPEG} \ - && rm -rf ffmpeg-${FFMPEG} + && tar -${TARCOMP}cf ${2} ffmpeg-${FFMPEG} + rm -rf ffmpeg-${FFMPEG} ;; *) # Do nothing ;; @@ -422,7 +425,7 @@ LDFLAGS="$SLKLDFLAGS" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_lame.log -make 2>&1 | tee $OUTPUT/make-${PRGNAM}_lame.log +make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_lame.log # Install lame into a temp location so ffmpeg can pickup the library make install DESTDIR=$FFMPEGDEPSDIR \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_lame.log @@ -452,7 +455,7 @@ LDFLAGS="$SLKLDFLAGS" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_amrnb.log -make 2>&1 | tee $OUTPUT/make-${PRGNAM}_amrnb.log +make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_amrnb.log # Install amrnb into a temp location so ffmpeg can pickup the library make install DESTDIR=$FFMPEGDEPSDIR \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_amrnb.log @@ -482,7 +485,7 @@ LDFLAGS="$SLKLDFLAGS" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_amrwb.log -make 2>&1 | tee $OUTPUT/make-${PRGNAM}_amrwb.log +make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_amrwb.log # Install amrwb into a temp location so ffmpeg can pickup the library make install DESTDIR=$FFMPEGDEPSDIR \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_amrwb.log @@ -512,7 +515,7 @@ LDFLAGS="$SLKLDFLAGS" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_raw1394.log -make 2>&1 | tee $OUTPUT/make-${PRGNAM}_raw1394.log +make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_raw1394.log # Install libraw1394 into a temp location so ffmpeg can pickup the library make install DESTDIR=$FFMPEGDEPSDIR \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_raw1394.log @@ -536,7 +539,7 @@ PKG_CONFIG_PATH="$FFMPEGDEPSDIR/usr/lib/pkgconfig" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_dc1394.log -make 2>&1 | tee $OUTPUT/make-${PRGNAM}_dc1394.log +make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_dc1394.log # Install libdc1394 into a temp location so ffmpeg can pickup the library make install DESTDIR=$FFMPEGDEPSDIR \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_dc1394.log @@ -568,7 +571,7 @@ LDFLAGS="$SLKLDFLAGS" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_faac.log -make 2>&1 | tee $OUTPUT/make-${PRGNAM}_faac.log +make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_faac.log # Install faac into a temp location so ffmpeg can pickup the library make install DESTDIR=$FFMPEGDEPSDIR \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_faac.log @@ -600,7 +603,7 @@ LDFLAGS="$SLKLDFLAGS" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_faad2.log -make 2>&1 | tee $OUTPUT/make-${PRGNAM}_faad2.log +make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_faad2.log # Install faad2 into a temp location so ffmpeg can pickup the library make install DESTDIR=$FFMPEGDEPSDIR \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_faad2.log @@ -609,30 +612,32 @@ mkdir -p $FFMPEGDEPSDIR/doc/faad2 cp -a $DOCS_FAAD2 $FFMPEGDEPSDIR/doc/faad2 || true cd - } + # ----------------------------------------------------------------------------- -# Compile a52 libraries +# Compile speex codec # ----------------------------------------------------------------------------- -make_a52() +make_speex() { -echo -e "**\n** a52 ...\n**" -cd $TMP/tmp-$PRGNAM/a52dec-${A52} +echo -e "**\n** speex ...\n**" +cd $TMP/tmp-$PRGNAM/speex-$SPEEX CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ - 2>&1 | tee $OUTPUT/configure-${PRGNAM}_a52.log -make 2>&1 | tee $OUTPUT/make-${PRGNAM}_a52.log -# Install a52 into a temp location so ffmpeg can pickup the library -make install DESTDIR=$FFMPEGDEPSDIR 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_a52.log -# Add DOCS to the ffmpegdeps to have it added to ffmpeg package later: -mkdir -p $FFMPEGDEPSDIR/doc/liba52 -cp -a $DOCS_A52 $FFMPEGDEPSDIR/doc/liba52 || true + 2>&1 | tee $OUTPUT/configure-${PRGNAM}_speex.log +make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_speex.log +# Install speex into a temp location so ffmpeg can pickup the library +echo -e "\n**\n**\n" +make install DESTDIR=$FFMPEGDEPSDIR \ + 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_speex.log +# Add DOCS to the ffmpegdeps to have it added to ffmpeg package later: +mkdir -p $FFMPEGDEPSDIR/doc/speex/ +cp $DOCS_SPEEX $FFMPEGDEPSDIR/doc/speex/ || true cd - } @@ -648,7 +653,7 @@ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_x264.log -make 2>&1 | tee $OUTPUT/make-${PRGNAM}_x264.log +make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_x264.log # Install x264 into a temp location so ffmpeg can pickup the library make install DESTDIR=$FFMPEGDEPSDIR \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_x264.log @@ -671,7 +676,7 @@ cd $TMP/tmp-$PRGNAM/gsm-${GSM} CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ -make 2>&1 | tee $OUTPUT/make-${PRGNAM}_gsm.log +make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_gsm.log # Install gsm into a temp location so ffmpeg can pickup the library make install 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_gsm.log mkdir -p $FFMPEGDEPSDIR/usr/{bin,include,lib} @@ -702,7 +707,7 @@ LDFLAGS="$SLKLDFLAGS" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_oil.log -make 2>&1 | tee $OUTPUT/make-${PRGNAM}_oil.log +make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_oil.log # Install liboil into a temp location so schroedinger can pickup the library echo -e "\n**\n**\n" # We used --prefix=$FFMPEGDEPSDIR/usr so that schroedinger's build will find the @@ -733,7 +738,7 @@ PKG_CONFIG_PATH="$FFMPEGDEPSDIR/usr/lib/pkgconfig" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_schroedinger.log -make 2>&1 | tee $OUTPUT/make-${PRGNAM}_schroedinger.log +make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_schroedinger.log # Install schroedinger into a temp location so ffmpeg can pickup the library echo -e "\n**\n**\n" make install DESTDIR=$FFMPEGDEPSDIR \ @@ -751,7 +756,7 @@ cd - # ----------------------------------------------------------------------------- # Compile ffmpeg with additional support for - -# LAME (MP3), XVID, FAAC (MP4), FAAD2 , A52 (AC3), X264, GSM, SCHROEDINGER +# LAME (MP3), XVID, FAAC (MP4), FAAD2 , SPEEX, X264, GSM, SCHROEDINGER # ----------------------------------------------------------------------------- make_ffmpeg() { @@ -787,16 +792,18 @@ PKG_CONFIG_PATH="$FFMPEGDEPSDIR/usr/lib/pkgconfig" \ --enable-postproc \ --enable-avfilter \ --enable-swscale \ - --enable-libtheora \ - --enable-libfaad \ - --enable-liba52 \ - --enable-libx264 \ + --enable-libdc1394 \ --enable-libgsm \ + --enable-libfaad \ --enable-libschroedinger \ - --enable-libdc1394 \ - --enable-pthreads \ + --enable-libspeex \ + --enable-libtheora \ + --enable-libx264 \ --enable-memalign-hack \ + --enable-pthreads \ --enable-x11grab \ + --enable-bzlib \ + --enable-zlib \ --enable-shared \ --enable-static \ --disable-debug \ @@ -804,7 +811,7 @@ PKG_CONFIG_PATH="$FFMPEGDEPSDIR/usr/lib/pkgconfig" \ --extra-cflags="-I$FFMPEGDEPSDIR/usr/include -DRUNTIME_CPUDETECT" \ --extra-ldflags="-L$FFMPEGDEPSDIR/usr/lib" \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_ffmpeg.log -make 2>&1 | tee $OUTPUT/make-${PRGNAM}_ffmpeg.log +make ${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_ffmpeg.log cd $OLDDIR } @@ -826,7 +833,7 @@ fi make_1394 make_faad2 -make_a52 +make_speex make_gsm make_oil make_schroedinger @@ -852,10 +859,10 @@ fi # statically, so we need to edit those out so that programs that try to link # against our ffmpeg will not get confused: for PCFILE in $(ls $PKG/usr/lib/pkgconfig/*.pc) ; do - sed -i -e 's/libraw1394//' -e 's/-la52//' -e 's/-lamrnb//' -e 's/-lamrwb//' \ - -e 's/-lfaac//' -e 's/-lfaad//' -e 's/-lgsm//' -e 's/-lmp3lame//' \ - -e 's/-lschroedinger-[^ ]*//' -e 's/-loil-[^ ]*//' -e 's/-lx264//' \ - -e 's/-ldc1394_control//' -e 's/-lraw1394//' $PCFILE + sed -i -e 's/libraw1394//' -e 's/-lspeex//' -e 's/-lamrnb//' \ + -e 's/-lamrwb//' -e 's/-lfaac//' -e 's/-lfaad//' -e 's/-lgsm//' \ + -e 's/-lmp3lame//' -e 's/-lschroedinger-[^ ]*//' -e 's/-loil-[^ ]*//' \ + -e 's/-lx264//' -e 's/-ldc1394_control//' -e 's/-lraw1394//' $PCFILE done # Add a configuration file for the ffserver: @@ -901,10 +908,8 @@ if [ -d $PKG/usr/man ]; then fi # Strip binaries -cd $PKG -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true -cd - +find $PKG | xargs file | grep -e "executable" -e "shared object" \ + | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null # Add package description: mkdir -p $PKG/install |