X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=contrib%2FJamfile;h=c24c7602df7cd5fdf71b5c33e89b7c3611cde01b;hb=0f25cfb3cfac4feff657bb79bcc0b689baa99860;hp=ebc9e7ffee0c9721cd8c1aa27737e318a0f66302;hpb=ac8e538e6d02c2c63c3f8839cb1e6e13be48c593;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/contrib/Jamfile b/contrib/Jamfile index ebc9e7ff..c24c7602 100644 --- a/contrib/Jamfile +++ b/contrib/Jamfile @@ -4,7 +4,7 @@ SubDir TOP contrib ; # is installed for all other systems if $(OS) = MACOSX { - WGET = curl -L -o ; + WGET = curl -q -L -o ; } else { @@ -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 --disable-network" ; } + 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 --disable-vhook \ + --extra-cflags="-I$CONTRIB/include" \ + --extra-ldflags="-L$CONTRIB/lib" $(FFMPEG_EXTRA_OPTIONS) && $(MAKE) && $(MAKE) install && $(STRIP) $CONTRIB/lib/libavcodec.a } @@ -101,8 +133,9 @@ LibAvUtil $(SUBDIR)/lib/libavutil.a : $(SUBDIR)/lib/libavcodec.a ; LibAvUtil $(SUBDIR)/lib/libavformat.a : $(SUBDIR)/lib/libavcodec.a ; LibAvUtil $(SUBDIR)/lib/libswscale.a : $(SUBDIR)/lib/libavcodec.a ; -# CSS doesn't work on Cygwin/Windows as of now, so don't use it. -if $(OS) != CYGWIN +# HandBrake does not include a DVD decrypting library, +# so if a user requests it, let them download and compile it from a 3rd party +if $(CSS) = 1 { # libdvdcss # We need libdvdcss.so for libdvdread's configure to work... @@ -114,8 +147,8 @@ if $(OS) != CYGWIN actions LibDvdCss { cd `dirname $(>)` && CONTRIB=`pwd` && - rm -rf libdvdcss && (gzip -dc libdvdcss.tar.gz | tar xf - ) && - cd libdvdcss && + rm -rf libdvdcss-1.2.9 && (gzip -dc libdvdcss.tar.gz | tar xf - ) && + cd libdvdcss-1.2.9 && ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && $(MAKE) && $(MAKE) install && $(STRIP) $CONTRIB/lib/libdvdcss.a } @@ -145,8 +178,19 @@ rule LibDvdRead { Depends $(<) : $(>) ; Depends lib : $(<) ; + + if $(OS) = MACOSX + { + DVDREAD_PATCH = "$(PATCH) -p0 < ../patch-libdvdread-css-vlc-dylib.patch &&" ; + } + + if $(OS) = CYGWIN + { + DVDREAD_PATCH = "$(PATCH) -p1 < ../patch-libdvdread-cygwin.patch &&" ; + } + } -if $(OS) != CYGWIN +if $(CSS) = 1 # Include CSS support in libdvdread if requested { actions LibDvdRead { @@ -161,11 +205,12 @@ if $(OS) != CYGWIN else { # Cygwin/Windows doesn't use CSS as of now, so don't include it on the # configure line. + # MacOSX uses a dylib for CSS, so it doesn't need including there either. actions LibDvdRead { cd `dirname $(>)` && CONTRIB=`pwd` && - rm -rf libdvdread && (gzip -dc libdvdread.tar.gz | tar xf - ) && - cd libdvdread && + rm -rf libdvdread && (gzip -dc libdvdread.tar.gz | tar xf - ) && + cd libdvdread && $(DVDREAD_PATCH) ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared && $(MAKE) && $(MAKE) install && $(STRIP) $CONTRIB/lib/libdvdread.a @@ -179,12 +224,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 } @@ -212,29 +261,19 @@ LibMp3Lame $(SUBDIR)/lib/libmp3lame.a : $(SUBDIR)/lame.tar.gz ; rule LibMp4v2 { LIBMP4V2_PATCH = "" ; - if $(OS) = CYGWIN - { - LIBMP4V2_PATCH += "$(PATCH) -p1 < ../patch_mpeg4ip_cygwin.patch && " ; - } - 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 && " ; Depends $(<) : $(>) ; Depends lib : $(<) ; } actions LibMp4v2 { cd `dirname $(>)` && CONTRIB=`pwd` && - rm -rf mpeg4ip && (gzip -dc mpeg4ip.tar.gz | tar xf - ) && - cd mpeg4ip && $(LIBMP4V2_PATCH) - ./bootstrap --cache-file=$CONTRIB/config.cache --disable-mp3lame --disable-faac --disable-x264 --disable-server --disable-player && - $(MAKE) -C lib/mp4v2 libmp4v2.la && cp lib/mp4v2/.libs/libmp4v2.a $CONTRIB/lib && - cp mpeg4ip_config.h include/mpeg4ip.h include/mpeg4ip_version.h \ - include/mpeg4ip_win32.h lib/mp4v2/*.h $CONTRIB/include && + rm -rf libmp4v2 && (gzip -dc libmp4v2.tar.gz | tar xf - ) && + cd libmp4v2 && $(LIBMP4V2_PATCH) rm -rf build && mkdir build && cd build && + ../configure --disable-shared --disable-debug --prefix=$CONTRIB && $(MAKE) && make install && $(STRIP) $CONTRIB/lib/libmp4v2.a } -Wget $(SUBDIR)/mpeg4ip.tar.gz : $(SUBDIR)/version_mpeg4ip.txt ; -LibMp4v2 $(SUBDIR)/lib/libmp4v2.a : $(SUBDIR)/mpeg4ip.tar.gz ; +Wget $(SUBDIR)/libmp4v2.tar.gz : $(SUBDIR)/version_libmp4v2.txt ; +LibMp4v2 $(SUBDIR)/lib/libmp4v2.a : $(SUBDIR)/libmp4v2.tar.gz ; rule LibMkv { @@ -263,8 +302,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 } @@ -336,6 +375,25 @@ actions LibVorbisEnc } LibVorbisEnc $(SUBDIR)/lib/libvorbisenc.a : $(SUBDIR)/lib/libvorbis.a ; +# libtheora +rule LibTheora +{ + Depends $(<) : $(>) ; + Depends lib : $(<) ; +} +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 && + $(STRIP) $CONTRIB/lib/libtheora.a +} +Wget $(SUBDIR)/libtheora.tar.gz : $(SUBDIR)/version_libtheora.txt ; +LibTheora $(SUBDIR)/lib/libtheora.a : $(SUBDIR)/libtheora.tar.gz ; + # libx264 rule LibX264 { @@ -348,10 +406,8 @@ rule LibX264 { LIBX264_PATCH += " $(PATCH) -p1 < ../patch-x264-solaris.patch && " ; } -# AQ is temporarily disabled LIBX264_PATCH += "$(PATCH) -p0 < ../patch-x264-aq.patch && " ; LIBX264_PATCH += "$(PATCH) -p0 < ../patch-x264-idr.patch && " ; - LIBX264_PATCH += "$(PATCH) -p0 < ../patch-x264-vbv-2pass.patch && " ; - Depends $(<) : $(>) ; + Depends $(<) : $(>) ; Depends lib : $(<) ; } actions LibX264 @@ -378,6 +434,7 @@ rule LibXvidCore LIBXVIDCORE_PATCH = "$(PATCH) -p1 < ../patch-xvidcore-cygwin.patch && " ; } LIBXVIDCORE_PATCH += "$(PATCH) -p1 < ../patch-xvidcore-nasm-2.00-configure.patch && " ; + LIBXVIDCORE_PATCH += "$(PATCH) -p1 < ../patch-xvidcore-fdct.patch && " ; Depends $(<) : $(>) ; Depends lib : $(<) ; } @@ -413,3 +470,22 @@ if $(OS) = CYGWIN Wget $(SUBDIR)/zlib.tar.gz : $(SUBDIR)/version_zlib.txt ; Zlib $(SUBDIR)/lib/libz.a : $(SUBDIR)/zlib.tar.gz ; } + +# bzip2 +if $(OS) = CYGWIN +{ + rule BZip2 + { + Depends $(<) : $(>) ; + Depends lib : $(<) ; + } + actions BZip2 + { + cd `dirname $(>)` && CONTRIB=`pwd` && + rm -rf bzip2 && (gzip -dc bzip2.tar.gz | tar xf - ) && + cd bzip2 && $(MAKE) && $(MAKE) install && cp libbz2.a $CONTRIB/lib/ && + $(STRIP) $CONTRIB/lib/libbz2.a + } + Wget $(SUBDIR)/bzip2.tar.gz : $(SUBDIR)/version_bzip2.txt ; + BZip2 $(SUBDIR)/lib/libbz2.a : $(SUBDIR)/bzip2.tar.gz ; +}