[xiph-commits] r12483 - trunk/ffmpeg2theora

j at svn.xiph.org j at svn.xiph.org
Fri Feb 16 03:38:56 PST 2007


Author: j
Date: 2007-02-16 03:38:53 -0800 (Fri, 16 Feb 2007)
New Revision: 12483

Modified:
   trunk/ffmpeg2theora/build.mac.sh
   trunk/ffmpeg2theora/get_ffmpeg_svn.sh
Log:
update build script again, including ffmpeg configure changes

Modified: trunk/ffmpeg2theora/build.mac.sh
===================================================================
--- trunk/ffmpeg2theora/build.mac.sh	2007-02-16 08:35:58 UTC (rev 12482)
+++ trunk/ffmpeg2theora/build.mac.sh	2007-02-16 11:38:53 UTC (rev 12483)
@@ -1,18 +1,21 @@
 #!/bin/bash
 #build universal binary of ffmpeg2theora and package it
 #
-
+set -e
 build_all_osx() {
-  unset PKG_CONFIG_PATH
-  
   tmp_dir=/tmp/ffmpeg2theora
   build_dir=$tmp_dir/$arch
   dist_dir=$tmp_dir/dist/$arch
   mkdir -p $build_dir
   mkdir -p $dist_dir
 
-  ffmpeg_extra="--enable-pp --enable-gpl --enable-swscaler --disable-encoders  --enable-libogg --enable-vorbis"
-  ffmpeg_extra="$ffmpeg_extra --enable-a52 --enable-dts"
+  unset PKG_CONFIG_PATH
+  export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=0
+  export PKG_CONFIG_ALLOW_SYSTEM_LIBS=0
+  export PKG_CONFIG_LIBDIR=$dist_dir/lib/pkgconfig
+
+  ffmpeg_extra="--enable-pp --enable-gpl --enable-swscaler --disable-encoders  --enable-libogg --enable-libvorbis"
+  ffmpeg_extra="$ffmpeg_extra --enable-libdts --enable-liba52"
   test -e $dist_dir/lib/libfaad.a && ffmpeg_extra="$ffmpeg_extra --enable-faad" && echo "building with faad"
   echo ""
   if [ $arch == 'ppc' ]; then
@@ -24,53 +27,89 @@
   fi
   export CFLAGS="-arch $arch"
   export LDFLAGS="-arch $arch"
-  
-  echo "building $arch/libogg"
+    
   cd $build_dir
-  test -e ogg || svn co https://svn.xiph.org/trunk/ogg
-  cd ogg && svn up &&  ./autogen.sh --disable-shared --prefix=$dist_dir && make && make install 
+  if [ -e ogg ]; then
+    echo "using existing $arch/libogg"
+  else
+    echo "building $arch/libogg"
+    svn co https://svn.xiph.org/trunk/ogg
+    cd ogg
+    ./autogen.sh --disable-shared --prefix=$dist_dir && make && make install
+  fi 
   export PKG_CONFIG_PATH=$build_dir/ogg:$PKG_CONFIG_PATH
 
-  echo "building libvorbis-aotuv"
   cd $build_dir
-  test -e vorbis-aotuv || svn co https://svn.xiph.org/branches/vorbis-aotuv/
-  cd vorbis-aotuv && svn up && ./autogen.sh --disable-shared --prefix=$dist_dir && make && make install
-  export PKG_CONFIG_PATH=$build_dir/vorbis-aotuv:$PKG_CONFIG_PATH
+  package="vorbis-aotuv"
+  if [ -e $package ]; then
+    echo "using existing $arch/$package"
+  else
+    echo "building $package"
+    svn co https://svn.xiph.org/branches/vorbis-aotuv/
+    cd $package
+    ./autogen.sh --disable-shared --prefix=$dist_dir && make && make install
+  fi
+  export PKG_CONFIG_PATH=$build_dir/$package:$PKG_CONFIG_PATH
 
-  echo "building $arch/libtheora"
   cd $build_dir
-  test -e theora || svn co https://svn.xiph.org/trunk/theora
-  cd theora && ./autogen.sh --disable-shared --prefix=$dist_dir --host=$arch && make && make install
-  export PKG_CONFIG_PATH=$build_dir/theora:$PKG_CONFIG_PATH
+  package="theora"
+  if [ -e $package ]; then
+    echo "using existing $arch/$package"
+  else
+    echo "building $package"
+    svn co https://svn.xiph.org/trunk/theora
+    cd $package
+    ./autogen.sh --disable-shared --prefix=$dist_dir --host=$arch && make && make install
+  fi
+  export PKG_CONFIG_PATH=$build_dir/$package:$PKG_CONFIG_PATH
+
+  cd $build_dir
+  package="libdts-0.0.2"
+  if [ -e $package ]; then
+    echo "using existing $arch/$package"
+  else
+    echo "building $arch/$package"
+    tarball="http://download.videolan.org/pub/videolan/libdca/0.0.2/libdca-0.0.2.tar.gz"
+    test -e libdts-0.0.2 || curl $tarball > libdts-0.0.2.tar.gz && tar xzf libdts-0.0.2.tar.gz && \
+    cd libdts-0.0.2 && ./configure --prefix=$dist_dir && make && make install
+  fi
   
-  echo "building $arch/libdts"
   cd $build_dir
-  tarball="http://download.videolan.org/pub/videolan/libdca/0.0.2/libdca-0.0.2.tar.gz"
-  test -e libdts-0.0.2 || curl $tarball > libdts-0.0.2.tar.gz && tar xzf libdts-0.0.2.tar.gz
-  cd libdts-0.0.2
-  ./configure --prefix=$dist_dir && make && make install
-  export PKG_CONFIG_PATH=$dist_dir/lib/pkgconfig:$PKG_CONFIG_PATH
+  package="a52dec-0.7.4"
+  if [ -e $package ]; then
+    echo "using existing $arch/$package"
+  else
+    echo "building $arch/$package"
+    tarball="http://liba52.sourceforge.net/files/$package.tar.gz"
+    test -e $package || curl $tarball > $package.tar.gz && tar xzf $package.tar.gz
+    cd $package && ./configure --disable-shared --prefix=$dist_dir && make && make install
+  fi
   
-  echo "building $arch/ffmpeg"
   cd $build_dir
-  test -e ffmpeg || svn co svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
-  cd ffmpeg
-  #svn up
-  unset CFLAGS
-  unset LDFLAGS
-  ./configure --cross-compile $ffmpeg_extra --arch=$ffmpeg_arch  \
-    --extra-ldflags="-L$dist_dir/lib -arch $arch" \
-    --extra-cflags="-I$dist_dir/include -arch $arch"
-  make
-
+  package="ffmpeg"
+  if [ -e $package ]; then
+    echo "using existing $arch/$package"
+  else
+    echo "building $arch/$package"
+    test -e ffmpeg || svn co svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
+    cd ffmpeg
+    unset CFLAGS
+    unset LDFLAGS
+    ./configure --cross-compile $ffmpeg_extra --arch=$ffmpeg_arch  \
+      --extra-ldflags="-L$dist_dir/lib -arch $arch" \
+      --extra-cflags="-I$dist_dir/include -arch $arch"
+    make
+  fi
   export PKG_CONFIG_PATH=$build_dir/ffmpeg:$PKG_CONFIG_PATH
-  echo $PKG_CONFIG_PATH
+  
   echo "build $arch/ffmpeg2theora"
   export CFLAGS="-arch $arch"
   export LDFLAGS="-arch $arch"  
   cd $build_dir
   test -e ffmpeg2theora || svn co https://svn.xiph.org/trunk/ffmpeg2theora
-  cd ffmpeg2theora &&  svn up && ./autogen.sh --prefix=$dist_dir --with-static-linking
+  cd ffmpeg2theora
+  svn up
+  ./autogen.sh --prefix=$dist_dir --with-static-linking
   make && make install
   
 }
