OSDN Git Service

Fix Solaris builds
[handbrake-jp/handbrake-jp-git.git] / contrib / Jamfile
index 202df5c..9bd4148 100644 (file)
@@ -57,10 +57,29 @@ actions LibA52
 Wget   $(SUBDIR)/a52dec.tar.gz : $(SUBDIR)/version_a52dec.txt ;
 LibA52 $(SUBDIR)/lib/liba52.a  : $(SUBDIR)/a52dec.tar.gz ;
 
+# FAAD2
+rule LibFaad2
+{
+    Depends $(<) : $(>) ;
+    Depends lib  : $(<) ;
+}
+
+actions LibFaad2
+{
+    cd `dirname $(>)` && CONTRIB=`pwd` &&
+    rm -rf faad2 && (gzip -dc faad2.tar.gz | tar xf -) &&
+    cd faad2 && $(PATCH) -p1 < ../patch-faad2-libtool22.patch &&
+    ./bootstrap && ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared && $(MAKE) && $(MAKE) install
+}
+Wget     $(SUBDIR)/faad2.tar.gz    : $(SUBDIR)/version_faad2.txt ;
+LibFaad2 $(SUBDIR)/lib/libfaad.a : $(SUBDIR)/faad2.tar.gz ;
+
 # libavcodec
 rule LibAvCodec
 {
     FFMPEG_PATCH = "$(PATCH) -p0 < ../patch-ffmpeg.patch" ;
+    FFMPEG_PATCH += " && $(PATCH) -p0 < ../patch-ffmpeg-latm.patch " ;
+    FFMPEG_PATCH += " && $(PATCH) -p0 < ../patch-ffmpeg-mpegleak.patch " ;
     if $(OS) = CYGWIN
     {
         FFMPEG_PATCH += " && $(PATCH) -p1 < ../patch-ffmpeg-cygwin.patch " ;
@@ -68,8 +87,18 @@ rule LibAvCodec
     else if $(OS) = SOLARIS
     {
         FFMPEG_PATCH += " && $(PATCH) -p1 < ../patch-ffmpeg-solaris.patch " ;
-        FFMPEG_OPTIONS = " --disable-mmx --extra-cflags=-fpic " ;
+    } 
+
+    if $(OS) = SOLARIS
+    {
+       #
+       # Not all of ffmpeg works on Solaris - disable the bits that
+       # don't. When we get new versions of FFMPEG we can try enabling
+       # then again.
+       #
+       FFMPEG_EXTRA_OPTIONS = "--disable-vis --disable-demuxer=mpc8 --disable-vhook" ;
     }
+
     Depends $(<) : $(>) ;
     Depends lib  : $(<) ;
 }
@@ -78,10 +107,13 @@ actions LibAvCodec
     cd `dirname $(>)` && CONTRIB=`pwd` &&
     rm -rf ffmpeg && (gzip -dc ffmpeg.tar.gz | tar xf -) &&
     cd ffmpeg && $(FFMPEG_PATCH) &&
-    ./configure --prefix=$CONTRIB --enable-gpl --enable-pthreads --enable-swscaler --disable-audio-beos --disable-shared --enable-static \
-        --disable-decoders --enable-decoder=mp2 --disable-parsers --enable-parser=mpegaudio \
-        --disable-encoders --enable-encoder=mpeg4 --enable-encoder=ac3 --enable-encoder=snow \
-        --disable-muxers --enable-muxer=ipod --disable-demuxers --disable-protocols --disable-bsfs &&
+    ./configure --prefix=$CONTRIB --enable-gpl --enable-pthreads --enable-swscale \
+        --disable-shared --enable-static --disable-encoders \
+        --enable-encoder=mpeg4 --enable-encoder=ac3 --enable-encoder=snow \
+        --enable-libfaad --disable-ffmpeg --disable-ffserver \
+        --disable-muxers --enable-muxer=ipod --disable-bsfs \
+        --extra-cflags="-I$CONTRIB/include" \
+        --extra-ldflags="-L$CONTRIB/lib" $(FFMPEG_EXTRA_OPTIONS) &&
     $(MAKE) && $(MAKE) install &&
     $(STRIP) $CONTRIB/lib/libavcodec.a
 }
@@ -187,12 +219,16 @@ rule LibFaac
 {
     Depends $(<) : $(>) ;
     Depends lib  : $(<) ;
+       if $(OS) = CYGWIN
+    {
+        CYGWIN_PATCH = "$(PATCH) -p1 < ../patch-faac-cygwin.patch &&" ;
+    }
 }
 actions LibFaac
 {
     cd `dirname $(>)` && CONTRIB=`pwd` &&
-    rm -rf faac && (gzip -dc faac.tar.gz | tar xf - ) && cd faac &&
-    ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared --enable-static &&
+    rm -rf faac && (gzip -dc faac.tar.gz | tar xf - ) && cd faac && $(CYGWIN_PATCH) ./bootstrap &&
+    ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared --enable-static --without-mp4v2 &&
     $(MAKE) && $(MAKE) install &&
     $(STRIP) $CONTRIB/lib/libfaac.a
 }
@@ -227,6 +263,7 @@ rule LibMp4v2
     LIBMP4V2_PATCH += "$(PATCH) -p1 < ../patch-mpeg4ip.patch && " ;
     LIBMP4V2_PATCH += "$(PATCH) -p1 < ../patch-mpeg4ip-nasm-2.00-configure.patch && " ;
     LIBMP4V2_PATCH += "$(PATCH) -p1 < ../patch-mpeg4ip-ac3.patch && " ;
+    LIBMP4V2_PATCH += "$(PATCH) -p1 < ../patch-mpeg4ip-colr.patch && " ;
     Depends $(<) : $(>) ;
     Depends lib  : $(<) ;
 }
@@ -271,8 +308,8 @@ actions LibMpeg2
 {
     cd `dirname $(>)` && CONTRIB=`pwd` &&
     rm -rf mpeg2dec && (gzip -dc mpeg2dec.tar.gz | tar xf - ) && 
-    cd mpeg2dec && $(PATCH) -p1 < ../patch-libmpeg2.patch &&
-    ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared --disable-sdl &&
+    cd mpeg2dec &&
+    ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared --disable-sdl --without-x &&
     $(MAKE) && $(MAKE) install &&
     $(STRIP) $CONTRIB/lib/libmpeg2.a
 }
@@ -354,6 +391,7 @@ actions LibTheora
 {
     cd `dirname $(>)` && CONTRIB=`pwd` && rm -rf libtheora &&
     (gzip -dc libtheora.tar.gz | tar xf - ) && cd libtheora &&
+    HAVE_PKG_CONFIG="no" && export HAVE_PKG_CONFIG &&
     ./configure --prefix=$CONTRIB --with-ogg=$CONTRIB --with-vorbis=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared \
             --disable-oggtest --disable-vorbistest --disable-sdltest --disable-examples &&
     $(MAKE) && $(MAKE) install &&
@@ -375,9 +413,7 @@ rule LibX264
         LIBX264_PATCH += " $(PATCH) -p1 < ../patch-x264-solaris.patch && " ;
     }
     LIBX264_PATCH += "$(PATCH) -p0 < ../patch-x264-idr.patch && " ;
-       LIBX264_PATCH += "$(PATCH) -p0 < ../patch-x264-vbv-1pass.patch && " ;
-    LIBX264_PATCH += "$(PATCH) -p0 < ../patch-x264-vbv-2pass.patch && " ;
-    Depends $(<) : $(>) ;
+       Depends $(<) : $(>) ;
     Depends lib  : $(<) ;
 }
 actions LibX264