Changeset View
Changeset View
Standalone View
Standalone View
build_files/build_environment/install_deps.sh
| Context not available. | |||||
| OPENJPEG_USE=false | OPENJPEG_USE=false | ||||
| OPENJPEG_DEV="" | OPENJPEG_DEV="" | ||||
| # Whether to use system GLEW or not | |||||
| NO_SYSTEM_GLEW=false | |||||
mont29: Would add to comment this is needed for OpenSubDiv | |||||
| # Switch to english language, else some things (like check_package_DEB()) won't work! | # Switch to english language, else some things (like check_package_DEB()) won't work! | ||||
| LANG_BACK=$LANG | LANG_BACK=$LANG | ||||
| LANG="" | LANG="" | ||||
| Context not available. | |||||
| OIIO_FORCE_REBUILD=true | OIIO_FORCE_REBUILD=true | ||||
| OSL_FORCE_BUILD=true | OSL_FORCE_BUILD=true | ||||
| OSL_FORCE_REBUILD=true | OSL_FORCE_REBUILD=true | ||||
| OPENVDB_FORCE_BUILD=true | |||||
| OPENVDB_FORCE_REBUILD=true | |||||
| prepare_opt | prepare_opt | ||||
| Context not available. | |||||
| INFO "Downloading Boost-$BOOST_VERSION" | INFO "Downloading Boost-$BOOST_VERSION" | ||||
| mkdir -p $SRC | mkdir -p $SRC | ||||
| download BOOST_SOURCE[@] $_src.tar.bz2 | download BOOST_SOURCE[@] $_src.tar.bz2 | ||||
| tar -C $SRC --transform "s,(.*/?)boost_1_[^/]+(.*),\1boost-$BOOST_VERSION\2,x" -xf $_src.tar.bz2 | tar -C $SRC --transform "s,\w*,boost-$BOOST_VERSION,x" -xf $_src.tar.bz2 | ||||
| fi | fi | ||||
| cd $_src | cd $_src | ||||
| Context not available. | |||||
| if [ -d $_inst ]; then | if [ -d $_inst ]; then | ||||
| _create_inst_shortcut | _create_inst_shortcut | ||||
| # Copy ilmbase files here (blender expects same dir for ilmbase and openexr :/). | # Copy ilmbase files here (blender expects same dir for ilmbase and openexr :/). | ||||
| cp -Lrn $_ilmbase_inst/* $_inst_shortcut | cp -an $_ilmbase_inst/* $_inst_shortcut | ||||
| else | else | ||||
| ERROR "OpenEXR-$OPENEXR_VERSION failed to compile, exiting" | ERROR "OpenEXR-$OPENEXR_VERSION failed to compile, exiting" | ||||
| exit 1 | exit 1 | ||||
| Context not available. | |||||
| INFO "Done compiling Blosc-$OPENVDB_BLOSC_VERSION!" | INFO "Done compiling Blosc-$OPENVDB_BLOSC_VERSION!" | ||||
| else | else | ||||
| INFO "Own Blosc-$OPENVDB_BLOSC_VERSION is up to date, nothing to do!" | INFO "Own Blosc-$OPENVDB_BLOSC_VERSION is up to date, nothing to do!" | ||||
| INFO "If you want to force rebuild of this lib (and openexr), use the --force-openvdb option." | INFO "If you want to force rebuild of this lib (and openvdb), use the --force-openvdb option." | ||||
| fi | fi | ||||
| magic_compile_set blosc-$OPENVDB_BLOSC_VERSION $blosc_magic | magic_compile_set blosc-$OPENVDB_BLOSC_VERSION $blosc_magic | ||||
| Context not available. | |||||
| download OPENVDB_SOURCE[@] "$_src.tar.gz" | download OPENVDB_SOURCE[@] "$_src.tar.gz" | ||||
| INFO "Unpacking OpenVDB-$OPENVDB_VERSION" | INFO "Unpacking OpenVDB-$OPENVDB_VERSION" | ||||
| #~ tar -C $SRC --transform "s,(.*/?)OpenShadingLanguage-[^/]*(.*),\1OpenShadingLanguage-$OPENVDB_VERSION\2,x" \ | |||||
| #~ -xf $_src.tar.gz | |||||
| tar -C $SRC -xf $_src.tar.gz | tar -C $SRC -xf $_src.tar.gz | ||||
| fi | fi | ||||
| Context not available. | |||||
| #~ git reset --hard | #~ git reset --hard | ||||
| #~ fi | #~ fi | ||||
| cd openvdb # Grrrrrr... | # Source builds here | ||||
| cd openvdb | |||||
| # Always refresh the whole build! | |||||
| if [ -d build ]; then | |||||
| rm -rf build | |||||
| fi | |||||
| mkdir build | |||||
| cd build | |||||
| make_d="DESTDIR=$_inst" | make_d="DESTDIR=$_inst" | ||||
| make_d="$make_d HDSO=/usr" | |||||
| if [ -d $INST/boost ]; then | if [ -d $INST/boost ]; then | ||||
| make_d="$make_d -D BOOST_ROOT=$INST/boost -D Boost_NO_SYSTEM_PATHS=ON" | make_d="$make_d BOOST_INCL_DIR=$INST/boost/include BOOST_LIB_DIR=$INST/boost/lib" | ||||
| fi | fi | ||||
| #~ if [ "$_with_built_openexr" = true ]; then | if [ "$_with_built_openexr" = true ]; then | ||||
| #~ cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr" | make_d="$make_d ILMBASE_INCL_DIR=$INST/openexr/include ILMBASE_LIB_DIR=$INST/openexr/lib" | ||||
| #~ cmake_d="$cmake_d -D OPENEXR_HOME=$INST/openexr" | make_d="$make_d EXR_INCL_DIR=$INST/openexr/include EXR_LIB_DIR=$INST/openexr/lib" | ||||
| #~ INFO "ILMBASE_HOME=$INST/openexr" | INFO "ILMBASE_HOME=$INST/openexr" | ||||
| #~ fi | fi | ||||
| #~ cmake_d="-D CMAKE_BUILD_TYPE=Release" | if [ -d $INST/blosc ]; then | ||||
| #~ cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst" | make_d="$make_d BLOSC_INCL_DIR=$INST/blosc/include BLOSC_LIB_DIR=$INST/blosc/lib" | ||||
| #~ # ptex is only needed when nicholas bishop is ready | fi | ||||
| #~ cmake_d="$cmake_d -D NO_PTEX=1" | |||||
| #~ cmake_d="$cmake_d -D NO_CLEW=1" | |||||
| #~ # maya plugin, docs, tutorials, regression tests and examples are not needed | |||||
| #~ cmake_d="$cmake_d -D NO_MAYA=1 -D NO_DOC=1 -D NO_TUTORIALS=1 -D NO_REGRESSION=1 -DNO_EXAMPLES=1" | |||||
| #~ cmake $cmake_d .. | # Build without log4cplus, glfw, python module & docs | ||||
| make_d="$make_d LOG4CPLUS_INCL_DIR= GLFW_INCL_DIR= PYTHON_VERSION= DOXYGEN=" | |||||
| #~ make -j$THREADS && make install | make -j$THREADS lib $make_d install | ||||
| #~ make clean | make clean | ||||
| #~ if [ -d $_inst ]; then | if [ -d $_inst ]; then | ||||
| #~ _create_inst_shortcut | _create_inst_shortcut | ||||
| #~ else | else | ||||
| #~ ERROR "OpenSubdiv-$OSD_VERSION failed to compile, exiting" | ERROR "OpenVDB-$OPENVDB_VERSION failed to compile, exiting" | ||||
| #~ exit 1 | exit 1 | ||||
| #~ fi | fi | ||||
| #~ magic_compile_set osd-$OSD_VERSION $osd_magic | magic_compile_set openvdb-$OPENVDB_VERSION $openvdb_magic | ||||
| cd $CWD | cd $CWD | ||||
| INFO "Done compiling OpenVDB-$OPENVDB_VERSION!" | INFO "Done compiling OpenVDB-$OPENVDB_VERSION!" | ||||
| Context not available. | |||||
| --disable-postproc --disable-librtmp --disable-libopencore-amrnb \ | --disable-postproc --disable-librtmp --disable-libopencore-amrnb \ | ||||
| --disable-libopencore-amrwb --disable-libdc1394 --disable-version3 --disable-outdev=sdl \ | --disable-libopencore-amrwb --disable-libdc1394 --disable-version3 --disable-outdev=sdl \ | ||||
| --disable-libxcb \ | --disable-libxcb \ | ||||
| --disable-outdev=xv \ | --disable-outdev=xv --disable-indev=sndio --disable-outdev=sndio \ | ||||
| --disable-outdev=alsa --disable-indev=sdl --disable-indev=alsa --disable-indev=jack \ | --disable-outdev=alsa --disable-indev=sdl --disable-indev=alsa --disable-indev=jack \ | ||||
| --disable-indev=lavfi $extra | --disable-indev=lavfi $extra | ||||
| Context not available. | |||||
| #### Install on DEB-like #### | #### Install on DEB-like #### | ||||
| get_package_version_DEB() { | get_package_version_DEB() { | ||||
| dpkg-query -W -f '${Version}' $1 | sed -r 's/.*:\s*([0-9]+:)(([0-9]+\.?)+).*/\2/' | dpkg-query -W -f '${Version}' $1 | sed 's/\-.*//' | ||||
mont29Unsubmitted Not Done Inline ActionsThis isn't quite correct either, things like '1:2.3.4-dmo5' won't get correctly extracted… Think the following works in all cases? dpkg-query -W -f '${Version}' ffmpeg | sed -r 's/([0-9]+:)?(([0-9]+\.?)+([0-9]+)).*/\2/' mont29: This isn't quite correct either, things like '1:2.3.4-dmo5' won't get correctly extracted…… | |||||
| } | } | ||||
| check_package_DEB() { | check_package_DEB() { | ||||
| Context not available. | |||||
| if [ ! $SUDO ]; then | if [ ! $SUDO ]; then | ||||
| WARNING "--no-sudo enabled, impossible to run apt-get install for $@, you'll have to do it yourself..." | WARNING "--no-sudo enabled, impossible to run apt-get install for $@, you'll have to do it yourself..." | ||||
| else | else | ||||
| $SUDO apt-get install -y --force-yes $@ | $SUDO apt-get install -y $@ | ||||
| if [ $? -ge 1 ]; then | if [ $? -ge 1 ]; then | ||||
| ERROR "apt-get failed to install requested packages, exiting." | ERROR "apt-get failed to install requested packages, exiting." | ||||
| exit 1 | exit 1 | ||||
| Context not available. | |||||
| [ "$(echo ${REPLY:=Y} | tr [:upper:] [:lower:])" != "y" ] && exit | [ "$(echo ${REPLY:=Y} | tr [:upper:] [:lower:])" != "y" ] && exit | ||||
| fi | fi | ||||
| if [ ! -z "`cat /etc/debian_version | grep ^6`" ]; then | |||||
| if [ -z "`cat /etc/apt/sources.list | grep backports.debian.org`" ]; then | |||||
| WARNING "Looks like you're using Debian Squeeze which does have broken CMake" | |||||
| PRINT "It is highly recommended to install cmake from backports, otherwise" | |||||
| PRINT "compilation of some libraries could fail" | |||||
| PRINT "" | |||||
| PRINT "You could install newer CMake from debian-backports repository" | |||||
| PRINT "Add this this line to your /etc/apt/sources.lixt:" | |||||
| PRINT "" | |||||
| PRINT "deb http://backports.debian.org/debian-backports squeeze-backports main" | |||||
| PRINT "" | |||||
| PRINT "and then run:" | |||||
| PRINT "" | |||||
| PRINT "sudo apt-get update && sudo apt-get install cmake=2.8.7-4~bpo60+1 sudo apt-get install cmake=2.8.7-4~bpo60+1" | |||||
| PRINT "" | |||||
| PRINT "(you could also add this reporisotry using GUI like synaptic)" | |||||
| PRINT "" | |||||
| PRINT "Hit Enter to continue running the script, or hit Ctrl-C to abort the script" | |||||
| read | |||||
| PRINT "" | |||||
| fi | |||||
| fi | |||||
| if [ ! $SUDO ]; then | if [ ! $SUDO ]; then | ||||
| WARNING "--no-sudo enabled, impossible to run apt-get update, you'll have to do it yourself..." | WARNING "--no-sudo enabled, impossible to run apt-get update, you'll have to do it yourself..." | ||||
| else | else | ||||
| Context not available. | |||||
| OGG_DEV="libogg-dev" | OGG_DEV="libogg-dev" | ||||
| THEORA_DEV="libtheora-dev" | THEORA_DEV="libtheora-dev" | ||||
| _packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev \ | _packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev libtiff-dev \ | ||||
| libfreetype6-dev libx11-dev \ | git libfreetype6-dev libx11-dev flex bison libtbb-dev libxxf86vm-dev \ | ||||
| libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \ | libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \ | ||||
| libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev $OPENJPEG_DEV \ | libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev $OPENJPEG_DEV \ | ||||
| libopenal-dev libglew-dev libglewmx-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \ | libopenal-dev libglew-dev libglewmx-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \ | ||||
| libsdl1.2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev" | libsdl1.2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev" | ||||
| OPENJPEG_USE=true | OPENJPEG_USE=true | ||||
| VORBIS_USE=true | VORBIS_USE=true | ||||
| OGG_USE=true | OGG_USE=true | ||||
| THEORA_USE=true | THEORA_USE=true | ||||
| PRINT "$LIBYAML_CPP_VER" | PRINT "" | ||||
| # Some not-so-old distro (ubuntu 12.4) do not have it, do not fail in this case, just warn. | # Some not-so-old distro (ubuntu 12.4) do not have it, do not fail in this case, just warn. | ||||
| YAMLCPP_DEV="libyaml-cpp-dev" | YAMLCPP_DEV="libyaml-cpp-dev" | ||||
| check_package_DEB $YAMLCPP_DEV | check_package_DEB $YAMLCPP_DEV | ||||
| if [ $? -eq 0 ]; then | if [ $? -eq 0 ]; then | ||||
| # Another Ubuntu hack - in 14.4, ocio uses (old) 0.3, while default is now 0.5... grrrrr. | |||||
| if $LIBYAML_CPP_VER_DEFINED; then | |||||
| YAMLCPP_VER_DEV="libyaml-cpp$LIBYAML_CPP_VER-dev" | |||||
| check_package_DEB $YAMLCPP_VER_DEV | |||||
| if [ $? -eq 0 ]; then | |||||
| YAMLCPP_DEV=$YAMLCPP_VER_DEV | |||||
| else | |||||
| PRINT "" | |||||
| WARNING "libyaml-cpp$LIBYAML_CPP_VER-dev not found!" | |||||
| PRINT "" | |||||
| fi | |||||
| fi | |||||
| _packages="$_packages $YAMLCPP_DEV" | _packages="$_packages $YAMLCPP_DEV" | ||||
| else | else | ||||
| PRINT "" | PRINT "" | ||||
| Context not available. | |||||
| PRINT "" | PRINT "" | ||||
| fi | fi | ||||
| # Install newest libtiff-dev in debian/ubuntu. | |||||
| TIFF="libtiff" | |||||
| check_package_DEB $TIFF | |||||
| if [ $? -eq 0 ]; then | |||||
| _packages="$_packages $TIFF-dev" | |||||
| else | |||||
| TIFF="libtiff5" | |||||
| check_package_DEB $TIFF | |||||
| if [ $? -eq 0 ]; then | |||||
| _packages="$_packages $TIFF-dev" | |||||
| else | |||||
| TIFF="libtiff4" # Some old distro, like e.g. ubuntu 10.04 :/ | |||||
| check_package_DEB $TIFF | |||||
| if [ $? -eq 0 ]; then | |||||
| _packages="$_packages $TIFF-dev" | |||||
| fi | |||||
| fi | |||||
| fi | |||||
| GIT="git" | |||||
| check_package_DEB $GIT | |||||
| if [ $? -eq 0 ]; then | |||||
| _packages="$_packages $GIT" | |||||
| else | |||||
| GIT="git-core" # Some old distro, like e.g. ubuntu 10.04 :/ | |||||
| check_package_DEB $GIT | |||||
| if [ $? -eq 0 ]; then | |||||
| _packages="$_packages $GIT" | |||||
| fi | |||||
| fi | |||||
| if [ "$WITH_ALL" = true ]; then | if [ "$WITH_ALL" = true ]; then | ||||
| _packages="$_packages libspnav-dev" | _packages="$_packages libspnav-dev" | ||||
| # Only install jack if jack2 is not already installed! | # Only install jack if jack2 is not already installed! | ||||
| Context not available. | |||||
| if [ "$WITH_ALL" = true ]; then | if [ "$WITH_ALL" = true ]; then | ||||
| PRINT "" | PRINT "" | ||||
| # Grmpf, debian is libxvidcore-dev and ubuntu libxvidcore4-dev! | |||||
| # Note: not since ubuntu 10.04 | |||||
| XVID_DEV="libxvidcore-dev" | XVID_DEV="libxvidcore-dev" | ||||
| check_package_DEB $XVID_DEV | check_package_DEB $XVID_DEV | ||||
| if [ $? -eq 0 ]; then | if [ $? -eq 0 ]; then | ||||
| install_packages_DEB $XVID_DEV | install_packages_DEB $XVID_DEV | ||||
| XVID_USE=true | XVID_USE=true | ||||
| else | |||||
| XVID_DEV="libxvidcore4-dev" | |||||
| check_package_DEB $XVID_DEV | |||||
| if [ $? -eq 0 ]; then | |||||
| install_packages_DEB $XVID_DEV | |||||
| XVID_USE=true | |||||
| fi | |||||
| fi | fi | ||||
| PRINT "" | PRINT "" | ||||
| Context not available. | |||||
| fi | fi | ||||
| fi | fi | ||||
| # Check cmake/glew versions and disable features for older distros. | |||||
| # This is so Blender can at least compile. | |||||
| PRINT "" | |||||
| _cmake=`get_package_version_DEB cmake` | |||||
| version_ge $_cmake "2.8.10" | |||||
| if [ $? -eq 1 ]; then | |||||
| version_ge $_cmake "2.8.8" | |||||
| if [ $? -eq 1 ]; then | |||||
| WARNING "OpenVDB and OpenCOLLADA disabled because cmake-$_cmake is not enough" | |||||
| OPENVDB_SKIP=true | |||||
| OPENCOLLADA_SKIP=true | |||||
| else | |||||
| WARNING "OpenVDB disabled because cmake-$_cmake is not enough" | |||||
| OPENVDB_SKIP=true | |||||
| fi | |||||
| fi | |||||
| PRINT "" | |||||
| _glew=`get_package_version_DEB libglew-dev` | |||||
| if [ -z $_glew ]; then | |||||
| # Stupid virtual package in Ubuntu 12.04 doesn't show version number... | |||||
| _glew=`apt-cache showpkg libglew-dev|tail -n1|awk '{print $2}'|sed 's/-.*//'` | |||||
| fi | |||||
| version_ge $_glew "1.9.0" | |||||
| if [ $? -eq 1 ]; then | |||||
| version_ge $_glew "1.7.0" | |||||
| if [ $? -eq 1 ]; then | |||||
| WARNING "OpenSubdiv disabled because GLEW-$_glew is not enough" | |||||
| WARNING "Blender will not use system GLEW library" | |||||
| OSD_SKIP=true | |||||
| NO_SYSTEM_GLEW=true | |||||
| else | |||||
| WARNING "OpenSubdiv will compile with GLEW-$_glew but with limited capability" | |||||
| WARNING "Blender will not use system GLEW library" | |||||
| NO_SYSTEM_GLEW=true | |||||
| fi | |||||
| fi | |||||
| PRINT "" | PRINT "" | ||||
| _do_compile_python=false | _do_compile_python=false | ||||
| Context not available. | |||||
| boost_version=$(echo `get_package_version_DEB libboost-dev` | sed -r 's/^([0-9]+\.[0-9]+).*/\1/') | boost_version=$(echo `get_package_version_DEB libboost-dev` | sed -r 's/^([0-9]+\.[0-9]+).*/\1/') | ||||
| check_package_DEB libboost-locale$boost_version-dev | install_packages_DEB libboost-{filesystem,iostreams,locale,regex,system,thread,wave}$boost_version-dev | ||||
| if [ $? -eq 0 ]; then | clean_Boost | ||||
| install_packages_DEB libboost-locale$boost_version-dev libboost-filesystem$boost_version-dev \ | |||||
| libboost-regex$boost_version-dev libboost-system$boost_version-dev \ | |||||
| libboost-thread$boost_version-dev libboost-wave$boost_version-dev | |||||
| clean_Boost | |||||
| else | |||||
| compile_Boost | |||||
| fi | |||||
| else | else | ||||
| compile_Boost | compile_Boost | ||||
| fi | fi | ||||
| Context not available. | |||||
| INFO "Forced OpenImageIO building, as requested..." | INFO "Forced OpenImageIO building, as requested..." | ||||
| compile_OIIO | compile_OIIO | ||||
| else | else | ||||
| check_package_version_ge_lt_DEB libopenimageio-dev $OIIO_VERSION_MIN $OIIO_VERSION_MAX | # XXX Debian Testing / Ubuntu 16.04 pulls in WAY too many deps (gtk2/opencv ?!) incl. OCIO build against libyaml-cpp0.3 so build for now... | ||||
| if [ $? -eq 0 -a "$_with_built_openexr" = false ]; then | #check_package_version_ge_lt_DEB libopenimageio-dev $OIIO_VERSION_MIN $OIIO_VERSION_MAX | ||||
| install_packages_DEB libopenimageio-dev | #if [ $? -eq 0 -a "$_with_built_openexr" = false ]; then | ||||
| clean_OIIO | # install_packages_DEB libopenimageio-dev | ||||
| else | # clean_OIIO | ||||
| #else | |||||
| compile_OIIO | compile_OIIO | ||||
| fi | #fi | ||||
| fi | fi | ||||
| Context not available. | |||||
| _do_compile_llvm=false | _do_compile_llvm=false | ||||
| if [ "$LLVM_SKIP" = true ]; then | if [ "$LLVM_SKIP" = true ]; then | ||||
| WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..." | WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..." | ||||
| OSL_SKIP=true | |||||
| elif [ "$LLVM_FORCE_BUILD" = true ]; then | elif [ "$LLVM_FORCE_BUILD" = true ]; then | ||||
| INFO "Forced LLVM building, as requested..." | INFO "Forced LLVM building, as requested..." | ||||
| _do_compile_llvm=true | _do_compile_llvm=true | ||||
| Context not available. | |||||
| LLVM_VERSION_FOUND=$LLVM_VERSION | LLVM_VERSION_FOUND=$LLVM_VERSION | ||||
| clean_LLVM | clean_LLVM | ||||
| else | else | ||||
| #~ check_package_version_ge_DEB llvm-dev $LLVM_VERSION_MIN | |||||
| #~ if [ $? -eq 0 ]; then | |||||
| #~ install_packages_DEB llvm-dev clang | |||||
| #~ have_llvm=true | |||||
| #~ LLVM_VERSION_FOUND="" # Using default one, no need to specify it! | |||||
| #~ clean_LLVM | |||||
| #~ else | |||||
| _do_compile_llvm=true | _do_compile_llvm=true | ||||
| #~ fi | |||||
| fi | fi | ||||
| fi | fi | ||||
| Context not available. | |||||
| INFO "Forced OpenShadingLanguage building, as requested..." | INFO "Forced OpenShadingLanguage building, as requested..." | ||||
| _do_compile_osl=true | _do_compile_osl=true | ||||
| else | else | ||||
| # No package currently! | # No package currently! | ||||
| _do_compile_osl=true | _do_compile_osl=true | ||||
| fi | fi | ||||
| if [ "$_do_compile_osl" = true ]; then | if [ "$_do_compile_osl" = true ]; then | ||||
| if [ "$have_llvm" = true ]; then | if [ "$have_llvm" = true ]; then | ||||
| install_packages_DEB flex bison libtbb-dev | |||||
| PRINT "" | PRINT "" | ||||
| compile_OSL | compile_OSL | ||||
| else | else | ||||
| Context not available. | |||||
| PRINT "" | PRINT "" | ||||
| _do_compile_osd=false | |||||
| if [ "$OSD_SKIP" = true ]; then | if [ "$OSD_SKIP" = true ]; then | ||||
| WARNING "Skipping OpenSubdiv installation, as requested..." | WARNING "Skipping OpenSubdiv installation, as requested..." | ||||
| elif [ "$OSD_FORCE_BUILD" = true ]; then | elif [ "$OSD_FORCE_BUILD" = true ]; then | ||||
| INFO "Forced OpenSubdiv building, as requested..." | INFO "Forced OpenSubdiv building, as requested..." | ||||
| _do_compile_osd=true | compile_OSD | ||||
| else | else | ||||
| # No package currently! | # No package currently! | ||||
| _do_compile_osd=true | |||||
| fi | |||||
| if [ "$_do_compile_osd" = true ]; then | |||||
| install_packages_DEB flex bison libtbb-dev | |||||
| PRINT "" | PRINT "" | ||||
| compile_OSD | compile_OSD | ||||
| fi | fi | ||||
| PRINT "" | |||||
| if [ "$OPENVDB_SKIP" = true ]; then | |||||
| WARNING "Skipping OpenVDB installation, as requested..." | |||||
| elif [ "$OPENVDB_FORCE_BUILD" = true ]; then | |||||
| INFO "Forced OpenVDB building, as requested..." | |||||
| compile_OPENVDB | |||||
| else | |||||
| check_package_version_ge_DEB libopenvdb-dev $OPENVDB_VERSION_MIN | |||||
| if [ $? -eq 0 ]; then | |||||
| install_packages_DEB libopenvdb-dev libblosc-dev | |||||
| clean_OPENVDB | |||||
| else | |||||
| compile_OPENVDB | |||||
| fi | |||||
| fi | |||||
| if [ "$WITH_OPENCOLLADA" = true ]; then | if [ "$WITH_OPENCOLLADA" = true ]; then | ||||
| _do_compile_collada=false | _do_compile_collada=false | ||||
| Context not available. | |||||
| INFO "Forced OpenCollada building, as requested..." | INFO "Forced OpenCollada building, as requested..." | ||||
| _do_compile_collada=true | _do_compile_collada=true | ||||
| else | else | ||||
| # No package currently! | # No package currently! | ||||
| _do_compile_collada=true | _do_compile_collada=true | ||||
| fi | fi | ||||
| Context not available. | |||||
| INFO "Forced FFMpeg building, as requested..." | INFO "Forced FFMpeg building, as requested..." | ||||
| compile_FFmpeg | compile_FFmpeg | ||||
| else | else | ||||
| # XXX Debian features libav packages as ffmpeg, those are not really compatible with blender code currently :/ | # XXX Debian Testing / Ubuntu 16.04 finally includes FFmpeg, so check as usual | ||||
| # So for now, always build our own ffmpeg. | check_package_DEB ffmpeg | ||||
| # check_package_DEB ffmpeg | if [ $? -eq 0 ]; then | ||||
| # if [ $? -eq 0 ]; then | check_package_version_ge_DEB ffmpeg $FFMPEG_VERSION_MIN | ||||
| # install_packages_DEB ffmpeg | if [ $? -eq 0 ]; then | ||||
| # ffmpeg_version=`get_package_version_DEB ffmpeg` | install_packages_DEB libavdevice-dev | ||||
| # PRINT "ffmpeg version: $ffmpeg_version" | clean_FFmpeg | ||||
| # if [ ! -z "$ffmpeg_version" ]; then | else | ||||
| # if dpkg --compare-versions $ffmpeg_version gt 0.7.2; then | compile_FFmpeg | ||||
| # install_packages_DEB libavfilter-dev libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev libswscale-dev | fi | ||||
| # clean_FFmpeg | else | ||||
| # else | compile_FFmpeg | ||||
| # compile_FFmpeg | fi | ||||
| # fi | |||||
| # fi | |||||
| # fi | |||||
| compile_FFmpeg | |||||
| fi | fi | ||||
| } | } | ||||
| Context not available. | |||||
| #### Install on RPM-like #### | #### Install on RPM-like #### | ||||
| rpm_flavour() { | rpm_flavour() { | ||||
| if [ -f /etc/redhat-release ]; then | if [ -f /etc/redhat-release ]; then | ||||
| if [ "`grep '6\.' /etc/redhat-release`" ]; then | if [ "`grep '[6-7]\.' /etc/redhat-release`" ]; then | ||||
| RPM="RHEL" | RPM="RHEL" | ||||
| else | else | ||||
| RPM="FEDORA" | RPM="FEDORA" | ||||
| Context not available. | |||||
| get_package_version_RPM() { | get_package_version_RPM() { | ||||
| rpm_flavour | rpm_flavour | ||||
| if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then | if [ "$RPM" = "RHEL" ]; then | ||||
| yum info $1 | grep Version | tail -n 1 | sed -r 's/.*:\s+(([0-9]+\.?)+).*/\1/' | yum info $1 | grep Version | tail -n 1 | sed -r 's/.*:\s+(([0-9]+\.?)+).*/\1/' | ||||
| elif [ "$RPM" = "FEDORA" ]; then | |||||
| dnf info $1 | grep Version | tail -n 1 | sed -r 's/.*:\s+(([0-9]+\.?)+).*/\1/' | |||||
| elif [ "$RPM" = "SUSE" ]; then | elif [ "$RPM" = "SUSE" ]; then | ||||
| zypper info $1 | grep Version | tail -n 1 | sed -r 's/.*:\s+(([0-9]+\.?)+).*/\1/' | zypper info $1 | grep Version | tail -n 1 | sed -r 's/.*:\s+(([0-9]+\.?)+).*/\1/' | ||||
| fi | fi | ||||
| Context not available. | |||||
| check_package_RPM() { | check_package_RPM() { | ||||
| rpm_flavour | rpm_flavour | ||||
| if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then | if [ "$RPM" = "RHEL" ]; then | ||||
| r=`yum info $1 | grep -c 'Summary'` | r=`yum info $1 | grep -c 'Summary'` | ||||
| elif [ "$RPM" = "FEDORA" ]; then | |||||
| r=`dnf info $1 | grep -c 'Summary'` | |||||
| elif [ "$RPM" = "SUSE" ]; then | elif [ "$RPM" = "SUSE" ]; then | ||||
| r=`zypper info $1 | grep -c 'Summary'` | r=`zypper info $1 | grep -c 'Summary'` | ||||
| fi | fi | ||||
| Context not available. | |||||
| install_packages_RPM() { | install_packages_RPM() { | ||||
| rpm_flavour | rpm_flavour | ||||
| if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then | if [ ! $SUDO ]; then | ||||
| if [ ! $SUDO ]; then | WARNING "--no-sudo enabled, impossible to install $@, you'll have to do it yourself..." | ||||
| WARNING "--no-sudo enabled, impossible to run yum install for $@, you'll have to do it yourself..." | fi | ||||
| else | if [ "$RPM" = "RHEL" ]; then | ||||
| $SUDO yum install -y $@ | $SUDO yum install -y $@ | ||||
| if [ $? -ge 1 ]; then | if [ $? -ge 1 ]; then | ||||
| ERROR "yum failed to install requested packages, exiting." | ERROR "yum failed to install requested packages, exiting." | ||||
| exit 1 | exit 1 | ||||
| fi | fi | ||||
| elif [ "$RPM" = "FEDORA" ]; then | |||||
| $SUDO dnf install -y $@ | |||||
| if [ $? -ge 1 ]; then | |||||
| ERROR "dnf failed to install requested packages, exiting." | |||||
| exit 1 | |||||
| fi | fi | ||||
| elif [ "$RPM" = "SUSE" ]; then | elif [ "$RPM" = "SUSE" ]; then | ||||
| if [ ! $SUDO ]; then | $SUDO zypper --non-interactive install --auto-agree-with-licenses $@ | ||||
| WARNING "--no-sudo enabled, impossible to run zypper install for $@, you'll have to do it yourself..." | if [ $? -ge 1 ]; then | ||||
| else | ERROR "zypper failed to install requested packages, exiting." | ||||
| $SUDO zypper --non-interactive install --auto-agree-with-licenses $@ | exit 1 | ||||
| if [ $? -ge 1 ]; then | |||||
| ERROR "zypper failed to install requested packages, exiting." | |||||
| exit 1 | |||||
| fi | |||||
| fi | fi | ||||
| fi | fi | ||||
| } | } | ||||
| Context not available. | |||||
| rpm_flavour | rpm_flavour | ||||
| if [ "$RPM" = "FEDORA" ]; then | if [ "$RPM" = "FEDORA" ]; then | ||||
| _fedora_rel="`egrep "[0-9]{1,}" /etc/fedora-release -o`" | _fedora_rel="`egrep "[0-9]{1,}" /etc/fedora-release -o`" | ||||
| $SUDO yum -y localinstall --nogpgcheck \ | $SUDO dnf -y install --nogpgcheck \ | ||||
| http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$_fedora_rel.noarch.rpm \ | http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$_fedora_rel.noarch.rpm \ | ||||
| http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$_fedora_rel.noarch.rpm | http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$_fedora_rel.noarch.rpm | ||||
| $SUDO yum -y update | $SUDO dnf -y update | ||||
| # Install cmake now because of difference with RHEL | |||||
| $SUDO yum -y install cmake | |||||
| elif [ "$RPM" = "RHEL" ]; then | elif [ "$RPM" = "RHEL" ]; then | ||||
| $SUDO yum -y localinstall --nogpgcheck \ | if [ "`grep '6\.' /etc/redhat-release`" ]; then | ||||
| http://download.fedoraproject.org/pub/epel/6/$(uname -i)/epel-release-6-8.noarch.rpm \ | ERROR "Building with GCC 4.4 is not supported!" | ||||
| http://download1.rpmfusion.org/free/el/updates/6/$(uname -i)/rpmfusion-free-release-6-1.noarch.rpm \ | exit 1 | ||||
| http://download1.rpmfusion.org/nonfree/el/updates/6/$(uname -i)/rpmfusion-nonfree-release-6-1.noarch.rpm | |||||
| $SUDO yum -y update | |||||
| # Install cmake 2.8 from other repo | |||||
| mkdir -p $SRC | |||||
| if [ -f $SRC/cmake-2.8.8-4.el6.$(uname -m).rpm ]; then | |||||
| PRINT "" | |||||
| INFO "Special cmake already installed" | |||||
| else | else | ||||
| curl -O ftp://ftp.pbone.net/mirror/atrpms.net/el6-$(uname -i)/atrpms/testing/cmake-2.8.8-4.el6.$(uname -m).rpm | $SUDO yum -y install --nogpgcheck \ | ||||
| mv cmake-2.8.8-4.el6.$(uname -m).rpm $SRC/ | http://download.fedoraproject.org/pub/epel/7/$(uname -i)/e/epel-release-7-6.noarch.rpm \ | ||||
| $SUDO rpm -ihv $SRC/cmake-2.8.8-4.el6.$(uname -m).rpm | http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm | ||||
| $SUDO yum -y update | |||||
| fi | fi | ||||
| elif [ "$RPM" = "SUSE" ]; then | elif [ "$RPM" = "SUSE" ]; then | ||||
| # Install this now to avoid using the version from packman repository... | # Packman repo now includes name in link... | ||||
| if [ "$WITH_ALL" = true ]; then | _suse_rel="`grep -w VERSION /etc/os-release | sed 's/[^0-9.]*//g'`" | ||||
| install_packages_RPM libjack-devel | _suse_name="`grep -w NAME /etc/os-release | gawk '{print $2}' | sed 's/\"//'`" | ||||
| if [ $_suse_name ]; then | |||||
| _suse_rel="${_suse_name}_${_suse_rel}" | |||||
| fi | fi | ||||
| _suse_rel="`grep VERSION /etc/SuSE-release | gawk '{print $3}'`" | |||||
| PRINT "" | PRINT "" | ||||
| INFO "About to add 'packman' repository from http://packman.inode.at/suse/openSUSE_$_suse_rel/" | INFO "About to add 'packman' repository from http://packman.inode.at/suse/openSUSE_$_suse_rel/" | ||||
| INFO "This is only needed if you do not already have a packman repository enabled..." | INFO "This is only needed if you do not already have a packman repository enabled..." | ||||
| read -p "Do you want to add this repo (Y/n)?" | read -p "Do you want to add this repo (Y/n)?" | ||||
| if [ "$(echo ${REPLY:=Y} | tr [:upper:] [:lower:])" == "y" ]; then | if [ "$(echo ${REPLY:=Y} | tr [:upper:] [:lower:])" == "y" ]; then | ||||
| INFO " Installing packman..." | INFO " Installing packman..." | ||||
| $SUDO zypper ar --refresh --name 'Packman Repository' http://ftp.gwdg.de/pub/linux/packman/suse/openSUSE_$_suse_rel/ ftp.gwdg.de-suse | $SUDO zypper ar -f -n packman http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_$_suse_rel/ packman | ||||
| INFO " Done." | INFO " Done." | ||||
| else | else | ||||
| INFO " Skipping packman installation." | INFO " Skipping packman installation." | ||||
| Context not available. | |||||
| OGG_DEV="libogg-devel" | OGG_DEV="libogg-devel" | ||||
| THEORA_DEV="libtheora-devel" | THEORA_DEV="libtheora-devel" | ||||
| _packages="gcc gcc-c++ git make cmake libtiff-devel libjpeg-devel\ | _packages="gcc gcc-c++ git make cmake tar bzip2 xz findutils flex bison \ | ||||
| libpng-devel libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \ | libtiff-devel libjpeg-devel libpng-devel sqlite-devel fftw-devel SDL-devel \ | ||||
| libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \ | |||||
| wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \ | wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \ | ||||
| glew-devel yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV patch \ | glew-devel yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV patch \ | ||||
| libxml2-devel yaml-cpp-devel tinyxml-devel" | libxml2-devel yaml-cpp-devel tinyxml-devel jemalloc-devel" | ||||
| OPENJPEG_USE=true | OPENJPEG_USE=true | ||||
| VORBIS_USE=true | VORBIS_USE=true | ||||
| Context not available. | |||||
| THEORA_USE=true | THEORA_USE=true | ||||
| if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then | if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then | ||||
| OPENEXR_DEV="openexr-devel" | _packages="$_packages freetype-devel tbb-devel" | ||||
| _packages="$_packages freetype-devel libsqlite3x-devel fftw-devel SDL-devel" | |||||
| if [ "$WITH_ALL" = true ]; then | if [ "$WITH_ALL" = true ]; then | ||||
| _packages="$_packages jack-audio-connection-kit-devel" | _packages="$_packages jack-audio-connection-kit-devel" | ||||
| Context not available. | |||||
| fi | fi | ||||
| elif [ "$RPM" = "SUSE" ]; then | elif [ "$RPM" = "SUSE" ]; then | ||||
| OPENEXR_DEV="libopenexr-devel" | _packages="$_packages freetype2-devel" | ||||
| _packages="$_packages cmake freetype2-devel sqlite3-devel fftw3-devel libSDL-devel" | |||||
| PRINT "" | PRINT "" | ||||
| install_packages_RPM $_packages | install_packages_RPM $_packages | ||||
| PRINT "" | PRINT "" | ||||
| # Install TBB on openSUSE, from temporary repo | |||||
| check_package_RPM tbb-devel | |||||
| if [ $? -eq 0 ]; then | |||||
| install_packages_RPM tbb-devel | |||||
| else | |||||
| $SUDO zypper ar -f http://download.opensuse.org/repositories/devel:/libraries:/c_c++/openSUSE_$_suse_rel/devel:libraries:c_c++.repo | |||||
| $SUDO zypper -n --gpg-auto-import-keys install tbb-devel | |||||
| $SUDO zypper rr devel_libraries_c_c++ | |||||
| fi | |||||
| PRINT "" | |||||
| X264_DEV="libx264-devel" | X264_DEV="libx264-devel" | ||||
| check_package_version_ge_RPM $X264_DEV $X264_VERSION_MIN | check_package_version_ge_RPM $X264_DEV $X264_VERSION_MIN | ||||
| if [ $? -eq 0 ]; then | if [ $? -eq 0 ]; then | ||||
| Context not available. | |||||
| PRINT "" | PRINT "" | ||||
| _do_compile_boost=false | |||||
| if [ "$BOOST_SKIP" = true ]; then | if [ "$BOOST_SKIP" = true ]; then | ||||
| WARNING "Skipping Boost installation, as requested..." | WARNING "Skipping Boost installation, as requested..." | ||||
| elif [ "$BOOST_FORCE_BUILD" = true ]; then | elif [ "$BOOST_FORCE_BUILD" = true ]; then | ||||
| INFO "Forced Boost building, as requested..." | INFO "Forced Boost building, as requested..." | ||||
| compile_Boost | _do_compile_boost=true | ||||
| else | 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 | ||||
| clean_Boost | clean_Boost | ||||
| else | else | ||||
| compile_Boost | _do_compile_boost=true | ||||
| fi | |||||
| fi | |||||
| if [ "$_do_compile_boost" = true ]; then | |||||
| if [ "$RPM" = "SUSE" ]; then | |||||
| install_packages_RPM gcc-fortran | |||||
| else | |||||
| install_packages_RPM libquadmath-devel bzip2-devel | |||||
| fi | fi | ||||
| PRINT "" | |||||
| compile_Boost | |||||
| fi | fi | ||||
| Context not available. | |||||
| INFO "Forced OpenColorIO building, as requested..." | INFO "Forced OpenColorIO building, as requested..." | ||||
| compile_OCIO | compile_OCIO | ||||
| else | else | ||||
| # XXX Always force build of own OCIO, until linux distro guys update their package to default libyaml-cpp ver (0.5)! | if [ "$RPM" = "SUSE" ]; then | ||||
| #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 | ||||
| #clean_OCIO | clean_OCIO | ||||
| #else | else | ||||
| compile_OCIO | |||||
| fi | |||||
| # XXX Fedora/RHEL OCIO still depends on libyaml-cpp v0.3 even when system default is v0.5! | |||||
| else | |||||
| compile_OCIO | compile_OCIO | ||||
| #fi | fi | ||||
| fi | fi | ||||
| PRINT "" | PRINT "" | ||||
| Context not available. | |||||
| INFO "Forced ILMBase/OpenEXR building, as requested..." | INFO "Forced ILMBase/OpenEXR building, as requested..." | ||||
| compile_OPENEXR | compile_OPENEXR | ||||
| else | else | ||||
| check_package_version_ge_RPM $OPENEXR_DEV $OPENEXR_VERSION_MIN | check_package_version_ge_RPM openexr-devel $OPENEXR_VERSION_MIN | ||||
| if [ $? -eq 0 ]; then | if [ $? -eq 0 ]; then | ||||
| install_packages_RPM $OPENEXR_DEV | install_packages_RPM openexr-devel | ||||
| OPENEXR_VERSION=`get_package_version_RPM $OPENEXR_DEV` | OPENEXR_VERSION=`get_package_version_RPM openexr-devel` | ||||
| ILMBASE_VERSION=$OPENEXR_VERSION | ILMBASE_VERSION=$OPENEXR_VERSION | ||||
| clean_OPENEXR | clean_OPENEXR | ||||
| else | else | ||||
| Context not available. | |||||
| INFO "Forced OpenImageIO building, as requested..." | INFO "Forced OpenImageIO building, as requested..." | ||||
| compile_OIIO | compile_OIIO | ||||
| else | else | ||||
| check_package_version_ge_lt_RPM OpenImageIO-devel $OIIO_VERSION_MIN $OIIO_VERSION_MAX | # XXX RPM distros pulls in too much and depends on old libs, so better to build for now... | ||||
| if [ $? -eq 0 -a $_with_built_openexr == false ]; then | #check_package_version_ge_lt_RPM OpenImageIO-devel $OIIO_VERSION_MIN $OIIO_VERSION_MAX | ||||
| install_packages_RPM OpenImageIO-devel | #if [ $? -eq 0 -a $_with_built_openexr == false ]; then | ||||
| clean_OIIO | # install_packages_RPM OpenImageIO-devel | ||||
| else | # clean_OIIO | ||||
| #else | |||||
| compile_OIIO | compile_OIIO | ||||
| fi | #fi | ||||
| fi | fi | ||||
| Context not available. | |||||
| _do_compile_llvm=false | _do_compile_llvm=false | ||||
| if [ "$LLVM_SKIP" = true ]; then | if [ "$LLVM_SKIP" = true ]; then | ||||
| WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..." | WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..." | ||||
| OSL_SKIP=true | |||||
| elif [ "$LLVM_FORCE_BUILD" = true ]; then | elif [ "$LLVM_FORCE_BUILD" = true ]; then | ||||
| INFO "Forced LLVM building, as requested..." | INFO "Forced LLVM building, as requested..." | ||||
| _do_compile_llvm=true | _do_compile_llvm=true | ||||
| else | else | ||||
| # Problem compiling with LLVM 3.2 so match version 3.1 ... | |||||
| if [ "$RPM" = "SUSE" ]; then | if [ "$RPM" = "SUSE" ]; then | ||||
| check_package_version_match_RPM llvm-clang-devel $LLVM_VERSION | CLANG_DEV="llvm-clang-devel" | ||||
| if [ $? -eq 0 ]; then | |||||
| install_packages_RPM llvm-devel llvm-clang-devel | |||||
| have_llvm=true | |||||
| LLVM_VERSION_FOUND=$LLVM_VERSION | |||||
| clean_LLVM | |||||
| else | |||||
| # Better to compile it than use minimum version from repo... | |||||
| _do_compile_llvm=true | |||||
| fi | |||||
| else | else | ||||
| check_package_version_match_RPM clang-devel $LLVM_VERSION | CLANG_DEV="clang-devel" | ||||
| if [ $? -eq 0 ]; then | |||||
| install_packages_RPM llvm-devel clang-devel | |||||
| have_llvm=true | |||||
| LLVM_VERSION_FOUND=$LLVM_VERSION | |||||
| clean_LLVM | |||||
| else | |||||
| # Better to compile it than use minimum version from repo... | |||||
| _do_compile_llvm=true | |||||
| fi | |||||
| fi | fi | ||||
| # XXX RHEL has 3.4 in repo but OSL complains about not finding MCJIT_LIBRARY, so compile for now... | |||||
| #check_package_version_match_RPM $CLANG_DEV $LLVM_VERSION | |||||
| #if [ $? -eq 0 ]; then | |||||
| # install_packages_RPM llvm-devel $CLANG_DEV | |||||
| # have_llvm=true | |||||
| # LLVM_VERSION_FOUND=$LLVM_VERSION | |||||
| # clean_LLVM | |||||
| #else | |||||
| _do_compile_llvm=true | |||||
| #fi | |||||
| fi | fi | ||||
| if [ "$_do_compile_llvm" = true ]; then | if [ "$_do_compile_llvm" = true ]; then | ||||
| Context not available. | |||||
| if [ "$_do_compile_osl" = true ]; then | if [ "$_do_compile_osl" = true ]; then | ||||
| if [ "$have_llvm" = true ]; then | if [ "$have_llvm" = true ]; then | ||||
| install_packages_RPM flex bison | |||||
| if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then | |||||
| install_packages_RPM tbb-devel | |||||
| fi | |||||
| PRINT "" | PRINT "" | ||||
| compile_OSL | compile_OSL | ||||
| else | else | ||||
| Context not available. | |||||
| PRINT "" | PRINT "" | ||||
| _do_compile_osd=false | |||||
| if [ "$OSD_SKIP" = true ]; then | if [ "$OSD_SKIP" = true ]; then | ||||
| WARNING "Skipping OpenSubdiv installation, as requested..." | WARNING "Skipping OpenSubdiv installation, as requested..." | ||||
| elif [ "$OSD_FORCE_BUILD" = true ]; then | elif [ "$OSD_FORCE_BUILD" = true ]; then | ||||
| INFO "Forced OpenSubdiv building, as requested..." | INFO "Forced OpenSubdiv building, as requested..." | ||||
| _do_compile_osd=true | compile_OSD | ||||
| else | else | ||||
| # No package currently! | # No package currently! | ||||
| _do_compile_osd=true | compile_OSD | ||||
| fi | fi | ||||
| if [ "$_do_compile_osd" = true ]; then | |||||
| install_packages_RPM flex bison | PRINT "" | ||||
| if [ "$RPM" = "FEDORA" -o "$RPM" = "RHEL" ]; then | if [ "$OPENVDB_SKIP" = true ]; then | ||||
| install_packages_RPM tbb-devel | WARNING "Skipping OpenVDB installation, as requested..." | ||||
| fi | elif [ "$OPENVDB_FORCE_BUILD" = true ]; then | ||||
| PRINT "" | INFO "Forced OpenVDB building, as requested..." | ||||
| compile_OSD | compile_OPENVDB | ||||
| else | |||||
| # No package currently! | |||||
| compile_OPENVDB | |||||
| fi | fi | ||||
| Context not available. | |||||
| INFO "Forced FFMpeg building, as requested..." | INFO "Forced FFMpeg building, as requested..." | ||||
| compile_FFmpeg | compile_FFmpeg | ||||
| else | else | ||||
| check_package_version_ge_RPM ffmpeg $FFMPEG_VERSION_MIN | check_package_version_ge_RPM ffmpeg-devel $FFMPEG_VERSION_MIN | ||||
| if [ $? -eq 0 ]; then | if [ $? -eq 0 ]; then | ||||
| install_packages_RPM ffmpeg ffmpeg-devel | install_packages_RPM ffmpeg ffmpeg-devel | ||||
| clean_FFmpeg | clean_FFmpeg | ||||
| Context not available. | |||||
| _do_compile_llvm=false | _do_compile_llvm=false | ||||
| if [ "$LLVM_SKIP" = true ]; then | if [ "$LLVM_SKIP" = true ]; then | ||||
| WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..." | WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..." | ||||
| OSL_SKIP=true | |||||
| elif [ "$LLVM_FORCE_BUILD" = true ]; then | elif [ "$LLVM_FORCE_BUILD" = true ]; then | ||||
| INFO "Forced LLVM building, as requested..." | INFO "Forced LLVM building, as requested..." | ||||
| _do_compile_llvm=true | _do_compile_llvm=true | ||||
| Context not available. | |||||
| if [ $? -eq 0 ]; then | if [ $? -eq 0 ]; then | ||||
| install_packages_ARCH llvm35 clang35 | install_packages_ARCH llvm35 clang35 | ||||
| have_llvm=true | have_llvm=true | ||||
| LLVM_VERSION=`get_package_version_ARCH llvm` | LLVM_VERSION=`get_package_version_ARCH llvm35` | ||||
| LLVM_VERSION_FOUND=$LLVM_VERSION | LLVM_VERSION_FOUND=$LLVM_VERSION | ||||
| clean_LLVM | clean_LLVM | ||||
| else | else | ||||
| Context not available. | |||||
| fi | fi | ||||
| PRINT "" | |||||
| if [ "$OPENVDB_SKIP" = true ]; then | |||||
| WARNING "Skipping OpenVDB installation, as requested..." | |||||
| elif [ "$OPENVDB_FORCE_BUILD" = true ]; then | |||||
| INFO "Forced OpenVDB building, as requested..." | |||||
| compile_OPENVDB | |||||
| else | |||||
| check_package_version_ge_ARCH openvdb $OPENVDB_VERSION_MIN | |||||
| if [ $? -eq 0 ]; then | |||||
| install_packages_ARCH openvdb | |||||
| clean_OPENVDB | |||||
| else | |||||
| compile_OPENVDB | |||||
| fi | |||||
| fi | |||||
| if [ "$WITH_OPENCOLLADA" = true ]; then | if [ "$WITH_OPENCOLLADA" = true ]; then | ||||
| PRINT "" | PRINT "" | ||||
| _do_compile_collada=false | _do_compile_collada=false | ||||
| Context not available. | |||||
| _buildargs="-U *SNDFILE* -U *PYTHON* -U *BOOST* -U *Boost*" | _buildargs="-U *SNDFILE* -U *PYTHON* -U *BOOST* -U *Boost*" | ||||
| _buildargs="$_buildargs -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CYCLES*" | _buildargs="$_buildargs -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CYCLES*" | ||||
| _buildargs="$_buildargs -U *OPENSUBDIV* -U *COLLADA* -U *FFMPEG*" | _buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *COLLADA* -U *FFMPEG*" | ||||
| _1="-D WITH_CODEC_SNDFILE=ON" | _1="-D WITH_CODEC_SNDFILE=ON" | ||||
| PRINT " $_1" | PRINT " $_1" | ||||
| Context not available. | |||||
| fi | fi | ||||
| fi | fi | ||||
| if [ "$OPENVDB_SKIP" = false ]; then | |||||
| _1="-D WITH_OPENVDB=ON" | |||||
| _2="-D WITH_OPENVDB_BLOSC=ON" | |||||
| PRINT " $_1" | |||||
| PRINT " $_2" | |||||
| _buildargs="$_buildargs $_1 $_2" | |||||
| if [ -d $INST/openvdb ]; then | |||||
| _1="-D OPENVDB_ROOT_DIR=$INST/openvdb" | |||||
| PRINT " $_1" | |||||
| _buildargs="$_buildargs $_1" | |||||
| fi | |||||
| fi | |||||
| if [ "$WITH_OPENCOLLADA" = true ]; then | if [ "$WITH_OPENCOLLADA" = true ]; then | ||||
| _1="-D WITH_OPENCOLLADA=ON" | _1="-D WITH_OPENCOLLADA=ON" | ||||
| PRINT " $_1" | PRINT " $_1" | ||||
| _buildargs="$_buildargs $_1" | _buildargs="$_buildargs $_1" | ||||
| fi | fi | ||||
| if [ "$NO_SYSTEM_GLEW" = true ]; then | |||||
| _1="-D WITH_SYSTEM_GLEW=OFF" | |||||
| PRINT " $_1" | |||||
| _buildargs="$_buildargs $_1" | |||||
| fi | |||||
| if [ "$FFMPEG_SKIP" = false ]; then | if [ "$FFMPEG_SKIP" = false ]; then | ||||
| _1="-D WITH_CODEC_FFMPEG=ON" | _1="-D WITH_CODEC_FFMPEG=ON" | ||||
| _2="-D FFMPEG_LIBRARIES='avformat;avcodec;avutil;avdevice;swscale;swresample;lzma;rt;`print_info_ffmpeglink`'" | _2="-D FFMPEG_LIBRARIES='avformat;avcodec;avutil;avdevice;swscale;swresample;lzma;rt;`print_info_ffmpeglink`'" | ||||
| Context not available. | |||||
Would add to comment this is needed for OpenSubDiv