diff options
149 files changed, 4047 insertions, 3087 deletions
diff --git a/00-BuildUserGuide.txt b/00-BuildUserGuide.txt new file mode 100644 index 000000000..3dd304128 --- /dev/null +++ b/00-BuildUserGuide.txt @@ -0,0 +1,375 @@ +HandBrake 0.9.3 Build User Guide +******************************** + +Table of Contents +***************** + +1 Introduction +2 Quickstart +3 Build Process + 3.1 Checkout Sources + 3.2 Configure + 3.3 Build + 3.4 Clean + 3.5 Extra Clean +4 Make Targets + 4.1 Global + 4.2 General Modules + 4.3 Contrib Modules + 4.4 Contrib Aggregate +5 Platform Requirements and Notes + 5.1 Mac OS X + 5.2 Cygwin + 5.3 Linux + + +1 Introduction +************** + +This guide documents the recommended process to build HandBrake from +the official source-code repository. Building from any other source is +not unsupported. + +2 Quickstart +************ + +This chapter is for the impatient or those just looking for a quick +summary of the commands used to launch a typical build with the fewest +commands possible. For more control over the build process please skip +this section and jump to *Note Build Process:: for full details. + + svn checkout svn://svn.handbrake.fr/HandBrake/trunk hb-trunk + cd hb-trunk + ./configure --launch + +The above is an special streamlined invocation of `configure' which +performs the following steps automatically: + + * assert scratch directory `build/' does not exist + + * create scratch directory `build/' + + * change to directory `build/' + + * launch `make' + + * capture build output to `build/log.txt' + + * echo build output + +3 Build Process +*************** + +3.1 Checkout Sources +==================== + +Checkout HandBrake from the official source-code repository. + + svn checkout svn://svn.handbrake.fr/HandBrake/trunk hb-trunk + cd hb-trunk + +Sources are checked out from the `trunk' branch. This document was +generated from that very branch, and for example purposes, we will use +exactly the same branch. + +If you have write-access to the repository, then you may add the +appropriate login/password information as needed. It is recommended to +use Subversion 1.5.0 or higher. Lower versions should also work. + +3.2 Configure +============= + +Configure the build system. + + rm -fr build/ + mkdir build/ + cd build/ + ../configure + +Create a scratch directory which will contain all files created during +the build process. The directory name is arbitrary but we recommend +something simple and descriptive. One directory is required for each +distinctly configured build. We name our directory `build' for example +purposes. + +The `configure' utility accepts many options. It is recommended that +you specify `--help' for the complete list of options. The following +options are detailed: + +`--help' + List available options. + +`--debug=MODE' + Select debug mode. Must be one of `none', `min', `std', `max'. + This generally maps to gcc options `-g0', `-g1', `-g2', `-g3'. + +`--optimize=MODE' + Select optimize mode. Must be one of `none', `speed', `size'. + This generally maps to gcc options `-g0', `-O0', `-O3', `-Os'. + +`--arch=MODE' + Select build architecture. The available architectures vary by + platform. Most platforms support exactly one architecture except + Mac OS X which has support for various universal binary + architectures. The available choices are hard-coded per platform + and no sanity checks for the required tools are performed. + +`--gcc=EXE' + Specify the `gcc' executable to use where EXE is the executable + name which is either absolute or environment `PATH' is searched + accordingly. + +Clean-room procedures dictate that when certain factors change, old +builds should be scrapped and new builds configured. This is the main +reason for requiring a scratch directory; to promote consistent, +reliable and clean software builds. The following is a short list of +some of the reasons why someone may choose to scrap an existing build: + + * configure with different options + + * subversion working dir is updated and you want configure to + re-evaluate working dir metadata. + + * build corruption is suspected + +There are generally two methods for scrapping a build. The `build' +directory can be recusrively removed which has the effect of loosing +your existing configuration but does guarantee no residuals are left +behind. The other method is to use ask the build system to perform an +`xclean'. This is known to work well but will leave empty directories +behind. However, the configuration is left intact. See *Note Extra +Clean:: for further details. + +3.3 Build +========= + +Build main product. All necessary dependencies are also built if +required. + + make + +Parallel builds may optionally be enabled. Be aware that while a +parallel build may save time on systems with additional cores, the +output is often mixed, overlapped and sometimes even corrupted with +binary characters. Thus if you experience a build issue, you should +clean and redo the build in default serial mode to produce a readable +log. The following command allows for up to 4 concurrent jobs via make: + + make -j4 + +3.4 Clean +========= + +Clean all build output excluding contrib modules. Configuration is +retained. + + make clean + +3.5 Extra Clean +=============== + +Clean all build output including contrib modules. Configuration is +retained. + + make xclean + +4 Make Targets +************** + +The build system supports passing many kinds of targets some of which +become very useful in normal development cycles. The targets by +convention are lower-case words passed to `make'. Global targets are +one-word targets. Scoped targets are usually two-words seperated by a +period. + +4.1 Global +========== + +`make' + Alias for `make build'. + +`make build' + Build main product. All necessary dependencies are also built if + required. + +`make clean' + Clean all build output excluding contrib modules. Configuration is + retained. + +`make xclean' + Clean all build output including contrib modules. Configuration is + retained. + +4.2 General Modules +=================== + +General modules such as `libhb' and `test' have the following scoped +targets: + +`make MODULE.build' + Build MODULE. + +`make MODULE.clean' + Clean build output for MODULE. + +4.3 Contrib Modules +=================== + +Contrib modules such as `a52dec', `bzip2', `faac', `faad2', `ffmpeg', +`lame', `libdca', `libdvdread', `libmkv', `libmp4v2', `libogg', +`libsamplerate', `libtheora', `libvorbis', `mpeg2dec', `x264', +`xvidcore' and `zlib' have the following scoped targets: + +`make MODULE.fetch' + Download source tarball from the Internet and save to + `TOP/downloads' directory. No checksumming is performed. + +`make MODULE.extract' + Extract source tarball into `build' tree. + +`make MODULE.patch' + Apply appropriate patches (if any) to module sources. + +`make MODULE.configure' + Configure module sources. This usually invokes autotool configure. + +`make MODULE.build' + Build module. This usually invokes autotool build. + +`make MODULE.install' + Install module products such as headers and libraries into `build' + tree. This usually invokes autotool install. + +`make MODULE.uninstall' + Uninstall module products; generally the reverse of install. This + usually invokes autotool uninstall. + +`make MODULE.clean' + Clean module; generally the reverse of build. This usually + invokes autotool clean. + +`make MODULE.xclean' + Extra clean module; first invokes uninstall then recursively + removes the module build directory. + +4.4 Contrib Aggregate +===================== + +For convenience, the following targets aggregate the all contrib +modules' respective targets together: + + * make contrib.fetch + + * make contrib.extract + + * make contrib.patch + + * make contrib.configure + + * make contrib.build + + * make contrib.install + + * make contrib.uninstall + + * make contrib.clean + + * make contrib.xclean + +5 Platform Requirements and Notes +********************************* + +The build system supports various platforms of interest to the project. +However this does not mean it supports all plaforms. If the platform is +not listed in this chapter, then it is not supported. + +The following tools are used on various platforms and it is recommended +you use these versions or newer: + + * python - Python 2.4.6 + + * curl - curl 7.19.3 (or wget) + + * m4 - GNU M4 1.4.6 + + * make - GNU Make 3.81 + + * patch - Patch 2.5.8 + + * tar - GNU tar 1.15.1 + + * wget - GNU Wget 1.11.4 (or curl) + +5.1 Mac OS X +============ + +Building on Mac OS X is well supported. It is the reference platform +for HandBrake. The following are the recommended specifications for +this platform; but is not necessarily the only configuration that is +possible: + + * Mac Intel hardware + + * Mac OS X 10.5.6 + + * Xcode-3.1.2 + + * gcc 4.0.1 (Apple Inc. build 5490) + + * yasm 0.7.2.2153 (for i386 or x86_64 architectures) + + Note: It is recommended to use the platform distribution's bundled + compiler for maximum C++ compatibility. If you build with a custom + compiler it will likely introduce non-standard runtime + requirements. There are of course many valid reasons to build with + unbundled compilers, but be aware it is generally unsupported and + left as an exercise to the reader. + +5.2 Cygwin +========== + +Building on Cygwin is supported. The following are the recommended +specifications for this platform; but is not necessarily the only +configuration that is possible: + + * Intel 32-bit or 64-bit hardware + + * Cygwin, gcc 4.3.2 + + * yasm 0.7.1.2093 (for i386 or x86_64 architectures) + + Note: As of this writing, Cygwin has available to it several + versions of gcc; only one of which may be found and used in the + path as `gcc' and `g++'. Configure will thus find what is probably + the older version of gcc in a typical Cygwin environment. If you + desire to build with the newer gcc, it is found in the path as + `gcc-4' and `g++-4' respectively and you must indicate to + configure the desired versions. The following syntax should do the + trick: + + ../configure --gcc=gcc-4 + +5.3 Linux +========= + +Building on Linux is supported. The following are the recommended +specifications for this platform; but is not necessarily the only +configuration that is possible: + + * Intel 32-bit or 64-bit hardware + + * Fedora 8, gcc 4.1.2, yasm 0.6.2.1985 + + * Fedora 9, gcc 4.3.0, yasm 0.6.2.1985 + + * Fedora 10, gcc 4.3.2, yasm 0.7.1.2093 + + * gcc 4.0.0 or higher is reported to work + + Note: It is recommended to use the platform distribution's bundled + compiler for maximum C++ compatibility. If you build with a custom + compiler it will likely introduce non-standard runtime + requirements. There are of course many valid reasons to build with + unbundled compilers, but be aware it is generally unsupported and + left as an exercise to the reader. + diff --git a/BUILD b/BUILD deleted file mode 100644 index edd841e66..000000000 --- a/BUILD +++ /dev/null @@ -1,85 +0,0 @@ -$Id: BUILD,v 1.11 2005/10/23 01:35:59 titer Exp $ - -BUILD file for HandBrake <http://handbrake.fr/> - -Building HandBrake with make -============================= - -Step 1: get needed tools -============== - -+ gcc and g++ - There are usually included in your OS' dev tools. On BeOS/Zeta, the - default gcc isn't enough, gcc 2.95.3 is required. - -+ nasm (Only for x86. On Mac OS X Intel, Xcode 2.4.1 include it) - -Cygwin: - See Trac > Windows Compile Guide - -Step 2: configuration -============== - -The HB_BUILD and HB_VERSION are defined in a single file, the Makefile correct the values in Xcode too. - -The file where the informations are stored is Makefile.config - -Step 3: build -============== - -Run `make'. This will build libhb, Handbrake and HandBrakeCLI as Universal Binary. -This build method use precompiled contrib libraries. Script to build those binaries are provided too. -All the build is handled by Xcode 2.4.1, should work on powerPC and Intel Macs. - -# To build under Cygwin simply use the command: -make HandbrakeCLI - -This will download pre-compiled libaries and build the handbrake source. - ------------------------------------------------------------------------------------------------------ - -Building HandBrake with jam -============================= - -You can build HandBrake on BeOS, MacOS X, Linux, and on Windows using Cygwin. -If you'd like to port it to another OS, email me ([email protected]). - -Step 1: get needed tools -============== - -+ gcc and g++ - There are usually included in your OS' dev tools. On BeOS/Zeta, the - default gcc isn't enough, gcc 2.95.3 is required. - -+ jam - I use 2.5rc3, earlier versions might cause issues. - On BeOS, you can download it at <http://www.haiku-os.org/develop.php>. - On OS X, you cannot use the modified jam shipped with the developer - tools, use the one included in the Handbrake svn checkout instead. - On Cygwin, get the jam source from - http://public.perforce.com/public/jam/index.html, - compile it with gcc in Cygwin, and put the jam executable somewhere on - your path. - -+ nasm (Only for x86. On Mac OS X Intel, Xcode 2.4.1 include it) - -+ libtool, autoconf, automake - To build libdca (the DTS audio extraction library) on Mac OS X via jam, you'll - need to update the default Mac OS X versions of libtool, autoconf and automake. - Compilation has been seen to work with libtool and libtool-shlibs v1.5.22-1000, - autoconf v2.60-4, and automake v1.9.6-3. You can update these tools using Fink. - Download the Fink 0.8.1 Binary Installer for your platform (PowerPC or Intel) - from http://www.finkproject.org/download/index.php?phpLang=en and install Fink - using the installer. If you want to use a GUI to run Fink, you can install - FinkCommander. Download the FinkCommander 0.5.4 installer from - http://finkcommander.sourceforge.net/ and install from the disk image. You can - install libtool, libtool-shlibs, autoconf and automake using FinkCommander. - -Cygwin: - See Trac > Windows Compile Guide - -Step 2: build -============== - -Run `./configure && jam'. This will build every library HandBrake -requires, then HandBrake itself. diff --git a/BuildContribsDarwin.sh b/BuildContribsDarwin.sh deleted file mode 100755 index 736d7cd1c..000000000 --- a/BuildContribsDarwin.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh -# This script build the contrib libs -# This used on MaxOs X to generate a universal version of the contrib libraries -# The new building process for HandBrake is to download a precompiled universal contrib folder -# and use them to build universal binaries of HandBrake -# pri: 01/28/07 -# ######################################################################## -# Parameters: -# Package Version (Version must be incremented to ensure that each of trunk/branches use the correct version) -# IP of the other platform host -# Username to connect with (passwordless must be setup between the 2 machines) -# -# ie: ./BuildContribsDarwin.sh 0001 192.168.0.150 toto -# -# ######################################################################### -# The script will connect to the other computer, download and build all of the contrib libraries -# and in the same time download and compile the contrib libraries on the native system -# My setup to do that is Mac Pro Intel as native and a Mac mini G4 ppc as foreign -# -# Native is the master computer, it sends compile commands to the foreign, get the library, then do a lipo -# to assemble both versions and put a universal binary version of the library in contrib/lib folder -# -# Once all of the contrib libraries are builded, a contribbin-darwin-${version}.tar.gz file is created, this file must -# be uploaded to the ftp server so Xcode will be able to build universal binaries of the HandBrake, HandBrakeCLI and libhb -# -# ########################################################################## -# SSH passwordless setup instructions -# 1) log on native using terminal -# 2) ssh-keygen -t rsa -# 3) leave passphrase empty (hit return) -# 4) copy the $HOME/.ssh/id_rsa.pub to foreign machine $HOME/.ssh/authorized_keys -# ########################################################################## -export VERSION=$1 -export IP=$2 -export USERNAME=$3 -export REPOS=svn://svn.handbrake.fr/HandBrake/trunk -# ########################################################################## -# Launch the build on the foreign system -# ########################################################################## -ssh $USERNAME@$IP "rm -rf HBBUILDTMP ; mkdir HBBUILDTMP ; svn co $REPOS HBBUILDTMP ; cd HBBUILDTMP ; ./configure ; cd contrib ; cp ../config.jam . ; ../jam ; touch BUILDTERMINATED" & -./configure -cd contrib -rm -rf lib include *tar.gz bin share man native foreign -cp ../config.jam . -# Use the new UB jam to be shure to use the correct version to build libraries (native on each system) -../jam -mkdir native -mv lib native -mkdir lib -mkdir foreign -# wait until the foreign build is done :) -wait -echo the foreign build is done, transferring files to native computer: -cd foreign -mkdir lib -cd lib -scp $USERNAME@$IP:/Users/$USERNAME/HBBUILDTMP/contrib/lib/*a . -for lib in `ls *.a` -do - echo ... lipo contrib libraries: $lib - lipo -create $lib ../../native/lib/$lib -output ../../lib/$lib -done; - - -cd ../.. -echo $VERSION > DarwinContribVersion.txt -echo Creating contribbin-darwin-$VERSION.tar.gz -tar zcvf contribbin-darwin-$VERSION.tar.gz lib include DarwinContribVersion.txt -echo Done.... -ls -l contribbin-darwin-$VERSION.tar.gz -cd .. -echo $VERSION > MacOsXContribBinariesVersion.txt diff --git a/DownloadMacOsXContribBinaries.sh b/DownloadMacOsXContribBinaries.sh deleted file mode 100755 index 29e282820..000000000 --- a/DownloadMacOsXContribBinaries.sh +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/sh - -# Incremented every time a new contrib package is available -VERSION=`cat MacOsXContribBinariesVersion.txt` - -if [ -f contrib/DarwinContribVersion.txt ]; then - if [ "`cat contrib/DarwinContribVersion.txt`" = $VERSION ]; then - echo "Contribs are up to date." - exit 0 - fi -fi - -HOST=download.m0k.org -#HOST=download.mediafork.dynalias.com -#HOST=sr55.ashosted.com -FILE=contribbin-darwin-$VERSION.tar.gz -#URL=http://$HOST/contrib/$FILE -URL=http://$HOST/handbrake/contrib/$FILE -# Check for internet connectivity -if ! host $HOST > /dev/null 2>&1; then - echo "Please connect to the Internet (could not resolve $HOST)." - exit 1 -fi - -# Look for something that can handle an HTTP download - WGET="curl -L -O" - -# Get and install the package -echo "Getting contribs ($VERSION)..." -( cd contrib && rm -f $FILE && $WGET $URL && rm -Rf lib include && \ - tar xzf $FILE && ranlib lib/*.a ) || exit 1 - -exit 0 - diff --git a/Jamfile b/Jamfile deleted file mode 100644 index ac3e79484..000000000 --- a/Jamfile +++ /dev/null @@ -1,98 +0,0 @@ -# $Id: Jamfile,v 1.86 2005/11/04 13:09:40 titer Exp $ -# -# This file is part of the HandBrake source code. -# Homepage: <http://handbrake.fr/>. -# It may be used under the terms of the GNU General Public License. - -SubDir TOP ; - -# libhb + contrib libraries -HANDBRAKE_LIBS = libhb.a - contrib/lib/liba52.a contrib/lib/libavformat.a - contrib/lib/libavcodec.a contrib/lib/libavutil.a - contrib/lib/libdca.a contrib/lib/libdvdread.a - contrib/lib/libmp4v2.a contrib/lib/libfaac.a - contrib/lib/libmp3lame.a contrib/lib/libmpeg2.a - contrib/lib/libvorbis.a contrib/lib/libvorbisenc.a - contrib/lib/libogg.a contrib/lib/libsamplerate.a - contrib/lib/libx264.a contrib/lib/libxvidcore.a - contrib/lib/libmkv.a contrib/lib/libswscale.a - contrib/lib/libtheora.a contrib/lib/libfaad.a ; - -if $(OS) = UNKNOWN -{ - OS = CYGWIN ; -} - -if $(OS) = CYGWIN -{ - HANDBRAKE_LIBS = $(HANDBRAKE_LIBS) contrib/lib/libbz2.a contrib/lib/libz.a ; -} - -if $(CSS) = 1 -{ - HANDBRAKE_LIBS = $(HANDBRAKE_LIBS) contrib/lib/libdvdcss.a ; -} - -# Interfaces -CLI_BIN = HandBrakeCLI ; -CLI_SRC = test/test.c - test/parsecsv.c ; -BEOS_BIN = HandBrake ; -BEOS_SRC = beos/HBApp.cpp beos/MainWindow.cpp beos/ScanWindow.cpp - beos/PicWindow.cpp beos/Stepper.cpp beos/QueueWindow.cpp ; -WX_BIN = wxHB ; -WX_SRC = wx/hbWizard.cpp wx/wxHB.cpp ; -UI_BIN = $(CLI_BIN) $(BEOS_BIN) $(WX_BIN) ; -UI_SRC = $(CLI_SRC) $(BEOS_SRC) $(WX_SRC) ; - -# CLI app -# Don't build the CLI from here if MACOSX, let xcode build it :) -if $(OS) != MACOSX -{ - Main $(CLI_BIN) : $(CLI_SRC) ; -} - -if $(OS) = BEOS -{ - Main HandBrake : $(BEOS_SRC) ; - - BeOSPackage HandBrake-$(HB_VERSION)-BeOS.zip : HandBrake ; - HB_PACKAGES += HandBrake-$(HB_VERSION)-BeOS.zip ; -} -if $(OS) = MACOSX -{ - OSX_SRC = macosx/main.mm macosx/Controller.h macosx/Controller.mm - macosx/PictureController.h macosx/PictureController.mm - macosx/HBQueueController.h macosx/HBQueueController.mm - macosx/HBAdvancedController.h macosx/HBAdvancedController.m - macosx/HBImageAndTextCell.h macosx/HBImageAndTextCell.m - macosx/HBPreferencesController.h macosx/HBPreferencesController.m - macosx/HBPresets.h macosx/HBPresets.m - macosx/English.lproj/InfoPlist.strings ; - - OSXApp HandBrake.app : $(OSX_SRC) $(HANDBRAKE_LIBS) ; - - # Package - OSXPackage HandBrake-$(HB_VERSION)-OSX.zip : HandBrake.app ; - HB_PACKAGES += HandBrake-$(HB_VERSION)-OSX.zip ; -} -if $(OS) = LINUX -{ - # WX UI outdated - #SystemLibraries $(WX_BIN) : -lpthread `wx-config --libs` ; - #ObjectC++Flags $(WX_SRC) : `wx-config --cflags` ; - #Main $(WX_BIN) : $(WX_SRC) ; -} - -if $(OS) != MACOSX -{ - ObjectHdrs $(UI_SRC) : $(TOP)/libhb ; - LinkLibraries $(UI_BIN) : $(HANDBRAKE_LIBS) ; -} -# Packages -NotFile package ; -Depends package : $(HB_PACKAGES) ; - -SubInclude TOP contrib ; -SubInclude TOP libhb ; diff --git a/Jamrules b/Jamrules deleted file mode 100644 index 490aa870c..000000000 --- a/Jamrules +++ /dev/null @@ -1,101 +0,0 @@ -# $Id: Jamrules,v 1.59 2005/11/04 16:06:21 titer Exp $ -# -# This file is part of the HandBrake source code. -# Homepage: <http://handbrake.fr/>. -# It may be used under the terms of the GNU General Public License. - -include config.jam ; - -if ! $(DEFINES) -{ - Exit "Please run ./configure first." ; -} - -# This line needs to be manually bumped for each release. -HB_VERSION = 0.9.3 ; - -# If the user configured with the --snapshot argument, -# generate version and build numbers that include -# the svn revision and are marked as unstable. -if $(SNAPSHOT) = 1 -{ -HB_VERSION = "svn$(SVN_REV)" ; -HB_BUILD = "$(BUILD_DATE)01" ; -APPCAST_URL = "http://handbrake.fr/appcast_unstable.xml" ; -} -else -{ -HB_BUILD = "$(BUILD_DATE)00" ; -APPCAST_URL = "http://handbrake.fr/appcast.xml" ; -} - -DEFINES += HB_VERSION=\\\"$(HB_VERSION)\\\" HB_BUILD=$(HB_BUILD) ; -LANGUAGES = fr de it pl ru nl es pt ja ; -RM = rm -rf ; - -# Build HandBrake.app using Xcode -- -# Getting the right version and build numbers -# requires editing the .plist and specifying -# extra CFLAGs. -rule OSXApp -{ - Depends exe : $(<) ; - Depends $(<) : $(>) ; - Clean clean : $(1) macosx/build ; -} -actions OSXApp -{ - $(RM) $(<) macosx/build/HandBrake.app && \ - ( cd macosx && \ - xcodebuild HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" APPCAST_URL="$(APPCAST_URL)" -target libhb -target HandBrake -target HandBrakeCLI ) && \ - for i in $(LANGUAGES) ; do \ - ( cd $(<)/Contents/Resources && \ - cp -r English.lproj $i.lproj && \ - cp ../../../macosx/i18n/$i.strings \ - $i.lproj/Localizable.strings ) \ - done ; -} -rule OSXPackage -{ - Depends $(<) : $(>) ; -} -actions OSXPackage -{ - rm -rf $(<) "HandBrake $(HB_VERSION)" && \ - mkdir "HandBrake $(HB_VERSION)" && \ - cp AUTHORS "HandBrake $(HB_VERSION)/AUTHORS.txt" && \ - cp COPYING "HandBrake $(HB_VERSION)/COPYING.txt" && \ - cp CREDITS "HandBrake $(HB_VERSION)/CREDITS.txt" && \ - cp THANKS "HandBrake $(HB_VERSION)/THANKS.txt" && \ - ( echo "[InternetShortcut]" && \ - echo "URL=http://handbrake.fr/" ) > \ - "HandBrake $(HB_VERSION)/HandBrake Homepage.url" && \ - ( echo "[InternetShortcut]" && \ - echo "URL=http://forum.handbrake,fr/" ) > \ - "HandBrake $(HB_VERSION)/HandBrake Forums.url" && \ - ( echo "[InternetShortcut]" && \ - echo "URL=http://handbrake.fr/?article=development" ) > \ - "HandBrake $(HB_VERSION)/Contribute.url" && \ - cp -r HandBrake.app "HandBrake $(HB_VERSION)" && \ - zip -9 -r $(<) "HandBrake $(HB_VERSION)" && \ - rm -rf "HandBrake $(HB_VERSION)" -} - -rule BeOSPackage -{ - Depends $(<) : $(>) ; - BuildBeOSPackage $(<) ; -} -actions BuildBeOSPackage -{ - rm -rf $(<) "HandBrake $(HB_VERSION)" && \ - mkdir "HandBrake $(HB_VERSION)" && \ - cp AUTHORS "HandBrake $(HB_VERSION)/AUTHORS.txt" && \ - cp COPYING "HandBrake $(HB_VERSION)/COPYING.txt" && \ - cp CREDITS "HandBrake $(HB_VERSION)/CREDITS.txt" && \ - cp THANKS "HandBrake $(HB_VERSION)/THANKS.txt" && \ - xres -o HandBrake beos/HandBrake.rsrc && \ - cp HandBrake "HandBrake $(HB_VERSION)" && \ - zip -9 -r $(<) "HandBrake $(HB_VERSION)" && \ - rm -rf "HandBrake $(HB_VERSION)" -} diff --git a/MacOsXContribBinariesVersion.txt b/MacOsXContribBinariesVersion.txt deleted file mode 100644 index c978718d6..000000000 --- a/MacOsXContribBinariesVersion.txt +++ /dev/null @@ -1 +0,0 @@ -0022 diff --git a/Makefile b/Makefile deleted file mode 100644 index 6295bb7a3..000000000 --- a/Makefile +++ /dev/null @@ -1,162 +0,0 @@ -include Makefile.config - -SYSTEM = $(shell uname -s) - -# Special case for Mac OS X: everything is handled from the Xcode project - -# -# Darwin -# -ifeq ($(SYSTEM),Darwin) - -snapshot: clean unstable-libhb/hbversion.h snapshot-app -official: clean force-hbversion app - -force-hbversion: - rm -f libhb/hbversion.h - -all: clean app - -all-chunky: clean app-chunky - -test: clean cli - -dev: clean internal - -ub-app: libhb/hbversion.h - (./DownloadMacOsXContribBinaries.sh ; cd macosx ; xcodebuild -target libhb -target HandBrake -target HandBrakeCLI -configuration UB HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" APPCAST_URL="http://handbrake.fr/appcast.xml" build | sed '/^$$/d' ) - -app: contrib/.contrib libhb/hbversion.h - ( cd macosx ; xcodebuild -target libhb -target HandBrake -target HandBrakeCLI -configuration Deployment HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" CURRENT_PROJECT_VERSION="$(HB_VERSION)" APPCAST_URL="http://handbrake.fr/appcast.xml" build | sed '/^$$/d' ) - -contrib/.contrib: - @$(MAKE) --no-print-directory -C contrib all - -snapshot-app: contrib/.contrib libhb/hbversion.h - ( cd macosx ; xcodebuild -target libhb -target HandBrake -target HandBrakeCLI -configuration Deployment HB_BUILD="$(SNAP_HB_BUILD)" HB_VERSION="$(SNAP_HB_VERSION)" CURRENT_PROJECT_VERSION="$(SNAP_HB_VERSION)" APPCAST_URL="http://handbrake.fr/appcast_unstable.xml" build | sed '/^$$/d' ) - -app-chunky: libhb/hbversion.h - (./DownloadMacOsXContribBinaries.sh ; cd macosx ; xcodebuild -alltargets -configuration UB HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" APPCAST_URL="http://handbrake.fr/appcast.xml" build | sed '/^$$/d' ) - -cli: libhb/hbversion.h - (./DownloadMacOsXContribBinaries.sh ; cd macosx ; xcodebuild -target libhb -target HandBrakeCLI -configuration UB HB_BUILD="$(HB_BUILD)" HB_VERSION="$(HB_VERSION)" build | sed '/^$$/d' ) - -clean: - (cd macosx ; xcodebuild -alltargets -configuration UB clean | sed '/^$$/d' ; rm -f libhb/hbversion.h ; rm -f contrib/config.cache ) - -mrproper: - (rm -rf libhb/hbversion.h contrib/*tar.gz contrib/include contrib/lib contrib/DarwinContribVersion.txt ; cd macosx ; xcodebuild -alltargets -configuration UB clean | sed '/^$$/d' ) - -release: - (rm -rf HandBrake HandBrake*dmg ; mkdir -p HandBrake/api HandBrake/doc HandBrake/doc/pdf; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/doc ; cp -rp pdf/ HandBrake/doc/pdf/ ; cp -rp HandBrake.app HandBrake ; cp -rp libhb/libhb.dylib HandBrake/api ; cp -rp libhb/hb.h libhb/common.h libhb/ports.h HandBrake/api ; cp -rp HandBrakeCLI HandBrake ; hdiutil create -srcfolder HandBrake -format UDZO HandBrake-$(HB_VERSION)-MacOS_UB.dmg ; rm -rf HandBrake ) - -gui-release: - (rm -rf HandBrake HandBrake*GUI_UB.dmg ; mkdir -p HandBrake/docs ; cp AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/docs ; cp -rp HandBrake.app HandBrake ; hdiutil create -srcfolder HandBrake -format UDBZ HandBrake-$(HB_VERSION)-MacOSX.4_GUI_UB.dmg ; rm -rf HandBrake ) - -cli-release: - (rm -rf HandBrake HandBrake*CLI_UB.dmg ; mkdir -p HandBrake/docs ; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/docs ; cp -rp HandBrakeCLI HandBrake ; hdiutil create -srcfolder HandBrake -format UDZO HandBrake-$(HB_VERSION)-MacOSX.3_CLI_UB.dmg ; rm -rf HandBrake ) - -gui-snapshot-release: - (rm -rf HandBrake HandBrake*GUI_UB.dmg ; mkdir -p HandBrake/docs ; cp AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/docs ; cp -rp HandBrake.app HandBrake ; hdiutil create -srcfolder HandBrake -format UDBZ HandBrake-$(SNAP_HB_VERSION)-MacOSX.5_GUI_UB.dmg ; rm -rf HandBrake ) - -cli-snapshot-release: - (rm -rf HandBrake HandBrake*CLI_UB.dmg ; mkdir -p HandBrake/docs ; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/docs ; cp -rp HandBrakeCLI HandBrake ; hdiutil create -srcfolder HandBrake -format UDZO HandBrake-$(SNAP_HB_VERSION)-MacOSX.5_CLI_UB.dmg ; rm -rf HandBrake ) - -endif - -# -# Linux -# -ifeq ($(SYSTEM),Linux) - -snapshot: unstable-libhb/hbversion.h all - (rm -rf HandBrake HandBrake*.tar.gz ; mkdir -p HandBrake/api HandBrake/doc; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/doc ; cp -rp libhb/hb.h libhb/common.h libhb/ports.h HandBrake/api ; cp -rp HandBrakeCLI HandBrake ; tar zcvf HandBrake-$(SNAP_HB_VERSION)_i386.tar.gz HandBrake ; rm -rf HandBrake ) - -official: force-hbversion all - (rm -rf HandBrake HandBrake*.tar.gz ; mkdir -p HandBrake/api HandBrake/doc; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/doc ; cp -rp libhb/hb.h libhb/common.h libhb/ports.h HandBrake/api ; cp -rp HandBrakeCLI HandBrake ; tar zcvf HandBrake-$(HB_VERSION)_i386.tar.gz HandBrake ; rm -rf HandBrake ) - -force-hbversion: - rm -f libhb/hbversion.h - -all: libhb/hbversion.h - @$(MAKE) --no-print-directory -C contrib all - @$(MAKE) --no-print-directory -C libhb all - @$(MAKE) --no-print-directory -C test all - -clean: - @$(MAKE) --no-print-directory -C libhb clean - @$(MAKE) --no-print-directory -C test clean - @rm libhb/hbversion.h - @rm -f contrib/config.cache - -mrproper: clean - @$(MAKE) --no-print-directory -C contrib mrproper - -endif - -# -# Cygwin -# -ifeq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT) - -snapshot: clean unstable-libhb/hbversion.h all -official: clean force-hbversion all - -snapshot-release: snapshot - (rm -rf HandBrake HandBrake*.zip ; mkdir -p HandBrake/api HandBrake/doc; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/doc ; cp -rp libhb/hb.h libhb/common.h libhb/ports.h HandBrake/api ; cp -rp HandBrakeCLI HandBrake ; cp /bin/cygwin1.dll HandBrake ; zip -r HandBrake-$(SNAP_HB_VERSION)-Win_CLI.zip HandBrake ; rm -rf HandBrake ) - -official-release: official - (rm -rf HandBrake HandBrake*.zip ; mkdir -p HandBrake/api HandBrake/doc; cp test/BUILDSHARED AUTHORS BUILD COPYING CREDITS NEWS THANKS TRANSLATIONS HandBrake/doc ; cp -rp libhb/hb.h libhb/common.h libhb/ports.h HandBrake/api ; cp -rp HandBrakeCLI HandBrake ; cp /bin/cygwin1.dll HandBrake ; zip -r HandBrake-$(HB_VERSION)-Win_GUI.zip HandBrake ; rm -rf HandBrake ) - -force-hbversion: - rm -f libhb/hbversion.h - -all: contrib/.contrib HandBrakeCLI - -contrib/.contrib: - @$(MAKE) --no-print-directory -C contrib all - -libhb/libhb.a: unstable-libhb/hbversion.h - @$(MAKE) --no-print-directory -C libhb all - -HandBrakeCLI: libhb/libhb.a - @$(MAKE) --no-print-directory -C test all - -clean: - @$(MAKE) --no-print-directory -C libhb clean - @$(MAKE) --no-print-directory -C test clean - @rm -f libhb/hbversion.h - @rm -f contrib/config.cache - @rm -f HandBrake HandBrake*.zip - @rm -f contrib/.contrib - -mrproper: clean - @$(MAKE) --no-print-directory -C contrib mrproper - -endif - -# -# Version Data -# - -libhb/hbversion.h: - echo "#ifndef HB_BUILD" > libhb/hbversion.h - echo "#define HB_BUILD $(HB_BUILD)" >> libhb/hbversion.h - echo "#endif" >> libhb/hbversion.h - echo "#ifndef HB_VERSION" >> libhb/hbversion.h - echo "#define HB_VERSION \"$(HB_VERSION)\"" >> libhb/hbversion.h - echo "#endif" >> libhb/hbversion.h - echo "#ifndef HB_APPCAST_URL" >> libhb/hbversion.h - echo "#define APPCAST_URL \"http://handbrake.fr/appcast.xml\"" >> libhb/hbversion.h - echo "#endif" >> libhb/hbversion.h - -unstable-libhb/hbversion.h: - echo "#ifndef HB_BUILD" > libhb/hbversion.h - echo "#define HB_BUILD $(SNAP_HB_BUILD)" >> libhb/hbversion.h - echo "#endif" >> libhb/hbversion.h - echo "#ifndef HB_VERSION" >> libhb/hbversion.h - echo "#define HB_VERSION \"$(SNAP_HB_VERSION)\"" >> libhb/hbversion.h - echo "#endif" >> libhb/hbversion.h - echo "#ifndef HB_APPCAST_URL" >> libhb/hbversion.h - echo "#define APPCAST_URL \"http://handbrake.fr/appcast_unstable.xml\"" >> libhb/hbversion.h - echo "#endif" >> libhb/hbversion.h diff --git a/Makefile.config b/Makefile.config deleted file mode 100644 index 4ae9bccdc..000000000 --- a/Makefile.config +++ /dev/null @@ -1,22 +0,0 @@ -# This line needs to be manually bumped for each release. -HB_VERSION = 0.9.3 - -# Use the current date for the build number -HB_BUILD = $(shell date "+%Y%m%d")00 - -# Do the same for snapshots but mark as unstable -SNAP_HB_BUILD = $(shell date "+%Y%m%d")01 - -# For snapshots add the svn revision number to the HB_VERSION -SNAP_HB_VERSION = svn$(shell svnversion) - -# The working path is needed for editing the MacGui .plist -FULL_PATH = $(shell pwd) -BUILD_DATE = $(shell date "+%Y%m%d") - -HB_DEFPPC = $(shell uname -a | grep ppc > /dev/null ; echo RES$$?) -ifeq ($(HB_DEFPPC), RES0) -HB_DEFPPC = "-DWORDS_BIGENDIAN" -else -HB_DEFPPC = -endif diff --git a/configure b/configure index 224b2b28d..8ea57efbf 100755..100644 --- a/configure +++ b/configure @@ -1,151 +1,25 @@ #! /bin/sh +# -CC="gcc" -CXX="g++" -CCFLAGS="$CCFLAGS -Wall -g" -OPTIM="$OPTIM -O3 -funroll-loops" -LINKLIBS="-lz -lbz2" -MAKE=make - -# System-specific flags -SYSTEM=`uname -s` -case $SYSTEM in - BeOS) - CCFLAGS="$CCFLAGS -Wno-multichar" - DEFINES="$DEFINES SYS_BEOS" - LINKLIBS="$LINKLIBS -lbe -ltracker" - - RELEASE=`uname -r` - case $RELEASE in - 6.0|5.0.4) # Zeta or R5 / BONE beta 7 - SYSTEM="$SYSTEM / BONE" - LINKLIBS="$LINKLIBS -lbind -lsocket" - ;; - 5.0*) # R5 / net_server - SYSTEM="$SYSTEM / net_server" - DEFINES="$DEFINES BEOS_NETSERVER" - LINKLIBS="$LINKLIBS -lnet" - ;; - *) - echo "Unsupported BeOS version" - exit 1 ;; - esac - ;; - - Darwin) - DEFINES="$DEFINES SYS_DARWIN USE_PTHREAD" - LINKLIBS="$LINKLIBS -lpthread" - ;; - - FreeBSD) - DEFINES="$DEFINES SYS_FREEBSD USE_PTHREAD" - LINKLIBS="$LINKLIBS -pthread" - ;; - - NetBSD) - DEFINES="$DEFINES SYS_NETBSD USE_PTHREAD" - LINKLIBS="$LINKLIBS -lpthread" - ;; - - Linux) - DEFINES="$DEFINES SYS_LINUX USE_PTHREAD _LARGEFILE_SOURCE _FILE_OFFSET_BITS=64" - LINKLIBS="$LINKLIBS -lpthread -ldl" - ;; - - CYGWIN*) - DEFINES="$DEFINES SYS_CYGWIN USE_PTHREAD" - LINKLIBS="$LINKLIBS -lpthread" - ;; - SunOS) - DEFINES="$DEFINES SYS_SunOS USE_PTHREAD _LARGEFILE_SOURCE _FILE_OFFSET_BITS=64" - LINKLIBS="$LINKLIBS -lpthread -lsocket -lnsl" - ;; - - *) - echo "Unsupported operating system" - exit 1 ;; -esac -echo -echo "System: $SYSTEM" - -# Check for endianness (we need to define WORDS_BIGENDIAN for libdvdread) -cat > testconf.c << EOF -int main() +inpath() { - int i = 1; - return *( (char *) &i ); + IFS=: + for d in $PATH + do + if [ -x $d/$1 ]; then + return 0 + fi + done + return 1 } -EOF -if ( $CC -o testconf testconf.c && ./testconf ) > /dev/null 2>&1 -then - echo "Endian: big" - DEFINES="$DEFINES WORDS_BIGENDIAN" -else - echo "Endian: little" -fi -rm -f testconf.c testconf - -# -# Use Gnu make when available over the built in make -# -if ( make --version | grep GNU ) > /dev/null 2>&1 -then -MAKE=make -elif ( gmake --version | grep GNU ) > /dev/null 2>&1 -then -MAKE=gmake -else -MAKE=make -fi - -# Unless the user wants a release build, configure for SVN snapshots -if test "$1" = "--release" || test "$2" = "--release"; then - SNAPSHOT=0 -else - SNAPSHOT=1 -fi - -# We fought the law and the law won -if test "$1" = "--libdvdcss" || test "$2" = "--libdvdcss"; then - CSS=1 -else - CSS=0 -fi - -# Generating the HB_BUILD and HB_VERSION for snapshots requires -# the build date, working path, and current SVN revision. -BUILD_DATE=`date +%Y%m%d` -FULL_PATH=`pwd` -SVN_REV=`svnversion` -# Generate config.jam -rm -f config.jam -cat << EOF > config.jam -CC = $CC ; -C++ = $CXX ; -LINK = $CXX ; -CCFLAGS = $CCFLAGS ; -C++FLAGS = $CCFLAGS ; -OPTIM = $OPTIM ; -DEFINES = $DEFINES ; -LINKLIBS = $LINKLIBS ; -MAKE = $MAKE ; -SNAPSHOT = $SNAPSHOT ; -BUILD_DATE = $BUILD_DATE ; -FULL_PATH = $FULL_PATH ; -SVN_REV = $SVN_REV ; -CSS = $CSS ; -EOF +for p in python2.6 python2.5 python2.4 +do + if ( inpath $p ); then + exec $p `dirname $0`/make/configure.py "$@" + exit 0 + fi +done -echo -echo "Don't run configure by hand, make runs it automatically." -echo -echo "No, really. That's it. Just type 'make' and hit return." -echo -echo "You're supposed to be building with make, not jam." -echo "If you were going to use jam--which you shouldn't--you'd run:" -echo " './jam' on a Mac, or" -echo " 'jam' on Linux or Windows" -echo -echo "To make jam, boil fruit with sugar and an acid until pectins are released." -echo +echo "ERROR: no suitable version of python found." +exit 1 diff --git a/contrib/Jamfile b/contrib/Jamfile deleted file mode 100644 index d0450cdfc..000000000 --- a/contrib/Jamfile +++ /dev/null @@ -1,494 +0,0 @@ -SubDir TOP contrib ; - -# Use curl on Mac OS X since it's always installed, and assume wget -# is installed for all other systems -if $(OS) = MACOSX -{ - WGET = curl -q -L -o ; -} -else -{ - WGET = wget -O ; -} - -if $(OS) = UNKNOWN -{ - OS = CYGWIN ; -} - -if $(OS) = SOLARIS -{ - PATCH = gpatch ; - STRIP = echo ; -} -else -{ - PATCH = patch ; - STRIP = strip -S ; -} - -# Wget rule: downloads $(<) from the link in $(>) -rule Wget -{ - Depends $(<) : $(>) ; -} -actions Wget -{ - $(RM) $(<) && - $(WGET) $(<) `cat $(>)` && - ( touch $(<) || true ) -} - -# liba52 -rule LibA52 -{ - Depends $(<) : $(>) ; - Depends lib : $(<) ; -} -actions LibA52 -{ - - cd `dirname $(>)` && CONTRIB=`pwd` && - rm -rf a52dec && (gzip -dc a52dec.tar.gz | tar xf -) && - cd a52dec && $(PATCH) -p1 < ../patch-a52dec.patch && - ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && $(MAKE) && $(MAKE) install && - $(STRIP) $CONTRIB/lib/liba52.a -} -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 " ; - } - else if $(OS) = SOLARIS - { - FFMPEG_PATCH += " && $(PATCH) -p1 < ../patch-ffmpeg-solaris.patch " ; - } - else if $(OS) = MACOSX - { - FFMPEG_PATCH += " && $(PATCH) -p1 < ../patch-ffmpeg-h264dsp-crash.diff " ; - } - - 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 : $(<) ; -} -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-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 -} -Wget $(SUBDIR)/ffmpeg.tar.gz : $(SUBDIR)/version_ffmpeg.txt ; -LibAvCodec $(SUBDIR)/lib/libavcodec.a : $(SUBDIR)/ffmpeg.tar.gz ; - -rule LibAvUtil -{ - Depends $(<) : $(>) ; - Depends lib : $(<) ; -} -actions LibAvUtil -{ - $(STRIP) $(<) -} -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 ; - -# 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... - rule LibDvdCss - { - Depends $(<) : $(>) ; - Depends lib : $(<) ; - } - actions LibDvdCss - { - cd `dirname $(>)` && CONTRIB=`pwd` && - 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 - } - Wget $(SUBDIR)/libdvdcss.tar.gz : $(SUBDIR)/version_libdvdcss.txt ; - LibDvdCss $(SUBDIR)/lib/libdvdcss.a : $(SUBDIR)/libdvdcss.tar.gz ; -} - -# libdca -rule LibDCA -{ - Depends $(<) : $(>) ; - Depends lib : $(<) ; -} -actions LibDCA -{ - cd `dirname $(>)` && CONTRIB=`pwd` && - rm -rf libdca && (gzip -dc libdca.tar.gz | tar xf - ) && - cd libdca && $(PATCH) -p1 < ../patch-libdca.patch && - ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && $(MAKE) && $(MAKE) install && - $(STRIP) $CONTRIB/lib/libdca.a -} -Wget $(SUBDIR)/libdca.tar.gz : $(SUBDIR)/version_libdca.txt ; -LibDCA $(SUBDIR)/lib/libdca.a : $(SUBDIR)/libdca.tar.gz ; - -# libdvdread -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 $(CSS) = 1 # Include CSS support in libdvdread if requested -{ - actions LibDvdRead - { - cd `dirname $(>)` && CONTRIB=`pwd` && - rm -rf libdvdread && (gzip -dc libdvdread.tar.gz | tar xf - ) && - cd libdvdread && - ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared --with-libdvdcss=$CONTRIB && - $(MAKE) && $(MAKE) install && - $(STRIP) $CONTRIB/lib/libdvdread.a - } -} -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 && $(DVDREAD_PATCH) - ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared && - $(MAKE) && $(MAKE) install && - $(STRIP) $CONTRIB/lib/libdvdread.a - } -} -Wget $(SUBDIR)/libdvdread.tar.gz : $(SUBDIR)/version_libdvdread.txt ; -LibDvdRead $(SUBDIR)/lib/libdvdread.a : $(SUBDIR)/libdvdread.tar.gz ; - -# libfaac -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 && $(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 -} -Wget $(SUBDIR)/faac.tar.gz : $(SUBDIR)/version_faac.txt ; -LibFaac $(SUBDIR)/lib/libfaac.a : $(SUBDIR)/faac.tar.gz ; - -# libmp3lame -rule LibMp3Lame -{ - Depends $(<) : $(>) ; - Depends lib : $(<) ; -} -actions LibMp3Lame -{ - cd `dirname $(>)` && CONTRIB=`pwd` && - rm -rf lame && (gzip -dc lame.tar.gz | tar xf - ) && cd lame && - ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared && - $(MAKE) && $(MAKE) install && - $(STRIP) $CONTRIB/lib/libmp3lame.a -} -Wget $(SUBDIR)/lame.tar.gz : $(SUBDIR)/version_lame.txt ; -LibMp3Lame $(SUBDIR)/lib/libmp3lame.a : $(SUBDIR)/lame.tar.gz ; - -# libmp4v2 -rule LibMp4v2 -{ - LIBMP4V2_PATCH = "" ; - Depends $(<) : $(>) ; - Depends lib : $(<) ; -} -actions LibMp4v2 -{ - cd `dirname $(>)` && CONTRIB=`pwd` && - 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)/libmp4v2.tar.gz : $(SUBDIR)/version_libmp4v2.txt ; -LibMp4v2 $(SUBDIR)/lib/libmp4v2.a : $(SUBDIR)/libmp4v2.tar.gz ; - -rule LibMkv -{ - Depends $(<) : $(>) ; - Depends lib : $(<) ; -} -actions LibMkv -{ - cd `dirname $(>)` && CONTRIB=`pwd` && - rm -rf libmkv && (gzip -dc libmkv.tar.gz | tar xf - ) && - cd libmkv && - ./configure --disable-shared --enable-static --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && - $(MAKE) && $(MAKE) install && - $(STRIP) $CONTRIB/lib/libmkv.a -} -Wget $(SUBDIR)/libmkv.tar.gz : $(SUBDIR)/version_libmkv.txt ; -LibMkv $(SUBDIR)/lib/libmkv.a : $(SUBDIR)/libmkv.tar.gz ; - -# libmpeg2 -rule LibMpeg2 -{ - Depends $(<) : $(>) ; - Depends lib : $(<) ; -} -actions LibMpeg2 -{ - cd `dirname $(>)` && CONTRIB=`pwd` && - rm -rf mpeg2dec && (gzip -dc mpeg2dec.tar.gz | tar xf - ) && - cd mpeg2dec && - ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared --disable-sdl --without-x && - $(MAKE) && $(MAKE) install && - $(STRIP) $CONTRIB/lib/libmpeg2.a -} -Wget $(SUBDIR)/mpeg2dec.tar.gz : $(SUBDIR)/version_mpeg2dec.txt ; -LibMpeg2 $(SUBDIR)/lib/libmpeg2.a : $(SUBDIR)/mpeg2dec.tar.gz ; - -# libogg -rule LibOgg -{ - Depends $(<) : $(>) ; - Depends lib : $(<) ; -} -actions LibOgg -{ - cd `dirname $(>)` && CONTRIB=`pwd` && - rm -rf libogg && (gzip -dc libogg.tar.gz | tar xf - ) && - cd libogg && - ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared && - $(MAKE) && $(MAKE) install && - $(STRIP) $CONTRIB/lib/libogg.a -} -Wget $(SUBDIR)/libogg.tar.gz : $(SUBDIR)/version_libogg.txt ; -LibOgg $(SUBDIR)/lib/libogg.a : $(SUBDIR)/libogg.tar.gz ; - -# libsamplerate -rule LibSampleRate -{ - Depends $(<) : $(>) ; - Depends lib : $(<) ; -} -actions LibSampleRate -{ - cd `dirname $(>)` && CONTRIB=`pwd` && - rm -rf libsamplerate && (gzip -dc libsamplerate.tar.gz | tar xf - ) && - cd libsamplerate && - ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared && - $(MAKE) && $(MAKE) install && - $(STRIP) $CONTRIB/lib/libsamplerate.a -} -Wget $(SUBDIR)/libsamplerate.tar.gz : $(SUBDIR)/version_libsamplerate.txt ; -LibSampleRate $(SUBDIR)/lib/libsamplerate.a : $(SUBDIR)/libsamplerate.tar.gz ; - -# libvorbis -rule LibVorbis -{ - Depends $(<) : $(>) ; - Depends lib : $(<) ; -} -actions LibVorbis -{ - cd `dirname $(>)` && CONTRIB=`pwd` && - rm -rf libvorbis && (gzip -dc libvorbis.tar.gz | tar xf - ) && - cd libvorbis && - ./configure --prefix=$CONTRIB --with-ogg=$CONTRIB --cache-file=$CONTRIB/config.cache --disable-shared && - $(MAKE) && $(MAKE) install && - $(STRIP) $CONTRIB/lib/libvorbis.a -} -Wget $(SUBDIR)/libvorbis.tar.gz : $(SUBDIR)/version_libvorbis.txt ; -LibVorbis $(SUBDIR)/lib/libvorbis.a : $(SUBDIR)/libvorbis.tar.gz ; - -rule LibVorbisEnc -{ - Depends $(<) : $(>) ; - Depends lib : $(<) ; -} -actions LibVorbisEnc -{ - $(STRIP) $(<) -} -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 -{ - LIBX264_PATCH = "" ; - if $(OS) = CYGWIN - { - LIBX264_PATCH += "$(PATCH) -p1 < ../patch-x264-cygwin.patch && " ; - } - else if $(OS) = SOLARIS - { - LIBX264_PATCH += " $(PATCH) -p1 < ../patch-x264-solaris.patch && " ; - } - Depends $(<) : $(>) ; - Depends lib : $(<) ; -} -actions LibX264 -{ - cd `dirname $(>)` && CONTRIB=`pwd` && - rm -rf x264 && (gzip -dc x264.tar.gz | tar xf - ) && - cd x264 && $(LIBX264_PATCH) - bash ./configure --prefix=$CONTRIB --enable-pthread && - $(MAKE) libx264.a && cp libx264.a $CONTRIB/lib/ && cp x264.h $CONTRIB/include/ && $(STRIP) $CONTRIB/lib/libx264.a -} -Wget $(SUBDIR)/x264.tar.gz : $(SUBDIR)/version_x264.txt ; -LibX264 $(SUBDIR)/lib/libx264.a : $(SUBDIR)/x264.tar.gz ; - -# libxvidcore -rule LibXvidCore -{ - LIBXVIDCORE_PATCH = "" ; - if $(OS) = MACOSX - { - LIBXVIDCORE_PATCH = "$(PATCH) -p1 < ../patch-xvidcore-macosx.patch && " ; - } - else if $(OS) = CYGWIN - { - 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 : $(<) ; -} -actions LibXvidCore -{ - cd `dirname $(>)` && CONTRIB=`pwd` && - rm -rf xvidcore && (gzip -dc xvidcore.tar.gz | tar xf - ) && - cd xvidcore && $(LIBXVIDCORE_PATCH) - cd build/generic/ && ./configure --prefix=$CONTRIB --cache-file=$CONTRIB/config.cache && $(MAKE) libxvidcore.a && - cp ./=build/libxvidcore.a $CONTRIB/lib/ && - cp ../../src/xvid.h $CONTRIB/include/ && - $(STRIP) $CONTRIB/lib/libxvidcore.a -} -Wget $(SUBDIR)/xvidcore.tar.gz : $(SUBDIR)/version_xvidcore.txt ; -LibXvidCore $(SUBDIR)/lib/libxvidcore.a : $(SUBDIR)/xvidcore.tar.gz ; - -# zlib -if $(OS) = CYGWIN -{ - rule Zlib - { - Depends $(<) : $(>) ; - Depends lib : $(<) ; - } - actions Zlib - { - cd `dirname $(>)` && CONTRIB=`pwd` && - rm -rf zlib && (gzip -dc zlib.tar.gz | tar xf - ) && - cd zlib && ./configure --prefix=$CONTRIB && - $(MAKE) && $(MAKE) install && touch $CONTRIB/.contrib && - $(STRIP) $CONTRIB/lib/libz.a - } - 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 ; -} diff --git a/contrib/Makefile b/contrib/Makefile deleted file mode 100644 index 1855ed06c..000000000 --- a/contrib/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# Contrib Makefile - -SYSTEM = $(shell uname -s) - -# Special case for Mac OS X: everything is handled from the Xcode project -ifeq ($(SYSTEM),Darwin) - -all: .contrib - -.contrib: - ( cd .. ; ./configure ; cd contrib ; cp -f ../config.jam . ; ../jam ) - -clean: - ( echo "Do a make mrproper to remove the contrib libraries ) - -mrproper: - (rm -rf lib ; rm -rf include ) - -endif - -ifeq ($(SYSTEM),Linux) - -all: .contrib - -.contrib: - ( cd .. ; ./configure ; cd contrib ; cp -f ../config.jam . ; jam ) - -clean: - ( echo "Do a make mrproper to remove the contrib libraries ) - -mrproper: - (rm -rf lib ; rm -rf include ) - -endif - -ifeq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT) - -all: .contrib - -.contrib: - ( cd .. ; ./configure ; cd contrib ; cp -f ../config.jam . ; jam.exe ) - -clean: - ( echo "Do a make mrproper to remove the contrib libraries ) - -mrproper: clean - (rm -rf lib ; rm -rf include ; rm -f .contrib) - -endif diff --git a/contrib/patch-a52dec.patch b/contrib/a52dec/A00-dpl2.patch index cf1c8a64a..cf1c8a64a 100644 --- a/contrib/patch-a52dec.patch +++ b/contrib/a52dec/A00-dpl2.patch diff --git a/contrib/a52dec/module.defs b/contrib/a52dec/module.defs new file mode 100644 index 000000000..470ddfa12 --- /dev/null +++ b/contrib/a52dec/module.defs @@ -0,0 +1,6 @@ +$(eval $(call import.MODULE.defs,A52DEC,a52dec)) +$(eval $(call import.CONTRIB.defs,A52DEC)) + +A52DEC.FETCH.url = http://download.m0k.org/handbrake/contrib/a52dec-0.7.4.tar.gz +A52DEC.EXTRACT.tarbase = a52dec +A52DEC.INSTALL.strip = liba52.a diff --git a/contrib/a52dec/module.rules b/contrib/a52dec/module.rules new file mode 100644 index 000000000..cecab72f7 --- /dev/null +++ b/contrib/a52dec/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,A52DEC)) +$(eval $(call import.CONTRIB.rules,A52DEC)) diff --git a/contrib/bzip2/module.defs b/contrib/bzip2/module.defs new file mode 100644 index 000000000..dcc878ad4 --- /dev/null +++ b/contrib/bzip2/module.defs @@ -0,0 +1,24 @@ +$(eval $(call import.MODULE.defs,BZIP2,bzip2)) +$(eval $(call import.CONTRIB.defs,BZIP2)) + +BZIP2.FETCH.url = http://download.m0k.org/handbrake/contrib/bzip2-1.0.5.tar.gz +BZIP2.EXTRACT.tarbase = bzip2 +BZIP2.CONFIGURE = + +BZIP2.BUILD.extra = \ + CC=$(BZIP2.GCC.gcc) \ + CFLAGS="$(call fn.ARGS,BZIP2.GCC,*archs)" \ + PREFIX=$(call fn.ABSOLUTE,$(CONTRIB.build/)) + +BZIP2.BUILD.ntargets = libbz2.a + +define BZIP2.INSTALL + mkdir -p $(CONTRIB.build/)lib/ $(CONTRIB.build/)include/ + cp $(BZIP2.EXTRACT.target/)libbz2.a $(CONTRIB.build/)lib/ + cp $(BZIP2.EXTRACT.target/)bzlib.h $(CONTRIB.build/)include/ +endef + +define BZIP2.UNINSTALL + rm $(CONTRIB.build/)lib/libbz2.a + rm $(CONTRIB.build/)include/bzlib.h +endef diff --git a/contrib/bzip2/module.rules b/contrib/bzip2/module.rules new file mode 100644 index 000000000..456bb1215 --- /dev/null +++ b/contrib/bzip2/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,BZIP2)) +$(eval $(call import.CONTRIB.rules,BZIP2)) diff --git a/contrib/patch-faac-cygwin.patch b/contrib/faac/P00-cygwin.patch index d54b08d02..d54b08d02 100644 --- a/contrib/patch-faac-cygwin.patch +++ b/contrib/faac/P00-cygwin.patch diff --git a/contrib/faac/module.defs b/contrib/faac/module.defs new file mode 100644 index 000000000..2b032fee9 --- /dev/null +++ b/contrib/faac/module.defs @@ -0,0 +1,8 @@ +$(eval $(call import.MODULE.defs,FAAC,faac)) +$(eval $(call import.CONTRIB.defs,FAAC)) + +FAAC.FETCH.url = http://download.m0k.org/handbrake/contrib/faac-1.26.tar.gz +FAAC.EXTRACT.tarbase = faac + +FAAC.CONFIGURE.bootstrap = ./bootstrap; +FAAC.CONFIGURE.extra = --without-mp4v2 diff --git a/contrib/faac/module.rules b/contrib/faac/module.rules new file mode 100644 index 000000000..5c311304a --- /dev/null +++ b/contrib/faac/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,FAAC)) +$(eval $(call import.CONTRIB.rules,FAAC)) diff --git a/contrib/patch-faad2-libtool22.patch b/contrib/faad2/A00-libtool22.patch index 4eab08487..4eab08487 100644 --- a/contrib/patch-faad2-libtool22.patch +++ b/contrib/faad2/A00-libtool22.patch diff --git a/contrib/faad2/module.defs b/contrib/faad2/module.defs new file mode 100644 index 000000000..04b9e0b82 --- /dev/null +++ b/contrib/faad2/module.defs @@ -0,0 +1,7 @@ +$(eval $(call import.MODULE.defs,FAAD2,faad2)) +$(eval $(call import.CONTRIB.defs,FAAD2)) + +FAAD2.FETCH.url = http://download.m0k.org/handbrake/contrib/faad2-2.6.1.tar.gz +FAAD2.EXTRACT.tarbase = faad2 + +FAAD2.CONFIGURE.bootstrap = ./bootstrap; diff --git a/contrib/faad2/module.rules b/contrib/faad2/module.rules new file mode 100644 index 000000000..2b9bdd015 --- /dev/null +++ b/contrib/faad2/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,FAAD2)) +$(eval $(call import.CONTRIB.rules,FAAD2)) diff --git a/contrib/patch-ffmpeg-latm.patch b/contrib/ffmpeg/A00-latm.patch index 84cd6a85f..a286f4c19 100644 --- a/contrib/patch-ffmpeg-latm.patch +++ b/contrib/ffmpeg/A00-latm.patch @@ -1,8 +1,7 @@ -Index: libavcodec/Makefile -=================================================================== ---- libavcodec/Makefile (revision 14016) -+++ libavcodec/Makefile (working copy) -@@ -322,7 +322,7 @@ +diff -Naur ffmpeg.orig/libavcodec/Makefile ffmpeg/libavcodec/Makefile +--- ffmpeg.orig/libavcodec/Makefile 2008-12-01 01:40:36.000000000 -0500 ++++ ffmpeg/libavcodec/Makefile 2009-02-21 08:25:13.000000000 -0500 +@@ -338,7 +338,7 @@ OBJS-$(CONFIG_LIBDIRAC_DECODER) += libdiracdec.o OBJS-$(CONFIG_LIBDIRAC_ENCODER) += libdiracenc.o libdirac_libschro.o OBJS-$(CONFIG_LIBFAAC) += libfaac.o @@ -20,10 +19,171 @@ Index: libavcodec/Makefile OBJS-$(CONFIG_AC3_PARSER) += ac3_parser.o ac3tab.o aac_ac3_parser.o OBJS-$(CONFIG_CAVSVIDEO_PARSER) += cavs_parser.o OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o -Index: libavcodec/latmaac.c -=================================================================== ---- libavcodec/latmaac.c (revision 0) -+++ libavcodec/latmaac.c (revision 0) +diff -Naur ffmpeg.orig/libavcodec/allcodecs.c ffmpeg/libavcodec/allcodecs.c +--- ffmpeg.orig/libavcodec/allcodecs.c 2008-12-01 01:40:36.000000000 -0500 ++++ ffmpeg/libavcodec/allcodecs.c 2009-02-21 08:25:13.000000000 -0500 +@@ -291,6 +291,7 @@ + REGISTER_ENCDEC (LIBDIRAC, libdirac); + REGISTER_ENCODER (LIBFAAC, libfaac); + REGISTER_DECODER (LIBFAAD, libfaad); ++ REGISTER_DECODER (LIBFAAD, libfaad2); + REGISTER_ENCDEC (LIBGSM, libgsm); + REGISTER_ENCDEC (LIBGSM_MS, libgsm_ms); + REGISTER_ENCODER (LIBMP3LAME, libmp3lame); +@@ -303,6 +304,7 @@ + + /* parsers */ + REGISTER_PARSER (AAC, aac); ++ REGISTER_PARSER (AAC, aac_latm); + REGISTER_PARSER (AC3, ac3); + REGISTER_PARSER (CAVSVIDEO, cavsvideo); + REGISTER_PARSER (DCA, dca); +diff -Naur ffmpeg.orig/libavcodec/avcodec.h ffmpeg/libavcodec/avcodec.h +--- ffmpeg.orig/libavcodec/avcodec.h 2008-12-01 01:40:36.000000000 -0500 ++++ ffmpeg/libavcodec/avcodec.h 2009-02-21 08:25:13.000000000 -0500 +@@ -264,6 +264,7 @@ + CODEC_ID_MP2= 0x15000, + CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3 + CODEC_ID_AAC, ++ CODEC_ID_AAC_LATM, + CODEC_ID_AC3, + CODEC_ID_DTS, + CODEC_ID_VORBIS, +diff -Naur ffmpeg.orig/libavcodec/latm_parser.c ffmpeg/libavcodec/latm_parser.c +--- ffmpeg.orig/libavcodec/latm_parser.c 1969-12-31 19:00:00.000000000 -0500 ++++ ffmpeg/libavcodec/latm_parser.c 2009-02-21 08:25:13.000000000 -0500 +@@ -0,0 +1,128 @@ ++/* ++ * LATM parser ++ * Copyright (c) 2008 Paul Kendall <[email protected]> ++ * ++ * This file is part of FFmpeg. ++ * ++ * FFmpeg is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * FFmpeg is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with FFmpeg; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++/** ++ * @file latm_parser.c ++ * LATM parser ++ */ ++ ++#include "parser.h" ++ ++#define LATM_HEADER 0x56e000 // 0x2b7 (11 bits) ++#define LATM_MASK 0xFFE000 // top 11 bits ++#define LATM_SIZE_MASK 0x001FFF // bottom 13 bits ++ ++typedef struct LATMParseContext{ ++ ParseContext pc; ++ int count; ++} LATMParseContext; ++ ++/** ++ * finds the end of the current frame in the bitstream. ++ * @return the position of the first byte of the next frame, or -1 ++ */ ++static int latm_find_frame_end(AVCodecParserContext *s1, const uint8_t *buf, ++ int buf_size) { ++ LATMParseContext *s = s1->priv_data; ++ ParseContext *pc = &s->pc; ++ int pic_found, i; ++ uint32_t state; ++ ++ pic_found = pc->frame_start_found; ++ state = pc->state; ++ ++ i = 0; ++ if(!pic_found){ ++ for(i=0; i<buf_size; i++){ ++ state = (state<<8) | buf[i]; ++ if((state & LATM_MASK) == LATM_HEADER){ ++ i++; ++ s->count = - i; ++ pic_found=1; ++ break; ++ } ++ } ++ } ++ ++ if(pic_found){ ++ /* EOF considered as end of frame */ ++ if (buf_size == 0) ++ return 0; ++ if((state & LATM_SIZE_MASK) - s->count <= buf_size) { ++ pc->frame_start_found = 0; ++ pc->state = -1; ++ return (state & LATM_SIZE_MASK) - s->count; ++ } ++ } ++ ++ s->count += buf_size; ++ pc->frame_start_found = pic_found; ++ pc->state = state; ++ return END_NOT_FOUND; ++} ++ ++static int latm_parse(AVCodecParserContext *s1, ++ AVCodecContext *avctx, ++ const uint8_t **poutbuf, int *poutbuf_size, ++ const uint8_t *buf, int buf_size) ++{ ++ LATMParseContext *s = s1->priv_data; ++ ParseContext *pc = &s->pc; ++ int next; ++ ++ if(s1->flags & PARSER_FLAG_COMPLETE_FRAMES){ ++ next = buf_size; ++ }else{ ++ next = latm_find_frame_end(s1, buf, buf_size); ++ ++ if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { ++ *poutbuf = NULL; ++ *poutbuf_size = 0; ++ return buf_size; ++ } ++ } ++ *poutbuf = buf; ++ *poutbuf_size = buf_size; ++ return next; ++} ++ ++static int latm_split(AVCodecContext *avctx, ++ const uint8_t *buf, int buf_size) ++{ ++ int i; ++ uint32_t state= -1; ++ ++ for(i=0; i<buf_size; i++){ ++ state= (state<<8) | buf[i]; ++ if((state & LATM_MASK) == LATM_HEADER) ++ return i-2; ++ } ++ return 0; ++} ++ ++AVCodecParser aac_latm_parser = { ++ { CODEC_ID_AAC_LATM }, ++ sizeof(LATMParseContext), ++ NULL, ++ latm_parse, ++ ff_parse_close, ++ latm_split, ++}; +diff -Naur ffmpeg.orig/libavcodec/latmaac.c ffmpeg/libavcodec/latmaac.c +--- ffmpeg.orig/libavcodec/latmaac.c 1969-12-31 19:00:00.000000000 -0500 ++++ ffmpeg/libavcodec/latmaac.c 2009-02-21 08:25:13.000000000 -0500 @@ -0,0 +1,624 @@ +/* + * copyright (c) 2008 Paul Kendall <[email protected]> @@ -649,182 +809,51 @@ Index: libavcodec/latmaac.c + .long_name = "AAC over LATM", +}; + -Index: libavcodec/latm_parser.c -=================================================================== ---- libavcodec/latm_parser.c (revision 0) -+++ libavcodec/latm_parser.c (revision 0) -@@ -0,0 +1,128 @@ -+/* -+ * LATM parser -+ * Copyright (c) 2008 Paul Kendall <[email protected]> -+ * -+ * This file is part of FFmpeg. -+ * -+ * FFmpeg is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * FFmpeg is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with FFmpeg; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+/** -+ * @file latm_parser.c -+ * LATM parser -+ */ -+ -+#include "parser.h" -+ -+#define LATM_HEADER 0x56e000 // 0x2b7 (11 bits) -+#define LATM_MASK 0xFFE000 // top 11 bits -+#define LATM_SIZE_MASK 0x001FFF // bottom 13 bits -+ -+typedef struct LATMParseContext{ -+ ParseContext pc; -+ int count; -+} LATMParseContext; -+ -+/** -+ * finds the end of the current frame in the bitstream. -+ * @return the position of the first byte of the next frame, or -1 -+ */ -+static int latm_find_frame_end(AVCodecParserContext *s1, const uint8_t *buf, -+ int buf_size) { -+ LATMParseContext *s = s1->priv_data; -+ ParseContext *pc = &s->pc; -+ int pic_found, i; -+ uint32_t state; -+ -+ pic_found = pc->frame_start_found; -+ state = pc->state; -+ -+ i = 0; -+ if(!pic_found){ -+ for(i=0; i<buf_size; i++){ -+ state = (state<<8) | buf[i]; -+ if((state & LATM_MASK) == LATM_HEADER){ -+ i++; -+ s->count = - i; -+ pic_found=1; -+ break; -+ } -+ } -+ } -+ -+ if(pic_found){ -+ /* EOF considered as end of frame */ -+ if (buf_size == 0) -+ return 0; -+ if((state & LATM_SIZE_MASK) - s->count <= buf_size) { -+ pc->frame_start_found = 0; -+ pc->state = -1; -+ return (state & LATM_SIZE_MASK) - s->count; -+ } -+ } -+ -+ s->count += buf_size; -+ pc->frame_start_found = pic_found; -+ pc->state = state; -+ return END_NOT_FOUND; -+} -+ -+static int latm_parse(AVCodecParserContext *s1, -+ AVCodecContext *avctx, -+ const uint8_t **poutbuf, int *poutbuf_size, -+ const uint8_t *buf, int buf_size) -+{ -+ LATMParseContext *s = s1->priv_data; -+ ParseContext *pc = &s->pc; -+ int next; -+ -+ if(s1->flags & PARSER_FLAG_COMPLETE_FRAMES){ -+ next = buf_size; -+ }else{ -+ next = latm_find_frame_end(s1, buf, buf_size); -+ -+ if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { -+ *poutbuf = NULL; -+ *poutbuf_size = 0; -+ return buf_size; -+ } -+ } -+ *poutbuf = buf; -+ *poutbuf_size = buf_size; -+ return next; -+} -+ -+static int latm_split(AVCodecContext *avctx, -+ const uint8_t *buf, int buf_size) -+{ -+ int i; -+ uint32_t state= -1; -+ -+ for(i=0; i<buf_size; i++){ -+ state= (state<<8) | buf[i]; -+ if((state & LATM_MASK) == LATM_HEADER) -+ return i-2; -+ } -+ return 0; -+} -+ -+AVCodecParser aac_latm_parser = { -+ { CODEC_ID_AAC_LATM }, -+ sizeof(LATMParseContext), -+ NULL, -+ latm_parse, -+ ff_parse_close, -+ latm_split, -+}; -Index: libavcodec/allcodecs.c -=================================================================== ---- libavcodec/allcodecs.c (revision 14016) -+++ libavcodec/allcodecs.c (working copy) -@@ -280,6 +280,7 @@ - REGISTER_ENCDEC (LIBDIRAC, libdirac); - REGISTER_ENCODER (LIBFAAC, libfaac); - REGISTER_DECODER (LIBFAAD, libfaad); -+ REGISTER_DECODER (LIBFAAD, libfaad2); - REGISTER_ENCDEC (LIBGSM, libgsm); - REGISTER_ENCDEC (LIBGSM_MS, libgsm_ms); - REGISTER_ENCODER (LIBMP3LAME, libmp3lame); -@@ -294,6 +295,7 @@ +diff -Naur ffmpeg.orig/libavformat/mpeg.c ffmpeg/libavformat/mpeg.c +--- ffmpeg.orig/libavformat/mpeg.c 2008-10-02 12:03:00.000000000 -0400 ++++ ffmpeg/libavformat/mpeg.c 2009-02-21 08:25:13.000000000 -0500 +@@ -281,7 +281,7 @@ + /* find matching stream */ + if (!((startcode >= 0x1c0 && startcode <= 0x1df) || + (startcode >= 0x1e0 && startcode <= 0x1ef) || +- (startcode == 0x1bd) || (startcode == 0x1fd))) ++ (startcode == 0x1bd) || (startcode == 0x1fa) || (startcode == 0x1fd))) + goto redo; + if (ppos) { + *ppos = url_ftell(s->pb) - 4; +@@ -441,6 +441,9 @@ + } else if(es_type == STREAM_TYPE_AUDIO_AAC){ + codec_id = CODEC_ID_AAC; + type = CODEC_TYPE_AUDIO; ++ } else if(es_type == STREAM_TYPE_AUDIO_AAC_LATM){ ++ codec_id = CODEC_ID_AAC_LATM; ++ type = CODEC_TYPE_AUDIO; + } else if(es_type == STREAM_TYPE_VIDEO_MPEG4){ + codec_id = CODEC_ID_MPEG4; + type = CODEC_TYPE_VIDEO; +diff -Naur ffmpeg.orig/libavformat/mpeg.h ffmpeg/libavformat/mpeg.h +--- ffmpeg.orig/libavformat/mpeg.h 2008-08-31 03:39:47.000000000 -0400 ++++ ffmpeg/libavformat/mpeg.h 2009-02-21 08:25:13.000000000 -0500 +@@ -53,6 +53,7 @@ + #define STREAM_TYPE_PRIVATE_DATA 0x06 + #define STREAM_TYPE_AUDIO_AAC 0x0f + #define STREAM_TYPE_VIDEO_MPEG4 0x10 ++#define STREAM_TYPE_AUDIO_AAC_LATM 0x11 + #define STREAM_TYPE_VIDEO_H264 0x1b - /* parsers */ - REGISTER_PARSER (AAC, aac); -+ REGISTER_PARSER (AAC, aac_latm); - REGISTER_PARSER (AC3, ac3); - REGISTER_PARSER (CAVSVIDEO, cavsvideo); - REGISTER_PARSER (DCA, dca); -Index: libavcodec/avcodec.h -=================================================================== ---- libavcodec/avcodec.h (revision 14016) -+++ libavcodec/avcodec.h (working copy) -@@ -259,4 +259,5 @@ - CODEC_ID_AAC, -+ CODEC_ID_AAC_LATM, - CODEC_ID_AC3, - CODEC_ID_DTS, - CODEC_ID_VORBIS, -Index: libavformat/mpegts.c -=================================================================== ---- libavformat/mpegts.c (revision 14016) -+++ libavformat/mpegts.c (working copy) -@@ -611,6 +611,7 @@ - case STREAM_TYPE_VIDEO_H264: + #define STREAM_TYPE_AUDIO_AC3 0x81 +diff -Naur ffmpeg.orig/libavformat/mpegts.c ffmpeg/libavformat/mpegts.c +--- ffmpeg.orig/libavformat/mpegts.c 2008-10-02 12:28:58.000000000 -0400 ++++ ffmpeg/libavformat/mpegts.c 2009-02-21 08:25:13.000000000 -0500 +@@ -625,6 +625,7 @@ case STREAM_TYPE_VIDEO_VC1: + case STREAM_TYPE_VIDEO_DIRAC: case STREAM_TYPE_AUDIO_AAC: + case STREAM_TYPE_AUDIO_AAC_LATM: case STREAM_TYPE_AUDIO_AC3: case STREAM_TYPE_AUDIO_DTS: case STREAM_TYPE_AUDIO_HDMV_DTS: -@@ -832,7 +833,7 @@ +@@ -847,7 +848,7 @@ code = pes->header[3] | 0x100; if (!((code >= 0x1c0 && code <= 0x1df) || (code >= 0x1e0 && code <= 0x1ef) || @@ -833,7 +862,7 @@ Index: libavformat/mpegts.c goto skip; if (!pes->st) { /* allocate stream */ -@@ -948,6 +949,10 @@ +@@ -968,6 +969,10 @@ codec_type = CODEC_TYPE_AUDIO; codec_id = CODEC_ID_AAC; break; @@ -844,10 +873,9 @@ Index: libavformat/mpegts.c case STREAM_TYPE_AUDIO_AC3: codec_type = CODEC_TYPE_AUDIO; codec_id = CODEC_ID_AC3; -Index: libavformat/mpegts.h -=================================================================== ---- libavformat/mpegts.h (revision 14016) -+++ libavformat/mpegts.h (working copy) +diff -Naur ffmpeg.orig/libavformat/mpegts.h ffmpeg/libavformat/mpegts.h +--- ffmpeg.orig/libavformat/mpegts.h 2008-08-31 03:39:47.000000000 -0400 ++++ ffmpeg/libavformat/mpegts.h 2009-02-21 08:25:13.000000000 -0500 @@ -50,6 +50,7 @@ #define STREAM_TYPE_PRIVATE_DATA 0x06 #define STREAM_TYPE_AUDIO_AAC 0x0f @@ -855,39 +883,4 @@ Index: libavformat/mpegts.h +#define STREAM_TYPE_AUDIO_AAC_LATM 0x11 #define STREAM_TYPE_VIDEO_H264 0x1b #define STREAM_TYPE_VIDEO_VC1 0xea - -Index: libavformat/mpeg.c -=================================================================== ---- libavformat/mpeg.c (revision 14016) -+++ libavformat/mpeg.c (working copy) -@@ -281,7 +281,7 @@ - /* find matching stream */ - if (!((startcode >= 0x1c0 && startcode <= 0x1df) || - (startcode >= 0x1e0 && startcode <= 0x1ef) || -- (startcode == 0x1bd) || (startcode == 0x1fd))) -+ (startcode == 0x1bd) || (startcode == 0x1fa) || (startcode == 0x1fd))) - goto redo; - if (ppos) { - *ppos = url_ftell(s->pb) - 4; -@@ -439,6 +439,9 @@ - } else if(es_type == STREAM_TYPE_AUDIO_AAC){ - codec_id = CODEC_ID_AAC; - type = CODEC_TYPE_AUDIO; -+ } else if(es_type == STREAM_TYPE_AUDIO_AAC_LATM){ -+ codec_id = CODEC_ID_AAC_LATM; -+ type = CODEC_TYPE_AUDIO; - } else if(es_type == STREAM_TYPE_VIDEO_MPEG4){ - codec_id = CODEC_ID_MPEG4; - type = CODEC_TYPE_VIDEO; -Index: libavformat/mpeg.h -=================================================================== ---- libavformat/mpeg.h (revision 14016) -+++ libavformat/mpeg.h (working copy) -@@ -53,6 +53,7 @@ - #define STREAM_TYPE_PRIVATE_DATA 0x06 - #define STREAM_TYPE_AUDIO_AAC 0x0f - #define STREAM_TYPE_VIDEO_MPEG4 0x10 -+#define STREAM_TYPE_AUDIO_AAC_LATM 0x11 - #define STREAM_TYPE_VIDEO_H264 0x1b - - #define STREAM_TYPE_AUDIO_AC3 0x81 + #define STREAM_TYPE_VIDEO_DIRAC 0xd1 diff --git a/contrib/patch-ffmpeg-mpegleak.patch b/contrib/ffmpeg/A01-mpegleak.patch index 74907258b..36179ba57 100644 --- a/contrib/patch-ffmpeg-mpegleak.patch +++ b/contrib/ffmpeg/A01-mpegleak.patch @@ -1,8 +1,7 @@ -Index: libavcodec/h264.c -=================================================================== ---- libavcodec/h264.c (revision 14820) -+++ libavcodec/h264.c (working copy) -@@ -3355,7 +3355,7 @@ +diff -Naur ffmpeg.orig/libavcodec/h264.c ffmpeg/libavcodec/h264.c +--- ffmpeg.orig/libavcodec/h264.c 2008-12-01 11:24:19.000000000 -0500 ++++ ffmpeg/libavcodec/h264.c 2009-02-21 08:23:58.000000000 -0500 +@@ -3298,7 +3298,7 @@ * stream. Need to discard one frame. Prevents overrun of the * short_ref and long_ref buffers. */ @@ -11,7 +10,7 @@ Index: libavcodec/h264.c "number of reference frames exceeds max (probably " "corrupt input), discarding one\n"); -@@ -7557,7 +7557,7 @@ +@@ -7556,7 +7556,7 @@ if(!(s->flags2 & CODEC_FLAG2_CHUNKS) && !s->current_picture_ptr){ if (avctx->skip_frame >= AVDISCARD_NONREF || s->hurry_up) return 0; @@ -20,10 +19,9 @@ Index: libavcodec/h264.c return -1; } -Index: libavcodec/mpegvideo.c -=================================================================== ---- libavcodec/mpegvideo.c (revision 14820) -+++ libavcodec/mpegvideo.c (working copy) +diff -Naur ffmpeg.orig/libavcodec/mpegvideo.c ffmpeg/libavcodec/mpegvideo.c +--- ffmpeg.orig/libavcodec/mpegvideo.c 2008-10-01 20:27:09.000000000 -0400 ++++ ffmpeg/libavcodec/mpegvideo.c 2009-02-21 08:23:58.000000000 -0500 @@ -779,19 +779,18 @@ } diff --git a/contrib/ffmpeg/A02-audioconvert.patch b/contrib/ffmpeg/A02-audioconvert.patch new file mode 100644 index 000000000..5062e3439 --- /dev/null +++ b/contrib/ffmpeg/A02-audioconvert.patch @@ -0,0 +1,12 @@ +diff -Naur ffmpeg.orig/libavcodec/Makefile ffmpeg/libavcodec/Makefile +--- ffmpeg.orig/libavcodec/Makefile 2008-12-01 01:40:36.000000000 -0500 ++++ ffmpeg/libavcodec/Makefile 2009-02-23 07:03:23.000000000 -0500 +@@ -3,7 +3,7 @@ + NAME = avcodec + FFLIBS = avutil + +-HEADERS = avcodec.h opt.h ++HEADERS = avcodec.h opt.h audioconvert.h + + OBJS = allcodecs.o \ + audioconvert.o \ diff --git a/contrib/patch-ffmpeg-cygwin.patch b/contrib/ffmpeg/P00-cygwin.patch index b6ca99f26..b6ca99f26 100644 --- a/contrib/patch-ffmpeg-cygwin.patch +++ b/contrib/ffmpeg/P00-cygwin.patch diff --git a/contrib/patch-ffmpeg-solaris.patch b/contrib/ffmpeg/P01-sunos.patch index f5cd7d726..f5cd7d726 100644 --- a/contrib/patch-ffmpeg-solaris.patch +++ b/contrib/ffmpeg/P01-sunos.patch diff --git a/contrib/patch-ffmpeg-h264dsp-crash.diff b/contrib/ffmpeg/P02-darwin-h264dsp-crash.patch index 53b5cf09d..53b5cf09d 100644 --- a/contrib/patch-ffmpeg-h264dsp-crash.diff +++ b/contrib/ffmpeg/P02-darwin-h264dsp-crash.patch diff --git a/contrib/ffmpeg/module.defs b/contrib/ffmpeg/module.defs new file mode 100644 index 000000000..b41291018 --- /dev/null +++ b/contrib/ffmpeg/module.defs @@ -0,0 +1,32 @@ +$(eval $(call import.MODULE.defs,FFMPEG,ffmpeg,FAAD2)) +$(eval $(call import.CONTRIB.defs,FFMPEG)) + +FFMPEG.FETCH.url = http://download.m0k.org/handbrake/contrib/ffmpeg-r15974.tar.gz +FFMPEG.EXTRACT.tarbase = ffmpeg + +FFMPEG.CONFIGURE.deps = +FFMPEG.CONFIGURE.env = +FFMPEG.CONFIGURE.host = + +FFMPEG.CONFIGURE.extra = \ + --disable-bsfs \ + --disable-encoders \ + --disable-ffmpeg \ + --disable-ffserver \ + --disable-muxers \ + --disable-vhook \ + --enable-encoder=ac3 \ + --enable-encoder=mpeg4 \ + --enable-encoder=snow \ + --enable-gpl \ + --enable-libfaad \ + --enable-muxer=ipod \ + --enable-pthreads \ + --enable-swscale \ + --cc="$(GCC.gcc)" \ + --extra-cflags="$(call fn.ARGS,FFMPEG.GCC,*archs) -I$(call fn.ABSOLUTE,$(CONTRIB.build/)include)" \ + --extra-ldflags="$(call fn.ARGS,FFMPEG.GCC,*archs) -L$(call fn.ABSOLUTE,$(CONTRIB.build/)lib)" + +ifeq ($(BUILD.cross),1) + FFMPEG.CONFIGURE.extra += --enable-cross-compile --arch=$(FFMPEG.GCC.archs) +endif diff --git a/contrib/ffmpeg/module.rules b/contrib/ffmpeg/module.rules new file mode 100644 index 000000000..7f475b3ec --- /dev/null +++ b/contrib/ffmpeg/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,FFMPEG)) +$(eval $(call import.CONTRIB.rules,FFMPEG)) diff --git a/contrib/lame/P00-darwin-xmmintrin.patch b/contrib/lame/P00-darwin-xmmintrin.patch new file mode 100644 index 000000000..de19e55ba --- /dev/null +++ b/contrib/lame/P00-darwin-xmmintrin.patch @@ -0,0 +1,28 @@ +diff -Naur lame.orig/configure lame/configure +--- lame.orig/configure 2008-06-29 17:40:05.000000000 -0400 ++++ lame/configure 2008-10-14 05:01:29.000000000 -0400 +@@ -21031,7 +21031,14 @@ + + + +- ++case $host_cpu in ++powerpc*) ++ check_xmmintrin= ++ ;; ++*) ++ check_xmmintrin="xmmintrin.h" ++ ;; ++esac + + for ac_header in \ + errno.h \ +@@ -21042,7 +21049,7 @@ + sys/soundcard.h \ + sys/time.h \ + unistd.h \ +- xmmintrin.h \ ++ $check_xmmintrin \ + linux/soundcard.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` diff --git a/contrib/lame/module.defs b/contrib/lame/module.defs new file mode 100644 index 000000000..dd89cd683 --- /dev/null +++ b/contrib/lame/module.defs @@ -0,0 +1,5 @@ +$(eval $(call import.MODULE.defs,LAME,lame)) +$(eval $(call import.CONTRIB.defs,LAME)) + +LAME.FETCH.url = http://download.m0k.org/handbrake/contrib/lame-3.98.tar.gz +LAME.EXTRACT.tarbase = lame diff --git a/contrib/lame/module.rules b/contrib/lame/module.rules new file mode 100644 index 000000000..058bc7b56 --- /dev/null +++ b/contrib/lame/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,LAME)) +$(eval $(call import.CONTRIB.rules,LAME)) diff --git a/contrib/patch-libdca.patch b/contrib/libdca/A00-general.patch index cab8db266..cab8db266 100644 --- a/contrib/patch-libdca.patch +++ b/contrib/libdca/A00-general.patch diff --git a/contrib/libdca/module.defs b/contrib/libdca/module.defs new file mode 100644 index 000000000..b69d1fb3a --- /dev/null +++ b/contrib/libdca/module.defs @@ -0,0 +1,5 @@ +$(eval $(call import.MODULE.defs,LIBDCA,libdca)) +$(eval $(call import.CONTRIB.defs,LIBDCA)) + +LIBDCA.FETCH.url = http://download.m0k.org/handbrake/contrib/libdca-r81-strapped.tar.gz +LIBDCA.EXTRACT.tarbase = libdca diff --git a/contrib/libdca/module.rules b/contrib/libdca/module.rules new file mode 100644 index 000000000..0f33e2185 --- /dev/null +++ b/contrib/libdca/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,LIBDCA)) +$(eval $(call import.CONTRIB.rules,LIBDCA)) diff --git a/contrib/patch-libdvdread-css-vlc-dylib.patch b/contrib/libdvdread/P00-darwin-css-vlc-dylib.patch index 70c5bab9c..cb0181517 100644 --- a/contrib/patch-libdvdread-css-vlc-dylib.patch +++ b/contrib/libdvdread/P00-darwin-css-vlc-dylib.patch @@ -1,5 +1,6 @@ ---- dvdread/dvd_input.c 2005-09-19 09:43:08.000000000 -0400 -+++ dvdread/patched-dvd_input.c 2008-03-19 12:47:16.000000000 -0400 +diff -Naur libdvdread.orig/dvdread/dvd_input.c libdvdread/dvdread/dvd_input.c +--- libdvdread.orig/dvdread/dvd_input.c 2005-09-19 09:43:08.000000000 -0400 ++++ libdvdread/dvdread/dvd_input.c 2009-02-21 10:22:42.000000000 -0500 @@ -332,7 +332,7 @@ #else diff --git a/contrib/patch-libdvdread-cygwin.patch b/contrib/libdvdread/P01-cygwin.patch index fbb1f12d3..fbb1f12d3 100644 --- a/contrib/patch-libdvdread-cygwin.patch +++ b/contrib/libdvdread/P01-cygwin.patch diff --git a/contrib/libdvdread/module.defs b/contrib/libdvdread/module.defs new file mode 100644 index 000000000..99b70923a --- /dev/null +++ b/contrib/libdvdread/module.defs @@ -0,0 +1,5 @@ +$(eval $(call import.MODULE.defs,LIBDVDREAD,libdvdread)) +$(eval $(call import.CONTRIB.defs,LIBDVDREAD)) + +LIBDVDREAD.FETCH.url = http://download.m0k.org/handbrake/contrib/libdvdread-0.9.7.tar.gz +LIBDVDREAD.EXTRACT.tarbase = libdvdread diff --git a/contrib/libdvdread/module.rules b/contrib/libdvdread/module.rules new file mode 100644 index 000000000..6a9b42b0d --- /dev/null +++ b/contrib/libdvdread/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,LIBDVDREAD)) +$(eval $(call import.CONTRIB.rules,LIBDVDREAD)) diff --git a/contrib/libmkv/module.defs b/contrib/libmkv/module.defs new file mode 100644 index 000000000..102aea033 --- /dev/null +++ b/contrib/libmkv/module.defs @@ -0,0 +1,5 @@ +$(eval $(call import.MODULE.defs,LIBMKV,libmkv)) +$(eval $(call import.CONTRIB.defs,LIBMKV)) + +LIBMKV.FETCH.url = http://download.m0k.org/handbrake/contrib/libmkv-0.6.3.1.tar.gz +LIBMKV.EXTRACT.tarbase = libmkv diff --git a/contrib/libmkv/module.rules b/contrib/libmkv/module.rules new file mode 100644 index 000000000..7f443fe04 --- /dev/null +++ b/contrib/libmkv/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,LIBMKV)) +$(eval $(call import.CONTRIB.rules,LIBMKV)) diff --git a/contrib/libmp4v2/module.defs b/contrib/libmp4v2/module.defs new file mode 100644 index 000000000..5a8063f3f --- /dev/null +++ b/contrib/libmp4v2/module.defs @@ -0,0 +1,5 @@ +$(eval $(call import.MODULE.defs,LIBMP4V2,libmp4v2)) +$(eval $(call import.CONTRIB.defs,LIBMP4V2)) + +LIBMP4V2.FETCH.url = http://download.m0k.org/handbrake/contrib/libmp4v2-2.0-r224-repack.tar.gz +LIBMP4V2.EXTRACT.tarbase = libmp4v2 diff --git a/contrib/libmp4v2/module.rules b/contrib/libmp4v2/module.rules new file mode 100644 index 000000000..8169e6032 --- /dev/null +++ b/contrib/libmp4v2/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,LIBMP4V2)) +$(eval $(call import.CONTRIB.rules,LIBMP4V2)) diff --git a/contrib/libogg/module.defs b/contrib/libogg/module.defs new file mode 100644 index 000000000..0edc4106a --- /dev/null +++ b/contrib/libogg/module.defs @@ -0,0 +1,7 @@ +$(eval $(call import.MODULE.defs,LIBOGG,libogg)) +$(eval $(call import.CONTRIB.defs,LIBOGG)) + +LIBOGG.FETCH.url = http://download.m0k.org/handbrake/contrib/libogg-1.1.3.tar.gz +LIBOGG.EXTRACT.tarbase = libogg + +LIBOGG.CONFIGURE.extra = --disable-sdl diff --git a/contrib/libogg/module.rules b/contrib/libogg/module.rules new file mode 100644 index 000000000..956fe0788 --- /dev/null +++ b/contrib/libogg/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,LIBOGG)) +$(eval $(call import.CONTRIB.rules,LIBOGG)) diff --git a/contrib/libsamplerate/module.defs b/contrib/libsamplerate/module.defs new file mode 100644 index 000000000..c0717df37 --- /dev/null +++ b/contrib/libsamplerate/module.defs @@ -0,0 +1,5 @@ +$(eval $(call import.MODULE.defs,LIBSAMPLERATE,libsamplerate)) +$(eval $(call import.CONTRIB.defs,LIBSAMPLERATE)) + +LIBSAMPLERATE.FETCH.url = http://download.m0k.org/handbrake/contrib/libsamplerate-0.1.4.tar.gz +LIBSAMPLERATE.EXTRACT.tarbase = libsamplerate diff --git a/contrib/libsamplerate/module.rules b/contrib/libsamplerate/module.rules new file mode 100644 index 000000000..ef633856c --- /dev/null +++ b/contrib/libsamplerate/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,LIBSAMPLERATE)) +$(eval $(call import.CONTRIB.rules,LIBSAMPLERATE)) diff --git a/contrib/libtheora/module.defs b/contrib/libtheora/module.defs new file mode 100644 index 000000000..be40ab579 --- /dev/null +++ b/contrib/libtheora/module.defs @@ -0,0 +1,13 @@ +$(eval $(call import.MODULE.defs,LIBTHEORA,libtheora,LIBOGG LIBVORBIS)) +$(eval $(call import.CONTRIB.defs,LIBTHEORA)) + +LIBTHEORA.FETCH.url = http://download.m0k.org/handbrake/contrib/libtheora-1.0.tar.gz +LIBTHEORA.EXTRACT.tarbase = libtheora + +LIBTHEORA.CONFIGURE.extra = \ + --disable-examples \ + --disable-oggtest \ + --disable-sdltest \ + --disable-vorbistest \ + --with-ogg=$(call fn.ABSOLUTE,$(CONTRIB.build/)) \ + --with-vorbis=$(call fn.ABSOLUTE,$(CONTRIB.build/)) diff --git a/contrib/libtheora/module.rules b/contrib/libtheora/module.rules new file mode 100644 index 000000000..c30224bb2 --- /dev/null +++ b/contrib/libtheora/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,LIBTHEORA)) +$(eval $(call import.CONTRIB.rules,LIBTHEORA)) diff --git a/contrib/libvorbis/module.defs b/contrib/libvorbis/module.defs new file mode 100644 index 000000000..9946bb53c --- /dev/null +++ b/contrib/libvorbis/module.defs @@ -0,0 +1,7 @@ +$(eval $(call import.MODULE.defs,LIBVORBIS,libvorbis,LIBOGG)) +$(eval $(call import.CONTRIB.defs,LIBVORBIS)) + +LIBVORBIS.FETCH.url = http://download.m0k.org/handbrake/contrib/libvorbis-aotuv_b5.tar.gz +LIBVORBIS.EXTRACT.tarbase = libvorbis + +LIBVORBIS.CONFIGURE.extra = --with-ogg=$(call fn.ABSOLUTE,$(CONTRIB.build/)) diff --git a/contrib/libvorbis/module.rules b/contrib/libvorbis/module.rules new file mode 100644 index 000000000..418dfe0ef --- /dev/null +++ b/contrib/libvorbis/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,LIBVORBIS)) +$(eval $(call import.CONTRIB.rules,LIBVORBIS)) diff --git a/contrib/mpeg2dec/module.defs b/contrib/mpeg2dec/module.defs new file mode 100644 index 000000000..5d608cc0b --- /dev/null +++ b/contrib/mpeg2dec/module.defs @@ -0,0 +1,7 @@ +$(eval $(call import.MODULE.defs,MPEG2DEC,mpeg2dec)) +$(eval $(call import.CONTRIB.defs,MPEG2DEC)) + +MPEG2DEC.FETCH.url = http://download.m0k.org/handbrake/contrib/mpeg2dec-0.5.1.tar.gz +MPEG2DEC.EXTRACT.tarbase = mpeg2dec + +MPEG2DEC.CONFIGURE.extra = --disable-sdl --without-x diff --git a/contrib/mpeg2dec/module.rules b/contrib/mpeg2dec/module.rules new file mode 100644 index 000000000..78ce10aca --- /dev/null +++ b/contrib/mpeg2dec/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,MPEG2DEC)) +$(eval $(call import.CONTRIB.rules,MPEG2DEC)) diff --git a/contrib/patch-ffmpeg.patch b/contrib/patch-ffmpeg.patch deleted file mode 100644 index e52731f1d..000000000 --- a/contrib/patch-ffmpeg.patch +++ /dev/null @@ -1,18 +0,0 @@ -Index: libavformat/tcp.c -=================================================================== ---- libavformat/tcp.c (revision 9814) -+++ libavformat/tcp.c (working copy) -@@ -88,11 +88,13 @@ - break; - } - -+#ifndef __BEOS__ - /* test error */ - optlen = sizeof(ret); - getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen); - if (ret != 0) - goto fail; -+#endif - } - s->fd = fd; - return 0; diff --git a/contrib/patch-libmpeg2.patch b/contrib/patch-libmpeg2.patch deleted file mode 100644 index d5ab5bf65..000000000 --- a/contrib/patch-libmpeg2.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -ur orig/header.c mpeg2dec/libmpeg2/header.c ---- orig/header.c 2003-12-22 12:24:02.000000000 +0100 -+++ mpeg2dec/libmpeg2/header.c 2004-08-02 18:07:50.000000000 +0200 -@@ -100,6 +100,9 @@ - mpeg2dec->decoder.convert = NULL; - mpeg2dec->decoder.convert_id = NULL; - mpeg2dec->picture = mpeg2dec->pictures; -+ memset(&mpeg2dec->fbuf_alloc[0].fbuf, 0, sizeof(mpeg2_fbuf_t)); -+ memset(&mpeg2dec->fbuf_alloc[1].fbuf, 0, sizeof(mpeg2_fbuf_t)); -+ memset(&mpeg2dec->fbuf_alloc[2].fbuf, 0, sizeof(mpeg2_fbuf_t)); - mpeg2dec->fbuf[0] = &mpeg2dec->fbuf_alloc[0].fbuf; - mpeg2dec->fbuf[1] = &mpeg2dec->fbuf_alloc[1].fbuf; - mpeg2dec->fbuf[2] = &mpeg2dec->fbuf_alloc[2].fbuf; -@@ -551,6 +554,7 @@ - if (!(mpeg2dec->sequence.flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE)) { - picture->nb_fields = (buffer[3] & 2) ? 3 : 2; - flags |= (buffer[3] & 128) ? PIC_FLAG_TOP_FIELD_FIRST : 0; -+ flags |= (buffer[3] & 2) ? PIC_FLAG_REPEAT_FIRST_FIELD : 0; - } else - picture->nb_fields = (buffer[3]&2) ? ((buffer[3]&128) ? 6 : 4) : 2; - break; -diff -ur orig/mpeg2.h mpeg2dec/include/mpeg2.h ---- orig/mpeg2.h 2003-12-22 13:13:35.000000000 +0100 -+++ mpeg2dec/include/mpeg2.h 2004-02-18 13:50:13.000000000 +0100 -@@ -82,6 +82,7 @@ - #define PIC_FLAG_COMPOSITE_DISPLAY 32 - #define PIC_FLAG_SKIP 64 - #define PIC_FLAG_TAGS 128 -+#define PIC_FLAG_REPEAT_FIRST_FIELD 256 - #define PIC_MASK_COMPOSITE_DISPLAY 0xfffff000 - - typedef struct mpeg2_picture_s { - diff --git a/contrib/patch-x264-idr.patch b/contrib/patch-x264-idr.patch deleted file mode 100644 index df4294f12..000000000 --- a/contrib/patch-x264-idr.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: encoder/slicetype.c -=================================================================== ---- encoder/slicetype.c (revision 665) -+++ encoder/slicetype.c (working copy) -@@ -379,7 +379,12 @@ - return; - frames[0] = h->frames.last_nonb; - for( j = 0; h->frames.next[j]; j++ ) -+ { -+ // if the app wants an IDR, give it to them -+ if ( h->frames.next[j]->i_type == X264_TYPE_IDR ) -+ return; - frames[j+1] = h->frames.next[j]; -+ } - keyint_limit = h->param.i_keyint_max - frames[0]->i_frame + h->frames.i_last_idr - 1; - num_frames = X264_MIN( j, keyint_limit ); - if( num_frames == 0 ) diff --git a/contrib/patch-x264-linux.patch b/contrib/patch-x264-linux.patch deleted file mode 100644 index 3f1752d4c..000000000 --- a/contrib/patch-x264-linux.patch +++ /dev/null @@ -1,194 +0,0 @@ -Index: /common/ppc/quant.c -=================================================================== ---- /common/ppc/quant.c (revision 601) -+++ /common/ppc/quant.c (revision 621) -@@ -18,8 +18,4 @@ - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. - *****************************************************************************/ -- --#ifdef HAVE_ALTIVEC_H --#include <altivec.h> --#endif - - #include "common/common.h" -@@ -54,29 +50,29 @@ - temp2v = vec_xor(temp2v, mskB); \ - temp1v = vec_adds(temp1v, vec_and(mskA, one)); \ --vec_st(temp1v, (dct0), dct); \ -+vec_st(temp1v, (dct0), (int16_t*)dct); \ - temp2v = vec_adds(temp2v, vec_and(mskB, one)); \ --vec_st(temp2v, (dct1), dct); -+vec_st(temp2v, (dct1), (int16_t*)dct); - - void x264_quant_4x4_altivec( int16_t dct[4][4], int quant_mf[4][4], int const i_qbits, int const f ) { - vector bool short mskA; -- vec_s32_t i_qbitsv; -+ vec_u32_t i_qbitsv; - vec_u16_t coefvA; - vec_u32_t multEvenvA, multOddvA; -- vec_u32_t mfvA; -+ vec_u16_t mfvA; - vec_s16_t zerov, one; -- vec_s32_t fV; -+ vec_u32_t fV; - - vector bool short mskB; - vec_u16_t coefvB; - vec_u32_t multEvenvB, multOddvB; -- vec_u32_t mfvB; -+ vec_u16_t mfvB; - - vec_s16_t temp1v, temp2v; - -- vect_sint_u qbits_u; -+ vect_int_u qbits_u; - qbits_u.s[0]=i_qbits; - i_qbitsv = vec_splat(qbits_u.v, 0); - -- vect_sint_u f_u; -+ vect_int_u f_u; - f_u.s[0]=f; - -@@ -114,16 +110,16 @@ - temp2v = vec_xor(temp2v, mskB); \ - temp1v = vec_add(temp1v, vec_and(mskA, one)); \ --vec_st(temp1v, (dct0), dct); \ -+vec_st(temp1v, (dct0), (int16_t*)dct); \ - temp2v = vec_add(temp2v, vec_and(mskB, one)); \ --vec_st(temp2v, (dct1), dct); -+vec_st(temp2v, (dct1), (int16_t*)dct); - - - void x264_quant_4x4_dc_altivec( int16_t dct[4][4], int i_quant_mf, int const i_qbits, int const f ) { - vector bool short mskA; -- vec_s32_t i_qbitsv; -+ vec_u32_t i_qbitsv; - vec_u16_t coefvA; - vec_u32_t multEvenvA, multOddvA; - vec_s16_t zerov, one; -- vec_s32_t fV; -+ vec_u32_t fV; - - vector bool short mskB; -@@ -133,15 +129,14 @@ - vec_s16_t temp1v, temp2v; - -- vec_u32_t mfv; -- vect_int_u mf_u; -+ vec_u16_t mfv; -+ vect_ushort_u mf_u; - mf_u.s[0]=i_quant_mf; - mfv = vec_splat( mf_u.v, 0 ); -- mfv = vec_packs( mfv, mfv); - -- vect_sint_u qbits_u; -+ vect_int_u qbits_u; - qbits_u.s[0]=i_qbits; - i_qbitsv = vec_splat(qbits_u.v, 0); - -- vect_sint_u f_u; -+ vect_int_u f_u; - f_u.s[0]=f; - fV = vec_splat(f_u.v, 0); -@@ -156,13 +151,15 @@ - void x264_quant_8x8_altivec( int16_t dct[8][8], int quant_mf[8][8], int const i_qbits, int const f ) { - vector bool short mskA; -- vec_s32_t i_qbitsv; -+ vec_u32_t i_qbitsv; - vec_u16_t coefvA; -- vec_s32_t multEvenvA, multOddvA, mfvA; -+ vec_u32_t multEvenvA, multOddvA; -+ vec_u16_t mfvA; - vec_s16_t zerov, one; -- vec_s32_t fV; -+ vec_u32_t fV; - - vector bool short mskB; - vec_u16_t coefvB; -- vec_u32_t multEvenvB, multOddvB, mfvB; -+ vec_u32_t multEvenvB, multOddvB; -+ vec_u16_t mfvB; - - vec_s16_t temp1v, temp2v; -@@ -172,5 +169,5 @@ - i_qbitsv = vec_splat(qbits_u.v, 0); - -- vect_sint_u f_u; -+ vect_int_u f_u; - f_u.s[0]=f; - fV = vec_splat(f_u.v, 0); -Index: /common/ppc/dct.c -=================================================================== ---- /common/ppc/dct.c (revision 604) -+++ /common/ppc/dct.c (revision 621) -@@ -61,6 +61,6 @@ - VEC_DCT( dct0v, dct1v, dct2v, dct3v, tmp0v, tmp1v, tmp2v, tmp3v ); - -- vec_st(vec_perm(tmp0v, tmp1v, permHighv), 0, dct); -- vec_st(vec_perm(tmp2v, tmp3v, permHighv), 16, dct); -+ vec_st(vec_perm(tmp0v, tmp1v, permHighv), 0, (int16_t*)dct); -+ vec_st(vec_perm(tmp2v, tmp3v, permHighv), 16, (int16_t*)dct); - } - -@@ -95,12 +95,12 @@ - VEC_DCT( dct4v, dct5v, dct6v, dct7v, tmp4v, tmp5v, tmp6v, tmp7v ); - -- vec_st(vec_perm(tmp0v, tmp1v, permHighv), 0, dct); -- vec_st(vec_perm(tmp2v, tmp3v, permHighv), 16, dct); -- vec_st(vec_perm(tmp4v, tmp5v, permHighv), 32, dct); -- vec_st(vec_perm(tmp6v, tmp7v, permHighv), 48, dct); -- vec_st(vec_perm(tmp0v, tmp1v, permLowv), 64, dct); -- vec_st(vec_perm(tmp2v, tmp3v, permLowv), 80, dct); -- vec_st(vec_perm(tmp4v, tmp5v, permLowv), 96, dct); -- vec_st(vec_perm(tmp6v, tmp7v, permLowv), 112, dct); -+ vec_st(vec_perm(tmp0v, tmp1v, permHighv), 0, (int16_t*)dct); -+ vec_st(vec_perm(tmp2v, tmp3v, permHighv), 16, (int16_t*)dct); -+ vec_st(vec_perm(tmp4v, tmp5v, permHighv), 32, (int16_t*)dct); -+ vec_st(vec_perm(tmp6v, tmp7v, permHighv), 48, (int16_t*)dct); -+ vec_st(vec_perm(tmp0v, tmp1v, permLowv), 64, (int16_t*)dct); -+ vec_st(vec_perm(tmp2v, tmp3v, permLowv), 80, (int16_t*)dct); -+ vec_st(vec_perm(tmp4v, tmp5v, permLowv), 96, (int16_t*)dct); -+ vec_st(vec_perm(tmp6v, tmp7v, permLowv), 112, (int16_t*)dct); - } - -@@ -312,6 +312,6 @@ - void x264_add8x8_idct8_altivec( uint8_t *dst, int16_t dct[8][8] ) - { -- vec_s16_t onev = vec_splat_s16(1); -- vec_s16_t twov = vec_splat_s16(2); -+ vec_u16_t onev = vec_splat_s16(1); -+ vec_u16_t twov = vec_splat_s16(2); - - dct[0][0] += 32; // rounding for the >>6 at the end -@@ -342,5 +342,5 @@ - vec_u8_t perm_ldv = vec_lvsl(0, dst); - vec_u8_t perm_stv = vec_lvsr(8, dst); -- vec_s16_t sixv = vec_splat_s16(6); -+ vec_u16_t sixv = vec_splat_s16(6); - const vec_u8_t sel = (vec_u8_t) CV(0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1); - LOAD_ZERO; -Index: /common/ppc/quant.h -=================================================================== ---- /common/ppc/quant.h (revision 601) -+++ /common/ppc/quant.h (revision 621) -@@ -19,4 +19,8 @@ - *****************************************************************************/ - -+#ifdef SYS_LINUX -+#include <altivec.h> -+#endif -+ - #ifndef _PPC_QUANT_H - #define _PPC_QUANT_H 1 -@@ -28,8 +32,7 @@ - - typedef union { -- signed int s[4]; -- vector signed int v; --} vect_sint_u; -- -+ unsigned short s[8]; -+ vector unsigned short v; -+} vect_ushort_u; - - void x264_quant_4x4_altivec( int16_t dct[4][4], int quant_mf[4][4], int const i_qbits, int const f ); diff --git a/contrib/patch_mpeg4ip_cygwin.patch b/contrib/patch_mpeg4ip_cygwin.patch deleted file mode 100644 index 0bc19cda6..000000000 --- a/contrib/patch_mpeg4ip_cygwin.patch +++ /dev/null @@ -1,262 +0,0 @@ -diff -Naur mpeg4ip/lib/mp4v2/mp4.cpp /Users/pri/t/mpeg4ip/lib/mp4v2/mp4.cpp ---- mpeg4ip/lib/mp4v2/mp4.cpp 2005-03-30 20:41:58.000000000 +0200 -+++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4.cpp 2007-02-09 22:39:28.000000000 +0100 -@@ -1678,9 +1678,9 @@ - extern "C" bool MP4GetTrackH264SeqPictHeaders (MP4FileHandle hFile, - MP4TrackId trackId, - uint8_t ***pSeqHeader, -- uint32_t **pSeqHeaderSize, -+ u_int32_t **pSeqHeaderSize, - uint8_t ***pPictHeader, -- uint32_t **pPictHeaderSize) -+ u_int32_t **pPictHeaderSize) - { - if (MP4_IS_VALID_FILE_HANDLE(hFile)) { - try { -diff -Naur mpeg4ip/lib/mp4v2/mp4.h /Users/pri/t/mpeg4ip/lib/mp4v2/mp4.h ---- mpeg4ip/lib/mp4v2/mp4.h 2005-03-30 20:41:58.000000000 +0200 -+++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4.h 2007-02-09 22:39:42.000000000 +0100 -@@ -631,9 +631,9 @@ - - bool MP4GetTrackVideoMetadata(MP4FileHandle hFile, - MP4TrackId trackId, -- uint8_t **ppConfig, -- uint32_t *pConfigSize); -- -+ u_int8_t **ppConfig, -+ u_int32_t *pConfigSize); -+ - bool MP4GetTrackESConfiguration( - MP4FileHandle hFile, - MP4TrackId trackId, -@@ -654,9 +654,9 @@ - bool MP4GetTrackH264SeqPictHeaders(MP4FileHandle hFile, - MP4TrackId trackId, - uint8_t ***pSeqHeaders, -- uint32_t **pSeqHeaderSize, -+ u_int32_t **pSeqHeaderSize, - uint8_t ***pPictHeader, -- uint32_t **pPictHeaderSize); -+ u_int32_t **pPictHeaderSize); - bool MP4GetTrackH264LengthSize(MP4FileHandle hFile, - MP4TrackId trackId, - uint32_t *pLength); -diff -Naur mpeg4ip/lib/mp4v2/mp4container.cpp /Users/pri/t/mpeg4ip/lib/mp4v2/mp4container.cpp ---- mpeg4ip/lib/mp4v2/mp4container.cpp 2001-11-19 18:06:58.000000000 +0100 -+++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4container.cpp 2007-02-09 22:10:23.000000000 +0100 -@@ -207,7 +207,7 @@ - u_int32_t numProperties = m_pProperties.Size(); - - if (numProperties == 0) { -- WARNING(numProperties == 0); -+ //WARNING(numProperties == 0); - return; - } - -diff -Naur mpeg4ip/lib/mp4v2/mp4container.h /Users/pri/t/mpeg4ip/lib/mp4v2/mp4container.h ---- mpeg4ip/lib/mp4v2/mp4container.h 2001-11-19 18:06:58.000000000 +0100 -+++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4container.h 2007-02-09 22:06:42.000000000 +0100 -@@ -1,24 +1,3 @@ --/* -- * The contents of this file are subject to the Mozilla Public -- * License Version 1.1 (the "License"); you may not use this file -- * except in compliance with the License. You may obtain a copy of -- * the License at http://www.mozilla.org/MPL/ -- * -- * Software distributed under the License is distributed on an "AS -- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -- * implied. See the License for the specific language governing -- * rights and limitations under the License. -- * -- * The Original Code is MPEG4IP. -- * -- * The Initial Developer of the Original Code is Cisco Systems Inc. -- * Portions created by Cisco Systems Inc. are -- * Copyright (C) Cisco Systems Inc. 2001. All Rights Reserved. -- * -- * Contributor(s): -- * Dave Mackie [email protected] -- */ -- - #ifndef __MP4_CONTAINER_INCLUDED__ - #define __MP4_CONTAINER_INCLUDED__ - -diff -Naur mpeg4ip/lib/mp4v2/mp4descriptor.cpp /Users/pri/t/mpeg4ip/lib/mp4v2/mp4descriptor.cpp ---- mpeg4ip/lib/mp4v2/mp4descriptor.cpp 2004-02-12 03:06:02.000000000 +0100 -+++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4descriptor.cpp 2007-02-09 22:24:17.000000000 +0100 -@@ -149,7 +149,7 @@ - u_int32_t numProperties = m_pProperties.Size(); - - if (numProperties == 0) { -- WARNING(numProperties == 0); -+ //WARNING(numProperties == 0); - return; - } - -@@ -194,7 +194,7 @@ - u_int32_t numProperties = m_pProperties.Size(); - - if (numProperties == 0) { -- WARNING(numProperties == 0); -+ //WARNING(numProperties == 0); - return; - } - for (u_int32_t i = 0; i < numProperties; i++) { -diff -Naur mpeg4ip/lib/mp4v2/mp4file.cpp /Users/pri/t/mpeg4ip/lib/mp4v2/mp4file.cpp ---- mpeg4ip/lib/mp4v2/mp4file.cpp 2005-03-30 20:41:58.000000000 +0200 -+++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4file.cpp 2007-02-09 22:44:08.000000000 +0100 -@@ -1431,7 +1431,7 @@ - return trackId; - } - --MP4TrackId MP4File::AddCntlTrackDefault (uint32_t timeScale, -+MP4TrackId MP4File::AddCntlTrackDefault (u_int32_t timeScale, - MP4Duration sampleDuration, - const char *type) - { -@@ -1682,7 +1682,7 @@ - (MP4Property **)&pLength) == false) || - (avcCAtom->FindProperty("avcC.sequenceEntries.sequenceParameterSetNALUnit", - (MP4Property **)&pUnit) == false)) { -- VERBOSE_ERROR(m_verbosity, WARNING("Could not find avcC properties")); -+ //VERBOSE_ERROR(m_verbosity, WARNING("Could not find avcC properties")); - return false; - } - uint32_t count = pCount->GetValue(); -@@ -1692,7 +1692,7 @@ - for (uint32_t index = 0; index < count; index++) { - if (pLength->GetValue(index) == sequenceLen) { - uint8_t *seq; -- uint32_t seqlen; -+ u_int32_t seqlen; - pUnit->GetValue(&seq, &seqlen, index); - if (memcmp(seq, pSequence, sequenceLen) == 0) { - free(seq); -@@ -1724,8 +1724,8 @@ - (MP4Property **)&pLength) == false) || - (avcCAtom->FindProperty("avcC.pictureEntries.pictureParameterSetNALUnit", - (MP4Property **)&pUnit) == false)) { -- VERBOSE_ERROR(m_verbosity, -- WARNING("Could not find avcC picture table properties")); -+ //VERBOSE_ERROR(m_verbosity, -+ //WARNING("Could not find avcC picture table properties")); - return false; - } - uint32_t count = pCount->GetValue(); -@@ -1735,7 +1735,7 @@ - for (uint32_t index = 0; index < count; index++) { - if (pLength->GetValue(index) == pictLen) { - uint8_t *seq; -- uint32_t seqlen; -+ u_int32_t seqlen; - pUnit->GetValue(&seq, &seqlen, index); - if (memcmp(seq, pPict, pictLen) == 0) { - VERBOSE_WRITE(m_verbosity, -@@ -2472,9 +2472,9 @@ - - bool MP4File::GetTrackH264SeqPictHeaders (MP4TrackId trackId, - uint8_t ***pppSeqHeader, -- uint32_t **ppSeqHeaderSize, -+ u_int32_t **ppSeqHeaderSize, - uint8_t ***pppPictHeader, -- uint32_t **ppPictHeaderSize) -+ u_int32_t **ppPictHeaderSize) - { - uint32_t count; - -@@ -2490,15 +2490,15 @@ - (MP4Property **)&pSeqLen) == false) || - (avcCAtom->FindProperty("avcC.sequenceEntries.sequenceParameterSetNALUnit", - (MP4Property **)&pSeqVal) == false)) { -- VERBOSE_ERROR(m_verbosity, WARNING("Could not find avcC properties")); -+ //VERBOSE_ERROR(m_verbosity, WARNING("Could not find avcC properties")); - return false; - } - uint8_t **ppSeqHeader = - (uint8_t **)malloc((pSeqCount->GetValue() + 1) * sizeof(uint8_t *)); - *pppSeqHeader = ppSeqHeader; - -- uint32_t *pSeqHeaderSize = -- (uint32_t *)malloc((pSeqCount->GetValue() + 1) * sizeof(uint32_t *)); -+ u_int32_t *pSeqHeaderSize = -+ (u_int32_t *)malloc((pSeqCount->GetValue() + 1) * sizeof(u_int32_t *)); - - *ppSeqHeaderSize = pSeqHeaderSize; - for (count = 0; count < pSeqCount->GetValue(); count++) { -@@ -2513,15 +2513,15 @@ - (MP4Property **)&pPictLen) == false) || - (avcCAtom->FindProperty("avcC.pictureEntries.pictureParameterSetNALUnit", - (MP4Property **)&pPictVal) == false)) { -- VERBOSE_ERROR(m_verbosity, -- WARNING("Could not find avcC picture table properties")); -+ //VERBOSE_ERROR(m_verbosity, -+ //WARNING("Could not find avcC picture table properties")); - return false; - } - uint8_t - **ppPictHeader = - (uint8_t **)malloc((pPictCount->GetValue() + 1) * sizeof(uint8_t *)); -- uint32_t *pPictHeaderSize = -- (uint32_t *)malloc((pPictCount->GetValue() + 1)* sizeof(uint32_t *)); -+ u_int32_t *pPictHeaderSize = -+ (u_int32_t *)malloc((pPictCount->GetValue() + 1)* sizeof(u_int32_t *)); - *pppPictHeader = ppPictHeader; - *ppPictHeaderSize = pPictHeaderSize; - -diff -Naur mpeg4ip/lib/mp4v2/mp4file.h /Users/pri/t/mpeg4ip/lib/mp4v2/mp4file.h ---- mpeg4ip/lib/mp4v2/mp4file.h 2005-03-30 20:41:58.000000000 +0200 -+++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4file.h 2007-02-09 22:35:21.000000000 +0100 -@@ -329,9 +329,9 @@ - uint8_t *pLevel); - bool GetTrackH264SeqPictHeaders(MP4TrackId trackId, - uint8_t ***pSeqHeader, -- uint32_t **pSeqHeaderSize, -+ u_int32_t **pSeqHeaderSize, - uint8_t ***pPictHeader, -- uint32_t **pPictHeaderSize); -+ u_int32_t **pPictHeaderSize); - void GetTrackH264LengthSize(MP4TrackId, - uint32_t *pLength); - const char* GetHintTrackSdp(MP4TrackId hintTrackId); -diff -Naur mpeg4ip/lib/mp4v2/mp4file_io.cpp /Users/pri/t/mpeg4ip/lib/mp4v2/mp4file_io.cpp ---- mpeg4ip/lib/mp4v2/mp4file_io.cpp 2004-07-15 20:09:48.000000000 +0200 -+++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4file_io.cpp 2007-02-09 22:44:47.000000000 +0100 -@@ -86,7 +86,7 @@ - } - - ASSERT(pBytes); -- WARNING(m_numReadBits > 0); -+ //WARNING(m_numReadBits > 0); - - if (pFile == NULL) { - pFile = m_pFile; -diff -Naur mpeg4ip/lib/mp4v2/mp4property.cpp /Users/pri/t/mpeg4ip/lib/mp4v2/mp4property.cpp ---- mpeg4ip/lib/mp4v2/mp4property.cpp 2004-08-23 20:28:21.000000000 +0200 -+++ /Users/pri/t/mpeg4ip/lib/mp4v2/mp4property.cpp 2007-02-09 22:47:04.000000000 +0100 -@@ -636,7 +636,7 @@ - u_int32_t numProperties = m_pProperties.Size(); - - if (numProperties == 0) { -- WARNING(numProperties == 0); -+ //WARNING(numProperties == 0); - return; - } - -@@ -670,7 +670,7 @@ - u_int32_t numProperties = m_pProperties.Size(); - - if (numProperties == 0) { -- WARNING(numProperties == 0); -+ //WARNING(numProperties == 0); - return; - } - -@@ -709,7 +709,7 @@ - u_int32_t numProperties = m_pProperties.Size(); - - if (numProperties == 0) { -- WARNING(numProperties == 0); -+ //WARNING(numProperties == 0); - return; - } - diff --git a/contrib/version_a52dec.txt b/contrib/version_a52dec.txt deleted file mode 100644 index 86617fd36..000000000 --- a/contrib/version_a52dec.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/a52dec-0.7.4.tar.gz diff --git a/contrib/version_bzip2.txt b/contrib/version_bzip2.txt deleted file mode 100644 index 7a90c8411..000000000 --- a/contrib/version_bzip2.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/bzip2-1.0.5.tar.gz diff --git a/contrib/version_faac.txt b/contrib/version_faac.txt deleted file mode 100644 index b53bcc4dd..000000000 --- a/contrib/version_faac.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/faac-1.26.tar.gz diff --git a/contrib/version_faad2.txt b/contrib/version_faad2.txt deleted file mode 100644 index ad74c36cd..000000000 --- a/contrib/version_faad2.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/faad2-2.6.1.tar.gz diff --git a/contrib/version_ffmpeg.txt b/contrib/version_ffmpeg.txt deleted file mode 100644 index 8ca79d702..000000000 --- a/contrib/version_ffmpeg.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/ffmpeg-r15974.tar.gz diff --git a/contrib/version_lame.txt b/contrib/version_lame.txt deleted file mode 100644 index 6790bfb7d..000000000 --- a/contrib/version_lame.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/lame-3.98.tar.gz diff --git a/contrib/version_libdca.txt b/contrib/version_libdca.txt deleted file mode 100644 index dfa4de6a0..000000000 --- a/contrib/version_libdca.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/libdca-r81-strapped.tar.gz diff --git a/contrib/version_libdvdcss.txt b/contrib/version_libdvdcss.txt deleted file mode 100644 index 4821730fd..000000000 --- a/contrib/version_libdvdcss.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.videolan.org/pub/libdvdcss/1.2.9/libdvdcss-1.2.9.tar.gz
\ No newline at end of file diff --git a/contrib/version_libdvdread.txt b/contrib/version_libdvdread.txt deleted file mode 100644 index ef686d667..000000000 --- a/contrib/version_libdvdread.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/libdvdread-0.9.7.tar.gz diff --git a/contrib/version_libmkv.txt b/contrib/version_libmkv.txt deleted file mode 100644 index b5f851c78..000000000 --- a/contrib/version_libmkv.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/libmkv-0.6.3.1.tar.gz diff --git a/contrib/version_libmp4v2.txt b/contrib/version_libmp4v2.txt deleted file mode 100644 index 33509b29b..000000000 --- a/contrib/version_libmp4v2.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/libmp4v2-2.0-r224.tar.gz diff --git a/contrib/version_libogg.txt b/contrib/version_libogg.txt deleted file mode 100644 index 25bcb92ce..000000000 --- a/contrib/version_libogg.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/libogg-1.1.3.tar.gz diff --git a/contrib/version_libsamplerate.txt b/contrib/version_libsamplerate.txt deleted file mode 100644 index 038fcbb1f..000000000 --- a/contrib/version_libsamplerate.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/libsamplerate-0.1.4.tar.gz diff --git a/contrib/version_libtheora.txt b/contrib/version_libtheora.txt deleted file mode 100644 index 8595fe999..000000000 --- a/contrib/version_libtheora.txt +++ /dev/null @@ -1,2 +0,0 @@ -http://download.m0k.org/handbrake/contrib/libtheora-1.0.tar.gz - diff --git a/contrib/version_libvorbis.txt b/contrib/version_libvorbis.txt deleted file mode 100644 index ad9df271e..000000000 --- a/contrib/version_libvorbis.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/libvorbis-aotuv_b5.tar.gz diff --git a/contrib/version_mpeg2dec.txt b/contrib/version_mpeg2dec.txt deleted file mode 100644 index 248ce7bfa..000000000 --- a/contrib/version_mpeg2dec.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/mpeg2dec-0.5.1.tar.gz diff --git a/contrib/version_mpeg4ip.txt b/contrib/version_mpeg4ip.txt deleted file mode 100644 index f60e5972a..000000000 --- a/contrib/version_mpeg4ip.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/mpeg4ip-1.3.tar.gz diff --git a/contrib/version_qt.txt b/contrib/version_qt.txt deleted file mode 100644 index 5f679e32c..000000000 --- a/contrib/version_qt.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/libquicktime-0.9.10.tar.gz diff --git a/contrib/version_x264.txt b/contrib/version_x264.txt deleted file mode 100644 index beb28f14b..000000000 --- a/contrib/version_x264.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/x264-r1109-75b495f.tar.gz
\ No newline at end of file diff --git a/contrib/version_xvidcore.txt b/contrib/version_xvidcore.txt deleted file mode 100644 index 5d8c19719..000000000 --- a/contrib/version_xvidcore.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/xvidcore-1.1.3.tar.gz diff --git a/contrib/version_zlib.txt b/contrib/version_zlib.txt deleted file mode 100644 index bbb84c298..000000000 --- a/contrib/version_zlib.txt +++ /dev/null @@ -1 +0,0 @@ -http://download.m0k.org/handbrake/contrib/zlib-1.2.3.tar.gz diff --git a/contrib/patch-x264-cygwin.patch b/contrib/x264/P00-cygwin.patch index f2e375d69..f2e375d69 100644 --- a/contrib/patch-x264-cygwin.patch +++ b/contrib/x264/P00-cygwin.patch diff --git a/contrib/patch-x264-solaris.patch b/contrib/x264/P01-sunos.patch index 24d629ff9..24d629ff9 100644 --- a/contrib/patch-x264-solaris.patch +++ b/contrib/x264/P01-sunos.patch diff --git a/contrib/x264/module.defs b/contrib/x264/module.defs new file mode 100644 index 000000000..6476d19fb --- /dev/null +++ b/contrib/x264/module.defs @@ -0,0 +1,11 @@ +$(eval $(call import.MODULE.defs,X264,x264)) +$(eval $(call import.CONTRIB.defs,X264)) + +X264.FETCH.url = http://download.m0k.org/handbrake/contrib/x264-r1109-75b495f.tar.gz +X264.EXTRACT.tarbase = x264 + +X264.CONFIGURE.deps = +X264.CONFIGURE.shared = +X264.CONFIGURE.static = + +X264.CONFIGURE.extra = --enable-pthread diff --git a/contrib/x264/module.rules b/contrib/x264/module.rules new file mode 100644 index 000000000..182ede881 --- /dev/null +++ b/contrib/x264/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,X264)) +$(eval $(call import.CONTRIB.rules,X264)) diff --git a/contrib/patch-xvidcore-nasm-2.00-configure.patch b/contrib/xvidcore/A00-nasm.patch index 44242ace4..44242ace4 100644 --- a/contrib/patch-xvidcore-nasm-2.00-configure.patch +++ b/contrib/xvidcore/A00-nasm.patch diff --git a/contrib/patch-xvidcore-fdct.patch b/contrib/xvidcore/A01-fdct.patch index 1fc90b689..1fc90b689 100644 --- a/contrib/patch-xvidcore-fdct.patch +++ b/contrib/xvidcore/A01-fdct.patch diff --git a/contrib/patch-xvidcore-macosx.patch b/contrib/xvidcore/P00-darwin.patch index 51cb94c6d..51cb94c6d 100644 --- a/contrib/patch-xvidcore-macosx.patch +++ b/contrib/xvidcore/P00-darwin.patch diff --git a/contrib/patch-xvidcore-cygwin.patch b/contrib/xvidcore/P01-cygwin.patch index 7b60510d0..7b60510d0 100644 --- a/contrib/patch-xvidcore-cygwin.patch +++ b/contrib/xvidcore/P01-cygwin.patch diff --git a/contrib/xvidcore/module.defs b/contrib/xvidcore/module.defs new file mode 100644 index 000000000..0ec291a24 --- /dev/null +++ b/contrib/xvidcore/module.defs @@ -0,0 +1,20 @@ +$(eval $(call import.MODULE.defs,XVIDCORE,xvidcore)) +$(eval $(call import.CONTRIB.defs,XVIDCORE)) + +XVIDCORE.FETCH.url = http://download.m0k.org/handbrake/contrib/xvidcore-1.1.3.tar.gz +XVIDCORE.EXTRACT.tarbase = xvidcore + +XVIDCORE.CONFIGURE.dir = $(XVIDCORE.EXTRACT.target/)build/generic/ + +XVIDCORE.BUILD.dir = $(XVIDCORE.EXTRACT.target/)build/generic/ +XVIDCORE.BUILD.ntargets = libxvidcore.a + +define XVIDCORE.INSTALL + cp $(XVIDCORE.EXTRACT.target/)build/generic/=build/libxvidcore.a $(CONTRIB.build/)lib/ + cp $(XVIDCORE.EXTRACT.target/)src/xvid.h $(CONTRIB.build/)include/ +endef + +define XVIDCORE.UNINSTALL + rm $(CONTRIB.build/)lib/libxvidcore.a + rm $(CONTRIB.build/)include/xvid.h +endef diff --git a/contrib/xvidcore/module.rules b/contrib/xvidcore/module.rules new file mode 100644 index 000000000..76600608e --- /dev/null +++ b/contrib/xvidcore/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,XVIDCORE)) +$(eval $(call import.CONTRIB.rules,XVIDCORE)) diff --git a/contrib/zlib/module.defs b/contrib/zlib/module.defs new file mode 100644 index 000000000..66db2f491 --- /dev/null +++ b/contrib/zlib/module.defs @@ -0,0 +1,6 @@ +$(eval $(call import.MODULE.defs,ZLIB,zlib)) +$(eval $(call import.CONTRIB.defs,ZLIB)) + +ZLIB.FETCH.url = http://download.m0k.org/handbrake/contrib/zlib-1.2.3.tar.gz +ZLIB.EXTRACT.tarbase = zlib +ZLIB.CONFIGURE.args = !sete @dir !env !exe @prefix !extra diff --git a/contrib/zlib/module.rules b/contrib/zlib/module.rules new file mode 100644 index 000000000..5767ee682 --- /dev/null +++ b/contrib/zlib/module.rules @@ -0,0 +1,2 @@ +$(eval $(call import.MODULE.rules,ZLIB)) +$(eval $(call import.CONTRIB.rules,ZLIB)) diff --git a/doc/module.defs b/doc/module.defs new file mode 100644 index 000000000..16929f03d --- /dev/null +++ b/doc/module.defs @@ -0,0 +1,41 @@ +$(eval $(call import.MODULE.defs,DOC,doc)) + +DOC.in/ = $(PROJECT/)doc/ +DOC.out/ = $(BUILD/)doc/ + +DOC.out.api/ = $(DOC.out/)api/ +DOC.out.articles/ = $(DOC.out/)articles/ + +############################################################################### + +DOC.m4.srcs = \ + texi/base/handbrake.texi.m4 + +DOC.m4.in = $(foreach n,$(DOC.m4.srcs),$(DOC.in/)$n) +DOC.m4.out = $(patsubst $(DOC.in/)%.m4,$(DOC.out/)%,$(DOC.m4.in)) + +DOC.texi.includes = $(wildcard $(DOC.in/)texi/*/*.texi) +DOC.texi.articles = $(wildcard $(DOC.in/)texi/*.texi) + +DOC.texi2html.out = $(patsubst $(DOC.in/)texi/%.texi,$(DOC.out.articles/)html/%.html,$(DOC.texi.articles)) +DOC.texi2txt.out = $(patsubst $(DOC.in/)texi/%.texi,$(DOC.out.articles/)txt/%.txt,$(DOC.texi.articles)) +DOC.texi2xml.out = $(patsubst $(DOC.in/)texi/%.texi,$(DOC.out.articles/)xml/%.xml,$(DOC.texi.articles)) + +BUILD.out += $(DOC.m4.out) +BUILD.out += $(DOC.texi2html.out) +BUILD.out += $(DOC.texi2txt.out) +BUILD.out += $(DOC.texi2xml.out) + +############################################################################### + +DOC.M4.exe = $(M4.exe) +DOC.M4.flags = -I$(BUILD/)project +DOC.M4.deps = $(BUILD/)project/handbrake.m4 +DOC.M4 = $(DOC.M4.exe) $(DOC.M4.flags) $(2) > $(1) + +MAKEINFO.exe = makeinfo +MAKEINFO.flags = -I$(DOC.out/)texi -I$(DOC.in/)texi +MAKEINFO.flags.html = --html --no-headers --no-split +MAKEINFO.flags.txt = --plaintext --no-headers +MAKEINFO.flags.xml = --xml --output-indent=4 +MAKEINFO = $(MAKEINFO.exe) $(MAKEINFO.flags) $(MAKEINFO.flags.$(1)) $(2) -o $(3) diff --git a/doc/module.rules b/doc/module.rules new file mode 100644 index 000000000..f318cf2a4 --- /dev/null +++ b/doc/module.rules @@ -0,0 +1,20 @@ +$(eval $(call import.MODULE.rules,DOC)) + +doc: doc.articles + +doc.articles: $(DOC.texi2txt.out) + +doc.clean: + $(RM.exe) -fr $(DOC.out/) + +$(DOC.texi2txt.out): | $(DOC.m4.out) +$(DOC.texi2txt.out): | $(dir $(DOC.texi2txt.out)) +$(DOC.texi2txt.out): $(DOC.texi.includes) +$(DOC.texi2txt.out): $(DOC.out.articles/)txt/%.txt: $(DOC.in/)texi/%.texi + $(call MAKEINFO,txt,$<,$@) + @echo $^ + +$(DOC.m4.out): | $(dir $(DOC.m4.out)) +$(DOC.m4.out): $(DOC.M4.deps) +$(DOC.m4.out): $(DOC.out/)%: $(DOC.in/)%.m4 + $(call DOC.M4,$@,$<) diff --git a/doc/texi/BuildUserGuide.texi b/doc/texi/BuildUserGuide.texi new file mode 100644 index 000000000..7fb3a4d66 --- /dev/null +++ b/doc/texi/BuildUserGuide.texi @@ -0,0 +1,280 @@ +@input texinfo @c -*- Texinfo -*- +@c %**start of header +@setfilename BuildUserGuide.info +@include base/article.texi +@include build/command.texi +@paragraphindent none +@c %**end of header + +@majorheading @value{HB.title} Build User Guide +@contents + +@c %**------------------------------------------------------------------------- +@chapter Introduction +This guide documents the recommended process to build @value{HB.name} from the official source-code repository. @b{Building from any other source is not unsupported}. + +@chapter Quickstart +This chapter is for the impatient or those just looking for a quick summary of the commands used to launch a typical build with the fewest commands possible. For more control over the build process please skip this section and jump to @ref{Build Process} for full details. + +@example +@end example + +The above is an special streamlined invocation of @command{configure} which performs the following steps automatically: + +@itemize +@item assert scratch directory @file{build/} does not exist +@item create scratch directory @file{build/} +@item change to directory @file{build/} +@item launch @command{make} +@item capture build output to @file{build/log.txt} +@item echo build output +@end itemize + +@c %**------------------------------------------------------------------------- +@anchor{Build Process} +@chapter Build Process + +@anchor{Checkout} +@section Checkout Sources +Checkout @value{HB.name} from the official source-code repository. + +@example +@end example + +Sources are checked out from the @samp{@value{HB.repo.branch}} branch. This document was generated from that very branch, and for example purposes, we will use exactly the same branch. + +If you have write-access to the repository, then you may add the appropriate login/password information as needed. It is recommended to use Subversion 1.5.0 or higher. Lower versions should also work. + +@anchor{Configure} +@section Configure +Configure the build system. + +@example +@end example + +Create a scratch directory which will contain all files created during the build process. The directory name is arbitrary but we recommend something simple and descriptive. One directory is required for each distinctly configured build. We name our directory @file{build} for example purposes. + +The @command{configure} utility accepts many options. It is recommended that you specify @command{--help} for the complete list of options. The following options are detailed: + +@table @samp +@item --help +List available options. + +@item --debug=MODE +Select debug mode. Must be one of @samp{none}, @samp{min}, @samp{std}, @samp{max}. +This generally maps to gcc options @samp{-g0}, @samp{-g1}, @samp{-g2}, @samp{-g3}. + +@item --optimize=MODE +Select optimize mode. Must be one of @samp{none}, @samp{speed}, @samp{size}. +This generally maps to gcc options @samp{-g0}, @samp{-O0}, @samp{-O3}, @samp{-Os}. + +@item --arch=MODE +Select build architecture. The available architectures vary by platform. Most platforms support exactly one architecture except @value{OS.osx} which has support for various universal binary architectures. The available choices are hard-coded per platform and no sanity checks for the required tools are performed. + +@item --gcc=EXE +Specify the @command{gcc} executable to use where @b{EXE} is the executable name which is either absolute or environment @samp{PATH} is searched accordingly. +@end table + +Clean-room procedures dictate that when certain factors change, old builds should be scrapped and new builds configured. This is the main reason for requiring a scratch directory; to promote consistent, reliable and clean software builds. The following is a short list of some of the reasons why someone may choose to scrap an existing build: + +@itemize +@item configure with different options +@item subversion working dir is updated and you want configure to re-evaluate working dir metadata. +@item build corruption is suspected +@end itemize + +There are generally two methods for scrapping a build. The @file{build} directory can be recusrively removed which has the effect of loosing your existing configuration but does guarantee no residuals are left behind. The other method is to use ask the build system to perform an @command{xclean}. This is known to work well but will leave empty directories behind. However, the configuration is left intact. See @ref{Extra Clean} for further details. + +@anchor{Build} +@section Build +Build main product. All necessary dependencies are also built if required. + +@example +@end example + +Parallel builds may optionally be enabled. Be aware that while a parallel build may save time on systems with additional cores, the output is often mixed, overlapped and sometimes even corrupted with binary characters. Thus if you experience a build issue, you should clean and redo the build in default serial mode to produce a readable log. The following command allows for up to 4 concurrent jobs via make: + +@example +make -j4 +@end example + +@anchor{Clean} +@section Clean +Clean all build output excluding contrib modules. Configuration is retained. + +@example +@end example + +@anchor{Extra Clean} +@section Extra Clean +Clean all build output including contrib modules. Configuration is retained. + +@example +@end example + +@c %**------------------------------------------------------------------------- +@anchor{Make Targets} +@chapter Make Targets + +The build system supports passing many kinds of targets some of which become very useful in normal development cycles. The targets by convention are lower-case words passed to @command{make}. Global targets are one-word targets. Scoped targets are usually two-words seperated by a period. + +@anchor{Global Targets} +@section Global + +@table @samp +@item make +Alias for @samp{make build}. + +@item make build +Build main product. All necessary dependencies are also built if required. + +@item make clean +Clean all build output excluding contrib modules. Configuration is retained. + +@item make xclean +Clean all build output including contrib modules. Configuration is retained. +@end table + +@anchor{General Module Targets} +@section General Modules + +General modules such as @samp{libhb} and @samp{test} have the following scoped targets: + +@table @samp +@item make @i{MODULE}.build +Build @i{MODULE}. + +@item make @i{MODULE}.clean +Clean build output for @i{MODULE}. +@end table + +@anchor{Contrib Module Targets} +@section Contrib Modules + +Contrib modules such as @samp{a52dec}, @samp{bzip2}, @samp{faac}, @samp{faad2}, @samp{ffmpeg}, @samp{lame}, @samp{libdca}, @samp{libdvdread}, @samp{libmkv}, @samp{libmp4v2}, @samp{libogg}, @samp{libsamplerate}, @samp{libtheora}, @samp{libvorbis}, @samp{mpeg2dec}, @samp{x264}, @samp{xvidcore} and @samp{zlib} have the following scoped targets: + +@table @samp +@item make @i{MODULE}.fetch +Download source tarball from the Internet and save to @file{TOP/downloads} directory. No checksumming is performed. + +@item make @i{MODULE}.extract +Extract source tarball into @file{build} tree. + +@item make @i{MODULE}.patch +Apply appropriate patches (if any) to module sources. + +@item make @i{MODULE}.configure +Configure module sources. +This usually invokes autotool configure. + +@item make @i{MODULE}.build +Build module. +This usually invokes autotool build. + +@item make @i{MODULE}.install +Install module products such as headers and libraries into @file{build} tree. +This usually invokes autotool install. + +@item make @i{MODULE}.uninstall +Uninstall module products; generally the reverse of install. +This usually invokes autotool uninstall. + +@item make @i{MODULE}.clean +Clean module; generally the reverse of build. +This usually invokes autotool clean. + +@item make @i{MODULE}.xclean +Extra clean module; first invokes uninstall then recursively removes the module build directory. +@end table + +@anchor{Contrib Aggregate Targets} +@section Contrib Aggregate + +For convenience, the following targets aggregate the all contrib modules' respective targets together: + +@itemize +@item make contrib.fetch +@item make contrib.extract +@item make contrib.patch +@item make contrib.configure +@item make contrib.build +@item make contrib.install +@item make contrib.uninstall +@item make contrib.clean +@item make contrib.xclean +@end itemize + +@c %**------------------------------------------------------------------------- +@anchor{Platform} +@chapter Platform Requirements and Notes + +The build system supports various platforms of interest to the project. However this does not mean it supports all plaforms. If the platform is not listed in this chapter, then it is not supported. + +The following tools are used on various platforms and it is recommended you use these versions or newer: + +@itemize @bullet +@item python - Python 2.4.6 +@item curl - curl 7.19.3 (or wget) +@item m4 - GNU M4 1.4.6 +@item make - GNU Make 3.81 +@item patch - Patch 2.5.8 +@item tar - GNU tar 1.15.1 +@item wget - GNU Wget 1.11.4 (or curl) +@end itemize + +@anchor{@value{OS.osx}} +@section @value{OS.osx} + +Building on @value{OS.osx} is well supported. It is the reference platform for @value{HB.name}. The following are the recommended specifications for this platform; but is not necessarily the only configuration that is possible: + +@itemize @bullet +@item Mac Intel hardware +@item @value{OS.osx} 10.5.6 +@item Xcode-3.1.2 +@item gcc 4.0.1 (Apple Inc. build 5490) +@item yasm 0.7.2.2153 (for i386 or x86_64 architectures) +@end itemize + +@include build/platform.common.bundled.texi + +@anchor{@value{OS.cygwin}} +@section @value{OS.cygwin} + +Building on @value{OS.cygwin} is supported. The following are the recommended specifications for this platform; but is not necessarily the only configuration that is possible: + +@itemize @bullet +@item Intel 32-bit or 64-bit hardware +@item @value{OS.cygwin}, gcc 4.3.2 +@item yasm 0.7.1.2093 (for i386 or x86_64 architectures) +@end itemize + +@quotation Note +As of this writing, @value{OS.cygwin} has available to it several versions of gcc; only one of which may be found and +used in the path as @code{gcc} and @code{g++}. Configure will thus find what is probably the older version of gcc in a typical @value{OS.cygwin} environment. If you desire to build with the newer gcc, it is found in the path as @command{gcc-4} and @command{g++-4} respectively and you must indicate to configure the desired versions. The following syntax should do the trick: +@end quotation + +@example +../configure --gcc=gcc-4 +@end example + +@anchor{@value{OS.linux}} +@section @value{OS.linux} + +Building on @value{OS.linux} is supported. The following are the recommended specifications for this platform; but is not necessarily the only configuration that is possible: + +@itemize @bullet +@item Intel 32-bit or 64-bit hardware +@item Fedora 8, gcc 4.1.2, yasm 0.6.2.1985 +@item Fedora 9, gcc 4.3.0, yasm 0.6.2.1985 +@item Fedora 10, gcc 4.3.2, yasm 0.7.1.2093 +@item gcc 4.0.0 or higher is reported to work +@end itemize + +@include build/platform.common.bundled.texi diff --git a/doc/texi/base/article.texi b/doc/texi/base/article.texi new file mode 100644 index 000000000..7ff6c7480 --- /dev/null +++ b/doc/texi/base/article.texi @@ -0,0 +1,6 @@ +@ifhtml +@exampleindent 0 +@end ifhtml + +@include base/handbrake.texi +@include base/glossary.texi diff --git a/doc/texi/base/glossary.texi b/doc/texi/base/glossary.texi new file mode 100644 index 000000000..1a998f4b8 --- /dev/null +++ b/doc/texi/base/glossary.texi @@ -0,0 +1,7 @@ +@set OS.cygwin Cygwin +@set OS.freebsd FreeBSD +@set OS.linux Linux +@set OS.osx Mac OS X +@set OS.solaris Solaris +@set OS.unix unix +@set OS.windows Windows diff --git a/doc/texi/base/handbrake.texi.m4 b/doc/texi/base/handbrake.texi.m4 new file mode 100644 index 000000000..efcfa8d82 --- /dev/null +++ b/doc/texi/base/handbrake.texi.m4 @@ -0,0 +1,30 @@ +changequote(<<,>>)dnl +include(<<handbrake.m4>>)dnl +dnl +dnl +dnl +@set HB.title __HB_title +@set HB.name __HB_name +@set HB.name.lower __HB_name_lower +@set HB.name.upper __HB_name_upper +@set HB.acro.lower __HB_acro_lower +@set HB.acro.upper __HB_acro_upper +@set HB.url.website __HB_url_website +@set HB.url.community __HB_url_community +@set HB.url.irc __HB_url_irc +@set HB.url.appcast __HB_url_appcast +@set HB.version.major __HB_version_major +@set HB.version.minor __HB_version_minor +@set HB.version.point __HB_version_point +@set HB.version __HB_version +@set HB.version.hex __HB_version_hex +@set HB.build __HB_build +@set HB.repo.url __HB_repo_url +@set HB.repo.root __HB_repo_root +@set HB.repo.branch __HB_repo_branch +@set HB.repo.uuid __HB_repo_uuid +@set HB.repo.rev __HB_repo_rev +@set HB.repo.date __HB_repo_date +@set HB.repo.wcversion __HB_repo_wcversion +@set HB.repo.official __HB_repo_official +@set HB.repo.type __HB_repo_type diff --git a/doc/texi/build/command.texi b/doc/texi/build/command.texi new file mode 100644 index 000000000..db6b0b493 --- /dev/null +++ b/doc/texi/build/command.texi @@ -0,0 +1,27 @@ +@macro COMMAND.checkout{} +svn checkout @value{HB.repo.url} @value{HB.acro.lower}-@value{HB.repo.branch} +cd @value{HB.acro.lower}-@value{HB.repo.branch} +@end macro + +@macro COMMAND.configure.launch{} +./configure --launch +@end macro + +@macro COMMAND.configure{} +rm -fr build/ +mkdir build/ +cd build/ +../configure +@end macro + +@macro COMMAND.build{} +make +@end macro + +@macro COMMAND.clean{} +make clean +@end macro + +@macro COMMAND.xclean{} +make xclean +@end macro diff --git a/doc/texi/build/platform.common.bundled.texi b/doc/texi/build/platform.common.bundled.texi new file mode 100644 index 000000000..f5af0fcce --- /dev/null +++ b/doc/texi/build/platform.common.bundled.texi @@ -0,0 +1,3 @@ +@quotation Note +It is recommended to use the platform distribution's bundled compiler for maximum C++ compatibility. If you build with a custom compiler it will likely introduce non-standard runtime requirements. There are of course many valid reasons to build with unbundled compilers, but be aware it is generally unsupported and left as an exercise to the reader. +@end quotation diff --git a/gtk/INSTALL b/gtk/INSTALL index 5458714e1..d3c5b40a9 100644 --- a/gtk/INSTALL +++ b/gtk/INSTALL @@ -2,7 +2,7 @@ Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006 Free Software Foundation, Inc. +2006, 2007 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -67,6 +67,9 @@ The simplest way to compile this package is: all sorts of other programs in order to regenerate files that came with the distribution. + 6. Often, you can also type `make uninstall' to remove the installed + files again. + Compilers and Options ===================== diff --git a/gtk/module.defs b/gtk/module.defs new file mode 100644 index 000000000..d3b86310e --- /dev/null +++ b/gtk/module.defs @@ -0,0 +1,14 @@ +$(eval $(call import.MODULE.defs,GTK,gtk,LIBHB)) + +GTK.src/ = $(PROJECT/)gtk/ +GTK.build/ = $(BUILD/)gtk/ + +GTK.CONFIGURE.stamp = $(GTK.build/).stamp.configure +GTK.BUILD.stamp = $(GTK.build/).stamp.build + +############################################################################### + +GTK.out += $(GTK.CONFIGURE.stamp) +GTK.out += $(GTK.BUILD.stamp) + +BUILD.out += $(GTK.out) diff --git a/gtk/module.rules b/gtk/module.rules new file mode 100644 index 000000000..3cc655923 --- /dev/null +++ b/gtk/module.rules @@ -0,0 +1,34 @@ +$(eval $(call import.MODULE.rules,GTK)) + +build: gtk.build +clean: gtk.clean + +gtk.configure: $(GTK.CONFIGURE.stamp) + +gtk.build: $(GTK.BUILD.stamp) + +$(GTK.CONFIGURE.stamp): | $(dir $(GTK.CONFIGURE.stamp)) + set -e; cd $(GTK.src/); NOCONFIGURE=1 ./autogen.sh + set -e; cd $(GTK.build/); $(call fn.ABSOLUTE,$(GTK.src/))configure \ + --with-hb=$(call fn.ABSOLUTE,$(BUILD/)) + $(TOUCH.exe) $@ + +$(GTK.BUILD.stamp): $(LIBHB.a) +$(GTK.BUILD.stamp): | $(dir $(GTK.BUILD.stamp)) +$(GTK.BUILD.stamp): $(GTK.CONFIGURE.stamp) + +$(MAKE) -C $(GTK.build/) + $(TOUCH.exe) $@ + +gtk.install: + $(MAKE) -C $(GTK.build/) install-strip + +gtk.uninstall: + $(MAKE) -C $(GTK.build/) uninstall + +gtk.clean: + $(MAKE) -C $(GTK.build/) clean + $(RM.exe) $(GTK.BUILD.stamp) + +gtk.xclean: + $(RM.exe) -f $(GTK.out) + $(RM.exe) -fr $(GTK.build/) Binary files differdiff --git a/libhb/Jamfile b/libhb/Jamfile deleted file mode 100644 index 364e17ff2..000000000 --- a/libhb/Jamfile +++ /dev/null @@ -1,40 +0,0 @@ -# $Id: Jamfile,v 1.34 2005/10/15 18:05:03 titer Exp $ -# -# This file is part of the HandBrake source code. -# Homepage: <http://handbrake.fr/>. -# It may be used under the terms of the GNU General Public License. - -SubDir TOP libhb : hbversion.h ; - -LIBHB_SRC = -common.c hb.c ports.c scan.c work.c decmpeg2.c encavcodec.c update.c -demuxmpeg.c fifo.c render.c reader.c muxcommon.c muxmp4.c sync.c stream.c -decsub.c deca52.c decdca.c encfaac.c declpcm.c encx264.c decavcodec.c encxvid.c -muxavi.c enclame.c muxogm.c encvorbis.c dvd.c muxmkv.c deblock.c deinterlace.c -denoise.c detelecine.c decomb.c lang.c enctheora.c decmetadata.c ; - -Library libhb : $(LIBHB_SRC) ; - -ObjectCcFlags $(LIBHB_SRC) : -I$(TOP)/contrib/include ; -ObjectDefines $(LIBHB_SRC) : __LIBHB__ ; -ObjectC++Flags $(LIBHB_SRC) : -I$(TOP)/contrib/include ; - -# turn the version number, etc., into an include file for cretinous build -# systems (XCode) that can't run shell commands -rule HBVersion -{ - Clean clean : $(TOP)/libhb/$(1) ; -} -actions HBVersion -{ - echo "#ifndef HB_BUILD" > $(TOP)/libhb/$(1) - echo "#define HB_BUILD $(HB_BUILD)" >> $(TOP)/libhb/$(1) - echo "#endif" >> $(TOP)/libhb/$(1) - echo "#ifndef HB_VERSION" >> $(TOP)/libhb/$(1) - echo "#define HB_VERSION \"$(HB_VERSION)\"" >> $(TOP)/libhb/$(1) - echo "#endif" >> $(TOP)/libhb/$(1) - echo "#ifndef HB_APPCAST_URL" >> $(TOP)/libhb/$(1) - echo "#define APPCAST_URL \"$(APPCAST_URL)\"" >> $(TOP)/libhb/$(1) - echo "#endif" >> $(TOP)/libhb/$(1) -} -HBVersion hbversion.h ; diff --git a/libhb/Makefile b/libhb/Makefile deleted file mode 100644 index 9992d7cd5..000000000 --- a/libhb/Makefile +++ /dev/null @@ -1,101 +0,0 @@ -include ../Makefile.config - -SYSTEM = $(shell uname -s) - -ifeq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT) - SYSDEF=-DSYS_CYGWIN -endif - -ifeq ($(SYSTEM),FreeBSD) - SYSDEF = -DSYS_FREEBSD - LDFLAGS += -pthread -lm -endif - -ifeq ($(SYSTEM),NetBSD) - SYSDEF = -DSYS_NETBSD - LDFLAGS += -lpthread -lm -endif - -ifeq ($(SYSTEM),Linux) - SYSDEF = -DSYS_LINUX $(HB_DEFPPC) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 - LDFLAGS += -lpthread -lm -ldl -endif - -SRCS = common.c hb.c ports.c scan.c work.c decmpeg2.c encavcodec.c enctheora.c \ - update.c demuxmpeg.c fifo.c render.c reader.c muxcommon.c stream.c \ - muxmp4.c sync.c decsub.c deca52.c decdca.c encfaac.c declpcm.c encx264.c \ - decavcodec.c encxvid.c muxmkv.c muxavi.c enclame.c muxogm.c encvorbis.c \ - dvd.c deblock.c deinterlace.c denoise.c detelecine.c decomb.c lang.c \ - decmetadata.c -OTMP = $(SRCS:%.c=%.o) -OBJS = $(OTMP:%.cpp=%.o) - -CONTRIBS = ../contrib/lib/liba52.a ../contrib/lib/libavformat.a \ - ../contrib/lib/libavcodec.a ../contrib/lib/libavutil.a \ - ../contrib/lib/libdca.a ../contrib/lib/libdvdread.a \ - ../contrib/lib/libfaac.a ../contrib/lib/libmp3lame.a \ - ../contrib/lib/libmpeg2.a ../contrib/lib/libmpeg2convert.a \ - ../contrib/lib/libvorbis.a ../contrib/lib/libvorbisenc.a \ - ../contrib/lib/libvorbisfile.a ../contrib/lib/libogg.a \ - ../contrib/lib/libsamplerate.a ../contrib/lib/libx264.a \ - ../contrib/lib/libxvidcore.a ../contrib/lib/libmp4v2.a \ - ../contrib/lib/libmkv.a ../contrib/lib/libswscale.a \ - ../contrib/lib/libtheora.a ../contrib/lib/libfaad.a - -ifeq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT) - CONTRIBS += ../contrib/lib/libz.a ../contrib/lib/libbz2.a -endif - -CFLAGS += -I../contrib/include -D__LIBHB__ -DUSE_PTHREAD $(SYSDEF) -Wall -g -O3 -funroll-loops - -CXXFLAGS += -I../contrib/include -D__LIBHB__ -DUSE_PTHREAD $(SYSDEF) - -ifeq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT) -all: libhb.a libhb.dll -else -all: libhb.a - -endif - -libhb.a: $(OBJS) - @echo "Library $@" - @ar ru $@ $(OBJS) - @ranlib $@ - -libhb.so: $(OBJS) - @echo "Shared library $@" - @g++ -o $@ $(OBJS) $(CONTRIBS) -shared $(CFLAGS) || \ - ( echo "Compile line for $@ was:"; echo $$CMD; false ) - -libhb.dll: $(OBJS) - @echo "Shared library $@" - @g++ -o $@ $(OBJS) $(CONTRIBS) -shared $(CFLAGS) || \ - ( echo "Compile line for $@ was:"; echo $$CMD; false ) - -%.o: %.c - @echo "Cc $@" - echo $(CC) $(CFLAGS) - @CMD="$(CC) $(CFLAGS) -o $@ -c $<"; $$CMD || \ - ( echo "Compile line for $@ was:"; echo $$CMD; false ) - -%.o: %.cpp - @echo "Cc $@" - @CMD="$(CC) $(CFLAGS) -o $@ -c $<"; $$CMD || \ - ( echo "Compile line for $@ was:"; echo $$CMD; false ) - - -clean: - @echo "Clean libhb.a" - @$(RM) libhb.* - @echo "Clean libhb.so" - @$(RM) libhb.so - @echo "Clean $(OBJS)" - @$(RM) $(OBJS) - -.depend: $(SRCS) - @echo "Checking dependencies..." - @$(RM) .depend - @$(foreach SRC, $(SRCS), $(CC) -MM $(SRC) $(CFLAGS) >> .depend;) - --include .depend - diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index 5dd22244c..e5c8fd10c 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -61,9 +61,7 @@ #include "hb.h" #include "hbffmpeg.h" - -//#include "libavcodec/audioconvert.h" -#include "../contrib/ffmpeg/libavcodec/audioconvert.h" +#include "libavcodec/audioconvert.h" static int decavcodecInit( hb_work_object_t *, hb_job_t * ); static int decavcodecWork( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** ); diff --git a/libhb/hb.c b/libhb/hb.c index 08bea4bf2..0e36465fd 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -257,7 +257,7 @@ hb_handle_t * hb_init_dl( int verbose, int update_check ) */ char * hb_get_version( hb_handle_t * h ) { - return HB_VERSION; + return HB_PROJECT_VERSION; } /** @@ -267,7 +267,7 @@ char * hb_get_version( hb_handle_t * h ) */ int hb_get_build( hb_handle_t * h ) { - return HB_BUILD; + return HB_PROJECT_BUILD; } /** diff --git a/libhb/hb.h b/libhb/hb.h index 4ea050975..5d517d3d8 100644 --- a/libhb/hb.h +++ b/libhb/hb.h @@ -5,7 +5,7 @@ extern "C" { #endif -#include "hbversion.h" +#include "project.h" #include "common.h" /* hb_init() diff --git a/libhb/module.defs b/libhb/module.defs new file mode 100644 index 000000000..4015ae1dc --- /dev/null +++ b/libhb/module.defs @@ -0,0 +1,47 @@ +$(eval $(call import.MODULE.defs,LIBHB,libhb,A52DEC BZIP2 FAAC FAAD2 FFMPEG LAME LIBDCA LIBDVDREAD LIBMKV LIBMP4V2 LIBOGG LIBSAMPLERATE LIBTHEORA LIBVORBIS MPEG2DEC X264 XVIDCORE ZLIB LIBHB TEST DOC)) +$(eval $(call import.GCC,LIBHB)) + +LIBHB.src/ = $(PROJECT/)libhb/ +LIBHB.build/ = $(BUILD/)libhb/ + +LIBHB.m4.in = $(wildcard $(LIBHB.src/)*.m4) +LIBHB.m4.out = $(patsubst $(LIBHB.src/)%.m4,$(LIBHB.build/)%,$(LIBHB.m4.in)) + +LIBHB.c = $(wildcard $(LIBHB.src/)*.c) +LIBHB.c.o = $(patsubst $(PROJECT/)%.c,$(BUILD/)%.o,$(LIBHB.c)) +LIBHB.d = $(LIBHB.m4.out) $(LIBHB.h.out) \ + $(foreach n, \ + A52DEC BZIP2 FAAC FAAD2 FFMPEG LAME LIBDCA LIBDVDREAD LIBMKV LIBMP4V2 LIBOGG \ + LIBSAMPLERATE LIBTHEORA LIBVORBIS MPEG2DEC X264 XVIDCORE ZLIB, \ + $($n.INSTALL.target) ) + +LIBHB.h.in = $(wildcard $(LIBHB.src/)*.h) +LIBHB.h.out = $(patsubst $(PROJECT/)%,$(BUILD/)%,$(LIBHB.h.in)) + +############################################################################### + +LIBHB.a = $(LIBHB.build/)$(call TARGET.archive,hb) + +############################################################################### + +LIBHB.out += $(LIBHB.m4.out) +LIBHB.out += $(LIBHB.c.o) +LIBHB.out += $(LIBHB.h.out) +LIBHB.out += $(LIBHB.a) + +BUILD.out += $(LIBHB.out) + +############################################################################### + +LIBHB.GCC.D += __LIBHB__ USE_PTHREAD +LIBHB.GCC.I += $(LIBHB.build/) $(CONTRIB.build/)include + +ifeq ($(BUILD.system),cygwin) + LIBHB.GCC.D += SYS_CYGWIN +else ifeq ($(BUILD.system),darwin) + LIBHB.GCC.D += SYS_DARWIN +else ifeq ($(BUILD.system),linux) + LIBHB.GCC.D += SYS_LINUX _LARGEFILE_SOURCE _FILE_OFFSET_BITS=64 +else + LIBHB.platform.D = SYS_UNKNOWN +endif diff --git a/libhb/module.rules b/libhb/module.rules new file mode 100644 index 000000000..91e47a46a --- /dev/null +++ b/libhb/module.rules @@ -0,0 +1,28 @@ +$(eval $(call import.MODULE.rules,LIBHB)) + +libhb.build: $(LIBHB.a) + +$(LIBHB.a): | $(dir $(LIBHB.a)) +$(LIBHB.a): $(LIBHB.c.o) + $(AR.exe) rsu $@ $^ + +$(LIBHB.c.o): $(LIBHB.d) +$(LIBHB.c.o): | $(dir $(LIBHB.c.o)) +$(LIBHB.c.o): $(BUILD/)%.o: $(PROJECT/)%.c + $(call LIBHB.GCC.C_O,$@,$<) + +$(LIBHB.m4.out): $(BUILD/)project/handbrake.m4 +$(LIBHB.m4.out): | $(dir $(LIBHB.m4.out)) +$(LIBHB.m4.out): $(LIBHB.build/)%: $(LIBHB.src/)%.m4 + $(M4.exe) -Iproject $< > $@ + +$(LIBHB.h.out): | $(dir $(LIBHB.h.out)) +$(LIBHB.h.out): $(BUILD/)%: $(PROJECT/)% + $(CP.exe) $< $@ + +libhb.clean: + $(RM.exe) -f $(LIBHB.out) + +############################################################################### + +clean: libhb.clean diff --git a/libhb/muxmkv.c b/libhb/muxmkv.c index 79d8f2356..83a7daa45 100644 --- a/libhb/muxmkv.c +++ b/libhb/muxmkv.c @@ -228,7 +228,7 @@ static int MKVInit( hb_mux_object_t * m ) free(track->codecPrivate); } - if( mk_writeHeader( m->file, "HandBrake " HB_VERSION) < 0 ) + if( mk_writeHeader( m->file, "HandBrake " HB_PROJECT_VERSION) < 0 ) { hb_error( "Failed to write to output file, disk full?"); *job->die = 1; diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c index 1c82211d9..3f9b2314f 100644 --- a/libhb/muxmp4.c +++ b/libhb/muxmp4.c @@ -390,7 +390,7 @@ static int MP4Init( hb_mux_object_t * m ) /* Add encoded-by metadata listing version and build date */ char *tool_string; tool_string = (char *)malloc(80); - snprintf( tool_string, 80, "HandBrake %s %i", HB_VERSION, HB_BUILD); + snprintf( tool_string, 80, "HandBrake %s %i", HB_PROJECT_VERSION, HB_PROJECT_BUILD); MP4SetMetadataTool(m->file, tool_string); free(tool_string); diff --git a/libhb/project.h.m4 b/libhb/project.h.m4 new file mode 100644 index 000000000..7889afb45 --- /dev/null +++ b/libhb/project.h.m4 @@ -0,0 +1,33 @@ +changequote(<<, >>)dnl +include(<<handbrake.m4>>)dnl +dnl +dnl +dnl +#ifndef HB_PROJECT_H +#define HB_PROJECT_H + +<<#>>define HB_PROJECT_TITLE "__HB_title" +<<#>>define HB_PROJECT_NAME "__HB_name" +<<#>>define HB_PROJECT_NAME_LOWER "__HB_name_lower" +<<#>>define HB_PROJECT_NAME_UPPER "__HB_name_upper" +<<#>>define HB_PROJECT_URL_WEBSITE "__HB_url_website" +<<#>>define HB_PROJECT_URL_COMMUNITY "__HB_url_community" +<<#>>define HB_PROJECT_URL_IRC "__HB_url_irc" +<<#>>define HB_PROJECT_URL_APPCAST "__HB_url_appcast" +<<#>>define HB_PROJECT_VERSION_MAJOR __HB_version_major +<<#>>define HB_PROJECT_VERSION_MINOR __HB_version_minor +<<#>>define HB_PROJECT_VERSION_POINT __HB_version_point +<<#>>define HB_PROJECT_VERSION "__HB_version" +<<#>>define HB_PROJECT_VERSION_FORMAL "__HB_version_formal" +<<#>>define HB_PROJECT_VERSION_HEX 0x<<>>__HB_version_hex<<>>LL +<<#>>define HB_PROJECT_BUILD __HB_build +<<#>>define HB_PROJECT_REPO_URL "__HB_repo_url" +<<#>>define HB_PROJECT_REPO_ROOT "__HB_repo_root" +<<#>>define HB_PROJECT_REPO_UUID "__HB_repo_uuid" +<<#>>define HB_PROJECT_REPO_REV __HB_repo_rev +<<#>>define HB_PROJECT_REPO_DATE "__HB_repo_date" +<<#>>define HB_PROJECT_REPO_WCVERSION "__HB_repo_wcversion" +<<#>>define HB_PROJECT_REPO_OFFICIAL __HB_repo_official +<<#>>define HB_PROJECT_REPO_TYPE "__HB_repo_type" + +#endif /* HB_PROJECT_PROJECT_H */ diff --git a/libhb/stream.c b/libhb/stream.c index b50dff15e..b50dff15e 100755..100644 --- a/libhb/stream.c +++ b/libhb/stream.c diff --git a/libhb/update.c b/libhb/update.c index 599d82ece..6b0d7af92 100644 --- a/libhb/update.c +++ b/libhb/update.c @@ -42,7 +42,7 @@ static void UpdateFunc( void * _data ) int i; /* Setup hb_query and hb_query_two with the correct appcast file */ - if( HB_BUILD % 100 ) + if( HB_PROJECT_BUILD % 100 ) { hb_log("Using http://handbrake.fr/appcast_unstable.xml (primary)"); hb_log("Using http://handbrake.fr/appcast.xml (secondary)"); @@ -148,7 +148,7 @@ static void UpdateFunc( void * _data ) goto error; } - /* Stable HB_BUILD */ + /* Stable HB_PROJECT_BUILD */ stable = strtol( cur, &cur, 10 ); if( cur >= end ) @@ -280,7 +280,7 @@ static void UpdateFunc( void * _data ) goto error; } - /* UnStable HB_BUILD */ + /* UnStable HB_PROJECT_BUILD */ unstable = strtol( cur, &cur, 10 ); if( cur >= end ) @@ -323,10 +323,10 @@ static void UpdateFunc( void * _data ) hb_log( "latest unstable: %s, build %d", unstable_str, unstable ); /* Return the build information */ - if( HB_BUILD % 100 ) + if( HB_PROJECT_BUILD % 100 ) { /* We are runnning an unstable build */ - if( unstable > HB_BUILD ) + if( unstable > HB_PROJECT_BUILD ) { memcpy( data->version, unstable_str, sizeof( unstable_str ) ); *(data->build) = unstable; @@ -335,7 +335,7 @@ static void UpdateFunc( void * _data ) else { /* We are runnning an stable build */ - if( stable > HB_BUILD ) + if( stable > HB_PROJECT_BUILD ) { memcpy( data->version, stable_str, sizeof( stable_str ) ); *(data->build) = stable; diff --git a/macosx/Growl.framework/Versions/A/Growl b/macosx/Growl.framework/Versions/A/Growl Binary files differindex a0572a332..aacc25fe3 100755 --- a/macosx/Growl.framework/Versions/A/Growl +++ b/macosx/Growl.framework/Versions/A/Growl diff --git a/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge-Carbon.h b/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge-Carbon.h index fb705097f..e35663f63 100644 --- a/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge-Carbon.h +++ b/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge-Carbon.h @@ -14,6 +14,10 @@ #include <sys/cdefs.h> #include <Carbon/Carbon.h> +#ifndef GROWL_EXPORT +#define GROWL_EXPORT __attribute__((visibility("default"))) +#endif + /*! @header GrowlApplicationBridge-Carbon.h * @abstract Declares an API that Carbon applications can use to interact with Growl. * @discussion GrowlApplicationBridge uses a delegate to provide information //XXX @@ -323,6 +327,8 @@ struct Growl_Notification { * 0.7. */ void (*clickCallback)(CFPropertyListRef clickContext); + + CFStringRef identifier; }; #pragma mark - @@ -374,6 +380,8 @@ struct Growl_Notification { (notification)->reserved = 0U; \ (notification)->isSticky = false; \ (notification)->clickContext = NULL; \ + (notification)->clickCallback = NULL; \ + (notification)->identifier = NULL; \ } \ } while(0) @@ -417,7 +425,7 @@ struct Growl_Notification { * structure, except possibly the referenceCount by calling the retain and * release members. */ -Boolean Growl_SetDelegate(struct Growl_Delegate *newDelegate); +GROWL_EXPORT Boolean Growl_SetDelegate(struct Growl_Delegate *newDelegate); /*! @function Growl_GetDelegate * @abstract Returns the current Growl delegate, if any. @@ -430,7 +438,7 @@ Boolean Growl_SetDelegate(struct Growl_Delegate *newDelegate); * delegate on your behalf. You are responsible for retaining and releasing * the delegate as needed. */ -struct Growl_Delegate *Growl_GetDelegate(void); +GROWL_EXPORT struct Growl_Delegate *Growl_GetDelegate(void); #pragma mark - @@ -452,7 +460,7 @@ struct Growl_Delegate *Growl_GetDelegate(void); * If the user does choose to install Growl, the requested notification will * be displayed once Growl is installed and running. */ -void Growl_PostNotification(const struct Growl_Notification *notification); +GROWL_EXPORT void Growl_PostNotification(const struct Growl_Notification *notification); /*! @function Growl_PostNotificationWithDictionary * @abstract Notifies using a userInfo dictionary suitable for passing to @@ -468,7 +476,7 @@ void Growl_PostNotification(const struct Growl_Notification *notification); * to using CFDistributedNotificationCenter. The keys for this dictionary * can be found in GrowlDefines.h. */ -void Growl_PostNotificationWithDictionary(CFDictionaryRef userInfo); +GROWL_EXPORT void Growl_PostNotificationWithDictionary(CFDictionaryRef userInfo); /*! @function Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext * @abstract Posts a Growl notification using parameter values. @@ -491,7 +499,7 @@ void Growl_PostNotificationWithDictionary(CFDictionaryRef userInfo); * The icon data can be in any format supported by NSImage. As of Mac OS X * 10.3, this includes the .icns, TIFF, JPEG, GIF, PNG, PDF, and PICT formats. */ -void Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext( +GROWL_EXPORT void Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext( /*inhale*/ CFStringRef title, CFStringRef description, @@ -525,7 +533,7 @@ void Growl_NotifyWithTitleDescriptionNameIconPriorityStickyClickContext( * This function was introduced in Growl.framework 0.7. * @result <code>false</code> if registration failed (e.g. if Growl isn't installed). */ -Boolean Growl_RegisterWithDictionary(CFDictionaryRef regDict); +GROWL_EXPORT Boolean Growl_RegisterWithDictionary(CFDictionaryRef regDict); /*! @function Growl_Reregister * @abstract Updates your registration with Growl. @@ -543,7 +551,7 @@ Boolean Growl_RegisterWithDictionary(CFDictionaryRef regDict); * This function is now implemented using * <code>Growl_RegisterWithDictionary</code>. */ -void Growl_Reregister(void); +GROWL_EXPORT void Growl_Reregister(void); #pragma mark - @@ -563,14 +571,14 @@ void Growl_Reregister(void); * @param flag <code>true</code> if you want GrowlApplicationBridge to register with * Growl when next it is ready; <code>false</code> if not. */ -void Growl_SetWillRegisterWhenGrowlIsReady(Boolean flag); +GROWL_EXPORT void Growl_SetWillRegisterWhenGrowlIsReady(Boolean flag); /*! @function Growl_WillRegisterWhenGrowlIsReady * @abstract Reports whether GrowlApplicationBridge will register with Growl * when Growl next launches. * @result <code>true</code> if GrowlApplicationBridge will register with * Growl when next it posts GROWL_IS_READY; <code>false</code> if not. */ -Boolean Growl_WillRegisterWhenGrowlIsReady(void); +GROWL_EXPORT Boolean Growl_WillRegisterWhenGrowlIsReady(void); #pragma mark - @@ -585,14 +593,14 @@ Boolean Growl_WillRegisterWhenGrowlIsReady(void); * This function does not attempt to clean up the dictionary in any way - for * example, if it is missing the <code>GROWL_APP_NAME</code> key, the result * will be missing it too. Use - * <code>Growl_CreateRegistrationDictionaryByFillingInDictionary:</code> or + * <code>Growl_CreateRegistrationDictionaryByFillingInDictionary</code> or * <code>Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys</code> * to try to fill in missing keys. * * This function was introduced in Growl.framework 0.7. * @result A registration dictionary. */ -CFDictionaryRef Growl_CopyRegistrationDictionaryFromDelegate(void); +GROWL_EXPORT CFDictionaryRef Growl_CopyRegistrationDictionaryFromDelegate(void); /*! @function Growl_CopyRegistrationDictionaryFromBundle * @abstract Looks in a bundle for a registration dictionary. @@ -613,7 +621,7 @@ CFDictionaryRef Growl_CopyRegistrationDictionaryFromDelegate(void); * This function was introduced in Growl.framework 0.7. * @result A registration dictionary. */ -CFDictionaryRef Growl_CopyRegistrationDictionaryFromBundle(CFBundleRef bundle); +GROWL_EXPORT CFDictionaryRef Growl_CopyRegistrationDictionaryFromBundle(CFBundleRef bundle); /*! @function Growl_CreateBestRegistrationDictionary * @abstract Obtains a registration dictionary, filled out to the best of @@ -639,7 +647,7 @@ CFDictionaryRef Growl_CopyRegistrationDictionaryFromBundle(CFBundleRef bundle); * This function was introduced in Growl.framework 0.7. * @result A registration dictionary. */ -CFDictionaryRef Growl_CreateBestRegistrationDictionary(void); +GROWL_EXPORT CFDictionaryRef Growl_CreateBestRegistrationDictionary(void); #pragma mark - @@ -664,7 +672,7 @@ CFDictionaryRef Growl_CreateBestRegistrationDictionary(void); * * This function was introduced in Growl.framework 0.7. */ -CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionary(CFDictionaryRef regDict); +GROWL_EXPORT CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionary(CFDictionaryRef regDict); /*! @function Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys * @abstract Tries to fill in missing keys in a registration dictionary. * @param regDict The dictionary to fill in. @@ -686,7 +694,21 @@ CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionary(CFDictio * * This function was introduced in Growl.framework 0.7. */ -CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys(CFDictionaryRef regDict, CFSetRef keys); +GROWL_EXPORT CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionaryRestrictedToKeys(CFDictionaryRef regDict, CFSetRef keys); + +/*! @brief Tries to fill in missing keys in a notification dictionary. + * @param notifDict The dictionary to fill in. + * @return The dictionary with the keys filled in. This will be a separate instance from \a notifDict. + * @discussion This function examines the \a notifDict for missing keys, and + * tries to get them from the last known registration dictionary. As of 1.1, + * the keys that it will look for are: + * + * \li <code>GROWL_APP_NAME</code> + * \li <code>GROWL_APP_ICON</code> + * + * @since Growl.framework 1.1 + */ +GROWL_EXPORT CFDictionaryRef Growl_CreateNotificationDictionaryByFillingInDictionary(CFDictionaryRef notifDict); #pragma mark - @@ -697,14 +719,14 @@ CFDictionaryRef Growl_CreateRegistrationDictionaryByFillingInDictionaryRestricte * installed. * @result Returns true if Growl is installed, false otherwise. */ -Boolean Growl_IsInstalled(void); +GROWL_EXPORT Boolean Growl_IsInstalled(void); /*! @function Growl_IsRunning * @abstract Cycles through the process list to find whether GrowlHelperApp * is running. * @result Returns true if Growl is running, false otherwise. */ -Boolean Growl_IsRunning(void); +GROWL_EXPORT Boolean Growl_IsRunning(void); #pragma mark - @@ -738,7 +760,7 @@ typedef void (*GrowlLaunchCallback)(void *context); * acceptable for context to be <code>NULL</code>. The callback itself can be * <code>NULL</code> if you don't want one. */ -Boolean Growl_LaunchIfInstalled(GrowlLaunchCallback callback, void *context); +GROWL_EXPORT Boolean Growl_LaunchIfInstalled(GrowlLaunchCallback callback, void *context); #pragma mark - #pragma mark Constants diff --git a/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h b/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h index 7ac315af3..4341f3fbd 100644 --- a/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h +++ b/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h @@ -3,7 +3,7 @@ // Growl // // Created by Evan Schoenberg on Wed Jun 16 2004. -// Copyright 2004-2005 The Growl Project. All rights reserved. +// Copyright 2004-2006 The Growl Project. All rights reserved. // /*! @@ -17,23 +17,12 @@ #define __GrowlApplicationBridge_h__ #import <Foundation/Foundation.h> +#import <AppKit/AppKit.h> #import "GrowlDefines.h" //Forward declarations @protocol GrowlApplicationBridgeDelegate; -/*! - * @defined GROWL_PREFPANE_BUNDLE_IDENTIFIER - * @discussion The bundle identifier for the Growl prefpane. - */ -#define GROWL_PREFPANE_BUNDLE_IDENTIFIER @"com.growl.prefpanel" - -/*! - * @defined GROWL_PREFPANE_NAME - * @discussion The file name of the Growl prefpane. - */ -#define GROWL_PREFPANE_NAME @"Growl.prefPane" - //Internal notification when the user chooses not to install (to avoid continuing to cache notifications awaiting installation) #define GROWL_USER_CHOSE_NOT_TO_INSTALL_NOTIFICATION @"User chose not to install" @@ -176,6 +165,40 @@ clickContext:(id)clickContext identifier:(NSString *)identifier; +/*! + * @method notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:identifier: + * @abstract Send a Growl notification. + * @discussion This is the preferred means for sending a Growl notification. + * The notification name and at least one of the title and description are + * required (all three are preferred). All other parameters may be + * <code>nil</code> (or 0 or NO as appropriate) to accept default values. + * + * If using the Growl-WithInstaller framework, if Growl is not installed the + * user will be prompted to install Growl. If the user cancels, this method + * will have no effect until the next application session, at which time when + * it is called the user will be prompted again. The user is also given the + * option to not be prompted again. If the user does choose to install Growl, + * the requested notification will be displayed once Growl is installed and + * running. + * + * @param title The title of the notification displayed to the user. + * @param description The full description of the notification displayed to the user. + * @param notifName The internal name of the notification. Should be human-readable, as it will be displayed in the Growl preference pane. + * @param iconData <code>NSData</code> object to show with the notification as its icon. If <code>nil</code>, the application's icon will be used instead. + * @param priority The priority of the notification. The default value is 0; positive values are higher priority and negative values are lower priority. Not all Growl displays support priority. + * @param isSticky If YES, the notification will remain on screen until clicked. Not all Growl displays support sticky notifications. + * @param clickContext A context passed back to the Growl delegate if it implements -(void)growlNotificationWasClicked: and the notification is clicked. Not all display plugins support clicking. The clickContext must be plist-encodable (completely of <code>NSString</code>, <code>NSArray</code>, <code>NSNumber</code>, <code>NSDictionary</code>, and <code>NSData</code> types). + * @param identifier An identifier for this notification. Notifications with equal identifiers are coalesced. + */ ++ (void) notifyWithTitle:(NSString *)title + description:(NSString *)description + notificationName:(NSString *)notifName + iconData:(NSData *)iconData + priority:(signed int)priority + isSticky:(BOOL)isSticky + clickContext:(id)clickContext + identifier:(NSString *)identifier; + /*! @method notifyWithDictionary: * @abstract Notifies using a userInfo dictionary suitable for passing to * <code>NSDistributedNotificationCenter</code>. @@ -371,6 +394,21 @@ */ + (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict restrictToKeys:(NSSet *)keys; +/*! @brief Tries to fill in missing keys in a notification dictionary. + * @param notifDict The dictionary to fill in. + * @return The dictionary with the keys filled in. This will be a separate instance from \a notifDict. + * @discussion This function examines the \a notifDict for missing keys, and + * tries to get them from the last known registration dictionary. As of 1.1, + * the keys that it will look for are: + * + * \li <code>GROWL_APP_NAME</code> + * \li <code>GROWL_APP_ICON</code> + * + * @since Growl.framework 1.1 + */ ++ (NSDictionary *) notificationDictionaryByFillingInDictionary:(NSDictionary *)regDict; + ++ (NSDictionary *) frameworkInfoDictionary; @end //------------------------------------------------------------------------------ @@ -417,10 +455,13 @@ * <code>+[GrowlApplicationBridge * notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]</code> calls. * - * The dictionary should have 2 key object pairs: + * The dictionary should have the required key object pairs: * key: GROWL_NOTIFICATIONS_ALL object: <code>NSArray</code> of <code>NSString</code> objects * key: GROWL_NOTIFICATIONS_DEFAULT object: <code>NSArray</code> of <code>NSString</code> objects * + * The dictionary may have the following key object pairs: + * key: GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES object: <code>NSDictionary</code> of key: notification name object: human-readable notification name + * * You do not need to implement this method if you have an auto-discoverable * plist file in your app bundle. (XXX refer to more information on that) * @@ -448,12 +489,25 @@ - (NSString *) applicationNameForGrowl; /*! + * @method applicationIconForGrowl + * @abstract Return the <code>NSImage</code> to treat as the application icon. + * @discussion The delegate may optionally return an <code>NSImage</code> + * object to use as the application icon. If this method is not implemented, + * {{{-applicationIconDataForGrowl}}} is tried. If that method is not + * implemented, the application's own icon is used. Neither method is + * generally needed. + * @result The <code>NSImage</code> to treat as the application icon. + */ +- (NSImage *) applicationIconForGrowl; + +/*! * @method applicationIconDataForGrowl * @abstract Return the <code>NSData</code> to treat as the application icon. * @discussion The delegate may optionally return an <code>NSData</code> * object to use as the application icon; if this is not implemented, the * application's own icon is used. This is not generally needed. * @result The <code>NSData</code> to treat as the application icon. + * @deprecated In version 1.1, in favor of {{{-applicationIconForGrowl}}}. */ - (NSData *) applicationIconDataForGrowl; @@ -461,9 +515,8 @@ * @method growlIsReady * @abstract Informs the delegate that Growl has launched. * @discussion Informs the delegate that Growl (specifically, the - * GrowlHelperApp) was launched successfully or was already running. The - * application can take actions with the knowledge that Growl is installed and - * functional. + * GrowlHelperApp) was launched successfully. The application can take actions + * with the knowledge that Growl is installed and functional. */ - (void) growlIsReady; diff --git a/macosx/Growl.framework/Versions/A/Headers/GrowlDefines.h b/macosx/Growl.framework/Versions/A/Headers/GrowlDefines.h index 6ff6ee3d2..2b971cfe5 100644 --- a/macosx/Growl.framework/Versions/A/Headers/GrowlDefines.h +++ b/macosx/Growl.framework/Versions/A/Headers/GrowlDefines.h @@ -7,10 +7,10 @@ #ifdef __OBJC__ #define XSTR(x) (@x) -#define STRING NSString * +#define STRING_TYPE NSString * #else #define XSTR CFSTR -#define STRING CFStringRef +#define STRING_TYPE CFStringRef #endif /*! @header GrowlDefines.h @@ -48,6 +48,14 @@ * "SurfWriter Lite" are not. */ #define GROWL_APP_NAME XSTR("ApplicationName") +/*! @defined GROWL_APP_ID + * @abstract The bundle identifier of your application. + * @discussion The bundle identifier of your application. This key should + * be unique for your application while there may be several applications + * with the same GROWL_APP_NAME. + * This key is optional. + */ +#define GROWL_APP_ID XSTR("ApplicationId") /*! @defined GROWL_APP_ICON * @abstract The image data for your application's icon. * @discussion Image data representing your application's icon. This may be @@ -74,6 +82,26 @@ * notification names. */ #define GROWL_NOTIFICATIONS_ALL XSTR("AllNotifications") +/*! @defined GROWL_NOTIFICATIONS_HUMAN_READABLE_DESCRIPTIONS + * @abstract A dictionary of human-readable names for your notifications. + * @discussion By default, the Growl UI will display notifications by the names given in GROWL_NOTIFICATIONS_ALL + * which correspond to the GROWL_NOTIFICATION_NAME. This dictionary specifies the human-readable name to display. + * The keys of the dictionary are GROWL_NOTIFICATION_NAME strings; the objects are the human-readable versions. + * For any GROWL_NOTIFICATION_NAME not specific in this dictionary, the GROWL_NOTIFICATION_NAME will be displayed. + * + * This key is optional. + */ +#define GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES XSTR("HumanReadableNames") +/*! @defined GROWL_NOTIFICATIONS_DESCRIPTIONS +* @abstract A dictionary of descriptions of _when_ each notification occurs +* @discussion This is an NSDictionary whose keys are GROWL_NOTIFICATION_NAME strings and whose objects are +* descriptions of _when_ each notification occurs, such as "You received a new mail message" or +* "A file finished downloading". +* +* This key is optional. +*/ +#define GROWL_NOTIFICATIONS_DESCRIPTIONS XSTR("NotificationDescriptions") + /*! @defined GROWL_TICKET_VERSION * @abstract The version of your registration ticket. * @discussion Include this key in a ticket plist file that you put in your @@ -97,9 +125,10 @@ /*! @defined GROWL_NOTIFICATION_NAME * @abstract The name of the notification. - * @discussion The name of the notification. This should be human-readable, as - * it's shown in the prefpane, in the list of notifications your application - * supports. */ + * @discussion The name of the notification. Note that if you do not define + * GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES when registering your ticket originally this name + * will the one displayed within the Growl preference pane and should be human-readable. + */ #define GROWL_NOTIFICATION_NAME XSTR("NotificationName") /*! @defined GROWL_NOTIFICATION_TITLE * @abstract The title to display in the notification. @@ -186,6 +215,15 @@ */ #define GROWL_APP_PID XSTR("ApplicationPID") +/*! @defined GROWL_NOTIFICATION_PROGRESS +* @abstract If this key is set, it should contain a double value wrapped +* in a NSNumber which describes some sort of progress (from 0.0 to 100.0). +* If this is key is not set, no progress bar is shown. +* +* Optional. Not supported by all display plugins. +*/ +#define GROWL_NOTIFICATION_PROGRESS XSTR("NotificationProgress") + // Notifications #pragma mark Notifications @@ -304,4 +342,7 @@ */ #define GROWL_REG_DICT_EXTENSION XSTR("growlRegDict") + +#define GROWL_POSITION_PREFERENCE_KEY @"GrowlSelectedPosition" + #endif //ndef _GROWLDEFINES_H diff --git a/macosx/Growl.framework/Versions/A/Resources/Info.plist b/macosx/Growl.framework/Versions/A/Resources/Info.plist index 6530bd21e..ab7194d2d 100644 --- a/macosx/Growl.framework/Versions/A/Resources/Info.plist +++ b/macosx/Growl.framework/Versions/A/Resources/Info.plist @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> @@ -13,11 +13,11 @@ <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> - <string>0.7.6</string> + <string>1.1.2</string> <key>CFBundleSignature</key> <string>GRRR</string> <key>CFBundleVersion</key> - <string>0.7.6</string> + <string>1.1.2</string> <key>NSPrincipalClass</key> <string>GrowlApplicationBridge</string> </dict> diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj index cb2bed5de..dcd6dc774 100644 --- a/macosx/HandBrake.xcodeproj/project.pbxproj +++ b/macosx/HandBrake.xcodeproj/project.pbxproj @@ -3,67 +3,37 @@ archiveVersion = 1; classes = { }; - objectVersion = 42; + objectVersion = 45; objects = { +/* Begin PBXAggregateTarget section */ + 27C7D1020F58AEC400974730 /* configure */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 27C7D1050F58AEE300974730 /* Build configuration list for PBXAggregateTarget "configure" */; + buildPhases = ( + 27C7D1010F58AEC400974730 /* ShellScript */, + ); + dependencies = ( + ); + name = configure; + productName = configure; + }; + 27C7D1160F58B0AF00974730 /* make.libhb */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 27C7D1180F58B0AF00974730 /* Build configuration list for PBXAggregateTarget "make.libhb" */; + buildPhases = ( + 27C7D1170F58B0AF00974730 /* ShellScript */, + ); + dependencies = ( + 27ED6AB70F58CA0A00C905EE /* PBXTargetDependency */, + ); + name = make.libhb; + productName = configure; + }; +/* End PBXAggregateTarget section */ + /* Begin PBXBuildFile section */ - 0D096E010B707D3400A845D4 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 526FBC9B0B4CAB100064E04C /* common.c */; }; - 0D096E020B707D3400A845D4 /* deca52.c in Sources */ = {isa = PBXBuildFile; fileRef = 526FBC9D0B4CAB100064E04C /* deca52.c */; }; - 0D096E030B707D3400A845D4 /* decavcodec.c in Sources */ = {isa = PBXBuildFile; fileRef = 526FBC9E0B4CAB100064E04C /* decavcodec.c */; }; - 0D096EA30B70884A00A845D4 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D1125D709D72FD200E0657B /* libz.dylib */; }; - 0DF377980B7BF99A00115CB0 /* fakexcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0DF377970B7BF99A00115CB0 /* fakexcode.cpp */; }; 0DFA5C7B0B8DD1E90020BC09 /* HandBrake.icns in Resources */ = {isa = PBXBuildFile; fileRef = 0DFA5C7A0B8DD1E90020BC09 /* HandBrake.icns */; }; - 0DFA5CC00B8DD3FE0020BC09 /* declpcm.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C7E0B8DD3B60020BC09 /* declpcm.c */; }; - 0DFA5CC10B8DD3FE0020BC09 /* decmpeg2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C7F0B8DD3B60020BC09 /* decmpeg2.c */; }; - 0DFA5CC20B8DD3FE0020BC09 /* decsub.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C800B8DD3B60020BC09 /* decsub.c */; }; - 0DFA5CC30B8DD3FE0020BC09 /* demuxmpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C810B8DD3B60020BC09 /* demuxmpeg.c */; }; - 0DFA5CC40B8DD3FE0020BC09 /* dvd.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C820B8DD3B60020BC09 /* dvd.c */; }; - 0DFA5CC50B8DD3FE0020BC09 /* encavcodec.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C830B8DD3B60020BC09 /* encavcodec.c */; }; - 0DFA5CC60B8DD3FE0020BC09 /* encfaac.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C840B8DD3B60020BC09 /* encfaac.c */; }; - 0DFA5CC70B8DD3FE0020BC09 /* enclame.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C850B8DD3B60020BC09 /* enclame.c */; }; - 0DFA5CC80B8DD3FE0020BC09 /* encvorbis.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C860B8DD3B60020BC09 /* encvorbis.c */; }; - 0DFA5CC90B8DD3FE0020BC09 /* encx264.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C870B8DD3B60020BC09 /* encx264.c */; }; - 0DFA5CCA0B8DD3FE0020BC09 /* encxvid.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C880B8DD3B60020BC09 /* encxvid.c */; }; - 0DFA5CCB0B8DD3FE0020BC09 /* fifo.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C890B8DD3B60020BC09 /* fifo.c */; }; - 0DFA5CCC0B8DD3FE0020BC09 /* hb.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C8A0B8DD3B60020BC09 /* hb.c */; }; - 0DFA5CCE0B8DD3FE0020BC09 /* muxavi.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C910B8DD3B60020BC09 /* muxavi.c */; }; - 0DFA5CCF0B8DD3FE0020BC09 /* muxcommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C920B8DD3B60020BC09 /* muxcommon.c */; }; - 0DFA5CD00B8DD3FE0020BC09 /* muxmp4.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C930B8DD3B60020BC09 /* muxmp4.c */; }; - 0DFA5CD10B8DD3FE0020BC09 /* muxogm.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C940B8DD3B60020BC09 /* muxogm.c */; }; - 0DFA5CD20B8DD3FE0020BC09 /* ports.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C950B8DD3B60020BC09 /* ports.c */; }; - 0DFA5CD30B8DD3FE0020BC09 /* reader.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C970B8DD3B60020BC09 /* reader.c */; }; - 0DFA5CD40B8DD3FE0020BC09 /* render.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C980B8DD3B60020BC09 /* render.c */; }; - 0DFA5CD50B8DD3FE0020BC09 /* scan.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C990B8DD3B60020BC09 /* scan.c */; }; - 0DFA5CD60B8DD3FE0020BC09 /* sync.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C9A0B8DD3B60020BC09 /* sync.c */; }; - 0DFA5CD70B8DD3FE0020BC09 /* update.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C9B0B8DD3B60020BC09 /* update.c */; }; - 0DFA5CD80B8DD3FE0020BC09 /* work.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C9C0B8DD3B60020BC09 /* work.c */; }; - 0DFA5CD90B8DD4210020BC09 /* declpcm.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C7E0B8DD3B60020BC09 /* declpcm.c */; }; - 0DFA5CDA0B8DD4210020BC09 /* decmpeg2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C7F0B8DD3B60020BC09 /* decmpeg2.c */; }; - 0DFA5CDB0B8DD4210020BC09 /* decsub.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C800B8DD3B60020BC09 /* decsub.c */; }; - 0DFA5CDC0B8DD4210020BC09 /* demuxmpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C810B8DD3B60020BC09 /* demuxmpeg.c */; }; - 0DFA5CDD0B8DD4210020BC09 /* dvd.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C820B8DD3B60020BC09 /* dvd.c */; }; - 0DFA5CDE0B8DD4210020BC09 /* encavcodec.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C830B8DD3B60020BC09 /* encavcodec.c */; }; - 0DFA5CDF0B8DD4210020BC09 /* encfaac.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C840B8DD3B60020BC09 /* encfaac.c */; }; - 0DFA5CE00B8DD4210020BC09 /* enclame.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C850B8DD3B60020BC09 /* enclame.c */; }; - 0DFA5CE10B8DD4210020BC09 /* encvorbis.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C860B8DD3B60020BC09 /* encvorbis.c */; }; - 0DFA5CE20B8DD4210020BC09 /* encx264.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C870B8DD3B60020BC09 /* encx264.c */; }; - 0DFA5CE30B8DD4210020BC09 /* encxvid.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C880B8DD3B60020BC09 /* encxvid.c */; }; - 0DFA5CE40B8DD4210020BC09 /* fifo.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C890B8DD3B60020BC09 /* fifo.c */; }; - 0DFA5CE50B8DD4210020BC09 /* hb.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C8A0B8DD3B60020BC09 /* hb.c */; }; - 0DFA5CE70B8DD4210020BC09 /* muxavi.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C910B8DD3B60020BC09 /* muxavi.c */; }; - 0DFA5CE80B8DD4210020BC09 /* muxcommon.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C920B8DD3B60020BC09 /* muxcommon.c */; }; - 0DFA5CE90B8DD4210020BC09 /* muxmp4.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C930B8DD3B60020BC09 /* muxmp4.c */; }; - 0DFA5CEA0B8DD4210020BC09 /* muxogm.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C940B8DD3B60020BC09 /* muxogm.c */; }; - 0DFA5CEB0B8DD4210020BC09 /* ports.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C950B8DD3B60020BC09 /* ports.c */; }; - 0DFA5CEC0B8DD4210020BC09 /* reader.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C970B8DD3B60020BC09 /* reader.c */; }; - 0DFA5CED0B8DD4210020BC09 /* render.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C980B8DD3B60020BC09 /* render.c */; }; - 0DFA5CEE0B8DD4210020BC09 /* scan.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C990B8DD3B60020BC09 /* scan.c */; }; - 0DFA5CEF0B8DD4210020BC09 /* sync.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C9A0B8DD3B60020BC09 /* sync.c */; }; - 0DFA5CF00B8DD4210020BC09 /* update.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C9B0B8DD3B60020BC09 /* update.c */; }; - 0DFA5CF10B8DD4210020BC09 /* work.c in Sources */ = {isa = PBXBuildFile; fileRef = 0DFA5C9C0B8DD3B60020BC09 /* work.c */; }; - 0DFF0B770B6BC72A00549488 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 526FBC9B0B4CAB100064E04C /* common.c */; }; - 0DFF0B790B6BC72A00549488 /* deca52.c in Sources */ = {isa = PBXBuildFile; fileRef = 526FBC9D0B4CAB100064E04C /* deca52.c */; }; - 0DFF0B7A0B6BC72A00549488 /* decavcodec.c in Sources */ = {isa = PBXBuildFile; fileRef = 526FBC9E0B4CAB100064E04C /* decavcodec.c */; }; 0DFF0C100B6BCEE800549488 /* test.c in Sources */ = {isa = PBXBuildFile; fileRef = 526FBC760B4CA8F40064E04C /* test.c */; }; 253886010BFE0A5B0064E995 /* HBOutputRedirect.h in Headers */ = {isa = PBXBuildFile; fileRef = 253885FF0BFE0A5B0064E995 /* HBOutputRedirect.h */; }; 253886020BFE0A5B0064E995 /* HBOutputRedirect.m in Sources */ = {isa = PBXBuildFile; fileRef = 253886000BFE0A5B0064E995 /* HBOutputRedirect.m */; }; @@ -71,6 +41,7 @@ 253886180BFE0C160064E995 /* HBOutputPanelController.m in Sources */ = {isa = PBXBuildFile; fileRef = 253886160BFE0C160064E995 /* HBOutputPanelController.m */; }; 25DE1FB60C169A0C00F01FC8 /* HBPreferencesController.h in Headers */ = {isa = PBXBuildFile; fileRef = 25DE1FB40C169A0C00F01FC8 /* HBPreferencesController.h */; }; 25DE1FB70C169A0C00F01FC8 /* HBPreferencesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 25DE1FB50C169A0C00F01FC8 /* HBPreferencesController.m */; }; + 27AC71850F5A0AF600053B83 /* fakexcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27AC71840F5A0AF600053B83 /* fakexcode.cpp */; }; 4D1125D809D72FD200E0657B /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D1125D709D72FD200E0657B /* libz.dylib */; }; 4DD93F8F082036E8008E1322 /* Controller.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DF3C8CB052889CD00A80101 /* Controller.h */; }; 4DD93F92082036E8008E1322 /* HBPreviewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D1FD381073D19CE00E46515 /* HBPreviewController.h */; }; @@ -81,27 +52,16 @@ 4DD93FA2082036E8008E1322 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; 4DD93FA3082036E8008E1322 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DEB2024052B055F00C39CA9 /* IOKit.framework */; }; 4DD93FA4082036E8008E1322 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DDE9724052B7B2B00C39CA9 /* OpenGL.framework */; }; - 5558B5690BE3BADF00E15E27 /* decdca.c in Sources */ = {isa = PBXBuildFile; fileRef = 5558B5680BE3BADF00E15E27 /* decdca.c */; }; - 5558B56A0BE3BADF00E15E27 /* decdca.c in Sources */ = {isa = PBXBuildFile; fileRef = 5558B5680BE3BADF00E15E27 /* decdca.c */; }; - 593034EB0BBA39A100172349 /* ChapterTitles.h in Headers */ = {isa = PBXBuildFile; fileRef = 593034E90BBA39A100172349 /* ChapterTitles.h */; }; - 593034EC0BBA39A100172349 /* ChapterTitles.m in Sources */ = {isa = PBXBuildFile; fileRef = 593034EA0BBA39A100172349 /* ChapterTitles.m */; }; 59CBD2370BBB44DA004A3BE3 /* parsecsv.c in Sources */ = {isa = PBXBuildFile; fileRef = 59CBD2360BBB44DA004A3BE3 /* parsecsv.c */; }; 59CBD2650BBB4D1B004A3BE3 /* ChapterTitles.m in Sources */ = {isa = PBXBuildFile; fileRef = 593034EA0BBA39A100172349 /* ChapterTitles.m */; }; - 7497010F0DC281BB009200D8 /* decomb.c in Sources */ = {isa = PBXBuildFile; fileRef = 7497010E0DC281BB009200D8 /* decomb.c */; }; - 749701100DC281BB009200D8 /* decomb.c in Sources */ = {isa = PBXBuildFile; fileRef = 7497010E0DC281BB009200D8 /* decomb.c */; }; - A20F46DC0EBB5E7A005B861B /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A20F46DB0EBB5E7A005B861B /* QuickTime.framework */; }; A20F47010EBB5EC2005B861B /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A20F47000EBB5EC2005B861B /* QTKit.framework */; }; A22C85EC0D05D35000C10E36 /* HBPresets.h in Headers */ = {isa = PBXBuildFile; fileRef = A22C85EA0D05D35000C10E36 /* HBPresets.h */; }; A22C85ED0D05D35100C10E36 /* HBPresets.m in Sources */ = {isa = PBXBuildFile; fileRef = A22C85EB0D05D35000C10E36 /* HBPresets.m */; }; - A25289E60D87A27D00461D5B /* enctheora.c in Sources */ = {isa = PBXBuildFile; fileRef = A25289E50D87A27D00461D5B /* enctheora.c */; }; - A25289E70D87A2CB00461D5B /* enctheora.c in Sources */ = {isa = PBXBuildFile; fileRef = A25289E50D87A27D00461D5B /* enctheora.c */; }; A25962E10F15077500B3BF4E /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A25962E00F15077500B3BF4E /* Quartz.framework */; }; A266019A0F2A1DC0007EA355 /* PictureFilters.xib in Resources */ = {isa = PBXBuildFile; fileRef = A26601980F2A1DC0007EA355 /* PictureFilters.xib */; }; A273E0510C57B39A00493A45 /* Pause.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A273E04A0C57B39A00493A45 /* Pause.tiff */; }; A273E0520C57B39A00493A45 /* Play.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A273E04B0C57B39A00493A45 /* Play.tiff */; }; A273E0530C57B39A00493A45 /* Stop.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A273E04C0C57B39A00493A45 /* Stop.tiff */; }; - A273E09A0C57C1CC00493A45 /* muxmkv.c in Sources */ = {isa = PBXBuildFile; fileRef = A273E0950C57C19500493A45 /* muxmkv.c */; }; - A273E09B0C57C1CD00493A45 /* muxmkv.c in Sources */ = {isa = PBXBuildFile; fileRef = A273E0950C57C19500493A45 /* muxmkv.c */; }; A27BB4EA0EFAB9310027CDF9 /* PicturePreview.xib in Resources */ = {isa = PBXBuildFile; fileRef = A27BB4E80EFAB9310027CDF9 /* PicturePreview.xib */; }; A29E05800BE1283E000533F5 /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A29E057F0BE1283E000533F5 /* Growl.framework */; }; A29E058B0BE12889000533F5 /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A29E057F0BE1283E000533F5 /* Growl.framework */; }; @@ -122,12 +82,8 @@ A2D7AD6F0C998AD30082CA33 /* Source.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A2D7AD660C998AD30082CA33 /* Source.tiff */; }; A9AC41DF0C918DB500DDF9B8 /* HBAdvancedController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9AC41DD0C918DB500DDF9B8 /* HBAdvancedController.m */; }; A9AC41E00C918DB500DDF9B8 /* HBAdvancedController.h in Headers */ = {isa = PBXBuildFile; fileRef = A9AC41DE0C918DB500DDF9B8 /* HBAdvancedController.h */; }; - B453420A0EE3619C005D6F26 /* decmetadata.c in Sources */ = {isa = PBXBuildFile; fileRef = B45342080EE3619C005D6F26 /* decmetadata.c */; }; - B453420B0EE3619C005D6F26 /* decmetadata.c in Sources */ = {isa = PBXBuildFile; fileRef = B45342080EE3619C005D6F26 /* decmetadata.c */; }; - B48359A80C82960500E04440 /* lang.c in Sources */ = {isa = PBXBuildFile; fileRef = B48359A70C82960500E04440 /* lang.c */; }; D289A9F30DBBE7AC00CE614B /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D289A9F20DBBE7AC00CE614B /* CoreServices.framework */; }; D289AAC40DBBF3F100CE614B /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DEB2024052B055F00C39CA9 /* IOKit.framework */; }; - D4D49FED0C83355600F01215 /* lang.c in Sources */ = {isa = PBXBuildFile; fileRef = B48359A70C82960500E04440 /* lang.c */; }; E3003C7F0C88505D0072F2A8 /* DeleteHighlightPressed.png in Resources */ = {isa = PBXBuildFile; fileRef = E3003C7E0C88505D0072F2A8 /* DeleteHighlightPressed.png */; }; E3003CB50C8852B70072F2A8 /* DeletePressed.png in Resources */ = {isa = PBXBuildFile; fileRef = E3003CB40C8852B70072F2A8 /* DeletePressed.png */; }; E37167890C92F6180072B384 /* JobPassSecondSmall.png in Resources */ = {isa = PBXBuildFile; fileRef = E37167830C92F6180072B384 /* JobPassSecondSmall.png */; }; @@ -160,32 +116,29 @@ E3C844F90CA6B3F90013B683 /* Reveal.png in Resources */ = {isa = PBXBuildFile; fileRef = E3C844F50CA6B3F90013B683 /* Reveal.png */; }; E3C845870CA6E9080013B683 /* EncodeComplete.png in Resources */ = {isa = PBXBuildFile; fileRef = E3C845860CA6E9080013B683 /* EncodeComplete.png */; }; E3FC10910D1611EC00470E7B /* EncodeCanceled.png in Resources */ = {isa = PBXBuildFile; fileRef = E3FC10900D1611EC00470E7B /* EncodeCanceled.png */; }; - EAA526930C3B25D200944FF2 /* stream.c in Sources */ = {isa = PBXBuildFile; fileRef = EAA526920C3B25D200944FF2 /* stream.c */; }; - EAA526940C3B25D200944FF2 /* stream.c in Sources */ = {isa = PBXBuildFile; fileRef = EAA526920C3B25D200944FF2 /* stream.c */; }; - FC8519500C59A02C0073812C /* denoise.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194C0C59A02C0073812C /* denoise.c */; }; - FC8519510C59A02C0073812C /* deinterlace.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194D0C59A02C0073812C /* deinterlace.c */; }; - FC8519520C59A02C0073812C /* deblock.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194E0C59A02C0073812C /* deblock.c */; }; - FC8519530C59A02C0073812C /* detelecine.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194F0C59A02C0073812C /* detelecine.c */; }; - FC8519540C59A02C0073812C /* denoise.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194C0C59A02C0073812C /* denoise.c */; }; - FC8519550C59A02C0073812C /* deinterlace.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194D0C59A02C0073812C /* deinterlace.c */; }; - FC8519560C59A02C0073812C /* deblock.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194E0C59A02C0073812C /* deblock.c */; }; - FC8519570C59A02C0073812C /* detelecine.c in Sources */ = {isa = PBXBuildFile; fileRef = FC85194F0C59A02C0073812C /* detelecine.c */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 0D6E35900B6BD5FA005AABB3 /* PBXContainerItemProxy */ = { + 27ED6A910F58BEE900C905EE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; + proxyType = 1; + remoteGlobalIDString = 27C7D1160F58B0AF00974730; + remoteInfo = make; + }; + 27ED6AB60F58CA0A00C905EE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; proxyType = 1; - remoteGlobalIDString = 0DFF0B710B6BC6E600549488; - remoteInfo = libmediafork; + remoteGlobalIDString = 27C7D1020F58AEC400974730; + remoteInfo = configure; }; - 0DFF0BF30B6BCCB900549488 /* PBXContainerItemProxy */ = { + 27ED6AC60F58CE8400C905EE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; proxyType = 1; - remoteGlobalIDString = 0DFF0B710B6BC6E600549488; - remoteInfo = libmediafork; + remoteGlobalIDString = 27C7D1160F58B0AF00974730; + remoteInfo = make; }; /* End PBXContainerItemProxy section */ @@ -205,9 +158,7 @@ /* Begin PBXFileReference section */ 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; - 0D096DFF0B707D1200A845D4 /* libhb.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libhb.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; 0D6E35760B6BD4F0005AABB3 /* HandBrake.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HandBrake.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 0DF377970B7BF99A00115CB0 /* fakexcode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = fakexcode.cpp; path = ../test/fakexcode.cpp; sourceTree = SOURCE_ROOT; }; 0DFA5C7A0B8DD1E90020BC09 /* HandBrake.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = HandBrake.icns; sourceTree = "<group>"; }; 0DFA5C7E0B8DD3B60020BC09 /* declpcm.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = declpcm.c; path = ../libhb/declpcm.c; sourceTree = SOURCE_ROOT; }; 0DFA5C7F0B8DD3B60020BC09 /* decmpeg2.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = decmpeg2.c; path = ../libhb/decmpeg2.c; sourceTree = SOURCE_ROOT; }; @@ -233,8 +184,6 @@ 0DFA5C9A0B8DD3B60020BC09 /* sync.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = sync.c; path = ../libhb/sync.c; sourceTree = SOURCE_ROOT; }; 0DFA5C9B0B8DD3B60020BC09 /* update.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = update.c; path = ../libhb/update.c; sourceTree = SOURCE_ROOT; }; 0DFA5C9C0B8DD3B60020BC09 /* work.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = work.c; path = ../libhb/work.c; sourceTree = SOURCE_ROOT; }; - 0DFA5D060B8DD9040020BC09 /* HandBrake.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = HandBrake.plist; sourceTree = "<group>"; }; - 0DFF0B720B6BC6E600549488 /* libhb.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libhb.a; sourceTree = BUILT_PRODUCTS_DIR; }; 0DFF0C0A0B6BCEC200549488 /* HandBrakeCLI */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = HandBrakeCLI; sourceTree = BUILT_PRODUCTS_DIR; }; 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; 253885FF0BFE0A5B0064E995 /* HBOutputRedirect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HBOutputRedirect.h; sourceTree = "<group>"; }; @@ -243,6 +192,7 @@ 253886160BFE0C160064E995 /* HBOutputPanelController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBOutputPanelController.m; sourceTree = "<group>"; }; 25DE1FB40C169A0C00F01FC8 /* HBPreferencesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HBPreferencesController.h; sourceTree = "<group>"; }; 25DE1FB50C169A0C00F01FC8 /* HBPreferencesController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBPreferencesController.m; sourceTree = "<group>"; }; + 27AC71840F5A0AF600053B83 /* fakexcode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fakexcode.cpp; path = ../test/fakexcode.cpp; sourceTree = SOURCE_ROOT; }; 29B97316FDCFA39411CA2CEA /* main.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; }; 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; }; @@ -334,21 +284,6 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 0D096DFD0B707D1200A845D4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 0D096EA30B70884A00A845D4 /* libz.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 0DFF0B700B6BC6E600549488 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; 0DFF0C080B6BCEC200549488 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -368,7 +303,6 @@ 4D1125D809D72FD200E0657B /* libz.dylib in Frameworks */, A29E05800BE1283E000533F5 /* Growl.framework in Frameworks */, A2D0A0AB0D3E5929002D57CB /* Sparkle.framework in Frameworks */, - A20F46DC0EBB5E7A005B861B /* QuickTime.framework in Frameworks */, A20F47010EBB5EC2005B861B /* QTKit.framework in Frameworks */, A25962E10F15077500B3BF4E /* Quartz.framework in Frameworks */, ); @@ -380,10 +314,8 @@ 19C28FACFE9D520D11CA2CBB /* Products */ = { isa = PBXGroup; children = ( - 0DFF0B720B6BC6E600549488 /* libhb.a */, 0DFF0C0A0B6BCEC200549488 /* HandBrakeCLI */, 0D6E35760B6BD4F0005AABB3 /* HandBrake.app */, - 0D096DFF0B707D1200A845D4 /* libhb.dylib */, ); name = Products; sourceTree = "<group>"; @@ -495,7 +427,7 @@ 526FBC920B4CAA120064E04C /* HandBrakeCLI Sources */ = { isa = PBXGroup; children = ( - 0DF377970B7BF99A00115CB0 /* fakexcode.cpp */, + 27AC71840F5A0AF600053B83 /* fakexcode.cpp */, 526FBC760B4CA8F40064E04C /* test.c */, 59CBD2360BBB44DA004A3BE3 /* parsecsv.c */, ); @@ -512,7 +444,6 @@ A2BEA5FA0F2A1ED1001CE7A1 /* PictureController.mm */, A22C85EA0D05D35000C10E36 /* HBPresets.h */, A22C85EB0D05D35000C10E36 /* HBPresets.m */, - 0DFA5D060B8DD9040020BC09 /* HandBrake.plist */, 4D1FD381073D19CE00E46515 /* HBPreviewController.h */, 4D1FD382073D19CE00E46515 /* HBPreviewController.mm */, 4DF3C8CB052889CD00A80101 /* Controller.h */, @@ -578,21 +509,6 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 0D096DFB0B707D1200A845D4 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 0DFF0B6E0B6BC6E600549488 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 593034EB0BBA39A100172349 /* ChapterTitles.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 4DD93F8E082036E8008E1322 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -615,40 +531,6 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 0D096DFE0B707D1200A845D4 /* libhb dlib */ = { - isa = PBXNativeTarget; - buildConfigurationList = 0D096E650B707D5800A845D4 /* Build configuration list for PBXNativeTarget "libhb dlib" */; - buildPhases = ( - 0D096DFB0B707D1200A845D4 /* Headers */, - 0D096DFC0B707D1200A845D4 /* Sources */, - 0D096DFD0B707D1200A845D4 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "libhb dlib"; - productName = "libmediafork dlib"; - productReference = 0D096DFF0B707D1200A845D4 /* libhb.dylib */; - productType = "com.apple.product-type.library.dynamic"; - }; - 0DFF0B710B6BC6E600549488 /* libhb */ = { - isa = PBXNativeTarget; - buildConfigurationList = 0DFF0B730B6BC70400549488 /* Build configuration list for PBXNativeTarget "libhb" */; - buildPhases = ( - 0DFF0B6E0B6BC6E600549488 /* Headers */, - 0DFF0B6F0B6BC6E600549488 /* Sources */, - 0DFF0B700B6BC6E600549488 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = libhb; - productName = libmediafork; - productReference = 0DFF0B720B6BC6E600549488 /* libhb.a */; - productType = "com.apple.product-type.library.static"; - }; 0DFF0C090B6BCEC200549488 /* HandBrakeCLI */ = { isa = PBXNativeTarget; buildConfigurationList = 0DFF0C0C0B6BCEE000549488 /* Build configuration list for PBXNativeTarget "HandBrakeCLI" */; @@ -659,7 +541,7 @@ buildRules = ( ); dependencies = ( - 0D6E35910B6BD5FA005AABB3 /* PBXTargetDependency */, + 27ED6A920F58BEE900C905EE /* PBXTargetDependency */, ); name = HandBrakeCLI; productName = HandBrakeCLI; @@ -679,7 +561,7 @@ buildRules = ( ); dependencies = ( - 0DFF0BF40B6BCCB900549488 /* PBXTargetDependency */, + 27ED6AC70F58CE8400C905EE /* PBXTargetDependency */, ); name = HandBrake; productName = HandBrake; @@ -692,16 +574,16 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; buildConfigurationList = 4D4E7BC4087804870051572B /* Build configuration list for PBXProject "HandBrake" */; - compatibilityVersion = "Xcode 2.4"; + compatibilityVersion = "Xcode 3.1"; hasScannedForEncodings = 1; mainGroup = 29B97314FDCFA39411CA2CEA /* HandBrake */; projectDirPath = ""; projectRoot = ""; targets = ( 4DD93F8D082036E8008E1322 /* HandBrake */, - 0DFF0B710B6BC6E600549488 /* libhb */, 0DFF0C090B6BCEC200549488 /* HandBrakeCLI */, - 0D096DFE0B707D1200A845D4 /* libhb dlib */, + 27C7D1160F58B0AF00974730 /* make.libhb */, + 27C7D1020F58AEC400974730 /* configure */, ); }; /* End PBXProject section */ @@ -758,105 +640,46 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXSourcesBuildPhase section */ - 0D096DFC0B707D1200A845D4 /* Sources */ = { - isa = PBXSourcesBuildPhase; +/* Begin PBXShellScriptBuildPhase section */ + 27C7D1010F58AEC400974730 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( - A25289E70D87A2CB00461D5B /* enctheora.c in Sources */, - D4D49FED0C83355600F01215 /* lang.c in Sources */, - 0DFA5CD90B8DD4210020BC09 /* declpcm.c in Sources */, - 0DFA5CDA0B8DD4210020BC09 /* decmpeg2.c in Sources */, - 0DFA5CDB0B8DD4210020BC09 /* decsub.c in Sources */, - 0DFA5CDC0B8DD4210020BC09 /* demuxmpeg.c in Sources */, - 0DFA5CDD0B8DD4210020BC09 /* dvd.c in Sources */, - 0DFA5CDE0B8DD4210020BC09 /* encavcodec.c in Sources */, - 0DFA5CDF0B8DD4210020BC09 /* encfaac.c in Sources */, - 0DFA5CE00B8DD4210020BC09 /* enclame.c in Sources */, - 0DFA5CE10B8DD4210020BC09 /* encvorbis.c in Sources */, - 0DFA5CE20B8DD4210020BC09 /* encx264.c in Sources */, - 0DFA5CE30B8DD4210020BC09 /* encxvid.c in Sources */, - 0DFA5CE40B8DD4210020BC09 /* fifo.c in Sources */, - 0DFA5CE50B8DD4210020BC09 /* hb.c in Sources */, - 0DFA5CE70B8DD4210020BC09 /* muxavi.c in Sources */, - 0DFA5CE80B8DD4210020BC09 /* muxcommon.c in Sources */, - 0DFA5CE90B8DD4210020BC09 /* muxmp4.c in Sources */, - 0DFA5CEA0B8DD4210020BC09 /* muxogm.c in Sources */, - 0DFA5CEB0B8DD4210020BC09 /* ports.c in Sources */, - 0DFA5CEC0B8DD4210020BC09 /* reader.c in Sources */, - 0DFA5CED0B8DD4210020BC09 /* render.c in Sources */, - 0DFA5CEE0B8DD4210020BC09 /* scan.c in Sources */, - 0DFA5CEF0B8DD4210020BC09 /* sync.c in Sources */, - 0DFA5CF00B8DD4210020BC09 /* update.c in Sources */, - 0DFA5CF10B8DD4210020BC09 /* work.c in Sources */, - 0D096E010B707D3400A845D4 /* common.c in Sources */, - 0D096E020B707D3400A845D4 /* deca52.c in Sources */, - 0D096E030B707D3400A845D4 /* decavcodec.c in Sources */, - 5558B56A0BE3BADF00E15E27 /* decdca.c in Sources */, - EAA526940C3B25D200944FF2 /* stream.c in Sources */, - A273E09B0C57C1CD00493A45 /* muxmkv.c in Sources */, - FC8519540C59A02C0073812C /* denoise.c in Sources */, - FC8519550C59A02C0073812C /* deinterlace.c in Sources */, - FC8519560C59A02C0073812C /* deblock.c in Sources */, - FC8519570C59A02C0073812C /* detelecine.c in Sources */, - 749701100DC281BB009200D8 /* decomb.c in Sources */, - B453420B0EE3619C005D6F26 /* decmetadata.c in Sources */, + ); + inputPaths = ( + ); + outputPaths = ( + "$(EXTERNAL_BUILD)/GNUmakefile", ); runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "set -e\nmkdir -p $EXTERNAL_BUILD\ncd $EXTERNAL_BUILD\n\ncase \"$CONFIGURATION\" in\n *.i386)\n args=\"--arch=i386\"\n ;;\n *.x86_64)\n args=\"--arch=x86_64\"\n ;;\n *.ppc)\n args=\"--arch=ppc\"\n ;;\n *.ppc64)\n args=\"--arch=ppc64\"\n ;;\n *)\n args=\"\"\n ;;\nesac\n\nif [ -z \"$args\" ]; then\n exec $EXTERNAL_PROJECT/configure\nelse\n exec $EXTERNAL_PROJECT/configure \"$args\"\nfi"; + showEnvVarsInLog = 0; }; - 0DFF0B6F0B6BC6E600549488 /* Sources */ = { - isa = PBXSourcesBuildPhase; + 27C7D1170F58B0AF00974730 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( - 0DFA5CC00B8DD3FE0020BC09 /* declpcm.c in Sources */, - 0DFA5CC10B8DD3FE0020BC09 /* decmpeg2.c in Sources */, - 0DFA5CC20B8DD3FE0020BC09 /* decsub.c in Sources */, - 0DFA5CC30B8DD3FE0020BC09 /* demuxmpeg.c in Sources */, - 0DFA5CC40B8DD3FE0020BC09 /* dvd.c in Sources */, - 0DFA5CC50B8DD3FE0020BC09 /* encavcodec.c in Sources */, - 0DFA5CC60B8DD3FE0020BC09 /* encfaac.c in Sources */, - 0DFA5CC70B8DD3FE0020BC09 /* enclame.c in Sources */, - 0DFA5CC80B8DD3FE0020BC09 /* encvorbis.c in Sources */, - 0DFA5CC90B8DD3FE0020BC09 /* encx264.c in Sources */, - 0DFA5CCA0B8DD3FE0020BC09 /* encxvid.c in Sources */, - 0DFA5CCB0B8DD3FE0020BC09 /* fifo.c in Sources */, - 0DFA5CCC0B8DD3FE0020BC09 /* hb.c in Sources */, - 0DFA5CCE0B8DD3FE0020BC09 /* muxavi.c in Sources */, - 0DFA5CCF0B8DD3FE0020BC09 /* muxcommon.c in Sources */, - 0DFA5CD00B8DD3FE0020BC09 /* muxmp4.c in Sources */, - 0DFA5CD10B8DD3FE0020BC09 /* muxogm.c in Sources */, - 0DFA5CD20B8DD3FE0020BC09 /* ports.c in Sources */, - 0DFA5CD30B8DD3FE0020BC09 /* reader.c in Sources */, - 0DFA5CD40B8DD3FE0020BC09 /* render.c in Sources */, - 0DFA5CD50B8DD3FE0020BC09 /* scan.c in Sources */, - 0DFA5CD60B8DD3FE0020BC09 /* sync.c in Sources */, - 0DFA5CD70B8DD3FE0020BC09 /* update.c in Sources */, - 0DFA5CD80B8DD3FE0020BC09 /* work.c in Sources */, - 0DFF0B770B6BC72A00549488 /* common.c in Sources */, - 0DFF0B790B6BC72A00549488 /* deca52.c in Sources */, - 0DFF0B7A0B6BC72A00549488 /* decavcodec.c in Sources */, - 593034EC0BBA39A100172349 /* ChapterTitles.m in Sources */, - 5558B5690BE3BADF00E15E27 /* decdca.c in Sources */, - EAA526930C3B25D200944FF2 /* stream.c in Sources */, - A273E09A0C57C1CC00493A45 /* muxmkv.c in Sources */, - FC8519500C59A02C0073812C /* denoise.c in Sources */, - FC8519510C59A02C0073812C /* deinterlace.c in Sources */, - FC8519520C59A02C0073812C /* deblock.c in Sources */, - FC8519530C59A02C0073812C /* detelecine.c in Sources */, - B48359A80C82960500E04440 /* lang.c in Sources */, - A25289E60D87A27D00461D5B /* enctheora.c in Sources */, - 7497010F0DC281BB009200D8 /* decomb.c in Sources */, - B453420A0EE3619C005D6F26 /* decmetadata.c in Sources */, + ); + inputPaths = ( + ); + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "make -C $EXTERNAL_BUILD macosx.fromxcode"; + showEnvVarsInLog = 0; }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ 0DFF0C070B6BCEC200549488 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 0DFF0C100B6BCEE800549488 /* test.c in Sources */, - 0DF377980B7BF99A00115CB0 /* fakexcode.cpp in Sources */, 59CBD2370BBB44DA004A3BE3 /* parsecsv.c in Sources */, + 27AC71850F5A0AF600053B83 /* fakexcode.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -884,15 +707,20 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 0D6E35910B6BD5FA005AABB3 /* PBXTargetDependency */ = { + 27ED6A920F58BEE900C905EE /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 0DFF0B710B6BC6E600549488 /* libhb */; - targetProxy = 0D6E35900B6BD5FA005AABB3 /* PBXContainerItemProxy */; + target = 27C7D1160F58B0AF00974730 /* make.libhb */; + targetProxy = 27ED6A910F58BEE900C905EE /* PBXContainerItemProxy */; }; - 0DFF0BF40B6BCCB900549488 /* PBXTargetDependency */ = { + 27ED6AB70F58CA0A00C905EE /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 0DFF0B710B6BC6E600549488 /* libhb */; - targetProxy = 0DFF0BF30B6BCCB900549488 /* PBXContainerItemProxy */; + target = 27C7D1020F58AEC400974730 /* configure */; + targetProxy = 27ED6AB60F58CA0A00C905EE /* PBXContainerItemProxy */; + }; + 27ED6AC70F58CE8400C905EE /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 27C7D1160F58B0AF00974730 /* make.libhb */; + targetProxy = 27ED6AC60F58CE8400C905EE /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -972,220 +800,193 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 0D096E660B707D5800A845D4 /* Development */ = { + 0DFF0C0D0B6BCEE000549488 /* debug */ = { isa = XCBuildConfiguration; buildSettings = { - CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/../libhb"; - COPY_PHASE_STRIP = NO; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - EXECUTABLE_PREFIX = lib; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = s; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ""; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../contrib/include"; - INSTALL_PATH = /usr/local/lib; - LIBRARY_SEARCH_PATHS = ""; - MACOSX_DEPLOYMENT_TARGET = 10.5; - OTHER_CFLAGS = ( - "-D__LIBHB__", - "-DSYS_DARWIN", - "-DUSE_PTHREAD", + INSTALL_PATH = /usr/local/bin; + OTHER_LDFLAGS = ( + "$(EXTERNAL_BUILD)/libhb/libhb.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp4v2.a", + "$(EXTERNAL_BUILD)/contrib/lib/liba52.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavformat.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavutil.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaac.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp3lame.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmpeg2.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbis.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbisenc.a", + "$(EXTERNAL_BUILD)/contrib/lib/libogg.a", + "$(EXTERNAL_BUILD)/contrib/lib/libsamplerate.a", + "$(EXTERNAL_BUILD)/contrib/lib/libx264.a", + "$(EXTERNAL_BUILD)/contrib/lib/libxvidcore.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdca.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmkv.a", + "$(EXTERNAL_BUILD)/contrib/lib/libswscale.a", + "$(EXTERNAL_BUILD)/contrib/lib/libtheora.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaad.a", + "-lbz2", + "-lz", ); + PRODUCT_NAME = HandBrakeCLI; + }; + name = debug; + }; + 0DFF0C0E0B6BCEE000549488 /* standard */ = { + isa = XCBuildConfiguration; + buildSettings = { + INSTALL_PATH = /usr/local/bin; OTHER_LDFLAGS = ( - ../contrib/lib/libmp4v2.a, - ../contrib/lib/liba52.a, - ../contrib/lib/libavformat.a, - ../contrib/lib/libavcodec.a, - ../contrib/lib/libavutil.a, - ../contrib/lib/libdvdread.a, - ../contrib/lib/libfaac.a, - ../contrib/lib/libmp3lame.a, - ../contrib/lib/libmpeg2.a, - ../contrib/lib/libvorbis.a, - ../contrib/lib/libvorbisenc.a, - ../contrib/lib/libogg.a, - ../contrib/lib/libsamplerate.a, - ../contrib/lib/libx264.a, - ../contrib/lib/libxvidcore.a, - ../contrib/lib/libdca.a, - ../contrib/lib/libmkv.a, - ../contrib/lib/libtheora.a, - ../contrib/lib/libswscale.a, - ../contrib/lib/libfaad.a, + "$(EXTERNAL_BUILD)/libhb/libhb.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp4v2.a", + "$(EXTERNAL_BUILD)/contrib/lib/liba52.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavformat.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavutil.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaac.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp3lame.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmpeg2.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbis.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbisenc.a", + "$(EXTERNAL_BUILD)/contrib/lib/libogg.a", + "$(EXTERNAL_BUILD)/contrib/lib/libsamplerate.a", + "$(EXTERNAL_BUILD)/contrib/lib/libx264.a", + "$(EXTERNAL_BUILD)/contrib/lib/libxvidcore.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdca.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmkv.a", + "$(EXTERNAL_BUILD)/contrib/lib/libswscale.a", + "$(EXTERNAL_BUILD)/contrib/lib/libtheora.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaad.a", "-lbz2", - "-ldl", - "-flat_namespace", - "-read_only_relocs", - suppress, + "-lz", ); - PER_ARCH_CFLAGS_ppc = "-DWORDS_BIGENDIAN"; - PREBINDING = NO; - PRODUCT_NAME = hb; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; - SEPARATE_STRIP = YES; + PRODUCT_NAME = HandBrakeCLI; + }; + name = standard; + }; + 27C7D1030F58AEC500974730 /* debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + PRODUCT_NAME = configure; + }; + name = debug; + }; + 27C7D1040F58AEC500974730 /* standard */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + PRODUCT_NAME = configure; ZERO_LINK = NO; }; - name = Development; + name = standard; + }; + 27C7D1190F58B0AF00974730 /* debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + PRODUCT_NAME = configure; + }; + name = debug; }; - 0D096E670B707D5800A845D4 /* Deployment */ = { + 27C7D11A0F58B0AF00974730 /* standard */ = { isa = XCBuildConfiguration; buildSettings = { - CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/../libhb"; COPY_PHASE_STRIP = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - EXECUTABLE_PREFIX = lib; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_ENABLE_FIX_AND_CONTINUE = NO; + PRODUCT_NAME = configure; + ZERO_LINK = NO; + }; + name = standard; + }; + 27ED6ADB0F58D7F100C905EE /* standard.i386 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = i386; + CONFIGURATION_BUILD_DIR = "$(EXTERNAL_BUILD)"; + CONFIGURATION_TEMP_DIR = "$(SYMROOT)"; + EXTERNAL_BUILD = "$(EXTERNAL_PROJECT)/build.$(CONFIGURATION)"; + EXTERNAL_PROJECT = ..; + GCC_DYNAMIC_NO_PIC = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = s; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ""; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../contrib/include"; - INSTALL_PATH = /usr/local/lib; - LIBRARY_SEARCH_PATHS = ""; - MACOSX_DEPLOYMENT_TARGET = 10.5; - OTHER_CFLAGS = ( - "-D__LIBHB__", - "-DSYS_DARWIN", - "-DUSE_PTHREAD", - ); - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - OTHER_LDFLAGS = ( - ../contrib/lib/libmp4v2.a, - ../contrib/lib/liba52.a, - ../contrib/lib/libavformat.a, - ../contrib/lib/libavcodec.a, - ../contrib/lib/libavutil.a, - ../contrib/lib/libdvdread.a, - ../contrib/lib/libfaac.a, - ../contrib/lib/libmp3lame.a, - ../contrib/lib/libmpeg2.a, - ../contrib/lib/libvorbis.a, - ../contrib/lib/libvorbisenc.a, - ../contrib/lib/libogg.a, - ../contrib/lib/libsamplerate.a, - ../contrib/lib/libx264.a, - ../contrib/lib/libxvidcore.a, - ../contrib/lib/libdca.a, - ../contrib/lib/libmkv.a, - ../contrib/lib/libtheora.a, - ../contrib/lib/libswscale.a, - ../contrib/lib/libfaad.a, - "-lbz2", - "-ldl", - "-flat_namespace", - "-read_only_relocs", - suppress, - ); - PER_ARCH_CFLAGS_ppc = "-DWORDS_BIGENDIAN"; + HEADER_SEARCH_PATHS = "$(EXTERNAL_BUILD)/libhb"; + OBJROOT = "$(EXTERNAL_BUILD)/macosx"; PREBINDING = NO; - PRODUCT_NAME = hb; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; - SEPARATE_STRIP = YES; + SDKROOT = macosx10.5; + SHARED_PRECOMPS_DIR = "$(SYMROOT)/cache"; + SYMROOT = "$(EXTERNAL_BUILD)/macosx"; + }; + name = standard.i386; + }; + 27ED6ADC0F58D7F100C905EE /* standard.i386 */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + PRODUCT_NAME = configure; ZERO_LINK = NO; }; - name = Deployment; + name = standard.i386; }; - 0D096E690B707D5800A845D4 /* UB */ = { + 27ED6ADD0F58D7F100C905EE /* standard.i386 */ = { isa = XCBuildConfiguration; buildSettings = { - CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/../libhb"; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - EXECUTABLE_PREFIX = lib; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_INLINES_ARE_PRIVATE_EXTERN = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = s; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ""; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../contrib/include"; - INSTALL_PATH = /usr/local/lib; - LIBRARY_SEARCH_PATHS = ""; - MACOSX_DEPLOYMENT_TARGET = 10.5; - OTHER_CFLAGS = ( - "-D__LIBHB__", - "-DSYS_DARWIN", - "-DUSE_PTHREAD", - ); - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - OTHER_LDFLAGS = ( - ../contrib/lib/libmp4v2.a, - ../contrib/lib/liba52.a, - ../contrib/lib/libavformat.a, - ../contrib/lib/libavcodec.a, - ../contrib/lib/libavutil.a, - ../contrib/lib/libdvdread.a, - ../contrib/lib/libfaac.a, - ../contrib/lib/libmp3lame.a, - ../contrib/lib/libmpeg2.a, - ../contrib/lib/libvorbis.a, - ../contrib/lib/libvorbisenc.a, - ../contrib/lib/libogg.a, - ../contrib/lib/libsamplerate.a, - ../contrib/lib/libx264.a, - ../contrib/lib/libxvidcore.a, - ../contrib/lib/libdca.a, - ../contrib/lib/libmkv.a, - ../contrib/lib/libtheora.a, - ../contrib/lib/libswscale.a, - ../contrib/lib/libfaad.a, - "-lbz2", - "-ldl", - "-flat_namespace", - "-read_only_relocs", - suppress, - ); - PER_ARCH_CFLAGS_ppc = "-DWORDS_BIGENDIAN"; - PREBINDING = NO; - PRODUCT_NAME = hb; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; - SEPARATE_STRIP = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + PRODUCT_NAME = configure; ZERO_LINK = NO; }; - name = UB; + name = standard.i386; }; - 0D88F56B0B6CDCD400F81F26 /* UB */ = { + 27ED6ADE0F58D7F100C905EE /* standard.i386 */ = { isa = XCBuildConfiguration; buildSettings = { - CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/../libhb"; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = s; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ""; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../contrib/include"; - INSTALL_PATH = /usr/local/lib; - MACOSX_DEPLOYMENT_TARGET = 10.3; - OTHER_CFLAGS = ( - "-D__LIBHB__", - "-DSYS_DARWIN", - "-DUSE_PTHREAD", + INSTALL_PATH = /usr/local/bin; + OTHER_LDFLAGS = ( + "$(EXTERNAL_BUILD)/libhb/libhb.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp4v2.a", + "$(EXTERNAL_BUILD)/contrib/lib/liba52.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavformat.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavutil.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaac.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp3lame.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmpeg2.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbis.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbisenc.a", + "$(EXTERNAL_BUILD)/contrib/lib/libogg.a", + "$(EXTERNAL_BUILD)/contrib/lib/libsamplerate.a", + "$(EXTERNAL_BUILD)/contrib/lib/libx264.a", + "$(EXTERNAL_BUILD)/contrib/lib/libxvidcore.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdca.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmkv.a", + "$(EXTERNAL_BUILD)/contrib/lib/libswscale.a", + "$(EXTERNAL_BUILD)/contrib/lib/libtheora.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaad.a", + "-lbz2", + "-lz", ); - OTHER_LDFLAGS = ""; - PER_ARCH_CFLAGS_ppc = "-DWORDS_BIGENDIAN"; - PREBINDING = NO; - PRODUCT_NAME = hb; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; - ZERO_LINK = NO; + PRODUCT_NAME = HandBrakeCLI; }; - name = UB; + name = standard.i386; }; - 0D88F56C0B6CDCD400F81F26 /* UB */ = { + 27ED6ADF0F58D7F100C905EE /* standard.i386 */ = { isa = XCBuildConfiguration; buildSettings = { APPCAST_URL = ""; - CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/.."; - CURRENT_PROJECT_VERSION = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", @@ -1193,45 +994,38 @@ ); FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\""; FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)\""; - GCC_OPTIMIZATION_LEVEL = s; - GCC_TREAT_WARNINGS_AS_ERRORS = NO; - HEADER_SEARCH_PATHS = ( - ../libhb, - ../contrib/include, - ); IBC_PLUGINS = /System/Library/Frameworks/QTKit.framework/Resources/QTKitIBPlugin.ibplugin; IBC_PLUGIN_SEARCH_PATHS = /System/Library/Frameworks/QTKit.framework/Resources; - INFOPLIST_FILE = HandBrake.plist; - LIBRARY_SEARCH_PATHS = ""; - MACOSX_DEPLOYMENT_TARGET = 10.5; - OTHER_CFLAGS = ""; + INFOPLIST_FILE = Info.plist; + INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; + INFOPLIST_PREFIX_HEADER = "$(EXTERNAL_BUILD)/macosx/Info.h"; + INFOPLIST_PREPROCESS = YES; OTHER_LDFLAGS = ( - ../libhb/libhb.a, - ../contrib/lib/libmp4v2.a, - ../contrib/lib/liba52.a, - ../contrib/lib/libavformat.a, - ../contrib/lib/libavcodec.a, - ../contrib/lib/libavutil.a, - ../contrib/lib/libdvdread.a, - ../contrib/lib/libfaac.a, - ../contrib/lib/libmp3lame.a, - ../contrib/lib/libmpeg2.a, - ../contrib/lib/libvorbis.a, - ../contrib/lib/libvorbisenc.a, - ../contrib/lib/libogg.a, - ../contrib/lib/libsamplerate.a, - ../contrib/lib/libx264.a, - ../contrib/lib/libxvidcore.a, - ../contrib/lib/libdca.a, - ../contrib/lib/libmkv.a, - ../contrib/lib/libswscale.a, - ../contrib/lib/libtheora.a, - ../contrib/lib/libfaad.a, + "$(EXTERNAL_BUILD)/libhb/libhb.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp4v2.a", + "$(EXTERNAL_BUILD)/contrib/lib/liba52.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavformat.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavutil.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaac.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp3lame.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmpeg2.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbis.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbisenc.a", + "$(EXTERNAL_BUILD)/contrib/lib/libogg.a", + "$(EXTERNAL_BUILD)/contrib/lib/libsamplerate.a", + "$(EXTERNAL_BUILD)/contrib/lib/libx264.a", + "$(EXTERNAL_BUILD)/contrib/lib/libxvidcore.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdca.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmkv.a", + "$(EXTERNAL_BUILD)/contrib/lib/libswscale.a", + "$(EXTERNAL_BUILD)/contrib/lib/libtheora.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaad.a", "-lbz2", + "-lz", ); PRODUCT_NAME = HandBrake; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; - SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", @@ -1239,222 +1033,393 @@ ); WRAPPER_EXTENSION = app; }; - name = UB; + name = standard.i386; }; - 0D88F56E0B6CDCD400F81F26 /* UB */ = { + 27ED6AE30F58D8F200C905EE /* standard.ppc */ = { isa = XCBuildConfiguration; buildSettings = { - CONFIGURATION_BUILD_DIR = ..; - GCC_ENABLE_FIX_AND_CONTINUE = YES; + ARCHS = ppc; + CONFIGURATION_BUILD_DIR = "$(EXTERNAL_BUILD)"; + CONFIGURATION_TEMP_DIR = "$(SYMROOT)"; + EXTERNAL_BUILD = "$(EXTERNAL_PROJECT)/build.$(CONFIGURATION)"; + EXTERNAL_PROJECT = ..; + GCC_DYNAMIC_NO_PIC = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = s; - HEADER_SEARCH_PATHS = ../libhb; + HEADER_SEARCH_PATHS = "$(EXTERNAL_BUILD)/libhb"; + OBJROOT = "$(EXTERNAL_BUILD)/macosx"; + PREBINDING = NO; + SDKROOT = macosx10.5; + SHARED_PRECOMPS_DIR = "$(SYMROOT)/cache"; + SYMROOT = "$(EXTERNAL_BUILD)/macosx"; + }; + name = standard.ppc; + }; + 27ED6AE40F58D8F200C905EE /* standard.ppc */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + PRODUCT_NAME = configure; + ZERO_LINK = NO; + }; + name = standard.ppc; + }; + 27ED6AE50F58D8F200C905EE /* standard.ppc */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + PRODUCT_NAME = configure; + ZERO_LINK = NO; + }; + name = standard.ppc; + }; + 27ED6AE60F58D8F200C905EE /* standard.ppc */ = { + isa = XCBuildConfiguration; + buildSettings = { INSTALL_PATH = /usr/local/bin; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = ""; OTHER_LDFLAGS = ( - ../libhb/libhb.a, - ../contrib/lib/libmp4v2.a, - ../contrib/lib/liba52.a, - ../contrib/lib/libavformat.a, - ../contrib/lib/libavcodec.a, - ../contrib/lib/libavutil.a, - ../contrib/lib/libdvdread.a, - ../contrib/lib/libfaac.a, - ../contrib/lib/libmp3lame.a, - ../contrib/lib/libmpeg2.a, - ../contrib/lib/libvorbis.a, - ../contrib/lib/libvorbisenc.a, - ../contrib/lib/libogg.a, - ../contrib/lib/libsamplerate.a, - ../contrib/lib/libx264.a, - ../contrib/lib/libxvidcore.a, - "-lz", - ../contrib/lib/libdca.a, - ../contrib/lib/libmkv.a, - ../contrib/lib/libswscale.a, - ../contrib/lib/libtheora.a, - ../contrib/lib/libfaad.a, + "$(EXTERNAL_BUILD)/libhb/libhb.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp4v2.a", + "$(EXTERNAL_BUILD)/contrib/lib/liba52.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavformat.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavutil.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaac.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp3lame.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmpeg2.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbis.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbisenc.a", + "$(EXTERNAL_BUILD)/contrib/lib/libogg.a", + "$(EXTERNAL_BUILD)/contrib/lib/libsamplerate.a", + "$(EXTERNAL_BUILD)/contrib/lib/libx264.a", + "$(EXTERNAL_BUILD)/contrib/lib/libxvidcore.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdca.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmkv.a", + "$(EXTERNAL_BUILD)/contrib/lib/libswscale.a", + "$(EXTERNAL_BUILD)/contrib/lib/libtheora.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaad.a", "-lbz2", + "-lz", ); - PREBINDING = NO; PRODUCT_NAME = HandBrakeCLI; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; - ZERO_LINK = NO; }; - name = UB; + name = standard.ppc; }; - 0D88F56F0B6CDCD400F81F26 /* UB */ = { + 27ED6AE70F58D8F200C905EE /* standard.ppc */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - ppc, - i386, + APPCAST_URL = ""; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)", ); - GCC_MODEL_TUNING = G5; - GCC_PREPROCESSOR_DEFINITIONS = "JOB_GROUPS=1"; - IBC_NOTICES = NO; - MACOSX_DEPLOYMENT_TARGET = 10.5; - OTHER_CFLAGS = ""; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\""; + FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)\""; + IBC_PLUGINS = /System/Library/Frameworks/QTKit.framework/Resources/QTKitIBPlugin.ibplugin; + IBC_PLUGIN_SEARCH_PATHS = /System/Library/Frameworks/QTKit.framework/Resources; + INFOPLIST_FILE = Info.plist; + INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; + INFOPLIST_PREFIX_HEADER = "$(EXTERNAL_BUILD)/macosx/Info.h"; + INFOPLIST_PREPROCESS = YES; + OTHER_LDFLAGS = ( + "$(EXTERNAL_BUILD)/libhb/libhb.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp4v2.a", + "$(EXTERNAL_BUILD)/contrib/lib/liba52.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavformat.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavutil.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaac.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp3lame.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmpeg2.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbis.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbisenc.a", + "$(EXTERNAL_BUILD)/contrib/lib/libogg.a", + "$(EXTERNAL_BUILD)/contrib/lib/libsamplerate.a", + "$(EXTERNAL_BUILD)/contrib/lib/libx264.a", + "$(EXTERNAL_BUILD)/contrib/lib/libxvidcore.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdca.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmkv.a", + "$(EXTERNAL_BUILD)/contrib/lib/libswscale.a", + "$(EXTERNAL_BUILD)/contrib/lib/libtheora.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaad.a", + "-lbz2", + "-lz", + ); + PRODUCT_NAME = HandBrake; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = app; }; - name = UB; + name = standard.ppc; }; - 0DFF0B740B6BC70400549488 /* Development */ = { + 27ED6AFF0F58DE7400C905EE /* standard.x86_64 */ = { isa = XCBuildConfiguration; buildSettings = { - CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/../libhb"; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + ARCHS = x86_64; + CONFIGURATION_BUILD_DIR = "$(EXTERNAL_BUILD)"; + CONFIGURATION_TEMP_DIR = "$(SYMROOT)"; + EXTERNAL_BUILD = "$(EXTERNAL_PROJECT)/build.$(CONFIGURATION)"; + EXTERNAL_PROJECT = ..; + GCC_DYNAMIC_NO_PIC = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ""; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../contrib/include"; - INSTALL_PATH = /usr/local/lib; - MACOSX_DEPLOYMENT_TARGET = 10.3; - OTHER_CFLAGS = ( - "-D__LIBHB__", - "-DSYS_DARWIN", - "-DUSE_PTHREAD", - ); - OTHER_LDFLAGS = ""; - PER_ARCH_CFLAGS_ppc = "-DWORDS_BIGENDIAN"; + HEADER_SEARCH_PATHS = "$(EXTERNAL_BUILD)/libhb"; + OBJROOT = "$(EXTERNAL_BUILD)/macosx"; PREBINDING = NO; - PRODUCT_NAME = hb; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + SDKROOT = macosx10.5; + SHARED_PRECOMPS_DIR = "$(SYMROOT)/cache"; + SYMROOT = "$(EXTERNAL_BUILD)/macosx"; + }; + name = standard.x86_64; + }; + 27ED6B000F58DE7400C905EE /* standard.x86_64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + PRODUCT_NAME = configure; ZERO_LINK = NO; }; - name = Development; + name = standard.x86_64; }; - 0DFF0B750B6BC70400549488 /* Deployment */ = { + 27ED6B010F58DE7400C905EE /* standard.x86_64 */ = { isa = XCBuildConfiguration; buildSettings = { - CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/../libhb"; COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ""; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../contrib/include"; - INSTALL_PATH = /usr/local/lib; - MACOSX_DEPLOYMENT_TARGET = 10.3; - OTHER_CFLAGS = ( - "-D__LIBHB__", - "-DSYS_DARWIN", - "-DUSE_PTHREAD", - ); - OTHER_LDFLAGS = ""; - PER_ARCH_CFLAGS_ppc = "-DWORDS_BIGENDIAN"; - PREBINDING = NO; - PRODUCT_NAME = hb; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + PRODUCT_NAME = configure; ZERO_LINK = NO; }; - name = Deployment; + name = standard.x86_64; }; - 0DFF0C0D0B6BCEE000549488 /* Development */ = { + 27ED6B020F58DE7400C905EE /* standard.x86_64 */ = { isa = XCBuildConfiguration; buildSettings = { - CONFIGURATION_BUILD_DIR = ..; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = s; - HEADER_SEARCH_PATHS = ../libhb; INSTALL_PATH = /usr/local/bin; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = ""; OTHER_LDFLAGS = ( - ../libhb/libhb.a, - ../contrib/lib/libmp4v2.a, - ../contrib/lib/liba52.a, - ../contrib/lib/libavformat.a, - ../contrib/lib/libavcodec.a, - ../contrib/lib/libavutil.a, - ../contrib/lib/libdvdread.a, - ../contrib/lib/libfaac.a, - ../contrib/lib/libmp3lame.a, - ../contrib/lib/libmpeg2.a, - ../contrib/lib/libvorbis.a, - ../contrib/lib/libvorbisenc.a, - ../contrib/lib/libogg.a, - ../contrib/lib/libsamplerate.a, - ../contrib/lib/libx264.a, - ../contrib/lib/libxvidcore.a, + "$(EXTERNAL_BUILD)/libhb/libhb.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp4v2.a", + "$(EXTERNAL_BUILD)/contrib/lib/liba52.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavformat.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavutil.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaac.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp3lame.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmpeg2.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbis.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbisenc.a", + "$(EXTERNAL_BUILD)/contrib/lib/libogg.a", + "$(EXTERNAL_BUILD)/contrib/lib/libsamplerate.a", + "$(EXTERNAL_BUILD)/contrib/lib/libx264.a", + "$(EXTERNAL_BUILD)/contrib/lib/libxvidcore.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdca.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmkv.a", + "$(EXTERNAL_BUILD)/contrib/lib/libswscale.a", + "$(EXTERNAL_BUILD)/contrib/lib/libtheora.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaad.a", + "-lbz2", "-lz", - ../contrib/lib/libdca.a, - ../contrib/lib/libmkv.a, - ../contrib/lib/libswscale.a, - ../contrib/lib/libtheora.a, - ../contrib/lib/libfaad.a, + ); + PRODUCT_NAME = HandBrakeCLI; + }; + name = standard.x86_64; + }; + 27ED6B030F58DE7400C905EE /* standard.x86_64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPCAST_URL = ""; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)", + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\""; + FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)\""; + IBC_PLUGINS = /System/Library/Frameworks/QTKit.framework/Resources/QTKitIBPlugin.ibplugin; + IBC_PLUGIN_SEARCH_PATHS = /System/Library/Frameworks/QTKit.framework/Resources; + INFOPLIST_FILE = Info.plist; + INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; + INFOPLIST_PREFIX_HEADER = "$(EXTERNAL_BUILD)/macosx/Info.h"; + INFOPLIST_PREPROCESS = YES; + OTHER_LDFLAGS = ( + "$(EXTERNAL_BUILD)/libhb/libhb.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp4v2.a", + "$(EXTERNAL_BUILD)/contrib/lib/liba52.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavformat.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavutil.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaac.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp3lame.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmpeg2.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbis.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbisenc.a", + "$(EXTERNAL_BUILD)/contrib/lib/libogg.a", + "$(EXTERNAL_BUILD)/contrib/lib/libsamplerate.a", + "$(EXTERNAL_BUILD)/contrib/lib/libx264.a", + "$(EXTERNAL_BUILD)/contrib/lib/libxvidcore.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdca.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmkv.a", + "$(EXTERNAL_BUILD)/contrib/lib/libswscale.a", + "$(EXTERNAL_BUILD)/contrib/lib/libtheora.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaad.a", "-lbz2", + "-lz", ); + PRODUCT_NAME = HandBrake; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = app; + }; + name = standard.x86_64; + }; + 27ED6B040F58DE7600C905EE /* standard.ppc64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ppc64; + CONFIGURATION_BUILD_DIR = "$(EXTERNAL_BUILD)"; + CONFIGURATION_TEMP_DIR = "$(SYMROOT)"; + EXTERNAL_BUILD = "$(EXTERNAL_PROJECT)/build.$(CONFIGURATION)"; + EXTERNAL_PROJECT = ..; + GCC_DYNAMIC_NO_PIC = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + HEADER_SEARCH_PATHS = "$(EXTERNAL_BUILD)/libhb"; + OBJROOT = "$(EXTERNAL_BUILD)/macosx"; PREBINDING = NO; - PRODUCT_NAME = HandBrakeCLI; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + SDKROOT = macosx10.5; + SHARED_PRECOMPS_DIR = "$(SYMROOT)/cache"; + SYMROOT = "$(EXTERNAL_BUILD)/macosx"; + }; + name = standard.ppc64; + }; + 27ED6B050F58DE7600C905EE /* standard.ppc64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + PRODUCT_NAME = configure; ZERO_LINK = NO; }; - name = Development; + name = standard.ppc64; }; - 0DFF0C0E0B6BCEE000549488 /* Deployment */ = { + 27ED6B060F58DE7600C905EE /* standard.ppc64 */ = { isa = XCBuildConfiguration; buildSettings = { - CONFIGURATION_BUILD_DIR = ..; COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = s; - HEADER_SEARCH_PATHS = ../libhb; + PRODUCT_NAME = configure; + ZERO_LINK = NO; + }; + name = standard.ppc64; + }; + 27ED6B070F58DE7600C905EE /* standard.ppc64 */ = { + isa = XCBuildConfiguration; + buildSettings = { INSTALL_PATH = /usr/local/bin; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = ""; OTHER_LDFLAGS = ( - ../libhb/libhb.a, - ../contrib/lib/libmp4v2.a, - ../contrib/lib/liba52.a, - ../contrib/lib/libavformat.a, - ../contrib/lib/libavcodec.a, - ../contrib/lib/libavutil.a, - ../contrib/lib/libdvdread.a, - ../contrib/lib/libfaac.a, - ../contrib/lib/libmp3lame.a, - ../contrib/lib/libmpeg2.a, - ../contrib/lib/libvorbis.a, - ../contrib/lib/libvorbisenc.a, - ../contrib/lib/libogg.a, - ../contrib/lib/libsamplerate.a, - ../contrib/lib/libx264.a, - ../contrib/lib/libxvidcore.a, - "-lz", - ../contrib/lib/libdca.a, - ../contrib/lib/libmkv.a, - ../contrib/lib/libswscale.a, - ../contrib/lib/libtheora.a, - ../contrib/lib/libfaad.a, + "$(EXTERNAL_BUILD)/libhb/libhb.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp4v2.a", + "$(EXTERNAL_BUILD)/contrib/lib/liba52.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavformat.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavutil.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaac.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp3lame.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmpeg2.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbis.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbisenc.a", + "$(EXTERNAL_BUILD)/contrib/lib/libogg.a", + "$(EXTERNAL_BUILD)/contrib/lib/libsamplerate.a", + "$(EXTERNAL_BUILD)/contrib/lib/libx264.a", + "$(EXTERNAL_BUILD)/contrib/lib/libxvidcore.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdca.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmkv.a", + "$(EXTERNAL_BUILD)/contrib/lib/libswscale.a", + "$(EXTERNAL_BUILD)/contrib/lib/libtheora.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaad.a", "-lbz2", + "-lz", ); - PREBINDING = NO; PRODUCT_NAME = HandBrakeCLI; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; - ZERO_LINK = NO; }; - name = Deployment; + name = standard.ppc64; }; - 4D4E7BC1087804870051572B /* Development */ = { + 27ED6B080F58DE7600C905EE /* standard.ppc64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPCAST_URL = ""; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)", + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\""; + FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)\""; + IBC_PLUGINS = /System/Library/Frameworks/QTKit.framework/Resources/QTKitIBPlugin.ibplugin; + IBC_PLUGIN_SEARCH_PATHS = /System/Library/Frameworks/QTKit.framework/Resources; + INFOPLIST_FILE = Info.plist; + INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; + INFOPLIST_PREFIX_HEADER = "$(EXTERNAL_BUILD)/macosx/Info.h"; + INFOPLIST_PREPROCESS = YES; + OTHER_LDFLAGS = ( + "$(EXTERNAL_BUILD)/libhb/libhb.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp4v2.a", + "$(EXTERNAL_BUILD)/contrib/lib/liba52.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavformat.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavutil.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaac.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp3lame.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmpeg2.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbis.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbisenc.a", + "$(EXTERNAL_BUILD)/contrib/lib/libogg.a", + "$(EXTERNAL_BUILD)/contrib/lib/libsamplerate.a", + "$(EXTERNAL_BUILD)/contrib/lib/libx264.a", + "$(EXTERNAL_BUILD)/contrib/lib/libxvidcore.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdca.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmkv.a", + "$(EXTERNAL_BUILD)/contrib/lib/libswscale.a", + "$(EXTERNAL_BUILD)/contrib/lib/libtheora.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaad.a", + "-lbz2", + "-lz", + ); + PRODUCT_NAME = HandBrake; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + WRAPPER_EXTENSION = app; + }; + name = standard.ppc64; + }; + 4D4E7BC1087804870051572B /* debug */ = { isa = XCBuildConfiguration; buildSettings = { APPCAST_URL = ""; - CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/.."; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", @@ -1463,65 +1428,51 @@ FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\""; FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)\""; FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)\""; - GCC_DYNAMIC_NO_PIC = YES; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_TREAT_WARNINGS_AS_ERRORS = NO; - HEADER_SEARCH_PATHS = ( - ../libhb, - ../contrib/include, - ); IBC_PLUGINS = /System/Library/Frameworks/QTKit.framework/Resources/QTKitIBPlugin.ibplugin; IBC_PLUGIN_SEARCH_PATHS = /System/Library/Frameworks/QTKit.framework/Resources; - INFOPLIST_FILE = HandBrake.plist; - INFOPLIST_PREPROCESS = NO; - LIBRARY_SEARCH_PATHS = ""; - MACOSX_DEPLOYMENT_TARGET = 10.5; - OTHER_CFLAGS = ""; + INFOPLIST_FILE = Info.plist; + INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; + INFOPLIST_PREFIX_HEADER = "$(EXTERNAL_BUILD)/macosx/Info.h"; + INFOPLIST_PREPROCESS = YES; OTHER_LDFLAGS = ( - ../libhb/libhb.a, - ../contrib/lib/libmp4v2.a, - ../contrib/lib/liba52.a, - ../contrib/lib/libavformat.a, - ../contrib/lib/libavcodec.a, - ../contrib/lib/libavutil.a, - ../contrib/lib/libdvdread.a, - ../contrib/lib/libfaac.a, - ../contrib/lib/libmp3lame.a, - ../contrib/lib/libmpeg2.a, - ../contrib/lib/libvorbis.a, - ../contrib/lib/libvorbisenc.a, - ../contrib/lib/libogg.a, - ../contrib/lib/libsamplerate.a, - ../contrib/lib/libx264.a, - ../contrib/lib/libxvidcore.a, - ../contrib/lib/libdca.a, - ../contrib/lib/libmkv.a, - ../contrib/lib/libswscale.a, - ../contrib/lib/libtheora.a, - ../contrib/lib/libfaad.a, + "$(EXTERNAL_BUILD)/libhb/libhb.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp4v2.a", + "$(EXTERNAL_BUILD)/contrib/lib/liba52.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavformat.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavutil.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaac.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp3lame.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmpeg2.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbis.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbisenc.a", + "$(EXTERNAL_BUILD)/contrib/lib/libogg.a", + "$(EXTERNAL_BUILD)/contrib/lib/libsamplerate.a", + "$(EXTERNAL_BUILD)/contrib/lib/libx264.a", + "$(EXTERNAL_BUILD)/contrib/lib/libxvidcore.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdca.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmkv.a", + "$(EXTERNAL_BUILD)/contrib/lib/libswscale.a", + "$(EXTERNAL_BUILD)/contrib/lib/libtheora.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaad.a", "-lbz2", + "-lz", ); PRODUCT_NAME = HandBrake; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; - SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); WRAPPER_EXTENSION = app; - ZERO_LINK = NO; }; - name = Development; + name = debug; }; - 4D4E7BC2087804870051572B /* Deployment */ = { + 4D4E7BC2087804870051572B /* standard */ = { isa = XCBuildConfiguration; buildSettings = { APPCAST_URL = ""; - CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/.."; - COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", @@ -1529,138 +1480,155 @@ ); FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)\""; FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)\""; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_OPTIMIZATION_LEVEL = s; - GCC_TREAT_WARNINGS_AS_ERRORS = NO; - HEADER_SEARCH_PATHS = ( - ../libhb, - ../contrib/include, - ); IBC_PLUGINS = /System/Library/Frameworks/QTKit.framework/Resources/QTKitIBPlugin.ibplugin; IBC_PLUGIN_SEARCH_PATHS = /System/Library/Frameworks/QTKit.framework/Resources; - INFOPLIST_FILE = HandBrake.plist; - LIBRARY_SEARCH_PATHS = ""; - MACOSX_DEPLOYMENT_TARGET = 10.5; - OTHER_CFLAGS = ""; + INFOPLIST_FILE = Info.plist; + INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional"; + INFOPLIST_PREFIX_HEADER = "$(EXTERNAL_BUILD)/macosx/Info.h"; + INFOPLIST_PREPROCESS = YES; OTHER_LDFLAGS = ( - ../libhb/libhb.a, - ../contrib/lib/libmp4v2.a, - ../contrib/lib/liba52.a, - ../contrib/lib/libavformat.a, - ../contrib/lib/libavcodec.a, - ../contrib/lib/libavutil.a, - ../contrib/lib/libdvdread.a, - ../contrib/lib/libfaac.a, - ../contrib/lib/libmp3lame.a, - ../contrib/lib/libmpeg2.a, - ../contrib/lib/libvorbis.a, - ../contrib/lib/libvorbisenc.a, - ../contrib/lib/libogg.a, - ../contrib/lib/libsamplerate.a, - ../contrib/lib/libx264.a, - ../contrib/lib/libxvidcore.a, - ../contrib/lib/libdca.a, - ../contrib/lib/libmkv.a, - ../contrib/lib/libswscale.a, - ../contrib/lib/libtheora.a, - ../contrib/lib/libfaad.a, + "$(EXTERNAL_BUILD)/libhb/libhb.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp4v2.a", + "$(EXTERNAL_BUILD)/contrib/lib/liba52.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavformat.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a", + "$(EXTERNAL_BUILD)/contrib/lib/libavutil.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaac.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmp3lame.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmpeg2.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbis.a", + "$(EXTERNAL_BUILD)/contrib/lib/libvorbisenc.a", + "$(EXTERNAL_BUILD)/contrib/lib/libogg.a", + "$(EXTERNAL_BUILD)/contrib/lib/libsamplerate.a", + "$(EXTERNAL_BUILD)/contrib/lib/libx264.a", + "$(EXTERNAL_BUILD)/contrib/lib/libxvidcore.a", + "$(EXTERNAL_BUILD)/contrib/lib/libdca.a", + "$(EXTERNAL_BUILD)/contrib/lib/libmkv.a", + "$(EXTERNAL_BUILD)/contrib/lib/libswscale.a", + "$(EXTERNAL_BUILD)/contrib/lib/libtheora.a", + "$(EXTERNAL_BUILD)/contrib/lib/libfaad.a", "-lbz2", + "-lz", ); PRODUCT_NAME = HandBrake; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; - SECTORDER_FLAGS = ""; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", ); WRAPPER_EXTENSION = app; - ZERO_LINK = NO; }; - name = Deployment; + name = standard; }; - 4D4E7BC5087804870051572B /* Development */ = { + 4D4E7BC5087804870051572B /* debug */ = { isa = XCBuildConfiguration; buildSettings = { + CONFIGURATION_BUILD_DIR = "$(EXTERNAL_BUILD)"; + CONFIGURATION_TEMP_DIR = "$(SYMROOT)"; + COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; - GCC_DEBUGGING_SYMBOLS = default; + EXTERNAL_BUILD = "$(EXTERNAL_PROJECT)/build.$(CONFIGURATION)"; + EXTERNAL_PROJECT = ..; + GCC_DYNAMIC_NO_PIC = YES; GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; - IBC_NOTICES = NO; - IBC_WARNINGS = YES; - MACOSX_DEPLOYMENT_TARGET = 10.5; - OTHER_CFLAGS = ""; + HEADER_SEARCH_PATHS = "$(EXTERNAL_BUILD)/libhb"; + OBJROOT = "$(EXTERNAL_BUILD)/macosx"; PREBINDING = NO; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; - ZERO_LINK = NO; + SDKROOT = macosx10.5; + SHARED_PRECOMPS_DIR = "$(SYMROOT)/cache"; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "$(EXTERNAL_BUILD)/macosx"; }; - name = Development; + name = debug; }; - 4D4E7BC6087804870051572B /* Deployment */ = { + 4D4E7BC6087804870051572B /* standard */ = { isa = XCBuildConfiguration; buildSettings = { + CONFIGURATION_BUILD_DIR = "$(EXTERNAL_BUILD)"; + CONFIGURATION_TEMP_DIR = "$(SYMROOT)"; + EXTERNAL_BUILD = "$(EXTERNAL_PROJECT)/build.$(CONFIGURATION)"; + EXTERNAL_PROJECT = ..; + GCC_DYNAMIC_NO_PIC = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_MODEL_TUNING = G5; - GCC_PREPROCESSOR_DEFINITIONS = "JOB_GROUPS=1"; - IBC_NOTICES = NO; - MACOSX_DEPLOYMENT_TARGET = 10.5; - OTHER_CFLAGS = ""; - SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; + HEADER_SEARCH_PATHS = "$(EXTERNAL_BUILD)/libhb"; + OBJROOT = "$(EXTERNAL_BUILD)/macosx"; + PREBINDING = NO; + SDKROOT = macosx10.5; + SHARED_PRECOMPS_DIR = "$(SYMROOT)/cache"; + SYMROOT = "$(EXTERNAL_BUILD)/macosx"; }; - name = Deployment; + name = standard; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 0D096E650B707D5800A845D4 /* Build configuration list for PBXNativeTarget "libhb dlib" */ = { + 0DFF0C0C0B6BCEE000549488 /* Build configuration list for PBXNativeTarget "HandBrakeCLI" */ = { isa = XCConfigurationList; buildConfigurations = ( - 0D096E660B707D5800A845D4 /* Development */, - 0D096E670B707D5800A845D4 /* Deployment */, - 0D096E690B707D5800A845D4 /* UB */, + 0DFF0C0E0B6BCEE000549488 /* standard */, + 0DFF0C0D0B6BCEE000549488 /* debug */, + 27ED6ADE0F58D7F100C905EE /* standard.i386 */, + 27ED6B020F58DE7400C905EE /* standard.x86_64 */, + 27ED6AE60F58D8F200C905EE /* standard.ppc */, + 27ED6B070F58DE7600C905EE /* standard.ppc64 */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Deployment; + defaultConfigurationName = standard; }; - 0DFF0B730B6BC70400549488 /* Build configuration list for PBXNativeTarget "libhb" */ = { + 27C7D1050F58AEE300974730 /* Build configuration list for PBXAggregateTarget "configure" */ = { isa = XCConfigurationList; buildConfigurations = ( - 0DFF0B740B6BC70400549488 /* Development */, - 0DFF0B750B6BC70400549488 /* Deployment */, - 0D88F56B0B6CDCD400F81F26 /* UB */, + 27C7D1040F58AEC500974730 /* standard */, + 27C7D1030F58AEC500974730 /* debug */, + 27ED6ADC0F58D7F100C905EE /* standard.i386 */, + 27ED6B000F58DE7400C905EE /* standard.x86_64 */, + 27ED6AE40F58D8F200C905EE /* standard.ppc */, + 27ED6B050F58DE7600C905EE /* standard.ppc64 */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Deployment; + defaultConfigurationName = standard; }; - 0DFF0C0C0B6BCEE000549488 /* Build configuration list for PBXNativeTarget "HandBrakeCLI" */ = { + 27C7D1180F58B0AF00974730 /* Build configuration list for PBXAggregateTarget "make.libhb" */ = { isa = XCConfigurationList; buildConfigurations = ( - 0DFF0C0D0B6BCEE000549488 /* Development */, - 0DFF0C0E0B6BCEE000549488 /* Deployment */, - 0D88F56E0B6CDCD400F81F26 /* UB */, + 27C7D11A0F58B0AF00974730 /* standard */, + 27C7D1190F58B0AF00974730 /* debug */, + 27ED6ADD0F58D7F100C905EE /* standard.i386 */, + 27ED6B010F58DE7400C905EE /* standard.x86_64 */, + 27ED6AE50F58D8F200C905EE /* standard.ppc */, + 27ED6B060F58DE7600C905EE /* standard.ppc64 */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Deployment; + defaultConfigurationName = standard; }; 4D4E7BC0087804870051572B /* Build configuration list for PBXNativeTarget "HandBrake" */ = { isa = XCConfigurationList; buildConfigurations = ( - 4D4E7BC1087804870051572B /* Development */, - 4D4E7BC2087804870051572B /* Deployment */, - 0D88F56C0B6CDCD400F81F26 /* UB */, + 4D4E7BC2087804870051572B /* standard */, + 4D4E7BC1087804870051572B /* debug */, + 27ED6ADF0F58D7F100C905EE /* standard.i386 */, + 27ED6B030F58DE7400C905EE /* standard.x86_64 */, + 27ED6AE70F58D8F200C905EE /* standard.ppc */, + 27ED6B080F58DE7600C905EE /* standard.ppc64 */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Deployment; + defaultConfigurationName = standard; }; 4D4E7BC4087804870051572B /* Build configuration list for PBXProject "HandBrake" */ = { isa = XCConfigurationList; buildConfigurations = ( - 4D4E7BC5087804870051572B /* Development */, - 4D4E7BC6087804870051572B /* Deployment */, - 0D88F56F0B6CDCD400F81F26 /* UB */, + 4D4E7BC6087804870051572B /* standard */, + 4D4E7BC5087804870051572B /* debug */, + 27ED6ADB0F58D7F100C905EE /* standard.i386 */, + 27ED6AFF0F58DE7400C905EE /* standard.x86_64 */, + 27ED6AE30F58D8F200C905EE /* standard.ppc */, + 27ED6B040F58DE7600C905EE /* standard.ppc64 */, ); defaultConfigurationIsVisible = 0; - defaultConfigurationName = Deployment; + defaultConfigurationName = standard; }; /* End XCConfigurationList section */ }; diff --git a/macosx/Info.h.m4 b/macosx/Info.h.m4 new file mode 100644 index 000000000..308e38f6a --- /dev/null +++ b/macosx/Info.h.m4 @@ -0,0 +1,15 @@ +dnl +dnl This file is used by Xcode Packaging for Info.plist preprocessing. +dnl See Info.plist for how the values are used. +dnl +changequote(<<, >>)dnl +include(<<handbrake.m4>>)dnl +dnl +dnl +dnl +<<#>>define HB_PLIST_BUNDLEVERSION svn<<>>__HB_repo_rev +<<#>>define HB_PLIST_DISPLAYNAME __HB_name +<<#>>define HB_PLIST_GETINFOSTRING __HB_build +<<#>>define HB_PLIST_SHORTVERSIONSTRING __HB_version_formal +<<#>>define HB_PLIST_SUFEEDURL __HB_url_appcast +<<#>>define HB_PLIST_VERSION __HB_version diff --git a/macosx/HandBrake.plist b/macosx/Info.plist index 8217aa787..011848a25 100644 --- a/macosx/HandBrake.plist +++ b/macosx/Info.plist @@ -2,37 +2,37 @@ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> + <key>CFBundleGetInfoString</key> + <string>HB_PLIST_GETINFOSTRING</string> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleDisplayName</key> - <string>HandBrake</string> + <string>HB_PLIST_DISPLAYNAME</string> <key>CFBundleExecutable</key> - <string>HandBrake</string> - <key>CFBundleGetInfoString</key> - <string>$(HB_VERSION)</string> + <string>${EXECUTABLE_NAME}</string> <key>CFBundleIconFile</key> - <string>HandBrake</string> + <string>${EXECUTABLE_NAME}</string> <key>CFBundleIdentifier</key> <string>org.m0k.handbrake</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> - <string>HandBrake</string> + <string>${PRODUCT_NAME}</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>$(HB_VERSION)</string> + <string>HB_PLIST_SHORTVERSIONSTRING</string> <key>CFBundleSignature</key> <string>HB##</string> <key>CFBundleVersion</key> - <string>$(HB_BUILD)</string> - <key>NSHumanReadableCopyright</key> - <string>HandBrake Devs</string> + <string>HB_PLIST_BUNDLEVERSION</string> <key>NSMainNibFile</key> <string>MainMenu</string> <key>NSPrincipalClass</key> <string>NSApplication</string> + <key>NSHumanReadableCopyright</key> + <string>© 2003-2009, HandBrake Developers</string> <key>SUFeedURL</key> - <string>$(APPCAST_URL)</string> + <string>HB_PLIST_SUFEEDURL</string> </dict> </plist> diff --git a/macosx/module.defs b/macosx/module.defs new file mode 100644 index 000000000..c13958da4 --- /dev/null +++ b/macosx/module.defs @@ -0,0 +1,29 @@ +$(eval $(call import.MODULE.defs,MACOSX,macosx)) + +MACOSX.src/ = $(PROJECT/)macosx/ +MACOSX.build/ = $(BUILD/)macosx/ + +MACOSX.m4.in = $(wildcard $(MACOSX.src/)*.m4) +MACOSX.m4.out = $(patsubst $(MACOSX.src/)%.m4,$(MACOSX.build/)%,$(MACOSX.m4.in)) + +MACOSX.targs = HandBrakeCLI HandBrake +MACOSX.conf = standard$(if $(filter 1,$(BUILD.cross)),.$(BUILD.arch)) + +############################################################################### + +BUILD.out += $(MACOSX.m4.out) + +############################################################################### + +MACOSX.XCODE.exe = xcodebuild +MACOSX.XCODE.project = HandBrake.xcodeproj + +MACOSX.XCODE = $(strip \ + cd $(MACOSX.src/) && \ + $(MACOSX.XCODE.exe) \ + -project $(MACOSX.XCODE.project) \ + -configuration $(MACOSX.conf) \ + $(foreach t,$(MACOSX.targs),-target $t) \ + EXTERNAL_BUILD=$(CURDIR) \ + EXTERNAL_PROJECT=$(PROJECT/) \ + $(1) ) diff --git a/macosx/module.rules b/macosx/module.rules new file mode 100644 index 000000000..94df66511 --- /dev/null +++ b/macosx/module.rules @@ -0,0 +1,20 @@ +$(eval $(call import.MODULE.rules,MACOSX)) + +build: macosx.build +clean: macosx.clean + +.PHONY: macosx.build macosx.clean + +macosx.build: $(MACOSX.m4.out) + +$(call MACOSX.XCODE,build) + +macosx.clean: + $(call MACOSX.XCODE,clean) + +$(MACOSX.m4.out): $(BUILD/)project/handbrake.m4 +$(MACOSX.m4.out): | $(dir $(MACOSX.m4.out)) +$(MACOSX.m4.out): $(MACOSX.build/)%: $(MACOSX.src/)%.m4 + $(M4.exe) -Iproject $< > $@ + +## target used by Xcode when launching as external build +macosx.fromxcode: $(MACOSX.m4.out) $(LIBHB.a) diff --git a/make/configure.py b/make/configure.py new file mode 100644 index 000000000..1aa85bd39 --- /dev/null +++ b/make/configure.py @@ -0,0 +1,752 @@ +import fnmatch +import optparse +import os +import platform +import re +import subprocess +import sys +import time + +from optparse import OptionGroup +from optparse import OptionGroup +from optparse import OptionParser +from sys import stderr +from sys import stdout + +############################################################################### + +def errf( format, *args ): + stderr.write( ('ERROR: ' + format + '\n') % args ) + sys.exit( 1 ) + +def outf( format, *args ): + stdout.write( (format + '\n') % args ) + +############################################################################### + +## Expand values of iterable object into a decent string representation. +## +def expandValues( obj ): + buf = '' + for v in obj: + buf += ', ' + v + return '{ ' + buf[2:] + ' }' + +############################################################################### + +## Find executable by searching path. +## On success, returns full pathname of executable. +## On fail, returns None. +## +def findExecutable( name ): + if len( os.path.split(name)[0] ): + return name if os.access( name, os.X_OK ) else None + + if not os.environ.has_key( 'PATH' ) or os.environ[ 'PATH' ] == '': + path = os.defpath + else: + path = os.environ['PATH'] + + for dir in path.split( os.pathsep ): + f = os.path.join( dir, name ) + if os.access( f, os.X_OK ): + return f + return None + +############################################################################### + +def computeDefaultMakeJobs(): + ## good for darwin9.6.0 and linux + try: + n = os.sysconf( 'SC_NPROCESSORS_ONLN' ) + if n < 1: + n = 1 + return n + except: + pass + ## windows + try: + n = int( os.environ['NUMBER_OF_PROCESSORS'] ) + if n < 1: + n = 1 + return n + except: + pass + return 1 + +############################################################################### + +## taken from python2.6 -- we need it +def relpath(path, start=os.path.curdir): + """Return a relative version of a path""" + + if not path: + raise ValueError("no path specified") + + start_list = os.path.abspath(start).split(os.sep) + path_list = os.path.abspath(path).split(os.sep) + + # Work out how much of the filepath is shared by start and path. + i = len(os.path.commonprefix([start_list, path_list])) + + rel_list = [os.pardir] * (len(start_list)-i) + path_list[i:] + if not rel_list: + return os.path.curdir + return os.path.join(*rel_list) + +############################################################################### + +# compute project dir which should be 2 dirs below this script +build_dir = os.curdir +project_dir = os.path.normpath( sys.argv[0] ) +for i in range( 2 ): + project_dir = os.path.dirname( project_dir ) +if len( project_dir ) == 0: + project_dir = os.curdir + +############################################################################### + +## model gnu-autotools platform guess +## +## native format: +## (PROC)-(VENDOR)-(SYSTEM)(RELEASE)-(EXTRA) +## +## examples: +## i386-apple-darwin9.6.0 (Mac OS X 10.5.6 Intel) +## powerpc-apple-darwin9.6.0 (Mac OS X 10.5.6 PPC) +## i686-pc-cygwin (Cygwin, Microsoft Vista) +## x86_64-unknown-linux-gnu (Linux, Fedora 10 x86_64) +## +class Guess: + def __init__( self ): + self.proc = 'unknown' + self.vendor = 'unknown' + self.system = 'unknown' + self.release = '0.0.0' + self.extra = '' + + p_system = platform.system().lower() + p_release = platform.release().lower() + p_processor = platform.processor().lower() + p_machine = platform.machine().lower() + + if re.match( 'cygwin', p_system ): + self.proc = p_machine + self.vendor = 'pc' + self.system = 'cygwin' + self.release = '' + self.extra = '' + elif re.match( 'darwin', p_system ): + self.proc = p_machine + self.vendor = 'apple' + self.system = p_system + self.release = p_release + self.extra = '' + elif re.match( 'linux', p_system ): + self.proc = p_machine + self.vendor = 'unknown' + self.system = p_system + self.release = '' + self.extra = 'gnu' + else: + errf( 'unrecognized host system: %s', p_system ) + + def __str__( self ): + if len(self.extra): + return '%s-%s-%s%s-%s' % (self.proc,self.vendor,self.system,self.release,self.extra) + else: + return '%s-%s-%s%s' % (self.proc,self.vendor,self.system,self.release) + + def match( self, spec ): + return fnmatch.fnmatch( str(self), spec ) + +############################################################################### + +# a tool represents a command-line tool which may be searched for in PATH +class Tool: + def __init__( self, parent, optional, var, *pool ): + self.name = pool[0] + self.optional = optional + self.var = var + self.pool = pool + self.found = None + if parent: + parent.register( self ) + + def addToConfig( self, config ): + config.add( self.var, self.found ) + + def addToGroup( self, group ): + group.add_option( '', '--' + self.name, help='specify %s location' % (self.name), default=None, metavar='EXE' ) + + def locate( self, options ): + spec = options.__dict__[self.name] + pool = self.pool if not spec else [spec] + for p in pool: + self.found = findExecutable( p ) + if self.found: + outf( 'located %s: %s', self.name, self.found ) + return + if self.optional: + outf( 'missing: %s (optional)', self.name ) + else: + errf( 'unable to locate tool: %s', self.name ) + +## a select tool picks first found from a list of tools +class SelectTool( Tool ): + def __init__( self, parent, var, name, *pool ): + self.var = var + self.name = name + self.pool = pool + self.found = None + + self.poolMap = {} + for p in self.pool: + self.poolMap[p.name] = p + if parent: + parent.register( self ) + + def addToConfig( self, config ): + config.add( self.var, self.found ) + + def addToGroup( self, group ): + group.add_option( '', '--' + self.name, help='select %s mode: %s' % (self.name,expandValues(self.poolMap)), + default=self.name, metavar='MODE' ) + + def locate( self, options ): + spec = options.__dict__[self.name] + if spec in self.poolMap: + self.found = spec + return + for p in self.pool: + if p.found: + self.found = p.name + outf( 'selected %s: %s', self.name, self.found ) + return + errf( 'require at least one location of: %s', expandValues( self.poolMap )) + +############################################################################### + +class ToolSet: + def __init__( self ): + self.items = [] + Tool( self, False, 'AR.exe', 'ar' ) + Tool( self, False, 'CP.exe', 'cp' ) + Tool( self, True, 'CURL.exe', 'curl' ) + Tool( self, False, 'GCC.gcc', 'gcc', 'gcc-4' ) + Tool( self, False, 'M4.exe', 'm4' ) + Tool( self, False, 'MKDIR.exe', 'mkdir' ) + Tool( self, False, 'PATCH.exe', 'patch' ) + Tool( self, False, 'RM.exe', 'rm' ) + Tool( self, False, 'TAR.exe', 'tar' ) + Tool( self, True, 'WGET.exe', 'wget' ) + + SelectTool( self, 'FETCH.select', 'fetch', self.wget, self.curl ) + + def register( self, item ): + self.__dict__[item.name] = item + self.items.append( item ) + +############################################################################### + +class OptionMode( list ): + def __init__( self, default, *items ): + super( OptionMode, self ).__init__( items ) + self.default = items[default] + self.mode = self.default + + def __str__( self ): + return ' '.join( self ).replace( self.mode, '*'+self.mode ) + + def addToGroup( self, group, option, name ): + group.add_option( '', option, help='select %s mode: %s' % (name,self), default=self.mode, metavar='MODE' ) + + def setFromOption( self, name, mode ): + if mode not in self: + errf( 'invalid %s mode: %s', name, mode ) + self.mode = mode + +############################################################################### + +## create singletons +guessHost = Guess() +guessBuild = Guess() + +makeTool = Tool( None, False, 'CONF.make', 'gmake', 'make' ) +tools = ToolSet() + +debugMode = OptionMode( 0, 'none', 'min', 'std', 'max' ) +optimizeMode = OptionMode( 1, 'none', 'speed', 'size' ) + +## populate platform-specific architecture modes +if guessHost.match( 'i386-*-darwin8.*' ): + archMode = OptionMode( 0, 'i386', 'ppc' ) +elif guessHost.match( 'powerpc-*-darwin8.*' ): + archMode = OptionMode( 1, 'i386', 'ppc' ) +elif guessHost.match( 'i386-*-darwin9.*' ): + archMode = OptionMode( 0, 'i386', 'x86_64', 'ppc', 'ppc64' ) +elif guessHost.match( 'powerpc-*-darwin9.*' ): + archMode = OptionMode( 2, 'i386', 'x86_64', 'ppc', 'ppc64' ) +else: + archMode = OptionMode( 0, guessHost.proc ) + +## create parser +parser = OptionParser( 'Usage: %prog' ) + +group = OptionGroup( parser, 'Feature Options' ) +group.add_option( '', '--disable-xcode', default=False, action='store_true', + help='disable Xcode (Darwin only)' ) +group.add_option( '', '--disable-gtk', default=False, action='store_true', + help='disable GTK GUI (Linux only)' ) +parser.add_option_group( group ) + +## add launch options +group = OptionGroup( parser, 'Launch Options' ) +group.add_option( '', '--launch', default=False, action='store_true', + help='launch build, capture log and wait for completion' ) +group.add_option( '', '--launch-jobs', default=1, action='store', metavar='N', + help='allow N jobs at once; 0 to match CPU count (1)' ) +group.add_option( '', '--launch-args', default=None, action='store', metavar='ARGS', + help='specify additional ARGS for launch command' ) +group.add_option( '', '--launch-dir', default='build', action='store', metavar='DIR', + help='specify scratch DIR to use for build (build)' ) +group.add_option( '', '--launch-force', default=False, action='store_true', + help='force use of scratch directory even if exists' ) +group.add_option( '', '--launch-log', default='log.txt', action='store', metavar='FILE', + help='specify log FILE (log.txt)' ) +group.add_option( '', '--launch-quiet', default=False, action='store_true', + help='do not echo build output' ) +parser.add_option_group( group ) + +## add compile options +group = OptionGroup( parser, 'Compiler Options' ) +debugMode.addToGroup( group, '--debug', 'debug' ) +optimizeMode.addToGroup( group, '--optimize', 'optimize' ) +archMode.addToGroup( group, '--arch', 'architecutre' ) +parser.add_option_group( group ) + +## add tool options +group = OptionGroup( parser, 'Tool Options' ) +makeTool.addToGroup( group ) +for tool in tools.items: + tool.addToGroup( group ) +parser.add_option_group( group ) + +(options, args) = parser.parse_args() + +## recompute values when launch mode +if options.launch: + options.launch_jobs = int(options.launch_jobs) + build_dir = options.launch_dir + if os.path.isabs( build_dir ): + project_dir = os.getcwd() + else: + project_dir = os.path.normpath( relpath( project_dir, build_dir )) + if options.launch_jobs == 0: + options.launch_jobs = computeDefaultMakeJobs() + if options.launch_jobs < 1: + options.launch_jobs = 1 + elif options.launch_jobs > 8: + options.launch_jobs = 8 + +## make sure configure does not run in source root +if os.path.abspath( project_dir ) == os.path.abspath( build_dir ): + errf( 'scratch (build) directory must not be the same as source root' ) + +## validate modes +debugMode.setFromOption( 'debug', options.debug ) +optimizeMode.setFromOption( 'optimize', options.optimize ) +archMode.setFromOption( 'architecture', options.arch ) + +## update guessBuild as per architecture mode +if guessHost.match( '*-*-darwin*' ): + if archMode.mode == 'i386': + guessBuild.proc = 'i386' + elif archMode.mode == 'x86_64': + guessBuild.proc = 'x86_64' + elif archMode.mode == 'ppc': + guessBuild.proc = 'powerpc' + elif archMode.mode == 'ppc64': + guessBuild.proc = 'powerpc64' +else: + guessBuild.proc = archMode.mode +guessBuild.cross = 0 if archMode.default == archMode.mode else 1 + +# locate tools +makeTool.locate( options ) +for tool in tools.items: + tool.locate( options ) + +############################################################################### + +## Repository object. +## Holds information gleaned from subversion working dir. +## +## Builds are classed into one of the following types: +## +## release +## must be built from official svn with '/tags/' in the url +## developer +## must be built from official svn but is not a release +## unofficial +## all other builds +## +class Repository: + def __init__( self ): + self.url = 'svn://nowhere.com/project/unknown' + self.root = 'svn://nowhere.com/project' + self.branch = 'unknown' + self.uuid = '00000000-0000-0000-0000-000000000000'; + self.rev = 0 + self.date = '0000-00-00 00:00:00 -0000' + self.wcversion = 'exported' + self.official = 0 + self.type = 'unofficial' + + # parse output: svnversion PROJECT_DIR + cmd = 'svnversion ' + project_dir + print 'running: %s' % (cmd) + try: + p = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE ) + p.wait(); + if p.returncode == 0: + self.wcversion = p.stdout.readline().rstrip() + except: + pass + + # parse output: svn info PROJECT_DIR + cmd = 'svn info ' + project_dir + print 'running: %s' % (cmd) + try: + p = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE ) + p.wait(); + if p.returncode == 0: + for line in p.stdout: + (name,value) = re.match( '([^:]+):\\s+(.+)', line.rstrip() ).groups() + if name == 'URL': + self.url = value + elif name == 'Repository Root': + self.root = value + elif name == 'Repository UUID': + self.uuid = value + elif name == 'Revision': + self.rev = int( value ) + elif name == 'Last Changed Date': + # strip chars in parens + if value.find( ' (' ): + self.date = value[0:value.find(' (')] + else: + self.date = value + except: + pass + + i = self.url.rfind( '/' ) + if i != -1 and i < len(self.url)-1: + self.branch = self.url[i+1:] + + # official UUID behavior + if self.uuid == 'b64f7644-9d1e-0410-96f1-a4d463321fa5': + self.official = 1 + m = re.match( '([^:]+)://([^/]+)/(.+)', self.url ) + if m and re.match( 'tags/', m.group( 3 )): + self.type = 'release' + else: + self.type = 'developer' + +############################################################################### + +## Project object. +## Contains manually updated version numbers consistent with HB releases +## and other project metadata. +## +class Project: + def __init__( self ): + self.name = 'HandBrake' + self.name_lower = self.name.lower() + self.name_upper = self.name.upper() + self.acro_lower = 'hb' + self.acro_upper = 'HB' + self.url_website = 'http://handbrake.fr' + self.url_community = 'http://forum.handbrake.fr' + self.url_irc = 'irc://irc.freenode.net/handbrake' + + self.vmajor = 0 + self.vminor = 9 + self.vpoint = 3 + + self.version = '%d.%d.%d' % (self.vmajor,self.vminor,self.vpoint) + appcastfmt = 'http://handbrake.fr/appcast%s.xml' + + if repo.type == 'release': + self.version_formal = '%s Release' % (self.version) + self.url_appcast = appcastfmt % ('') + elif repo.type == 'developer': + self.version_formal = '%s Developer ' % (self.version) + self.url_appcast = appcastfmt % ('_unstable') + else: + self.version_formal = '%s Unnofficial ' % (self.version) + self.url_appcast = appcastfmt % ('_unofficial') + + self.title = '%s %s' % (self.name,self.version) + self.build = time.strftime('%Y%m%d') + '01' + +############################################################################### + +## Config object used to output gnu-make or gnu-m4 output. +## +## Use add() to add NAME/VALUE pairs suitable for both make/m4. +## Use addBlank() to add a linefeed for both make/m4. +## Use addMake() to add a make-specific line. +## Use addM4() to add a m4-specific line. +## +class Config: + def __init__( self ): + self._items = [] + + def add( self, name, value ): + self._items.append( (name,value) ) + + def addBlank( self ): + self._items.append( None ) + + def addComment( self, format, *args ): + self.addMake( '## ' + format % args ) + self.addM4( 'dnl ' + format % args ) + + def addMake( self, line ): + self._items.append( ('?make',line) ) + + def addM4( self, line ): + self._items.append( ('?m4',line) ) + + def output( self, file, type ): + namelen = 0 + for item in self._items: + if item == None or item[0].find( '?' ) == 0: + continue + if len(item[0]) > namelen: + namelen = len(item[0]) + for item in self._items: + if item == None: + if type == 'm4': + file.write( 'dnl\n' ) + else: + file.write( '\n' ) + continue + if item[0].find( '?' ) == 0: + if item[0].find( type, 1 ) == 1: + file.write( '%s\n' % (item[1]) ) + continue + + if type == 'm4': + self._outputM4( file, namelen, item[0], item[1] ) + else: + self._outputMake( file, namelen, item[0], item[1] ) + + def _outputMake( self, file, namelen, name, value ): + file.write( '%-*s = %s\n' % (namelen, name, value )) + + def _outputM4( self, file, namelen, name, value ): + namelen += 7 + name = '<<__%s>>,' % name.replace( '.', '_' ) + file.write( 'define(%-*s <<%s>>)dnl\n' % (namelen, name, value )) + +############################################################################### + +## create configure line, stripping arg --launch, quoting others +configure = [] +for arg in sys.argv[1:]: + #if arg.find( '--launch' ) == 0: + # continue + if arg == '--launch': + continue + configure.append( '"%s"' % (arg.replace('"', '\\"')) ) + +## create singletones +repo = Repository() +project = Project() +config = Config() + +config.addComment( 'generated by configure on %s', time.strftime( '%c' )) + +config.addBlank() +config.add( 'CONF.args', ' '.join( configure )) + +config.addBlank() +config.add( 'HB.title', project.title ) +config.add( 'HB.name', project.name ) +config.add( 'HB.name.lower', project.name_lower ) +config.add( 'HB.name.upper', project.name_upper ) +config.add( 'HB.acro.lower', project.acro_lower ) +config.add( 'HB.acro.upper', project.acro_upper ) + +config.add( 'HB.url.website', project.url_website ) +config.add( 'HB.url.community', project.url_community ) +config.add( 'HB.url.irc', project.url_irc ) +config.add( 'HB.url.appcast', project.url_appcast ) + +config.add( 'HB.version.major', project.vmajor ) +config.add( 'HB.version.minor', project.vminor ) +config.add( 'HB.version.point', project.vpoint ) +config.add( 'HB.version', project.version ) +config.add( 'HB.version.formal', project.version_formal ) +config.add( 'HB.version.hex', '%04x%02x%02x%02x%06x' % (project.vmajor,project.vminor,project.vpoint,0,repo.rev) ) + +config.add( 'HB.build', project.build ) + +config.add( 'HB.repo.url', repo.url ) +config.add( 'HB.repo.root', repo.root ) +config.add( 'HB.repo.branch', repo.branch ) +config.add( 'HB.repo.uuid', repo.uuid ) +config.add( 'HB.repo.rev', repo.rev ) +config.add( 'HB.repo.date', repo.date ) +config.add( 'HB.repo.wcversion', repo.wcversion ) +config.add( 'HB.repo.official', repo.official ) +config.add( 'HB.repo.type', repo.type ) + +config.addBlank() +config.add( 'HOST.spec', guessHost ) +config.add( 'HOST.proc', guessHost.proc ) +config.add( 'HOST.vendor', guessHost.vendor ) +config.add( 'HOST.system', guessHost.system ) +config.add( 'HOST.release', guessHost.release ) +config.add( 'HOST.extra', guessHost.extra ) + +config.addBlank() +config.add( 'BUILD.spec', guessBuild ) +config.add( 'BUILD.proc', guessBuild.proc ) +config.add( 'BUILD.vendor', guessBuild.vendor ) +config.add( 'BUILD.system', guessBuild.system ) +config.add( 'BUILD.release', guessBuild.release ) +config.add( 'BUILD.extra', guessBuild.extra ) +config.add( 'BUILD.cross', guessBuild.cross ) +config.add( 'BUILD.date', time.strftime('%c') ) +config.add( 'BUILD.arch', archMode.mode ) + +config.addBlank() +config.add( 'BUILD/', os.curdir + os.sep ) +config.add( 'PROJECT/', project_dir + os.sep ) + +config.addBlank() +config.add( 'FEATURE.xcode', 0 if options.disable_xcode else 1 ) +config.add( 'FEATURE.gtk', 0 if options.disable_gtk else 1 ) + +config.addMake( '' ) +config.addMake( '## include main definitions' ) +config.addMake( 'include $(PROJECT/)make/include/main.defs' ) + +config.addBlank() +for tool in tools.items: + tool.addToConfig( config ) + +config.addBlank() +config.add( 'GCC.archs', archMode.mode if guessBuild.cross else '' ) +config.add( 'GCC.g', options.debug ) +config.add( 'GCC.O', options.optimize ) + +config.addMake( '' ) +config.addMake( '## include (optional) customization file' ) +config.addMake( '-include $(BUID/)GNUmakefile.custom' ) + +config.addMake( '' ) +config.addMake( '## include main rules' ) +config.addMake( 'include $(PROJECT/)make/include/main.rules' ) + +############################################################################### + +# generate make or m4 file +def generate( type ): + if type == 'make': + fname = 'GNUmakefile' + elif type == 'm4': + fname = os.path.join( 'project', project.name_lower + '.m4' ) + else: + raise ValueError, 'unknown file type: ' + type + + ftmp = fname + '.tmp' + + pdir = os.path.dirname( fname ) + if pdir: + if not os.path.exists( pdir ): + os.makedirs( pdir ) + + try: + try: + outf( 'generating %s', fname ) + file = open( ftmp, 'w' ) + config.output( file, type ) + finally: + try: + file.close() + except: + pass + except Exception, x: + try: + os.remove( ftmp ) + except Exception, x: + pass + errf( 'failed writing to %s\n%s', ftmp, x ) + + try: + os.rename( ftmp, fname ) + except Exception, x: + errf( 'failed writing to %s\n%s', fname, x ) + +############################################################################### + +if not options.launch: + generate( 'make' ) + generate( 'm4' ) + sys.exit( 0 ) + +############################################################################### + +if os.path.exists( options.launch_dir ): + if not options.launch_force: + errf( 'scratch directory already exists: %s', options.launch_dir ) +else: + outf( 'creating %s', options.launch_dir ) + os.makedirs( options.launch_dir ) + +outf( 'chdir %s', options.launch_dir ) +os.chdir( options.launch_dir ) +generate( 'make' ) +generate( 'm4' ) + +outf( 'opening %s', options.launch_log ) +try: + log = open( options.launch_log, 'w' ) +except Exception, x: + errf( 'open failure: %s', x ) + +cmd = '%s -j%d' % (makeTool.found,options.launch_jobs) +if options.launch_args: + cmd += ' ' + options.launch_args + +## record begin +timeBegin = time.time() +s = '###\n### TIME: %s\n### launch: %s\n###\n' % (time.asctime(),cmd) +stdout.write( s ); stdout.flush() +log.write( s ); log.flush() + +## launch/pipe +try: + pipe = subprocess.Popen( cmd, shell=True, bufsize=1, stdout=subprocess.PIPE, stderr=subprocess.STDOUT ) +except Exception, x: + errf( 'launch failure: %s', x ) +for line in pipe.stdout: + if not options.launch_quiet: + stdout.write( line ); stdout.flush() + log.write( line ); log.flush() +pipe.wait() + +## record end +timeEnd = time.time() +elapsed = timeEnd - timeBegin +result = '%s (exit code %d)' % ('success' if pipe.returncode == 0 else 'failed',pipe.returncode) +s = '###\n### TIME: %s\n### finished: %.2f seconds\n### %s\n###\n' % (time.asctime(),elapsed,result) +stdout.write( s ); stdout.flush() +log.write( s ); log.flush() + +log.close() +sys.exit( 0 ) diff --git a/make/include/base.defs b/make/include/base.defs new file mode 100644 index 000000000..3b4e666f3 --- /dev/null +++ b/make/include/base.defs @@ -0,0 +1,50 @@ +## Define module metadata. +## It is mandatory for every module to use this template. +## +## $(1) module name (uppercase) +## $(2) module name (lowercase) +## $(3) list of prerequisite modules (uppercase) +## +define import.MODULE.defs + ## indicates module is defined; useful for conditionals + $(1).enabled = 1 + + ## module name (lowercase) + $(1).name = $(2) + + ## list of prerequisite modules (uppercase) + $(1).prerequisites = $(3) + + ## add to global list of modules + MODULES.NAMES += $(1) + MODULES.names += $(2) +endef + +## +## $(1) module name (uppercase) +## +define import.MODULE.rules +$($(1).name).report: + @$(MAKE) report.true REPORT=module REPORT.module=$(1) + +## aggregate +report.modules:: $($(1).name).report + +endef + +.PHONY: report.main report.gcc report.modules + +report.modules:: + +.PHONY: report.main +report.main: + @$(MAKE) report.true REPORT=main + +.PHONY: report.gcc +report.gcc: + @$(MAKE) report.true REPORT=gcc + +## needed for nested make (which drives each report) +.PHONY: report.true +report.true: + @true diff --git a/make/include/contrib.defs b/make/include/contrib.defs new file mode 100644 index 000000000..772258c37 --- /dev/null +++ b/make/include/contrib.defs @@ -0,0 +1,276 @@ +CONTRIB.build/ = $(BUILD/)contrib/ +CONTRIB.download/ = $(PROJECT/)download/ +CONTRIB.host = $(if $(filter 1,$(BUILD.cross)),$(BUILD.spec)) + +############################################################################### + +## +## $(1) = module name (uppercase) +## +define import.CONTRIB.defs + ## + ## import gcc/g++ support mainly so we can force contrib choice of + ## gcc executable, and debug/optimization flags. + ## + $$(eval $$(call import.GCC,$(1))) + + ## + ## common values useful across targets + ## + $(1).src/ = $$(PROJECT/)contrib/$($(1).name)/ + $(1).build/ = $$(CONTRIB.build/)$($(1).name)/ + $(1).deps = $$(foreach n,$($(1).prerequisites),$$($$n.INSTALL.target)) + + ## + ## target: fetch + ## + $(1).FETCH.tar = $$(CONTRIB.download/)$$(notdir $$($(1).FETCH.url)) + $(1).FETCH.url = FETCH_IS_UNDEFINED + $(1).FETCH.target = $$($(1).FETCH.tar) + define $(1).FETCH + $$(call FETCH,$$@,$$($(1).FETCH.url)) + endef + + ## + ## target: extract + ## + $(1).EXTRACT.tarbase = $$(patsubst %.tar.gz,%,$$(notdir $$($(1).FETCH.url))) + $(1).EXTRACT.target/ = $$($(1).build/)$$($(1).EXTRACT.tarbase)/ + define $(1).EXTRACT + $$(TAR.exe) xfC $$($(1).FETCH.tar) $$($(1).build/) + endef + + ## + ## target: patch + ## + $(1).PATCH.srcs = $$(wildcard \ + $$($(1).src/)A??-*.patch \ + $$($(1).src/)P??-$$(BUILD.system)*.patch ) + + # extra line feed is required + define $(1).PATCH.item + $$(PATCH.exe) -t -p1 -d $$(1) < $$(2) + + endef + + $(1).PATCH.target = $$($(1).build/).stamp.patch + define $(1).PATCH + $$(foreach p,$$($(1).PATCH.srcs),$$(call $(1).PATCH.item,$$($(1).EXTRACT.target/),$$(p))) + endef + + ## + ## target: configure + ## + $(1).CONFIGURE.sete = set -e; + $(1).CONFIGURE.dir = $$($(1).EXTRACT.target/) + $(1).CONFIGURE.bootstrap = + $(1).CONFIGURE.exe = ./configure + $(1).CONFIGURE.host = $$(CONTRIB.host) + $(1).CONFIGURE.prefix = $$(call fn.ABSOLUTE,$$(CONTRIB.build/)) + $(1).CONFIGURE.deps = --disable-dependency-tracking + $(1).CONFIGURE.shared = --disable-shared + $(1).CONFIGURE.static = --enable-static + $(1).CONFIGURE.extra = + + $(1).CONFIGURE.args.dir = cd $$(1); + $(1).CONFIGURE.args.host = --host=$$(1) + $(1).CONFIGURE.args.prefix = --prefix=$$(1) + + $(1).CONFIGURE.args = !sete @dir !bootstrap !env !exe @host @prefix !deps !shared !static !extra + + $(1).CONFIGURE.env.CC = CC=$$($(1).GCC.gcc) + $(1).CONFIGURE.env.CFLAGS = CFLAGS="$$(call fn.ARGS,$(1).GCC,*archs)" + $(1).CONFIGURE.env.CXX = CXX=$$($(1).GCC.gxx) + $(1).CONFIGURE.env.CXXFLAGS = CXXFLAGS="$$(call fn.ARGS,$(1).GCC,*archs)" + $(1).CONFIGURE.env.CPPFLAGS = CPPFLAGS="$$(call fn.ARGS,$(1).GCC,*archs)" + $(1).CONFIGURE.env.LDFLAGS = LDFLAGS="$$(call fn.ARGS,$(1).GCC,*archs)" + + $(1).CONFIGURE.env.args = !CC !CFLAGS !CXX !CXXFLAGS !CPPFLAGS !LDFLAGS + $(1).CONFIGURE.env = $$(call fn.ARGS,$(1).CONFIGURE.env,$$($(1).CONFIGURE.env.args)) + + $(1).CONFIGURE.target = $$($(1).build/).stamp.configure + define $(1).CONFIGURE + $$(call fn.ARGS,$(1).CONFIGURE,$$($(1).CONFIGURE.args)) + endef + + ## + ## target: build + ## + $(1).BUILD.make = $$(MAKE) + $(1).BUILD.dir = $$($(1).EXTRACT.target/) + $(1).BUILD.extra = + $(1).BUILD.ntargets = + + $(1).BUILD.args = !make @dir !extra !ntargets + $(1).BUILD.args.dir = -C $$(1) + + $(1).BUILD.target = $$($(1).build/).stamp.build + define $(1).BUILD + $$(call fn.ARGS,$(1).BUILD,$$($(1).BUILD.args)) + endef + + ## + ## target: install + ## + + $(1).INSTALL.make = $$(MAKE) + $(1).INSTALL.dir = $$($(1).EXTRACT.target/) + $(1).INSTALL.extra = + $(1).INSTALL.ntargets = + + $(1).INSTALL.args = !make @dir !extra !ntargets + $(1).INSTALL.args.dir = -C $$(1) install + + $(1).INSTALL.target = $$($(1).build/).stamp.install + define $(1).INSTALL + $$(call fn.ARGS,$(1).INSTALL,$$($(1).INSTALL.args)) + endef + + ## + ## target: uninstall + ## + $(1).UNINSTALL.make = $$(MAKE) + $(1).UNINSTALL.dir = $$($(1).EXTRACT.target/) + $(1).UNINSTALL.extra = + $(1).UNINSTALL.ntargets = uninstall + + $(1).UNINSTALL.args = !make @dir !extra !ntargets + $(1).UNINSTALL.args.dir = -C $$(1) + + define $(1).UNINSTALL + $$(call fn.ARGS,$(1).UNINSTALL,$$($(1).UNINSTALL.args)) + endef + + ## + ## target: clean + ## + $(1).CLEAN.make = $$(MAKE) + $(1).CLEAN.dir = $$($(1).EXTRACT.target/) + $(1).CLEAN.extra = + $(1).CLEAN.ntargets = clean + + $(1).CLEAN.args = !make @dir !extra !ntargets + $(1).CLEAN.args.dir = -C $$(1) + + define $(1).CLEAN + $$(call fn.ARGS,$(1).CLEAN,$$($(1).CLEAN.args)) + endef + + ## other values used to aid prerequisite dirs and cleanup + ## + $(1).out += $$($(1).build/) + $(1).out += $$($(1).FETCH.target) + $(1).out += $$($(1).PATCH.target) + $(1).out += $$($(1).CONFIGURE.target) + $(1).out += $$($(1).ALL.target) + $(1).out += $$($(1).INSTALL.target) + + BUILD.out += $$($(1).out) +endef + +############################################################################### + +## +## $(1) = module name +## +define import.CONTRIB.rules + +## +## target: fetch +## +$($(1).name).fetch: $$($(1).FETCH.target) + +$$($(1).FETCH.target): | $$(dir $$($(1).FETCH.target)) + $$($(1).FETCH) + +## +## target: extract +## must touch dir after extraction because old timestamp is restored via tar. +## +$($(1).name).extract: | $$($(1).EXTRACT.target/) + +$$($(1).EXTRACT.target/): | $$(dir $$($(1).build/)) +$$($(1).EXTRACT.target/): $$($(1).FETCH.target) + $$($(1).EXTRACT) + $$(TOUCH.exe) $$@ + +## +## target: patch +## +$($(1).name).patch: $$($(1).PATCH.target) + +$$($(1).PATCH.target): | $$(dir $$($(1).PATCH.target)) +$$($(1).PATCH.target): | $$($(1).EXTRACT.target/) + $$($(1).PATCH) + $$(TOUCH.exe) $$@ + +## +## target: configure +## +$($(1).name).configure: $$($(1).CONFIGURE.target) + +$$($(1).CONFIGURE.target): | $$(dir $$($(1).CONFIGURE.target)) +$$($(1).CONFIGURE.target): $$($(1).deps) +$$($(1).CONFIGURE.target): $$($(1).PATCH.target) + $$($(1).CONFIGURE) + $$(TOUCH.exe) $$@ + +## +## target: build +## +$($(1).name).build: $$($(1).BUILD.target) + +$$($(1).BUILD.target): | $$(dir $$($(1).BUILD.target)) +$$($(1).BUILD.target): $$($(1).CONFIGURE.target) + +$$($(1).BUILD) + $$(TOUCH.exe) $$@ + +## +## target: install +## +$($(1).name).install: $$($(1).INSTALL.target) + +$$($(1).INSTALL.target): | $$(dir $$($(1).INSTALL.target)) +$$($(1).INSTALL.target): $$($(1).BUILD.target) + $$($(1).INSTALL) + $$(TOUCH.exe) $$@ + +## +## target: uninstall +## +$($(1).name).uninstall: + -$$($(1).UNINSTALL) + $$(RM.exe) -f $$($(1).INSTALL.target) + +## +## target: clean +## +$($(1).name).clean: + -$$($(1).CLEAN) + $$(RM.exe) -f $$($(1).BUILD.target) + +## +## target: xclean +## +$($(1).name).xclean: $($(1).name).uninstall + $$(RM.exe) -fr $$($(1).build/) + +## +## alias: module name is same as build +## +$($(1).name): $($(1).name).build + +## +## participate with global convenience targets +## +contrib.fetch: $($(1).name).fetch +contrib.extract: $($(1).name).extract +contrib.patch: $($(1).name).patch +contrib.configure: $($(1).name).configure +contrib.build: $($(1).name).build +contrib.install: $($(1).name).install +contrib.uninstall: $($(1).name).uninstall +contrib.clean: $($(1).name).clean +contrib.xclean: $($(1).name).xclean + +endef diff --git a/make/include/function.defs b/make/include/function.defs new file mode 100644 index 000000000..5bf5aaa89 --- /dev/null +++ b/make/include/function.defs @@ -0,0 +1,19 @@ +fn.ERROR1 = ERROR: $(1) +fn.ERROR2 = ERROR: $(1): $(2) + +fn.HEADER = @echo "$(1): $(2)" +fn.DIVIDER = @echo "======================================================================" + +fn.ABSOLUTE = $(if $(filter /%,$(1)),$(1),$(subst /./,/,$(CURDIR)/$(1))) + +fn.ARGS = $(strip $(foreach a,$(2), \ + $($(1).$(patsubst !%,%,$(filter !%,$(a)))) \ + $(foreach x,$(patsubst ?%,%,$(filter ?%,$(a))),$(if $(filter 1,$($(1).$(x))),$($(1).args.$(x)))) \ + $(foreach x,$(patsubst .%,%,$(filter .%,$(a))),$($(1).args.$(x).$($(1).$(x)))) \ + $(foreach x,$(patsubst @%,%,$(filter @%,$(a))),$(if $($(1).$(x)),$(call $(1).args.$(x),$($(1).$(x))))) \ + $(foreach x,$(patsubst *%,%,$(filter *%,$(a))),$(foreach i,$($(1).$(x)),$(call $(1).args.$(x),$(i)))) \ + )) + +fn.VARS = $(foreach v,$($(1).vars),$(v)="$($(1).vars.$(v))") + +fn.TARGET = $(TARGET.$(2).prefix)$(1)$(TARGET.$(2).suffix)$(TARGET.$(2).ext) diff --git a/make/include/gcc.defs b/make/include/gcc.defs new file mode 100644 index 000000000..4ed746392 --- /dev/null +++ b/make/include/gcc.defs @@ -0,0 +1,146 @@ +GCC.gcc = gcc +GCC.gxx = $(dir $(GCC.gcc))$(subst gcc,g++,$(notdir $(GCC.gcc))) + +GCC.strip = $$(if $$(filter none,$$(GCC.g)),1) +GCC.dylib = 1 +GCC.pipe = 1 +GCC.ML = 1 +GCC.H = 0 +GCC.W = all +GCC.archs = +GCC.vis = 0 +GCC.pic = 0 +GCC.g = none +GCC.O = none +GCC.D = +GCC.I = +GCC.muldefs = 0 +GCC.start = 0 +GCC.a = +GCC.F = +GCC.f = +GCC.L = +GCC.l = +GCC.end = 0 + +GCC.args.pipe = -pipe +GCC.args.strip = -Wl,-S +GCC.args.dylib = -dynamiclib +GCC.args.ML = -fmessage-length=0 +GCC.args.H = -H +GCC.args.W = -W$(1) +GCC.args.archs = -arch $(1) +GCC.args.vis = -fvisibility=hidden +GCC.args.pic = -fPIC +GCC.args.g.none = -g0 +GCC.args.g.min = -gdwarf-2 -g1 +GCC.args.g.std = -gdwarf-2 +GCC.args.g.max = -gdwarf-2 -g3 +GCC.args.O.none = -O0 +GCC.args.O.size = -Os +GCC.args.O.speed = -O3 +GCC.args.D = -D$(1) +GCC.args.I = -I$(1) +GCC.args.muldefs = -Wl,--allow-multiple-definition +GCC.args.start = -Wl,--start-group +GCC.args.F = -F$(1) +GCC.args.f = -framework $(1) +GCC.args.L = -L$(1) +GCC.args.l = -l$(1) +GCC.args.end = -Wl,--end-group + +############################################################################### + +define import.GCC + $(1).GCC.gcc = $$(GCC.gcc) + $(1).GCC.gxx = $$(dir $$($(1).GCC.gcc))$$(subst gcc,g++,$$(notdir $$($(1).GCC.gcc))) + + $(1).GCC.pipe = $$(GCC.pipe) + $(1).GCC.strip = $$(if $$(filter none,$$($(1).GCC.g)),1) + $(1).GCC.dylib = $$(GCC.dylib) + $(1).GCC.ML = $$(GCC.ML) + $(1).GCC.H = $$(GCC.H) + $(1).GCC.W = $$(GCC.W) + $(1).GCC.archs = $$(GCC.archs) + $(1).GCC.vis = $$(GCC.vis) + $(1).GCC.pic = $$(GCC.pic) + $(1).GCC.g = $$(GCC.g) + $(1).GCC.O = $$(GCC.O) + $(1).GCC.D = $$(GCC.D) + $(1).GCC.I = $$(GCC.I) + $(1).GCC.muldefs = $$(GCC.muldefs) + $(1).GCC.start = $$(GCC.start) + $(1).GCC.a = $$(GCC.a) + $(1).GCC.F = $$(GCC.F) + $(1).GCC.f = $$(GCC.f) + $(1).GCC.L = $$(GCC.L) + $(1).GCC.l = $$(GCC.l) + $(1).GCC.end = $$(GCC.end) + + $(1).GCC.args.pipe = $$(GCC.args.pipe) + $(1).GCC.args.strip = $$(GCC.args.strip) + $(1).GCC.args.dylib = $$(GCC.args.dylib) + $(1).GCC.args.ML = $$(GCC.args.ML) + $(1).GCC.args.H = $$(GCC.args.H) + $(1).GCC.args.W = $$(GCC.args.W) + $(1).GCC.args.archs = $$(GCC.args.archs) + $(1).GCC.args.vis = $$(GCC.args.vis) + $(1).GCC.args.pic = $$(GCC.args.pic) + $(1).GCC.args.g.none = $$(GCC.args.g.none) + $(1).GCC.args.g.min = $$(GCC.args.g.min) + $(1).GCC.args.g.std = $$(GCC.args.g.std) + $(1).GCC.args.g.max = $$(GCC.args.g.max ) + $(1).GCC.args.O.none = $$(GCC.args.O.none) + $(1).GCC.args.O.size = $$(GCC.args.O.size) + $(1).GCC.args.O.speed = $$(GCC.args.O.speed) + $(1).GCC.args.D = $$(GCC.args.D) + $(1).GCC.args.I = $$(GCC.args.I) + $(1).GCC.args.muldefs = $$(GCC.args.muldefs) + $(1).GCC.args.start = $$(GCC.args.start) + $(1).GCC.args.F = $$(GCC.args.F) + $(1).GCC.args.f = $$(GCC.args.f) + $(1).GCC.args.L = $$(GCC.args.L) + $(1).GCC.args.l = $$(GCC.args.l) + $(1).GCC.args.end = $$(GCC.args.end) + + ########################################################################### + + $(1).GCC.c = -c $$(4) + $(1).GCC.o = -o $$(3) + + # FUNCTION: C precompiled headers + $(1).GCC.H_O.args = !gcc ?pipe ?ML ?H *W *archs ?vis ?pic .g .O *D *I !c !o + $(1).GCC.H_O = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.H_O.args),$$(1),$$(2)) + + # FUNCTION: C compile source + $(1).GCC.C_O.args = !gcc ?pipe ?ML ?H *W *archs ?vis ?pic .g .O *D *I !c !o + $(1).GCC.C_O = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.C_O.args),$$(1),$$(2)) + + # FUNCTION: C++ precompile headers + $(1).GCC.HPP_O.args = !gxx ?pipe ?ML ?H *W *archs ?vis ?pic .g .O *D *I !c !o + $(1).GCC.HPP_O = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.HPP_O.args),$$(1),$$(2)) + + # FUNCTION: C++ compile source + $(1).GCC.CPP_O.args = !gxx ?pipe ?ML ?H *W *archs ?vis ?pic .g .O *D *I !c !o + $(1).GCC.CPP_O = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.CPP_O.args),$$(1),$$(2)) + + ########################################################################### + + $(1).GCC.i = $$(4) + + # FUNCTION: C link dynamic-lib + $(1).GCC.DYLIB.args = !gcc ?pipe ?strip ?dylib ?ML *W *archs ?vis ?pic .g .O *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end + $(1).GCC.DYLIB = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.DYLIB.args),$$(1),$$(2)) + + # FUNCTION: C link executable + $(1).GCC.EXE.args = !gcc ?pipe ?strip ?ML *W *archs ?vis ?pic .g .O *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end + $(1).GCC.EXE = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.EXE.args),$$(1),$$(2)) + + # FUNCTION: C++ link dynamic-lib + $(1).GCC.DYLIB++.args = !gxx ?pipe ?strip ?dylib ?ML *W *archs ?vis ?pic .g .O *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end + $(1).GCC.DYLIB++ = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.DYLIB++.args),$$(1),$$(2)) + + # FUNCTION: C++ link executable + $(1).GCC.EXE++.args = !gxx ?pipe ?strip ?ML *W *archs ?vis ?pic .g .O *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end + $(1).GCC.EXE++ = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.EXE++.args),$$(1),$$(2)) +endef diff --git a/make/include/main.defs b/make/include/main.defs new file mode 100644 index 000000000..c40e2b62a --- /dev/null +++ b/make/include/main.defs @@ -0,0 +1,75 @@ +.DELETE_ON_ERROR: +.SUFFIXES: + +.PHONY: build +build: + +############################################################################### + +include $(PROJECT/)make/include/base.defs +include $(PROJECT/)make/include/contrib.defs +include $(PROJECT/)make/include/function.defs +include $(PROJECT/)make/include/gcc.defs +include $(PROJECT/)make/include/select.defs +include $(PROJECT/)make/include/target.defs +include $(PROJECT/)make/include/tool.defs + +############################################################################### + +MODULES += contrib/a52dec + +ifneq (,$(filter $(BUILD.system),cygwin)) + MODULES += contrib/bzip2 +endif + +MODULES += contrib/faac +MODULES += contrib/faad2 +MODULES += contrib/ffmpeg +MODULES += contrib/lame +MODULES += contrib/libdca +MODULES += contrib/libdvdread +MODULES += contrib/libmkv +MODULES += contrib/libmp4v2 +MODULES += contrib/libogg +MODULES += contrib/libsamplerate +MODULES += contrib/libtheora +MODULES += contrib/libvorbis +MODULES += contrib/mpeg2dec +MODULES += contrib/x264 +MODULES += contrib/xvidcore + +ifneq (,$(filter $(BUILD.system),cygwin)) + MODULES += contrib/zlib +endif + +## these must come after contrib since some contrib modules are optional +MODULES += libhb + +############################################################################### + +## test module is replaced with macosx when Darwin+Xcode +ifneq (,$(filter $(BUILD.system),darwin)) + ifeq (1,$(FEATURE.xcode)) + MODULES += macosx + else + MODULES += test + endif +else + MODULES += test +endif + +ifneq (,$(filter $(BUILD.system),linux)) + ifeq (1,$(FEATURE.gtk)) + MODULES += gtk + endif +endif + +############################################################################### + +MODULES += doc + +############################################################################### + +include $(MODULES:%=$(PROJECT/)%/module.defs) +include $(PROJECT/)make/variant/$(HOST.system).defs +-include $(PROJECT/)make/variant/$(HOST.system).$(BUILD.proc).defs diff --git a/make/include/main.rules b/make/include/main.rules new file mode 100644 index 000000000..f46d22398 --- /dev/null +++ b/make/include/main.rules @@ -0,0 +1,39 @@ +## only included using special report targets +ifneq (,$(REPORT)) + include $(PROJECT/)make/include/report.defs +endif + +############################################################################### + +.PHONY: clean xclean doc report + +clean: +xclean: contrib.xclean clean +doc: +report:: report.main report.modules + +## legacy +mrproper: xclean + +############################################################################### + +include $(MODULES:%=$(PROJECT/)%/module.rules) +include $(PROJECT/)make/variant/$(HOST.system).rules +-include $(PROJECT/)make/variant/$(HOST.system).$(BUILD.proc).rules + +############################################################################### + +## target which causes re-configure if project-root is svn update'd +$(BUILD/)GNUmakefile: $(wildcard $(PROJECT/).svn/entries) + $(PROJECT/)configure $(CONF.args) + +## target useful to force reconfigure; only helpful for build-system development +.PHONY: reconfigure +reconfigure: + $(PROJECT/)configure $(CONF.args) + +############################################################################### + +## target to build all dependency dirs +$(sort $(dir $(BUILD.out))): + $(MKDIR.exe) -p $@ diff --git a/make/include/report.defs b/make/include/report.defs new file mode 100644 index 000000000..6ff71dc99 --- /dev/null +++ b/make/include/report.defs @@ -0,0 +1,53 @@ +## function: print a var's name, definition and expanded value +## +## $(1) = name of variable +## +define fn.PRINTVAR + +$(1) + ORIGIN = $(origin $(1)) + FLAVOR = $(flavor $(1)) + DEFINITION = $(value $(1)) + EXPANDED = $($(1)) +endef + +## report: module +## +## REPORT.module = module name (uppercase) +## +ifeq (module,$(REPORT)) +$(info ###############################################################################) +$(info ##) +$(info ## MODULE: $(REPORT.module)) +$(info ##) +$(info ###############################################################################) +$(info $(foreach v,$(sort $(filter $(REPORT.module).%,$(.VARIABLES))),$(call fn.PRINTVAR,$v))) +$(info ) +endif + +## report: main +## +ifeq (main,$(REPORT)) +$(info ###############################################################################) +$(info ##) +$(info ## MAIN) +$(info ##) +$(info ###############################################################################) +$(info $(foreach v,$(sort $(filter HB.%,$(.VARIABLES))),$(call fn.PRINTVAR,$v))) +$(info $(foreach v,$(sort $(filter HOST.%,$(.VARIABLES))),$(call fn.PRINTVAR,$v))) +$(info $(foreach v,$(sort $(filter BUILD.%,$(.VARIABLES))),$(call fn.PRINTVAR,$v))) +$(info $(foreach v,$(sort $(filter CONTRIB.%,$(.VARIABLES))),$(call fn.PRINTVAR,$v))) +$(info ) +endif + +## report: gcc +## +ifeq (gcc,$(REPORT)) +$(info ###############################################################################) +$(info ##) +$(info ## GCC) +$(info ##) +$(info ###############################################################################) +$(info $(foreach v,$(sort $(filter GCC.%,$(.VARIABLES))),$(call fn.PRINTVAR,$v))) +$(info ) +endif diff --git a/make/include/select.defs b/make/include/select.defs new file mode 100644 index 000000000..32a652523 --- /dev/null +++ b/make/include/select.defs @@ -0,0 +1,12 @@ +## +## fetch a file from the web via well-known anonymous protocols such as HTTP. +## +## $(1) = output filename +## $(2) = URL +## +FETCH = $(FETCH.$(FETCH.select)) + +FETCH.select = MISSING +FETCH.MISSING = $(error one of the following tools is required: wget, curl) +FETCH.curl = $(CURL.exe) -q -L -o $(1) $(2) +FETCH.wget = $(WGET.exe) -O $(1) $(2) diff --git a/make/include/target.defs b/make/include/target.defs new file mode 100644 index 000000000..64bdde434 --- /dev/null +++ b/make/include/target.defs @@ -0,0 +1,14 @@ +TARGET.dylib.prefix = lib +TARGET.dylib.suffix = +TARGET.dylib.ext = .dylib +TARGET.dylib = $(TARGET.dylib.prefix)$(1)$(TARGET.dylib.suffix)$(TARGET.dylib.ext) + +TARGET.archive.prefix = lib +TARGET.archive.suffix = +TARGET.archive.ext = .a +TARGET.archive = $(TARGET.archive.prefix)$(1)$(TARGET.archive.suffix)$(TARGET.archive.ext) + +TARGET.exe.prefix = +TARGET.exe.suffix = +TARGET.exe.ext = +TARGET.exe = $(TARGET.exe.prefix)$(1)$(TARGET.exe.suffix)$(TARGET.exe.ext) diff --git a/make/include/tool.defs b/make/include/tool.defs new file mode 100644 index 000000000..0ccccd728 --- /dev/null +++ b/make/include/tool.defs @@ -0,0 +1,10 @@ +AR.exe = ar +CP.exe = cp +CURL.exe = curl +M4.exe = m4 +MKDIR.exe = mkdir +PATCH.exe = patch +RM.exe = rm +TAR.exe = tar +TOUCH.exe = touch +WGET.exe = wget diff --git a/make/variant/cygwin.defs b/make/variant/cygwin.defs new file mode 100644 index 000000000..bab73c6ca --- /dev/null +++ b/make/variant/cygwin.defs @@ -0,0 +1,8 @@ +GCC.muldefs = 1 +GCC.start = 1 +GCC.end = 1 + +GCC.args.g.none = -g0 +GCC.args.g.min = -g1 +GCC.args.g.default = -g2 +GCC.args.g.max = -g3 diff --git a/make/variant/darwin.defs b/make/variant/darwin.defs new file mode 100644 index 000000000..6f8f6729d --- /dev/null +++ b/make/variant/darwin.defs @@ -0,0 +1,61 @@ +## UB build support +## +## PROCEDURE: +## +## 1. Perform a build (let us call it arch-X). +## 2. cd into arch-X's build/ driectory. +## 3. Launch builds of the remaining architectures. +## We compute $(UB.archs.other) to be the remaining archs to build. +## The entire list is defined $(UB.archs) . +## 4. Combine other architectures into arch-X's binaries. +## +## EXAMPLE: serial method, archs: i386,x86_64,ppc,ppc64 +## +## ./configure --launch +## cd build/ +## make ub.build.serial +## make ub.combine +## +## EXAMPLE: parallel method, archs: i386,x86_64,ppc,ppc64 +## +## ./configure --launch +## cd build/ +## make ub.build.parallel +## make ub.combine +## +## EXAMPLE: serial, archs: i386,x86_64 (assuming i386 is native) +## +## ./configure --launch +## cd build/ +## make ub.build.parallel UB.archs="i386 x86_64" +## make ub.combine UB.archs="i386 x86_64" +## +UB.archs = i386 x86_64 ppc ppc64 +UB.archs.other = $(filter-out $(BUILD.arch),$(UB.archs)) +UB.builds = $(wildcard $(foreach n,$(UB.archs.other),$(PROJECT/)build.$n)) + +UB.BUILD = $(PROJECT/)configure --launch --launch-dir=ub.$(1) --arch=$(1) + +## linefeed is important +define UB.BUILD.item + $(call UB.BUILD,$(1)) + +endef + +define UB.BUILD.SERIAL + $(foreach n,$(UB.archs.other),$(call UB.BUILD.item,$n)) +endef + +define UB.BUILD.PARALLEL + $(call UB.BUILD,$(1)) 2>&1 > ub.$(1).log +endef + +define UB.COMBINE + $(RM.exe) -fr ub.combine + $(MKDIR.exe) -p ub.combine + $(CP.exe) -R HandBrake.app ub.combine/. + lipo $(1) $(foreach n,$(UB.archs.other),ub.$n/$(1)) -create -output ub.combine/$(1) + @echo "" + @sync; lipo -info ub.combine/$(1) + @du -sh ub.combine/$(1) +endef diff --git a/make/variant/darwin.rules b/make/variant/darwin.rules new file mode 100644 index 000000000..c4f4f97a4 --- /dev/null +++ b/make/variant/darwin.rules @@ -0,0 +1,20 @@ +.PHONY: ub.build ub.combine ub.clean + +ub.build.serial: + @$(UB.BUILD.SERIAL) + +ub.build.parallel: + @set -e; \ + for arch in $(UB.archs.other); do \ + $(call UB.BUILD.PARALLEL,$$arch) & \ + children="$$children $$!"; \ + echo "pid $$!: $(call UB.BUILD.PARALLEL,$$arch)"; \ + done; \ + echo "waiting for background jobs to complete:$$children"; \ + wait + +ub.combine: + $(call UB.COMBINE,HandBrake.app/Contents/MacOS/HandBrake) + +ub.clean: + $(RM.EXE) -fr $(foreach n,$(UB.archs.other),ub.$n) diff --git a/make/variant/darwin.x86_64.defs b/make/variant/darwin.x86_64.defs new file mode 100644 index 000000000..c6e856476 --- /dev/null +++ b/make/variant/darwin.x86_64.defs @@ -0,0 +1,3 @@ +## can enable asm if we replace .rept pseudo op with standard pre-processor macros +## since darwin's as doesn't support them. for now just disable. +LIBTHEORA.CONFIGURE.extra += --disable-asm diff --git a/make/variant/freebsd.defs b/make/variant/freebsd.defs new file mode 100644 index 000000000..c58706ba1 --- /dev/null +++ b/make/variant/freebsd.defs @@ -0,0 +1,4 @@ +TARGET.dylib.ext = .so + +GCC.args.dylib = -shared +GCC.args.pic = 1 diff --git a/make/variant/linux.defs b/make/variant/linux.defs new file mode 100644 index 000000000..f0babe87c --- /dev/null +++ b/make/variant/linux.defs @@ -0,0 +1,11 @@ +TARGET.dylib.ext = .so + +GCC.start = 1 +GCC.end = 1 +GCC.args.dylib = -shared +GCC.args.pic = 1 + +GCC.args.g.none = -g0 +GCC.args.g.min = -g1 +GCC.args.g.default = -g2 +GCC.args.g.max = -g3 diff --git a/test/BUILDSHARED b/test/BUILDSHARED deleted file mode 100644 index 6b33fb90a..000000000 --- a/test/BUILDSHARED +++ /dev/null @@ -1,36 +0,0 @@ -To test the HandBrake dylib on MacOs X issue the following commands: -=================================================================== - -cp ../libhb/libhb.dylib . -gcc -I../libhb -L. -lhb test.c -o test -arch i386 -arch ppc -install_name_tool -change /usr/local/lib/libhb.dylib @executable_path/libhb.dylib test - -Validate that the test Binary is really using the shared library - -otool -L test - ------------------------------------------------------------------------- - -To test the HandBrake .so on Linux issue the following commands: -================================================================ - -cp ../libhb/libhb.so . -gcc -I../libhb -L. -lhb test.c -o test -lz -lpthread - -Validate that the test Binary is really using the shared library - -ldd test - ------------------------------------------------------------------------- - -To test the HandBrake .dll on cygwin issue the following commands: -================================================================== - -cp ../libhb/libhb.dll . -gcc -I../libhb -L. -lhb test.c -o test -lz -lpthread - -The resulting binary test should depend on the cygwin dll and the hb dll. - -I works like that but wasn't tested yet outside of cygwin. - ------------------------------------------------------------------------- diff --git a/test/Makefile b/test/Makefile deleted file mode 100644 index 219d594d8..000000000 --- a/test/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -SYSTEM = $(shell uname -s) - -LIBS = a52 mkv avformat avcodec avutil dca dvdread faac mp3lame mpeg2 vorbis \ - vorbisenc ogg samplerate x264 xvidcore mp4v2 swscale theora faad - -CYGLIBS = zlib bzip2 - -all: ../HandBrakeCLI - -CFLAGS += -I../libhb -CXXFLAGS += -I../libhb -LIBS2 = ../libhb/libhb.a $(LIBS:%=../contrib/lib/lib%.a) - -ifeq ($(findstring CYGWIN_NT,$(SYSTEM)),CYGWIN_NT) - LIBS2 += $(CYGLIBS:%=../contrib/lib/libz.a) $(CYGLIBS:%=../contrib/lib/libbz2.a) -endif - -LDFLAGS += $(LIBS2) -lbz2 -ldl - -../HandBrakeCLI: test.c parsecsv.c $(LIBS2) - @CMD="$(CC) $(CFLAGS) -o test.o -c test.c"; $$CMD || \ - ( echo "Compile line for $@ was:"; echo $$CMD; false ) - @CMD="$(CC) $(CFLAGS) -o parsecsv.o -c parsecsv.c"; $$CMD || \ - ( echo "Compile line for $@ was:"; echo $$CMD; false ) - @echo "Link HandBrakeCLI" - @CMD="g++ $(CXXFLAGS) -o ../HandBrakeCLI test.o parsecsv.o $(LDFLAGS) -lz -lpthread"; $$CMD || \ - ( echo "Compile line for $@ was:"; echo $$CMD; false ) - @CMD="rm -rf ../plugins ; mkdir ../plugins ; cp ../contrib/lib/libquicktime/* ../plugins"; $$CMD - - -clean: - @echo "Clean HandBrakeCLI" - @$(RM) ../HandBrakeCLI - @$(RM) ../HandBrakeCLI.exe - @$(RM) *.o - diff --git a/test/module.defs b/test/module.defs new file mode 100644 index 000000000..3eda79509 --- /dev/null +++ b/test/module.defs @@ -0,0 +1,41 @@ +$(eval $(call import.MODULE.defs,TEST,test,LIBHB)) +$(eval $(call import.GCC,TEST)) + +TEST.src/ = $(PROJECT/)test/ +TEST.build/ = $(BUILD/)test/ + +TEST.c = $(wildcard $(TEST.src/)*.c) +TEST.c.o = $(patsubst $(PROJECT/)%.c,$(BUILD/)%.o,$(TEST.c)) + +TEST.exe = $(BUILD/)$(call TARGET.exe,$(HB.name)CLI) + +TEST.libs = $(LIBHB.a) $(foreach n, \ + a52 avcodec avformat avutil dca dvdread faac faad mkv mpeg2 mp3lame mp4v2 \ + ogg samplerate swscale theora vorbis vorbisenc x264 xvidcore, \ + $(CONTRIB.build/)lib/lib$(n).a ) + +## add libs from optional modules +ifeq (1,$(BZIP2.enabled)) + TEST.libs += $(CONTRIB.build/)lib/libbz2.a +endif +ifeq (1,$(ZLIB.enabled)) + TEST.libs += $(CONTRIB.build/)lib/libz.a +endif + +############################################################################### + +TEST.out += $(TEST.c.o) +TEST.out += $(TEST.exe) + +BUILD.out += $(TEST.out) + +############################################################################### + +TEST.GCC.I += $(LIBHB.GCC.I) + +ifeq ($(BUILD.system),darwin) + TEST.GCC.f += IOKit CoreServices + TEST.GCC.l += bz2 z +else ifeq ($(BUILD.system),linux) + TEST.GCC.l += bz2 z pthread dl m +endif diff --git a/test/module.rules b/test/module.rules new file mode 100644 index 000000000..34004b97f --- /dev/null +++ b/test/module.rules @@ -0,0 +1,20 @@ +$(eval $(call import.MODULE.rules,TEST)) + +test.build: $(TEST.exe) + +$(TEST.exe): | $(dir $(TEST.exe)) +$(TEST.exe): $(TEST.c.o) + $(call TEST.GCC.EXE++,$@,$^ $(TEST.libs)) + +$(TEST.c.o): $(LIBHB.a) +$(TEST.c.o): | $(dir $(TEST.c.o)) +$(TEST.c.o): $(BUILD/)%.o: $(PROJECT/)%.c + $(call TEST.GCC.C_O,$@,$<) + +test.clean: + $(RM.exe) -f $(TEST.out) + +############################################################################### + +build: test.build +clean: test.clean diff --git a/test/test.c b/test/test.c index 2c24d4c36..0fd39f527 100644 --- a/test/test.c +++ b/test/test.c @@ -2217,20 +2217,19 @@ static int ParseOptions( int argc, char ** argv ) break; case 'i': input = strdup( optarg ); - #ifdef __APPLE_CC__ - char *devName = bsd_name_for_path( input ); - if( devName == NULL ) - { - break; - } - if( device_is_dvd( devName ) ) +#ifdef __APPLE_CC__ + char *devName = bsd_name_for_path( input ); // alloc + if( devName ) { - char *newInput = malloc( strlen("/dev/") + strlen( devName ) + 1); - sprintf( newInput, "/dev/%s", devName ); - free(input); - input = newInput; + if( device_is_dvd( devName )) + { + free( input ); + input = malloc( strlen( "/dev/" ) + strlen( devName ) + 1 ); + sprintf( input, "/dev/%s", devName ); + } + free( devName ); } - #endif +#endif break; case 'o': output = strdup( optarg ); @@ -2711,10 +2710,20 @@ static char* bsd_name_for_path(char *path) return NULL; } - // A version 4 GetVolParmsInfoBuffer contains the BSD node name in the - // vMDeviceID field. It is actually a char * value. This is mentioned in the - // header CoreServices/CarbonCore/Files.h. - return volumeParms.vMDeviceID; + // A version 4 GetVolParmsInfoBuffer contains the BSD node name in the vMDeviceID field. + // It is actually a char * value. This is mentioned in the header CoreServices/CarbonCore/Files.h. + if( volumeParms.vMVersion < 4 ) + { + return NULL; + } + + // vMDeviceID might be zero as is reported with experimental ZFS (zfs-119) support in Leopard. + if( !volumeParms.vMDeviceID ) + { + return NULL; + } + + return strdup( volumeParms.vMDeviceID ); } /**************************************************************************** |