Add libjeack0 as (Debian and co) dep.

Also add --skip-foo args to command line.
This commit is contained in:
Bastien Montagne 2012-12-03 17:53:01 +00:00
parent d6a09974e2
commit eeece25d82

@ -4,8 +4,9 @@
ARGS=$( \ ARGS=$( \
getopt \ getopt \
-o s:i:t:h \ -o s:i:t:h \
--long source:,install:,threads:,help,with-osl,all-static,force-all,force-python, --long source:,install:,threads:,help,with-osl,all-static,force-all,force-python,\
force-boost,force-ocio,force-oiio,force-llvm,force-osl,force-ffmpeg \ force-boost,force-ocio,force-oiio,force-llvm,force-osl,force-ffmpeg,\
skip-python,skip-boost,skip-ocio,skip-oiio,skip-llvm,skip-osl,skip-ffmpeg \
-- "$@" \ -- "$@" \
) )
@ -27,7 +28,7 @@ fi
COMMON_INFO="\"Source code of dependencies needed to be compiled will be downloaded and extracted into '\$SRC'. COMMON_INFO="\"Source code of dependencies needed to be compiled will be downloaded and extracted into '\$SRC'.
Built libs of dependencies needed to be compiled will be installed into '\$INST'. Built libs of dependencies needed to be compiled will be installed into '\$INST'.
Please edit \\\$SRC and/or \\\$INST variables at the begining of this script, Please edit \\\$SRC and/or \\\$INST variables at the beginning of this script,
or use --source/--install options, if you want to use other paths! or use --source/--install options, if you want to use other paths!
Number of threads for building: \$THREADS (automatically detected, use --threads=<nbr> to override it). Number of threads for building: \$THREADS (automatically detected, use --threads=<nbr> to override it).
@ -82,31 +83,56 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
Note about the --force-foo options: Note about the --force-foo options:
* They obviously only have an effect if those libraries are built by this script * They obviously only have an effect if those libraries are built by this script
(i.e. if there is no available and satisfatory package)! (i.e. if there is no available and satisfactory package)!
* If the “force-rebuilt” library is a dependency of anothers, it will force the rebuild * If the “force-rebuilt” library is a dependency of others, it will force the rebuild
of those libraries too (e.g. --force-boost will also rebuild oiio and osl...). of those libraries too (e.g. --force-boost will also rebuild oiio and osl...).
* Do not forget --with-osl if you built it and still want it!\"" * Do not forget --with-osl if you built it and still want it!
--skip-python
Unconditionally skip Python installation/building.
--skip-boost
Unconditionally skip Boost installation/building.
--skip-ocio
Unconditionally skip OpenColorIO installation/building.
--skip-oiio
Unconditionally skip OpenImageIO installation/building.
--skip-llvm
Unconditionally skip LLVM installation/building.
--skip-osl
Unconditionally skip OpenShadingLanguage installation/building.
--skip-ffmpeg
Unconditionally skip FFMpeg installation/building.\""
PYTHON_VERSION="3.3.0" PYTHON_VERSION="3.3.0"
PYTHON_VERSION_MIN="3.3" PYTHON_VERSION_MIN="3.3"
PYTHON_SOURCE="http://python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.bz2" PYTHON_SOURCE="http://python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.bz2"
PYTHON_FORCE_REBUILD=false PYTHON_FORCE_REBUILD=false
PYTHON_SKIP=false
BOOST_VERSION="1.51.0" BOOST_VERSION="1.51.0"
_boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'` _boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'`
BOOST_SOURCE="http://sourceforge.net/projects/boost/files/boost/$BOOST_VERSION/boost_$_boost_version_nodots.tar.bz2/download" BOOST_SOURCE="http://sourceforge.net/projects/boost/files/boost/$BOOST_VERSION/boost_$_boost_version_nodots.tar.bz2/download"
BOOST_VERSION_MIN="1.49" BOOST_VERSION_MIN="1.49"
BOOST_FORCE_REBUILD=false BOOST_FORCE_REBUILD=false
BOOST_SKIP=false
OCIO_VERSION="1.0.7" OCIO_VERSION="1.0.7"
OCIO_SOURCE="https://github.com/imageworks/OpenColorIO/tarball/v$OCIO_VERSION" OCIO_SOURCE="https://github.com/imageworks/OpenColorIO/tarball/v$OCIO_VERSION"
OCIO_VERSION_MIN="1.0" OCIO_VERSION_MIN="1.0"
OCIO_FORCE_REBUILD=false OCIO_FORCE_REBUILD=false
OCIO_SKIP=false
OIIO_VERSION="1.1.1" OIIO_VERSION="1.1.1"
OIIO_SOURCE="https://github.com/OpenImageIO/oiio/tarball/Release-$OIIO_VERSION" OIIO_SOURCE="https://github.com/OpenImageIO/oiio/tarball/Release-$OIIO_VERSION"
OIIO_VERSION_MIN="1.1" OIIO_VERSION_MIN="1.1"
OIIO_FORCE_REBUILD=false OIIO_FORCE_REBUILD=false
OIIO_SKIP=false
LLVM_VERSION="3.1" LLVM_VERSION="3.1"
LLVM_VERSION_MIN="3.0" LLVM_VERSION_MIN="3.0"
@ -114,16 +140,19 @@ LLVM_VERSION_FOUND=""
LLVM_SOURCE="http://llvm.org/releases/$LLVM_VERSION/llvm-$LLVM_VERSION.src.tar.gz" LLVM_SOURCE="http://llvm.org/releases/$LLVM_VERSION/llvm-$LLVM_VERSION.src.tar.gz"
LLVM_CLANG_SOURCE="http://llvm.org/releases/$LLVM_VERSION/clang-$LLVM_VERSION.src.tar.gz" LLVM_CLANG_SOURCE="http://llvm.org/releases/$LLVM_VERSION/clang-$LLVM_VERSION.src.tar.gz"
LLVM_FORCE_REBUILD=false LLVM_FORCE_REBUILD=false
LLVM_SKIP=false
# OSL needs to be compiled for now! # OSL needs to be compiled for now!
OSL_VERSION="1.2.0" OSL_VERSION="1.2.0"
OSL_SOURCE="https://github.com/mont29/OpenShadingLanguage/archive/blender-fixes.tar.gz" OSL_SOURCE="https://github.com/mont29/OpenShadingLanguage/archive/blender-fixes.tar.gz"
OSL_FORCE_REBUILD=false OSL_FORCE_REBUILD=false
OSL_SKIP=false
FFMPEG_VERSION="1.0" FFMPEG_VERSION="1.0"
FFMPEG_SOURCE="http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" FFMPEG_SOURCE="http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2"
FFMPEG_VERSION_MIN="0.7.6" FFMPEG_VERSION_MIN="0.7.6"
FFMPEG_FORCE_REBUILD=false FFMPEG_FORCE_REBUILD=false
FFMPEG_SKIP=false
_ffmpeg_list_sep=";" _ffmpeg_list_sep=";"
# FFMPEG optional libs. # FFMPEG optional libs.
@ -228,6 +257,27 @@ while true; do
--force-ffmpeg) --force-ffmpeg)
FFMPEG_FORCE_REBUILD=true; shift; continue FFMPEG_FORCE_REBUILD=true; shift; continue
;; ;;
--skip-python)
PYTHON_SKIP=true; shift; continue
;;
--skip-boost)
BOOST_SKIP=true; shift; continue
;;
--skip-ocio)
OCIO_SKIP=true; shift; continue
;;
--skip-oiio)
OIIO_SKIP=true; shift; continue
;;
--skip-llvm)
LLVM_SKIP=true; shift; continue
;;
--skip-osl)
OSL_SKIP=true; shift; continue
;;
--skip-ffmpeg)
FFMPEG_SKIP=true; shift; continue
;;
--) --)
# no more arguments to parse # no more arguments to parse
break break
@ -1041,7 +1091,7 @@ install_DEB() {
libfreetype6-dev libx11-dev libxi-dev wget libsqlite3-dev libbz2-dev libncurses5-dev \ libfreetype6-dev libx11-dev libxi-dev wget libsqlite3-dev libbz2-dev libncurses5-dev \
libssl-dev liblzma-dev libreadline-dev $OPENJPEG_DEV libopenexr-dev libopenal-dev \ libssl-dev liblzma-dev libreadline-dev $OPENJPEG_DEV libopenexr-dev libopenal-dev \
libglew-dev yasm $SCHRO_DEV $THEORA_DEV $VORBIS_DEV libsdl1.2-dev \ libglew-dev yasm $SCHRO_DEV $THEORA_DEV $VORBIS_DEV libsdl1.2-dev \
libfftw3-dev libjack-dev python-dev patch bzip2 libfftw3-dev libjack0 libjack-dev python-dev patch bzip2
OPENJPEG_USE=true OPENJPEG_USE=true
SCHRO_USE=true SCHRO_USE=true
@ -1095,14 +1145,21 @@ install_DEB() {
fi fi
INFO "" INFO ""
if $PYTHON_SKIP; then
INFO "WARNING! Skipping Python installation, as requested..."
else
check_package_DEB python3.3-dev check_package_DEB python3.3-dev
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
install_packages_DEB python3.3-dev install_packages_DEB python3.3-dev
else else
compile_Python compile_Python
fi fi
fi
INFO "" INFO ""
if $BOOST_SKIP; then
INFO "WARNING! Skipping Boost installation, as requested..."
else
check_package_version_ge_DEB libboost-dev $BOOST_VERSION_MIN check_package_version_ge_DEB libboost-dev $BOOST_VERSION_MIN
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
install_packages_DEB libboost-dev install_packages_DEB libboost-dev
@ -1120,26 +1177,38 @@ install_DEB() {
else else
compile_Boost compile_Boost
fi fi
fi
INFO "" INFO ""
if $OCIO_SKIP; then
INFO "WARNING! Skipping OpenColorIO installation, as requested..."
else
check_package_version_ge_DEB libopencolorio-dev $OCIO_VERSION_MIN check_package_version_ge_DEB libopencolorio-dev $OCIO_VERSION_MIN
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
install_packages_DEB libopencolorio-dev install_packages_DEB libopencolorio-dev
else else
compile_OCIO compile_OCIO
fi fi
fi
INFO "" INFO ""
if $OIIO_SKIP; then
INFO "WARNING! Skipping OpenImageIO installation, as requested..."
else
check_package_version_ge_DEB libopenimageio-dev $OIIO_VERSION_MIN check_package_version_ge_DEB libopenimageio-dev $OIIO_VERSION_MIN
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
install_packages_DEB libopenimageio-dev install_packages_DEB libopenimageio-dev
else else
compile_OIIO compile_OIIO
fi fi
fi
if $BUILD_OSL; then if $BUILD_OSL; then
have_llvm=false have_llvm=false
if $LLVM_SKIP; then
INFO "WARNING! Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
else
INFO "" INFO ""
check_package_DEB llvm-$LLVM_VERSION-dev check_package_DEB llvm-$LLVM_VERSION-dev
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
@ -1160,7 +1229,12 @@ install_DEB() {
LLVM_VERSION_FOUND=$LLVM_VERSION LLVM_VERSION_FOUND=$LLVM_VERSION
fi fi
fi fi
fi
if $OSL_SKIP; then
INFO ""
INFO "WARNING! Skipping OpenShadingLanguage installation, as requested..."
else
if $have_llvm; then if $have_llvm; then
INFO "" INFO ""
install_packages_DEB clang flex bison libtbb-dev git install_packages_DEB clang flex bison libtbb-dev git
@ -1169,7 +1243,13 @@ install_DEB() {
compile_OSL compile_OSL
fi fi
fi fi
fi
INFO ""
if $FFMPEG_SKIP; then
INFO "WARNING! Skipping FFMpeg installation, as requested..."
else
# XXX Debian features libav packages as ffmpeg, those are not really compatible with blender code currently :/ # XXX Debian features libav packages as ffmpeg, those are not really compatible with blender code currently :/
# So for now, always build our own ffmpeg. # So for now, always build our own ffmpeg.
# check_package_DEB ffmpeg # check_package_DEB ffmpeg
@ -1185,8 +1265,8 @@ install_DEB() {
# fi # fi
# fi # fi
# fi # fi
INFO ""
compile_FFmpeg compile_FFmpeg
fi
} }
get_package_version_RPM() { get_package_version_RPM() {
@ -1294,41 +1374,60 @@ install_RPM() {
fi fi
INFO "" INFO ""
if $PYTHON_SKIP; then
INFO "WARNING! Skipping Python installation, as requested..."
else
check_package_version_match_RPM python3-devel $PYTHON_VERSION_MIN check_package_version_match_RPM python3-devel $PYTHON_VERSION_MIN
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
install_packages_RPM python3-devel install_packages_RPM python3-devel
else else
compile_Python compile_Python
fi fi
fi
INFO "" INFO ""
if $BOOST_SKIP; then
INFO "WARNING! Skipping Boost installation, as requested..."
else
check_package_version_ge_RPM boost-devel $BOOST_VERSION_MIN check_package_version_ge_RPM boost-devel $BOOST_VERSION_MIN
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
install_packages_RPM boost-devel install_packages_RPM boost-devel
else else
compile_Boost compile_Boost
fi fi
fi
INFO "" INFO ""
if $OCIO_SKIP; then
INFO "WARNING! Skipping OpenColorIO installation, as requested..."
else
check_package_version_ge_RPM OpenColorIO-devel $OCIO_VERSION_MIN check_package_version_ge_RPM OpenColorIO-devel $OCIO_VERSION_MIN
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
install_packages_RPM OpenColorIO-devel install_packages_RPM OpenColorIO-devel
else else
compile_OCIO compile_OCIO
fi fi
fi
INFO "" INFO ""
if $OIIO_SKIP; then
INFO "WARNING! Skipping OpenImageIO installation, as requested..."
else
check_package_version_ge_RPM OpenImageIO-devel $OIIO_VERSION_MIN check_package_version_ge_RPM OpenImageIO-devel $OIIO_VERSION_MIN
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
install_packages_RPM OpenImageIO-devel install_packages_RPM OpenImageIO-devel
else else
compile_OIIO compile_OIIO
fi fi
fi
if $BUILD_OSL; then if $BUILD_OSL; then
have_llvm=false have_llvm=false
INFO "" INFO ""
if $LLVM_SKIP; then
INFO "WARNING! Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
else
check_package_RPM llvm-$LLVM_VERSION-devel check_package_RPM llvm-$LLVM_VERSION-devel
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
install_packages_RPM llvm-$LLVM_VERSION-devel install_packages_RPM llvm-$LLVM_VERSION-devel
@ -1356,7 +1455,12 @@ install_RPM() {
have_llvm=true have_llvm=true
LLVM_VERSION_FOUND=$LLVM_VERSION LLVM_VERSION_FOUND=$LLVM_VERSION
fi fi
fi
if $OSL_SKIP; then
INFO ""
INFO "WARNING! Skipping OpenShadingLanguage installation, as requested..."
else
if $have_llvm; then if $have_llvm; then
INFO "" INFO ""
install_packages_RPM flex bison clang tbb-devel git install_packages_RPM flex bison clang tbb-devel git
@ -1365,10 +1469,15 @@ install_RPM() {
compile_OSL compile_OSL
fi fi
fi fi
fi
# Always for now, not sure which packages should be installed
INFO "" INFO ""
if $FFMPEG_SKIP; then
INFO "WARNING! Skipping FFMpeg installation, as requested..."
else
# Always for now, not sure which packages should be installed
compile_FFmpeg compile_FFmpeg
fi
} }
get_package_version_SUSE() { get_package_version_SUSE() {
@ -1478,29 +1587,48 @@ install_SUSE() {
fi fi
INFO "" INFO ""
if $PYTHON_SKIP; then
INFO "WARNING! Skipping Python installation, as requested..."
else
check_package_version_match_SUSE python3-devel 3.3. check_package_version_match_SUSE python3-devel 3.3.
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
install_packages_SUSE python3-devel install_packages_SUSE python3-devel
else else
compile_Python compile_Python
fi fi
fi
INFO "" INFO ""
if $BOOST_SKIP; then
INFO "WARNING! Skipping Boost installation, as requested..."
else
# No boost_locale currently available, so let's build own boost. # No boost_locale currently available, so let's build own boost.
compile_Boost compile_Boost
fi
INFO "" INFO ""
if $OCIO_SKIP; then
INFO "WARNING! Skipping OpenColorIO installation, as requested..."
else
# No ocio currently available, so let's build own boost. # No ocio currently available, so let's build own boost.
compile_OCIO compile_OCIO
fi
INFO "" INFO ""
if $OIIO_SKIP; then
INFO "WARNING! Skipping OpenImageIO installation, as requested..."
else
# No oiio currently available, so let's build own boost. # No oiio currently available, so let's build own boost.
compile_OIIO compile_OIIO
fi
if $BUILD_OSL; then if $BUILD_OSL; then
have_llvm=false have_llvm=false
INFO "" INFO ""
if $LLVM_SKIP; then
INFO "WARNING! Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
else
# Suse llvm package *_$SUCKS$_* (tm) !!! # Suse llvm package *_$SUCKS$_* (tm) !!!
# check_package_version_ge_SUSE llvm-devel $LLVM_VERSION_MIN # check_package_version_ge_SUSE llvm-devel $LLVM_VERSION_MIN
# if [ $? -eq 0 ]; then # if [ $? -eq 0 ]; then
@ -1514,7 +1642,12 @@ install_SUSE() {
compile_LLVM compile_LLVM
have_llvm=true have_llvm=true
LLVM_VERSION_FOUND=$LLVM_VERSION LLVM_VERSION_FOUND=$LLVM_VERSION
fi
if $OSL_SKIP; then
INFO ""
INFO "WARNING! Skipping OpenShaderLanguage installation, as requested..."
else
if $have_llvm; then if $have_llvm; then
INFO "" INFO ""
# XXX No tbb lib! # XXX No tbb lib!
@ -1524,10 +1657,15 @@ install_SUSE() {
compile_OSL compile_OSL
fi fi
fi fi
fi
# No ffmpeg currently available, so let's build own boost.
INFO "" INFO ""
if $FFMPEG_SKIP; then
INFO "WARNING! Skipping FFMpeg installation, as requested..."
else
# No ffmpeg currently available, so let's build own boost.
compile_FFmpeg compile_FFmpeg
fi
} }
print_info_ffmpeglink_DEB() { print_info_ffmpeglink_DEB() {