Changeset View
Changeset View
Standalone View
Standalone View
build_files/build_environment/install_deps.sh
| Show First 20 Lines • Show All 284 Lines • ▼ Show 20 Lines | |||||
| ##### Main Vars ##### | ##### Main Vars ##### | ||||
| DO_SHOW_DEPS=false | DO_SHOW_DEPS=false | ||||
| SUDO="sudo" | SUDO="sudo" | ||||
| NO_BUILD=false | NO_BUILD=false | ||||
| NO_CONFIRM=false | NO_CONFIRM=false | ||||
| USE_CXX11=false | USE_CXX11=true | ||||
| PYTHON_VERSION="3.6.2" | PYTHON_VERSION="3.6.2" | ||||
| PYTHON_VERSION_MIN="3.6" | PYTHON_VERSION_MIN="3.6" | ||||
| PYTHON_FORCE_BUILD=false | PYTHON_FORCE_BUILD=false | ||||
| PYTHON_FORCE_REBUILD=false | PYTHON_FORCE_REBUILD=false | ||||
| PYTHON_SKIP=false | PYTHON_SKIP=false | ||||
| NUMPY_VERSION="1.13.1" | NUMPY_VERSION="1.13.1" | ||||
| ▲ Show 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | --no-build) | ||||
| PRINT "" | PRINT "" | ||||
| WARNING "--no-build enabled, this script will not be able to install all dependencies..." | WARNING "--no-build enabled, this script will not be able to install all dependencies..." | ||||
| PRINT "" | PRINT "" | ||||
| NO_BUILD=true; shift; continue | NO_BUILD=true; shift; continue | ||||
| ;; | ;; | ||||
| --no-confirm) | --no-confirm) | ||||
| NO_CONFIRM=true; shift; continue | NO_CONFIRM=true; shift; continue | ||||
| ;; | ;; | ||||
| --use-cxx11) | |||||
| USE_CXX11=true; shift; continue | |||||
| ;; | |||||
| --with-all) | --with-all) | ||||
| WITH_ALL=true; shift; continue | WITH_ALL=true; shift; continue | ||||
| ;; | ;; | ||||
| --with-opencollada) | --with-opencollada) | ||||
| WITH_OPENCOLLADA=true; shift; continue | WITH_OPENCOLLADA=true; shift; continue | ||||
| ;; | ;; | ||||
| --with-jack) | --with-jack) | ||||
| WITH_JACK=true; shift; continue; | WITH_JACK=true; shift; continue; | ||||
| ▲ Show 20 Lines • Show All 282 Lines • ▼ Show 20 Lines | |||||
| # ALEMBIC_SOURCE_REPO_BRANCH="master" | # ALEMBIC_SOURCE_REPO_BRANCH="master" | ||||
| OPENCOLLADA_SOURCE=( "https://github.com/KhronosGroup/OpenCOLLADA.git" ) | OPENCOLLADA_SOURCE=( "https://github.com/KhronosGroup/OpenCOLLADA.git" ) | ||||
| OPENCOLLADA_REPO_UID="0c2cdc17c22cf42050e4d42154bed2176363549c" | OPENCOLLADA_REPO_UID="0c2cdc17c22cf42050e4d42154bed2176363549c" | ||||
| OPENCOLLADA_REPO_BRANCH="master" | OPENCOLLADA_REPO_BRANCH="master" | ||||
| FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" ) | FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" ) | ||||
| # C++11 is required now | |||||
| CXXFLAGS_BACK=$CXXFLAGS | CXXFLAGS_BACK=$CXXFLAGS | ||||
| if [ "$USE_CXX11" = true ]; then | |||||
| WARNING "You are trying to use c++11, this *should* go smoothely with any very recent distribution | |||||
| However, if you are experiencing linking errors (also when building Blender itself), please try the following: | |||||
| * Re-run this script with '--build-all --force-all' options. | |||||
| * Ensure your gcc version is at the very least 4.8, if possible you should really rather use gcc-5.1 or above. | |||||
| Please note that until the transition to C++11-built libraries if completed in your distribution, situation will | |||||
| remain fuzzy and incompatibilities may happen..." | |||||
| PRINT "" | |||||
| PRINT "" | |||||
| CXXFLAGS="$CXXFLAGS -std=c++11" | CXXFLAGS="$CXXFLAGS -std=c++11" | ||||
| export CXXFLAGS | export CXXFLAGS | ||||
| fi | |||||
| #### Show Dependencies #### | #### Show Dependencies #### | ||||
| # Need those to be after we defined versions... | # Need those to be after we defined versions... | ||||
| DEPS_COMMON_INFO="\"COMMON DEPENDENCIES: | DEPS_COMMON_INFO="\"COMMON DEPENDENCIES: | ||||
| Those libraries should be available as packages in all recent distributions (optional ones are [between brackets]): | Those libraries should be available as packages in all recent distributions (optional ones are [between brackets]): | ||||
| ▲ Show 20 Lines • Show All 858 Lines • ▼ Show 20 Lines | if [ ! -d $_inst ]; then | ||||
| fi | fi | ||||
| # Looks like we do not need ocio in oiio for now... | # Looks like we do not need ocio in oiio for now... | ||||
| # if [ -d $INST/ocio ]; then | # if [ -d $INST/ocio ]; then | ||||
| # cmake_d="$cmake_d -D OCIO_PATH=$INST/ocio" | # cmake_d="$cmake_d -D OCIO_PATH=$INST/ocio" | ||||
| # fi | # fi | ||||
| cmake_d="$cmake_d -D USE_OCIO=OFF" | cmake_d="$cmake_d -D USE_OCIO=OFF" | ||||
| if [ "$USE_CXX11" = true ]; then | |||||
| cmake_d="$cmake_d -D OIIO_BUILD_CPP11=ON" | cmake_d="$cmake_d -D OIIO_BUILD_CPP11=ON" | ||||
| fi | |||||
| if file /bin/cp | grep -q '32-bit'; then | if file /bin/cp | grep -q '32-bit'; then | ||||
| cflags="-fPIC -m32 -march=i686" | cflags="-fPIC -m32 -march=i686" | ||||
| else | else | ||||
| cflags="-fPIC" | cflags="-fPIC" | ||||
| fi | fi | ||||
| cmake $cmake_d -D CMAKE_CXX_FLAGS="$cflags" -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" .. | cmake $cmake_d -D CMAKE_CXX_FLAGS="$cflags" -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" .. | ||||
| ▲ Show 20 Lines • Show All 196 Lines • ▼ Show 20 Lines | if [ ! -d $_inst ]; then | ||||
| cmake_d="-D CMAKE_BUILD_TYPE=Release" | cmake_d="-D CMAKE_BUILD_TYPE=Release" | ||||
| cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst" | cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst" | ||||
| cmake_d="$cmake_d -D BUILD_TESTING=OFF" | cmake_d="$cmake_d -D BUILD_TESTING=OFF" | ||||
| cmake_d="$cmake_d -D STOP_ON_WARNING=OFF" | cmake_d="$cmake_d -D STOP_ON_WARNING=OFF" | ||||
| cmake_d="$cmake_d -D BUILDSTATIC=OFF" | cmake_d="$cmake_d -D BUILDSTATIC=OFF" | ||||
| cmake_d="$cmake_d -D OSL_BUILD_PLUGINS=OFF" | cmake_d="$cmake_d -D OSL_BUILD_PLUGINS=OFF" | ||||
| cmake_d="$cmake_d -D OSL_BUILD_TESTS=OFF" | cmake_d="$cmake_d -D OSL_BUILD_TESTS=OFF" | ||||
| cmake_d="$cmake_d -D USE_SIMD=sse2" | cmake_d="$cmake_d -D USE_SIMD=sse2" | ||||
| if [ "$USE_CXX11" = true ]; then | |||||
| cmake_d="$cmake_d -D OSL_BUILD_CPP11=1" | cmake_d="$cmake_d -D OSL_BUILD_CPP11=1" | ||||
| fi | |||||
| #~ cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION" | #~ cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION" | ||||
| if [ "$_with_built_openexr" = true ]; then | if [ "$_with_built_openexr" = true ]; then | ||||
| INFO "ILMBASE_HOME=$INST/openexr" | INFO "ILMBASE_HOME=$INST/openexr" | ||||
| cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr" | cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr" | ||||
| # XXX Temp workaround... sigh, ILMBase really messed the things up by defining their custom names ON by default :( | # XXX Temp workaround... sigh, ILMBase really messed the things up by defining their custom names ON by default :( | ||||
| cmake_d="$cmake_d -D ILMBASE_CUSTOM=ON" | cmake_d="$cmake_d -D ILMBASE_CUSTOM=ON" | ||||
| ▲ Show 20 Lines • Show All 369 Lines • ▼ Show 20 Lines | if [ ! -d $_src -o true ]; then | ||||
| INFO "Unpacking Alembic-$ALEMBIC_VERSION" | INFO "Unpacking Alembic-$ALEMBIC_VERSION" | ||||
| tar -C $SRC -xf $_src.tar.gz | tar -C $SRC -xf $_src.tar.gz | ||||
| fi | fi | ||||
| cd $_src | cd $_src | ||||
| cmake_d="-D CMAKE_INSTALL_PREFIX=$_inst" | cmake_d="-D CMAKE_INSTALL_PREFIX=$_inst" | ||||
| # Without Boost or TR1, Alembic requires C++11. | |||||
| if [ "$USE_CXX11" != true ]; then | |||||
| cmake_d="$cmake_d -D ALEMBIC_LIB_USES_BOOST=ON" | |||||
| cmake_d="$cmake_d -D ALEMBIC_LIB_USES_TR1=OFF" | |||||
| fi | |||||
| if [ -d $INST/boost ]; then | if [ -d $INST/boost ]; then | ||||
| if [ -d $INST/boost ]; then | if [ -d $INST/boost ]; then | ||||
| cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost" | cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost" | ||||
| fi | fi | ||||
| cmake_d="$cmake_d -D USE_STATIC_BOOST=ON" | cmake_d="$cmake_d -D USE_STATIC_BOOST=ON" | ||||
| else | else | ||||
| cmake_d="$cmake_d -D USE_STATIC_BOOST=OFF" | cmake_d="$cmake_d -D USE_STATIC_BOOST=OFF" | ||||
| fi | fi | ||||
| ▲ Show 20 Lines • Show All 1,920 Lines • ▼ Show 20 Lines | print_info() { | ||||
| PRINT "" | PRINT "" | ||||
| PRINT "" | PRINT "" | ||||
| PRINT "If you're using CMake add this to your configuration flags:" | PRINT "If you're using CMake add this to your configuration flags:" | ||||
| _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 *OPENVDB* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC*" | _buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC*" | ||||
| if [ "$USE_CXX11" = true ]; then | |||||
| _1="-D WITH_CXX11=ON" | |||||
| PRINT " $_1" | |||||
| _buildargs="$_buildargs $_1" | |||||
| fi | |||||
| _1="-D WITH_CODEC_SNDFILE=ON" | _1="-D WITH_CODEC_SNDFILE=ON" | ||||
| PRINT " $_1" | PRINT " $_1" | ||||
| _buildargs="$_buildargs $_1" | _buildargs="$_buildargs $_1" | ||||
| _1="-D PYTHON_VERSION=$PYTHON_VERSION_MIN" | _1="-D PYTHON_VERSION=$PYTHON_VERSION_MIN" | ||||
| PRINT " $_1" | PRINT " $_1" | ||||
| _buildargs="$_buildargs $_1" | _buildargs="$_buildargs $_1" | ||||
| if [ -d $INST/python-$PYTHON_VERSION_MIN ]; then | if [ -d $INST/python-$PYTHON_VERSION_MIN ]; then | ||||
| ▲ Show 20 Lines • Show All 166 Lines • Show Last 20 Lines | |||||