@@ -101,4 +140,3 @@
 
 cd $dist_dir
 zip -r ffmpeg2theora-$version.pkg.zip ffmpeg2theora-$version.pkg
-

Modified: trunk/ffmpeg2theora/get_ffmpeg_svn.sh
===================================================================
--- trunk/ffmpeg2theora/get_ffmpeg_svn.sh	2007-02-16 08:35:58 UTC (rev 12482)
+++ trunk/ffmpeg2theora/get_ffmpeg_svn.sh	2007-02-16 11:38:53 UTC (rev 12483)
@@ -1,9 +1,9 @@
 #!/bin/sh
 
-#optional, if you have the libs installed:
-#extra="--enable-faad --enable-libgsm --enable-amr_nb --enable-amr_nb-fixed --enable-amr_wb --enable-amr_if2 --enable-dts"
+#optional, if you have those libs installed:
+#extra="--enable-libfaad --enable-libgsm --enable-amr_nb --enable-amr_nb-fixed --enable-amr_wb --enable-amr_if2 --enable-libdts"
 
-common="--enable-gpl --enable-swscaler --enable-a52 --disable-encoders"
+common="--enable-gpl --enable-swscaler --enable-liba52 --disable-encoders"
 
 #linux
 options="$common --enable-pthreads $extra"



More information about the commits mailing list