diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index cf6958d6ea0..f5f88dba498 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -277,6 +277,22 @@ export LANG ##### Generic Helpers ##### +BLACK=$(tput setaf 0) +RED=$(tput setaf 1) +GREEN=$(tput setaf 2) +YELLOW=$(tput setaf 3) +LIME_YELLOW=$(tput setaf 190) +POWDER_BLUE=$(tput setaf 153) +BLUE=$(tput setaf 4) +MAGENTA=$(tput setaf 5) +CYAN=$(tput setaf 6) +WHITE=$(tput setaf 7) +BRIGHT=$(tput bold) +NORMAL=$(tput sgr0) +BLINK=$(tput blink) +REVERSE=$(tput smso) +UNDERLINE=$(tput smul) + _echo() { if [ "X$1" = "X-n" ]; then shift; printf "%s" "$@" @@ -286,10 +302,18 @@ _echo() { } ERROR() { - _echo "$@" + _echo "${BRIGHT}${RED}ERROR! ${NORMAL}${RED}$@${NORMAL}" +} + +WARNING() { + _echo "${BRIGHT}${YELLOW}WARNING! ${NORMAL}${YELLOW}$@${NORMAL}" } INFO() { + _echo "${GREEN}$@${NORMAL}" +} + +PRINT() { _echo "$@" } @@ -312,13 +336,13 @@ while true; do THREADS="$2"; shift; shift; continue ;; -h|--help) - INFO "" - INFO "USAGE:" - INFO "" - INFO "`eval _echo "$COMMON_INFO"`" - INFO "" - INFO "`eval _echo "$ARGUMENTS_INFO"`" - INFO "" + PRINT "" + PRINT "USAGE:" + PRINT "" + PRINT "`eval _echo "$COMMON_INFO"`" + PRINT "" + PRINT "`eval _echo "$ARGUMENTS_INFO"`" + PRINT "" exit 0 ;; --with-all) @@ -416,11 +440,11 @@ while true; do break ;; *) - INFO "" - INFO "Wrong parameter! Usage:" - INFO "" - INFO "`eval _echo "$COMMON_INFO"`" - INFO "" + PRINT "" + ERROR "Wrong parameter! Usage:" + PRINT "" + PRINT "`eval _echo "$COMMON_INFO"`" + PRINT "" exit 1 ;; esac @@ -563,11 +587,11 @@ _create_inst_shortcut() { run_ldconfig() { _lib_path="$INST/$1/lib" _ldconf_path="/etc/ld.so.conf.d/$1.conf" - INFO "" + PRINT "" INFO "Running ldconfig for $1..." sudo sh -c "echo \"$_lib_path\" > $_ldconf_path" sudo /sbin/ldconfig # XXX OpenSuse does not include sbin in command path with sudo!!! - INFO "" + PRINT "" } #### Build Python #### @@ -972,6 +996,7 @@ compile_OPENEXR() { _openexr_inst=$INST/openexr-$OPENEXR_VERSION compile_ILMBASE + PRINT "" _ilmbase_inst=$_inst_shortcut _init_openexr @@ -1392,7 +1417,6 @@ compile_OSL() { cmake_d="$cmake_d -D OPENIMAGEIOHOME=$INST/oiio" fi - INFO "$LLVM_VERSION_FOUND" if [ ! -z $LLVM_VERSION_FOUND ]; then cmake_d="$cmake_d -D LLVM_VERSION=$LLVM_VERSION_FOUND" if [ -d $INST/llvm ]; then @@ -1659,36 +1683,36 @@ install_packages_DEB() { } install_DEB() { - INFO "" + PRINT "" INFO "Installing dependencies for DEB-based distribution" - INFO "" - INFO "`eval _echo "$COMMON_INFO"`" - INFO "" + PRINT "" + PRINT "`eval _echo "$COMMON_INFO"`" + PRINT "" read -p "Do you want to continue (Y/n)?" [ "$(echo ${REPLY:=Y} | tr [:upper:] [:lower:])" != "y" ] && exit if [ ! -z "`cat /etc/debian_version | grep ^6`" ]; then if [ -z "`cat /etc/apt/sources.list | grep backports.debian.org`" ]; then - INFO "Looks like you're using Debian Squeeze which does have broken CMake" - INFO "It is highly recommended to install cmake from backports, otherwise" - INFO "compilation of some libraries could fail" - INFO "" - INFO "You could install newer CMake from debian-backports repository" - INFO "Add this this line to your /etc/apt/sources.lixt:" - INFO "" - INFO "deb http://backports.debian.org/debian-backports squeeze-backports main" - INFO "" - INFO "and then run:" - INFO "" - INFO "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" - INFO "" - INFO "(you could also add this reporisotry using GUI like synaptic)" - INFO "" - INFO "Hit Enter to continue running the script, or hit Ctrl-C to abort the script" + 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 - INFO "" + PRINT "" fi fi @@ -1704,13 +1728,24 @@ install_DEB() { libfreetype6-dev libx11-dev libxi-dev wget libsqlite3-dev libbz2-dev \ libncurses5-dev libssl-dev liblzma-dev libreadline-dev $OPENJPEG_DEV \ libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \ - libsdl1.2-dev libfftw3-dev patch bzip2 libxml2-dev libyaml-cpp-dev libtinyxml-dev" + libsdl1.2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev" OPENJPEG_USE=true VORBIS_USE=true OGG_USE=true THEORA_USE=true + # 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" + check_package_DEB $YAMLCPP_DEV + if [ $? -eq 0 ]; then + _packages="$_packages $YAMLCPP_DEV" + else + PRINT "" + WARNING "libyaml-cpp-dev not found, you may have to install it by hand to get Blender compiling..." + PRINT "" + fi + # Install newest libtiff-dev in debian/ubuntu. TIFF="libtiff" check_package_DEB $TIFF @@ -1733,13 +1768,11 @@ install_DEB() { GIT="git" check_package_DEB $GIT if [ $? -eq 0 ]; then - INFO $GIT _packages="$_packages $GIT" else GIT="git-core" # Some old distro, like e.g. ubuntu 10.04 :/ check_package_DEB $GIT if [ $? -eq 0 ]; then - INFO $GIT _packages="$_packages $GIT" fi fi @@ -1748,10 +1781,10 @@ install_DEB() { _packages="$_packages libspnav-dev libjack-dev" fi - INFO "" + PRINT "" install_packages_DEB $_packages - INFO "" + PRINT "" X264_DEV="libx264-dev" check_package_version_ge_DEB $X264_DEV $X264_VERSION_MIN if [ $? -eq 0 ]; then @@ -1760,7 +1793,7 @@ install_DEB() { fi if $WITH_ALL; then - INFO "" + PRINT "" # Grmpf, debian is libxvidcore-dev and ubuntu libxvidcore4-dev! # Note: not since ubuntu 10.04 XVID_DEV="libxvidcore-dev" @@ -1777,7 +1810,7 @@ install_DEB() { fi fi - INFO "" + PRINT "" MP3LAME_DEV="libmp3lame-dev" check_package_DEB $MP3LAME_DEV if [ $? -eq 0 ]; then @@ -1785,7 +1818,7 @@ install_DEB() { MP3LAME_USE=true fi - INFO "" + PRINT "" VPX_DEV="libvpx-dev" check_package_version_ge_DEB $VPX_DEV $VPX_VERSION_MIN if [ $? -eq 0 ]; then @@ -1794,28 +1827,28 @@ install_DEB() { fi fi - INFO "" + PRINT "" if $PYTHON_SKIP; then - INFO "WARNING! Skipping Python installation, as requested..." + WARNING "Skipping Python installation, as requested..." else _do_compile=false check_package_DEB python$PYTHON_VERSION_MIN-dev if [ $? -eq 0 ]; then install_packages_DEB python$PYTHON_VERSION_MIN-dev - INFO "" + PRINT "" if $NUMPY_SKIP; then - INFO "WARNING! Skipping NumPy installation, as requested..." + WARNING "Skipping NumPy installation, as requested..." else check_package_DEB python$PYTHON_VERSION_MIN-numpy if [ $? -eq 0 ]; then install_packages_DEB python$PYTHON_VERSION_MIN-numpy elif $NUMPY_REQUIRED; then - INFO "WARNING! Valid python package but no valid numpy package!" - INFO " Building both Python and Numpy from sources!" + WANING "Valid python package but no valid numpy package!" \ + " Building both Python and Numpy from sources!" _do_compile=true else - INFO "WARNING! Sorry, using python package but no valid numpy package available!" - INFO " Use --required-numpy to force building of both Python and numpy." + WARNING "Sorry, using python package but no valid numpy package available!" \ + " Use --required-numpy to force building of both Python and numpy." fi fi else @@ -1824,9 +1857,9 @@ install_DEB() { if $_do_compile; then compile_Python - INFO "" + PRINT "" if $NUMPY_SKIP; then - INFO "WARNING! Skipping NumPy installation, as requested..." + WARNING "Skipping NumPy installation, as requested..." else compile_Numpy fi @@ -1835,9 +1868,9 @@ install_DEB() { fi fi - INFO "" + PRINT "" if $BOOST_SKIP; then - INFO "WARNING! Skipping Boost installation, as requested..." + WARNING "Skipping Boost installation, as requested..." else check_package_version_ge_DEB libboost-dev $BOOST_VERSION_MIN if [ $? -eq 0 ]; then @@ -1859,9 +1892,9 @@ install_DEB() { fi fi - INFO "" + PRINT "" if $OCIO_SKIP; then - INFO "WARNING! Skipping OpenColorIO installation, as requested..." + WARNING "Skipping OpenColorIO installation, as requested..." else check_package_version_ge_DEB libopencolorio-dev $OCIO_VERSION_MIN if [ $? -eq 0 ]; then @@ -1872,9 +1905,9 @@ install_DEB() { fi fi - INFO "" + PRINT "" if $OPENEXR_SKIP; then - INFO "WARNING! Skipping OpenEXR installation, as requested..." + WARNING "Skipping OpenEXR installation, as requested..." else check_package_version_ge_DEB libopenexr-dev $OPENEXR_VERSION_MIN if [ $? -eq 0 ]; then @@ -1887,9 +1920,9 @@ install_DEB() { fi fi - INFO "" + PRINT "" if $OIIO_SKIP; then - INFO "WARNING! Skipping OpenImageIO installation, as requested..." + WARNING "Skipping OpenImageIO installation, as requested..." else check_package_version_ge_DEB libopenimageio-dev $OIIO_VERSION_MIN if [ $? -eq 0 -a $_with_built_openexr == false ]; then @@ -1902,10 +1935,10 @@ install_DEB() { have_llvm=false + PRINT "" if $LLVM_SKIP; then - INFO "WARNING! Skipping LLVM installation, as requested (this also implies skipping OSL!)..." + WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..." else - INFO "" check_package_DEB llvm-$LLVM_VERSION-dev if [ $? -eq 0 ]; then install_packages_DEB llvm-$LLVM_VERSION-dev clang-$LLVM_VERSION @@ -1923,7 +1956,7 @@ install_DEB() { install_packages_DEB libffi-dev # LLVM can't find the debian ffi header dir _FFI_INCLUDE_DIR=`dpkg -L libffi-dev | grep -e ".*/ffi.h" | sed -r 's/(.*)\/ffi.h/\1/'` - INFO "" + PRINT "" compile_LLVM have_llvm=true LLVM_VERSION_FOUND=$LLVM_VERSION @@ -1931,35 +1964,37 @@ install_DEB() { fi fi + PRINT "" if $OSL_SKIP; then - INFO "WARNING! Skipping OpenShadingLanguage installation, as requested..." + WARNING "Skipping OpenShadingLanguage installation, as requested..." else if $have_llvm; then - INFO "" install_packages_DEB flex bison libtbb-dev # No package currently! - INFO "" + PRINT "" compile_OSL + else + WARNING "No LLVM available, cannot build OSL!" fi fi if $WITH_OPENCOLLADA; then + PRINT "" if $OPENCOLLADA_SKIP; then - INFO "WARNING! Skipping OpenCOLLADA installation, as requested..." + WARNING "Skipping OpenCOLLADA installation, as requested..." else - INFO "" install_packages_DEB libpcre3-dev # Find path to libxml shared lib... _XML2_LIB=`dpkg -L libxml2-dev | grep -e ".*/libxml2.so"` # No package - INFO "" + PRINT "" compile_OpenCOLLADA fi fi - INFO "" + PRINT "" if $FFMPEG_SKIP; then - INFO "WARNING! Skipping FFMpeg installation, as requested..." + WARNING "Skipping FFMpeg installation, as requested..." else # XXX Debian features libav packages as ffmpeg, those are not really compatible with blender code currently :/ # So for now, always build our own ffmpeg. @@ -1967,7 +2002,7 @@ install_DEB() { # if [ $? -eq 0 ]; then # install_packages_DEB ffmpeg # ffmpeg_version=`get_package_version_DEB ffmpeg` -# INFO "ffmpeg version: $ffmpeg_version" +# PRINT "ffmpeg version: $ffmpeg_version" # if [ ! -z "$ffmpeg_version" ]; then # if dpkg --compare-versions $ffmpeg_version gt 0.7.2; then # install_packages_DEB libavfilter-dev libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev libswscale-dev @@ -2060,11 +2095,11 @@ install_packages_RPM() { } install_RPM() { - INFO "" + PRINT "" INFO "Installing dependencies for RPM-based distribution" - INFO "" - INFO "`eval _echo "$COMMON_INFO"`" - INFO "" + PRINT "" + PRINT "`eval _echo "$COMMON_INFO"`" + PRINT "" read -p "Do you want to continue (Y/n)?" [ "$(echo ${REPLY:=Y} | tr [:upper:] [:lower:])" != "y" ] && exit @@ -2093,7 +2128,7 @@ install_RPM() { # Install cmake 2.8 from other repo mkdir -p $SRC if [ -f $SRC/cmake-2.8.8-4.el6.$(uname -m).rpm ]; then - INFO "" + PRINT "" INFO "Special cmake already installed" else curl -O ftp://ftp.pbone.net/mirror/atrpms.net/el6-$(uname -i)/atrpms/testing/cmake-2.8.8-4.el6.$(uname -m).rpm @@ -2109,7 +2144,7 @@ install_RPM() { _suse_rel="`grep VERSION /etc/SuSE-release | gawk '{print $3}'`" - INFO "" + PRINT "" 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..." read -p "Do you want to add this repo (Y/n)?" @@ -2149,10 +2184,10 @@ install_RPM() { _packages="$_packages jack-audio-connection-kit-devel" fi - INFO "" + PRINT "" install_packages_RPM $_packages - INFO "" + PRINT "" X264_DEV="x264-devel" check_package_version_ge_RPM $X264_DEV $X264_VERSION_MIN if [ $? -eq 0 ]; then @@ -2161,7 +2196,7 @@ install_RPM() { fi if $WITH_ALL; then - INFO "" + PRINT "" XVID_DEV="xvidcore-devel" check_package_RPM $XVID_DEV if [ $? -eq 0 ]; then @@ -2169,7 +2204,7 @@ install_RPM() { XVID_USE=true fi - INFO "" + PRINT "" MP3LAME_DEV="lame-devel" check_package_RPM $MP3LAME_DEV if [ $? -eq 0 ]; then @@ -2183,10 +2218,10 @@ install_RPM() { _packages="$_packages cmake sqlite3-devel fftw3-devel libSDL-devel" - INFO "" + PRINT "" install_packages_RPM $_packages - INFO "" + PRINT "" X264_DEV="libx264-devel" check_package_version_ge_RPM $X264_DEV $X264_VERSION_MIN if [ $? -eq 0 ]; then @@ -2195,7 +2230,7 @@ install_RPM() { fi if $WITH_ALL; then - INFO "" + PRINT "" XVID_DEV="libxvidcore-devel" check_package_RPM $XVID_DEV if [ $? -eq 0 ]; then @@ -2203,7 +2238,7 @@ install_RPM() { XVID_USE=true fi - INFO "" + PRINT "" MP3LAME_DEV="libmp3lame-devel" check_package_RPM $MP3LAME_DEV if [ $? -eq 0 ]; then @@ -2214,39 +2249,39 @@ install_RPM() { fi if $WITH_ALL; then - INFO "" + PRINT "" VPX_DEV="libvpx-devel" check_package_version_ge_RPM $VPX_DEV $VPX_VERSION_MIN if [ $? -eq 0 ]; then install_packages_RPM $VPX_DEV VPX_USE=true fi - INFO "" + PRINT "" install_packages_RPM libspnav-devel fi - INFO "" + PRINT "" if $PYTHON_SKIP; then - INFO "WARNING! Skipping Python installation, as requested..." + WARNING "Skipping Python installation, as requested..." else _do_compile=false check_package_version_match_RPM python3-devel $PYTHON_VERSION_MIN if [ $? -eq 0 ]; then install_packages_RPM python3-devel - INFO "" + PRINT "" if $NUMPY_SKIP; then - INFO "WARNING! Skipping NumPy installation, as requested..." + WARNING "Skipping NumPy installation, as requested..." else check_package_version_match_RPM python3-numpy $NUMPY_VERSION_MIN if [ $? -eq 0 ]; then install_packages_RPM python3-numpy elif $NUMPY_REQUIRED; then - INFO "WARNING! Valid python package but no valid numpy package!" - INFO " Building both Python and Numpy from sources!" + WARNING "Valid python package but no valid numpy package!" \ + " Building both Python and Numpy from sources!" _do_compile=true else - INFO "WARNING! Sorry, using python package but no valid numpy package available!" - INFO " Use --required-numpy to force building of both Python and numpy." + WARNING "Sorry, using python package but no valid numpy package available!" \ + " Use --required-numpy to force building of both Python and numpy." fi fi else @@ -2255,9 +2290,9 @@ install_RPM() { if $_do_compile; then compile_Python - INFO "" + PRINT "" if $NUMPY_SKIP; then - INFO "WARNING! Skipping NumPy installation, as requested..." + WARNING "Skipping NumPy installation, as requested..." else compile_Numpy fi @@ -2266,9 +2301,9 @@ install_RPM() { fi fi - INFO "" + PRINT "" if $BOOST_SKIP; then - INFO "WARNING! Skipping Boost installation, as requested..." + WARNING "Skipping Boost installation, as requested..." else check_package_version_ge_RPM boost-devel $BOOST_VERSION if [ $? -eq 0 ]; then @@ -2279,9 +2314,9 @@ install_RPM() { fi fi - INFO "" + PRINT "" if $OCIO_SKIP; then - INFO "WARNING! Skipping OpenColorIO installation, as requested..." + WARNING "Skipping OpenColorIO installation, as requested..." else check_package_version_ge_RPM OpenColorIO-devel $OCIO_VERSION_MIN if [ $? -eq 0 ]; then @@ -2292,9 +2327,9 @@ install_RPM() { fi fi - INFO "" + PRINT "" if $OPENEXR_SKIP; then - INFO "WARNING! Skipping OpenEXR installation, as requested..." + WARNING "Skipping OpenEXR installation, as requested..." else check_package_version_ge_RPM $OPENEXR_DEV $OPENEXR_VERSION_MIN if [ $? -eq 0 ]; then @@ -2307,9 +2342,9 @@ install_RPM() { fi fi - INFO "" + PRINT "" if $OIIO_SKIP; then - INFO "WARNING! Skipping OpenImageIO installation, as requested..." + WARNING "Skipping OpenImageIO installation, as requested..." else check_package_version_ge_RPM OpenImageIO-devel $OIIO_VERSION_MIN if [ $? -eq 0 -a $_with_built_openexr == false ]; then @@ -2322,9 +2357,9 @@ install_RPM() { have_llvm=false - INFO "" + PRINT "" if $LLVM_SKIP; then - INFO "WARNING! Skipping LLVM installation, as requested (this also implies skipping OSL!)..." + WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..." else # Problem compiling with LLVM 3.2 so match version 3.1 ... check_package_version_match_RPM llvm $LLVM_VERSION @@ -2344,52 +2379,53 @@ install_RPM() { install_packages_RPM libffi-devel # LLVM can't find the fedora ffi header dir... _FFI_INCLUDE_DIR=`rpm -ql libffi-devel | grep -e ".*/ffi.h" | sed -r 's/(.*)\/ffi.h/\1/'` - INFO "" + PRINT "" compile_LLVM have_llvm=true LLVM_VERSION_FOUND=$LLVM_VERSION fi fi + PRINT "" if $OSL_SKIP; then - INFO "" - INFO "WARNING! Skipping OpenShadingLanguage installation, as requested..." + WARNING "Skipping OpenShadingLanguage installation, as requested..." else if $have_llvm; then # No package currently! - INFO "" install_packages_RPM flex bison git if [ $RPM = "FEDORA" -o $RPM = "RHEL" ]; then install_packages_RPM tbb-devel fi - INFO "" + PRINT "" compile_OSL + else + WARNING "No LLVM available, cannot build OSL!" fi fi if $WITH_OPENCOLLADA; then + PRINT "" if $OPENCOLLADA_SKIP; then - INFO "WARNING! Skipping OpenCOLLADA installation, as requested..." + WARNING "Skipping OpenCOLLADA installation, as requested..." else - INFO "" install_packages_RPM pcre-devel git # Find path to libxml shared lib... _XML2_LIB=`rpm -ql libxml2-devel | grep -e ".*/libxml2.so"` # No package... - INFO "" + PRINT "" compile_OpenCOLLADA fi fi + PRINT "" if $FFMPEG_SKIP; then - INFO "WARNING! Skipping FFMpeg installation, as requested..." + WARNING "Skipping FFMpeg installation, as requested..." else check_package_version_ge_RPM ffmpeg $FFMPEG_VERSION_MIN if [ $? -eq 0 ]; then install_packages_RPM ffmpeg ffmpeg-devel clean_FFmpeg else - INFO "" compile_FFmpeg fi fi @@ -2442,23 +2478,23 @@ install_packages_ARCH() { } install_ARCH() { - INFO "" + PRINT "" INFO "Installing dependencies for ARCH-based distribution" - INFO "" - INFO "`eval _echo "$COMMON_INFO"`" - INFO "" + PRINT "" + PRINT "`eval _echo "$COMMON_INFO"`" + PRINT "" read -p "Do you want to continue (Y/n)?" [ "$(echo ${REPLY:=Y} | tr [:upper:] [:lower:])" != "y" ] && exit # Check for sudo... if [ ! -x "/usr/bin/sudo" ]; then - INFO "" - INFO "This script requires sudo but it is not installed." - INFO "Please setup sudo according to:" - INFO "https://wiki.archlinux.org/index.php/Sudo" - INFO "and try again." - INFO "" + PRINT "" + ERROR "This script requires sudo but it is not installed." + PRINT "Please setup sudo according to:" + PRINT "https://wiki.archlinux.org/index.php/Sudo" + PRINT "and try again." + PRINT "" exit fi @@ -2484,10 +2520,10 @@ install_ARCH() { _packages="$_packages jack" fi - INFO "" + PRINT "" install_packages_ARCH $_packages - INFO "" + PRINT "" X264_DEV="x264" check_package_version_ge_ARCH $X264_DEV $X264_VERSION_MIN if [ $? -eq 0 ]; then @@ -2496,7 +2532,7 @@ install_ARCH() { fi if $WITH_ALL; then - INFO "" + PRINT "" XVID_DEV="xvidcore" check_package_ARCH $XVID_DEV if [ $? -eq 0 ]; then @@ -2504,7 +2540,7 @@ install_ARCH() { XVID_USE=true fi - INFO "" + PRINT "" MP3LAME_DEV="lame" check_package_ARCH $MP3LAME_DEV if [ $? -eq 0 ]; then @@ -2512,7 +2548,7 @@ install_ARCH() { MP3LAME_USE=true fi - INFO "" + PRINT "" VPX_DEV="libvpx" check_package_version_ge_ARCH $VPX_DEV $VPX_VERSION_MIN if [ $? -eq 0 ]; then @@ -2521,29 +2557,29 @@ install_ARCH() { fi fi - INFO "" + PRINT "" if $PYTHON_SKIP; then - INFO "WARNING! Skipping Python installation, as requested..." + WARNING "Skipping Python installation, as requested..." else _do_compile=false check_package_version_ge_ARCH python $PYTHON_VERSION_MIN if [ $? -eq 0 ]; then install_packages_ARCH python - INFO "" + PRINT "" if $WITH_NUMPY; then if $NUMPY_SKIP; then - INFO "WARNING! Skipping NumPy installation, as requested..." + WARNING "Skipping NumPy installation, as requested..." else check_package_version_ge_ARCH python-numpy $NUMPY_VERSION_MIN if [ $? -eq 0 ]; then install_packages_ARCH python-numpy elif $NUMPY_REQUIRED; then - INFO "WARNING! Valid python package but no valid numpy package!" - INFO " Building both Python and Numpy from sources!" + WARNING "Valid python package but no valid numpy package!" \ + " Building both Python and Numpy from sources!" _do_compile=true else - INFO "WARNING! Sorry, using python package but no valid numpy package available!" - INFO " Use --required-numpy to force building of both Python and numpy." + WARNING "Sorry, using python package but no valid numpy package available!" \ + " Use --required-numpy to force building of both Python and numpy." fi fi fi @@ -2553,9 +2589,9 @@ install_ARCH() { if $_do_compile; then compile_Python - INFO "" + PRINT "" if $NUMPY_SKIP; then - INFO "WARNING! Skipping NumPy installation, as requested..." + WARNING "Skipping NumPy installation, as requested..." else compile_Numpy fi @@ -2564,9 +2600,9 @@ install_ARCH() { fi fi - INFO "" + PRINT "" if $BOOST_SKIP; then - INFO "WARNING! Skipping Boost installation, as requested..." + WARNING "Skipping Boost installation, as requested..." else check_package_version_ge_ARCH boost $BOOST_VERSION_MIN if [ $? -eq 0 ]; then @@ -2577,9 +2613,9 @@ install_ARCH() { fi fi - INFO "" + PRINT "" if $OCIO_SKIP; then - INFO "WARNING! Skipping OpenColorIO installation, as requested..." + WARNING "Skipping OpenColorIO installation, as requested..." else check_package_version_ge_ARCH opencolorio $OCIO_VERSION_MIN if [ $? -eq 0 ]; then @@ -2591,9 +2627,9 @@ install_ARCH() { fi fi - INFO "" + PRINT "" if $OPENEXR_SKIP; then - INFO "WARNING! Skipping OpenEXR installation, as requested..." + WARNING "Skipping OpenEXR installation, as requested..." else check_package_version_ge_ARCH openexr $OPENEXR_VERSION_MIN if [ $? -eq 0 ]; then @@ -2606,9 +2642,9 @@ install_ARCH() { fi fi - INFO "" + PRINT "" if $OIIO_SKIP; then - INFO "WARNING! Skipping OpenImageIO installation, as requested..." + WARNING "Skipping OpenImageIO installation, as requested..." else check_package_version_ge_ARCH openimageio $OIIO_VERSION_MIN if [ $? -eq 0 ]; then @@ -2621,9 +2657,9 @@ install_ARCH() { have_llvm=false - INFO "" + PRINT "" if $LLVM_SKIP; then - INFO "WARNING! Skipping LLVM installation, as requested (this also implies skipping OSL!)..." + WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..." else check_package_version_ge_ARCH llvm $LLVM_VERSION_MIN if [ $? -eq 0 ]; then @@ -2638,16 +2674,16 @@ install_ARCH() { _FFI_INCLUDE_DIR=`pacman -Ql libffi | grep -e ".*/ffi.h" | awk '{print $2}' | sed -r 's/(.*)\/ffi.h/\1/'` # LLVM 3.1 needs python2 to build and arch defaults to python3 _PYTHON2_BIN="/usr/bin/python2" - INFO "" + PRINT "" compile_LLVM have_llvm=true LLVM_VERSION_FOUND=$LLVM_VERSION fi fi + PRINT "" if $OSL_SKIP; then - INFO "" - INFO "WARNING! Skipping OpenShadingLanguage installation, as requested..." + WARNING "Skipping OpenShadingLanguage installation, as requested..." else if $have_llvm; then check_package_version_ge_ARCH openshadinglanguage $OSL_VERSION_MIN @@ -2656,27 +2692,27 @@ install_ARCH() { clean_OSL else #XXX Note: will fail to build with LLVM 3.2! - INFO "" install_packages_ARCH git intel-tbb - INFO "" + PRINT "" compile_OSL fi + else + WARNING "No LLVM available, cannot build OSL!" fi fi - INFO "" if $WITH_OPENCOLLADA; then + PRINT "" if $OPENCOLLADA_SKIP; then - INFO "WARNING! Skipping OpenCOLLADA installation, as requested..." + WARNING "Skipping OpenCOLLADA installation, as requested..." else - INFO "" check_package_ARCH opencollada if [ $? -eq 0 ]; then install_packages_ARCH opencollada clean_OpenCOLLADA else install_packages_ARCH pcre git - INFO "" + PRINT "" compile_OpenCOLLADA fi # Find path to libxml shared lib... @@ -2684,9 +2720,9 @@ install_ARCH() { fi fi - INFO "" + PRINT "" if $FFMPEG_SKIP; then - INFO "WARNING! Skipping FFMpeg installation, as requested..." + WARNING "Skipping FFMpeg installation, as requested..." else check_package_version_ge_ARCH ffmpeg $FFMPEG_VERSION_MIN if [ $? -eq 0 ]; then @@ -2772,21 +2808,21 @@ print_info_ffmpeglink() { elif [ "$DISTRO" = "ARCH" ]; then print_info_ffmpeglink_ARCH # XXX TODO! - else INFO "" + else PRINT "" fi } print_info() { - INFO "" - INFO "" - INFO "****WARNING****" - INFO "If you are experiencing issues building Blender, _*TRY A FRESH, CLEAN BUILD FIRST*_!" - INFO "The same goes for install_deps itself, if you encounter issues, please first erase everything in $SRC and $INST" - INFO "(provided obviously you did not add anything yourself in those dirs!), and run install_deps.sh again!" - INFO "Often, changes in the libs built by this script, or in your distro package, cannot be handled simply, so..." - INFO "" - INFO "" - INFO "If you're using CMake add this to your configuration flags:" + PRINT "" + PRINT "" + WARNING "****WARNING****" + PRINT "If you are experiencing issues building Blender, _*TRY A FRESH, CLEAN BUILD FIRST*_!" + PRINT "The same goes for install_deps itself, if you encounter issues, please first erase everything in $SRC and $INST" + PRINT "(provided obviously you did not add anything yourself in those dirs!), and run install_deps.sh again!" + PRINT "Often, changes in the libs built by this script, or in your distro package, cannot be handled simply, so..." + PRINT "" + PRINT "" + PRINT "If you're using CMake add this to your configuration flags:" _buildargs="" @@ -2794,32 +2830,32 @@ print_info() { _1="-D WITH_STATIC_LIBS=ON" # XXX Force linking with shared SDL lib! _2="-D SDL_LIBRARY='libSDL.so;-lpthread'" - INFO " $_1" - INFO " $_2" + PRINT " $_1" + PRINT " $_2" _buildargs="$_buildargs $_1 $_2" # XXX Arch linux needs to link freetype dynamically... if [ "$DISTRO" = "ARCH" ]; then _1="-D FREETYPE_LIBRARY=/usr/lib/libfreetype.so" - INFO " $_1" + PRINT " $_1" _buildargs="$_buildargs $_1" fi fi if [ -d $INST/python-$PYTHON_VERSION_MIN ]; then _1="-D PYTHON_ROOT_DIR=$INST/python-$PYTHON_VERSION_MIN" - INFO " $_1" + PRINT " $_1" _buildargs="$_buildargs $_1" fi if [ -d $INST/boost ]; then _1="-D BOOST_ROOT=$INST/boost" _2="-D Boost_NO_SYSTEM_PATHS=ON" - INFO " $_1" - INFO " $_2" + PRINT " $_1" + PRINT " $_2" _buildargs="$_buildargs $_1 $_2" elif $ALL_STATIC; then _1="-D WITH_BOOST_ICU=ON" - INFO " $_1" + PRINT " $_1" _buildargs="$_buildargs $_1" # XXX Arch linux fails static linking without these... if [ "$DISTRO" = "ARCH" ]; then @@ -2830,13 +2866,13 @@ print_info() { _5="-D ICU_LIBRARY_LX=/usr/lib/libiculx.so" _6="-D ICU_LIBRARY_TU=/usr/lib/libicutu.so" _7="-D ICU_LIBRARY_UC=/usr/lib/libicuuc.so" - INFO " $_1" - INFO " $_2" - INFO " $_3" - INFO " $_4" - INFO " $_5" - INFO " $_6" - INFO " $_7" + PRINT " $_1" + PRINT " $_2" + PRINT " $_3" + PRINT " $_4" + PRINT " $_5" + PRINT " $_6" + PRINT " $_7" _buildargs="$_buildargs $_1 $_2 $_3 $_4 $_5 $_6 $_7" fi fi @@ -2844,155 +2880,155 @@ print_info() { if [ -d $INST/openexr ]; then _1="-D OPENEXR_ROOT_DIR=$INST/openexr" _2="-D OPENEXR_VERSION=$OPENEXR_VERSION" - INFO " $_1" - INFO " $_2" + PRINT " $_1" + PRINT " $_2" _buildargs="$_buildargs $_1 $_2" fi _1="-D WITH_CYCLES_OSL=ON" _2="-D WITH_LLVM=ON" _3="-D LLVM_VERSION=$LLVM_VERSION_FOUND" - INFO " $_1" - INFO " $_2" - INFO " $_3" + PRINT " $_1" + PRINT " $_2" + PRINT " $_3" _buildargs="$_buildargs $_1 $_2 $_3" if [ -d $INST/osl ]; then _1="-D CYCLES_OSL=$INST/osl" - INFO " $_1" + PRINT " $_1" _buildargs="$_buildargs $_1" fi if [ -d $INST/llvm ]; then _1="-D LLVM_DIRECTORY=$INST/llvm" _2="-D LLVM_STATIC=ON" - INFO " $_1" - INFO " $_2" + PRINT " $_1" + PRINT " $_2" _buildargs="$_buildargs $_1 $_2" fi if $WITH_OPENCOLLADA; then _1="-D WITH_OPENCOLLADA=ON" - INFO " $_1" + PRINT " $_1" _buildargs="$_buildargs $_1" if $ALL_STATIC; then _1="-D XML2_LIBRARY=$_XML2_LIB" - INFO " $_1" + PRINT " $_1" _buildargs="$_buildargs $_1" fi fi _1="-D WITH_CODEC_FFMPEG=ON" _2="-D FFMPEG_LIBRARIES='avformat;avcodec;avutil;avdevice;swscale;rt;`print_info_ffmpeglink`'" - INFO " $_1" - INFO " $_2" + PRINT " $_1" + PRINT " $_2" _buildargs="$_buildargs $_1 $_2" if [ -d $INST/ffmpeg ]; then _1="-D FFMPEG=$INST/ffmpeg" - INFO " $_1" + PRINT " $_1" _buildargs="$_buildargs $_1" fi - INFO "" - INFO "Or even simpler, just run (in your blender-source dir):" - INFO " make -j$THREADS BUILD_CMAKE_ARGS=\"$_buildargs\"" + PRINT "" + PRINT "Or even simpler, just run (in your blender-source dir):" + PRINT " make -j$THREADS BUILD_CMAKE_ARGS=\"$_buildargs\"" - INFO "" - INFO "If you're using SCons add this to your user-config:" + PRINT "" + PRINT "If you're using SCons add this to your user-config:" if [ -d $INST/python-$PYTHON_VERSION_MIN ]; then - INFO "BF_PYTHON = '$INST/python-$PYTHON_VERSION_MIN'" - INFO "BF_PYTHON_ABI_FLAGS = 'm'" + PRINT "BF_PYTHON = '$INST/python-$PYTHON_VERSION_MIN'" + PRINT "BF_PYTHON_ABI_FLAGS = 'm'" fi if $ALL_STATIC; then - INFO "WITH_BF_STATICPYTHON = True" + PRINT "WITH_BF_STATICPYTHON = True" fi - INFO "WITH_BF_OCIO = True" + PRINT "WITH_BF_OCIO = True" if [ -d $INST/ocio ]; then - INFO "BF_OCIO = '$INST/ocio'" + PRINT "BF_OCIO = '$INST/ocio'" fi if $ALL_STATIC; then - INFO "WITH_BF_STATICOCIO = True" + PRINT "WITH_BF_STATICOCIO = True" fi if [ -d $INST/openexr ]; then - INFO "BF_OPENEXR = '$INST/openexr'" + PRINT "BF_OPENEXR = '$INST/openexr'" _ilm_libs_ext="" version_ge $OPENEXR_VERSION "2.1.0" if [ $? -eq 0 ]; then _ilm_libs_ext=`echo $OPENEXR_VERSION | sed -r 's/([0-9]+)\.([0-9]+).*/-\1_\2/'` fi - INFO "BF_OPENEXR_LIB = 'Half IlmImf$_ilm_libs_ext Iex$_ilm_libs_ext Imath$_ilm_libs_ext '" + PRINT "BF_OPENEXR_LIB = 'Half IlmImf$_ilm_libs_ext Iex$_ilm_libs_ext Imath$_ilm_libs_ext '" if $ALL_STATIC; then - INFO "BF_OPENEXR_LIB_STATIC = '\${BF_OPENEXR}/lib/libHalf.a \${BF_OPENEXR}/lib/libIlmImf$_ilm_libs_ext.a \${BF_OPENEXR}/lib/libIex$_ilm_libs_ext.a \${BF_OPENEXR}/lib/libImath$_ilm_libs_ext.a \${BF_OPENEXR}/lib/libIlmThread$_ilm_libs_ext.a'" + PRINT "BF_OPENEXR_LIB_STATIC = '\${BF_OPENEXR}/lib/libHalf.a \${BF_OPENEXR}/lib/libIlmImf$_ilm_libs_ext.a \${BF_OPENEXR}/lib/libIex$_ilm_libs_ext.a \${BF_OPENEXR}/lib/libImath$_ilm_libs_ext.a \${BF_OPENEXR}/lib/libIlmThread$_ilm_libs_ext.a'" else # BF_OPENEXR_LIB does not work, things like '-lIlmImf-2_1' do not suit ld. # For now, hack around!!! - INFO "BF_OPENEXR_LIB_STATIC = '\${BF_OPENEXR}/lib/libHalf.so \${BF_OPENEXR}/lib/libIlmImf$_ilm_libs_ext.so \${BF_OPENEXR}/lib/libIex$_ilm_libs_ext.so \${BF_OPENEXR}/lib/libImath$_ilm_libs_ext.so \${BF_OPENEXR}/lib/libIlmThread$_ilm_libs_ext.so'" - INFO "WITH_BF_STATICOPENEXR = True" + PRINT "BF_OPENEXR_LIB_STATIC = '\${BF_OPENEXR}/lib/libHalf.so \${BF_OPENEXR}/lib/libIlmImf$_ilm_libs_ext.so \${BF_OPENEXR}/lib/libIex$_ilm_libs_ext.so \${BF_OPENEXR}/lib/libImath$_ilm_libs_ext.so \${BF_OPENEXR}/lib/libIlmThread$_ilm_libs_ext.so'" + PRINT "WITH_BF_STATICOPENEXR = True" fi fi if $ALL_STATIC; then - INFO "WITH_BF_STATICOPENEXR = True" + PRINT "WITH_BF_STATICOPENEXR = True" fi - INFO "WITH_BF_OIIO = True" + PRINT "WITH_BF_OIIO = True" if [ -d $INST/oiio ]; then - INFO "BF_OIIO = '$INST/oiio'" + PRINT "BF_OIIO = '$INST/oiio'" fi # XXX No more static oiio for now :/ #if $ALL_STATIC; then - #INFO "WITH_BF_STATICOIIO = True" + #PRINT "WITH_BF_STATICOIIO = True" #fi - INFO "WITH_BF_CYCLES = True" + PRINT "WITH_BF_CYCLES = True" if [ -d $INST/osl ]; then - INFO "BF_OSL = '$INST/osl'" + PRINT "BF_OSL = '$INST/osl'" fi - INFO "WITH_BF_BOOST = True" + PRINT "WITH_BF_BOOST = True" if [ -d $INST/boost ]; then - INFO "BF_BOOST = '$INST/boost'" + PRINT "BF_BOOST = '$INST/boost'" fi # XXX Broken in scons... #if $ALL_STATIC; then - #INFO "WITH_BF_STATICBOOST = True" + #PRINT "WITH_BF_STATICBOOST = True" #fi if $WITH_OPENCOLLADA; then - INFO "WITH_BF_COLLADA = True" + PRINT "WITH_BF_COLLADA = True" if [ -d $INST/opencollada ]; then - INFO "BF_OPENCOLLADA = '$INST/opencollada'" + PRINT "BF_OPENCOLLADA = '$INST/opencollada'" fi fi _ffmpeg_list_sep=" " if [ -d $INST/ffmpeg ]; then - INFO "BF_FFMPEG = '$INST/ffmpeg'" + PRINT "BF_FFMPEG = '$INST/ffmpeg'" fi if $ALL_STATIC; then - INFO "WITH_BF_STATICFFMPEG = True" - INFO "BF_FFMPEG_LIB_STATIC = '\${BF_FFMPEG_LIBPATH}/libavformat.a \${BF_FFMPEG_LIBPATH}/libavcodec.a \${BF_FFMPEG_LIBPATH}/libswscale.a \${BF_FFMPEG_LIBPATH}/libavutil.a \${BF_FFMPEG_LIBPATH}/libavdevice.a `print_info_ffmpeglink`'" + PRINT "WITH_BF_STATICFFMPEG = True" + PRINT "BF_FFMPEG_LIB_STATIC = '\${BF_FFMPEG_LIBPATH}/libavformat.a \${BF_FFMPEG_LIBPATH}/libavcodec.a \${BF_FFMPEG_LIBPATH}/libswscale.a \${BF_FFMPEG_LIBPATH}/libavutil.a \${BF_FFMPEG_LIBPATH}/libavdevice.a `print_info_ffmpeglink`'" else - INFO "BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice `print_info_ffmpeglink`'" + PRINT "BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice `print_info_ffmpeglink`'" fi if ! $WITH_ALL; then - INFO "WITH_BF_3DMOUSE = False" + PRINT "WITH_BF_3DMOUSE = False" # No libspacenav in official arch repos... elif [ "$DISTRO" = "ARCH" ]; then - INFO "WITH_BF_3DMOUSE = False" + PRINT "WITH_BF_3DMOUSE = False" fi if [ $ALL_STATIC -o $WITH_OPENCOLLADA ]; then - INFO "LLIBS = [\""xml2"\", \""expat"\"] + LLIBS" + PRINT "LLIBS = [\""xml2"\", \""expat"\"] + LLIBS" fi - INFO "" - INFO "NOTE: static build with scons are very tricky to set-up, if you choose that option" - INFO " you will likely have to edit these settings manually!" - INFO "" + PRINT "" + PRINT "NOTE: static build with scons are very tricky to set-up, if you choose that option" + PRINT " you will likely have to edit these settings manually!" + PRINT "" } #### "Main" #### @@ -3012,9 +3048,9 @@ else fi print_info | tee BUILD_NOTES.txt -INFO "" -INFO "This information has been written to BUILD_NOTES.txt" -INFO "" +PRINT "" +PRINT "This information has been written to BUILD_NOTES.txt" +PRINT "" # Switch back to user language. LANG=LANG_BACK