[Bf-blender-cvs] [3ccc61c] master: install_deps: bunch of cleanups, tweaks and micro-fixes.
Ejner Fergo
noreply at git.blender.org
Fri Apr 29 16:57:09 CEST 2016
Commit: 3ccc61c03a8f706a13afd7ba5f7823f468659680
Author: Ejner Fergo
Date: Fri Apr 29 16:35:37 2016 +0200
Branches: master
https://developer.blender.org/rB3ccc61c03a8f706a13afd7ba5f7823f468659680
install_deps: bunch of cleanups, tweaks and micro-fixes.
This commit mostly:
* removes some (very) old messages or hacks (like those for ubuntu 10.4...).
* Moves lib-specific dependencies installations to upper level
(simpler to manage, and those are small enough packages).
* Uses new dnf package manager for fedora (sigh, we now have tree different commands for fed/suse/rehl).
* fixes or enhances some options for commandline tools.
* Force anew building of oiio package, due to insane dependencies of this one in recent distro.
Part of D1933.
===================================================================
M build_files/build_environment/install_deps.sh
===================================================================
diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh
index 75da86d..5d5ef1b 100755
--- a/build_files/build_environment/install_deps.sh
+++ b/build_files/build_environment/install_deps.sh
@@ -1115,7 +1115,7 @@ compile_Boost() {
INFO "Downloading Boost-$BOOST_VERSION"
mkdir -p $SRC
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
cd $_src
@@ -1339,7 +1339,7 @@ clean_OPENEXR() {
compile_OPENEXR() {
# To be changed each time we make edits that would modify the compiled result!
- openexr_magic=13
+ openexr_magic=14
# Clean install if needed!
magic_compile_check openexr-$OPENEXR_VERSION $openexr_magic
@@ -1418,7 +1418,7 @@ compile_OPENEXR() {
if [ -d $_inst ]; then
_create_inst_shortcut
# 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
ERROR "OpenEXR-$OPENEXR_VERSION failed to compile, exiting"
exit 1
@@ -1959,7 +1959,7 @@ compile_BLOSC() {
INFO "Done compiling Blosc-$OPENVDB_BLOSC_VERSION!"
else
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
magic_compile_set blosc-$OPENVDB_BLOSC_VERSION $blosc_magic
@@ -2167,7 +2167,7 @@ clean_FFmpeg() {
compile_FFmpeg() {
# To be changed each time we make edits that would modify the compiled result!
- ffmpeg_magic=4
+ ffmpeg_magic=5
_init_ffmpeg
# Clean install if needed!
@@ -2234,7 +2234,7 @@ compile_FFmpeg() {
--disable-postproc --disable-librtmp --disable-libopencore-amrnb \
--disable-libopencore-amrwb --disable-libdc1394 --disable-version3 --disable-outdev=sdl \
--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-indev=lavfi $extra
@@ -2261,7 +2261,7 @@ compile_FFmpeg() {
#### Install on DEB-like ####
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 -r 's/([0-9]+:)?(([0-9]+\.?)+([0-9]+)).*/\2/'
}
check_package_DEB() {
@@ -2321,7 +2321,7 @@ install_packages_DEB() {
if [ ! $SUDO ]; then
WARNING "--no-sudo enabled, impossible to run apt-get install for $@, you'll have to do it yourself..."
else
- $SUDO apt-get install -y --force-yes $@
+ $SUDO apt-get install -y $@
if [ $? -ge 1 ]; then
ERROR "apt-get failed to install requested packages, exiting."
exit 1
@@ -2341,30 +2341,6 @@ install_DEB() {
[ "$(echo ${REPLY:=Y} | tr [:upper:] [:lower:])" != "y" ] && exit
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
WARNING "--no-sudo enabled, impossible to run apt-get update, you'll have to do it yourself..."
else
@@ -2377,35 +2353,23 @@ install_DEB() {
OGG_DEV="libogg-dev"
THEORA_DEV="libtheora-dev"
- _packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev \
- libfreetype6-dev libx11-dev \
+ _packages="gawk cmake cmake-curses-gui build-essential libjpeg-dev libpng-dev libtiff-dev \
+ git libfreetype6-dev libx11-dev flex bison libtbb-dev libxxf86vm-dev \
libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-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 \
- 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
VORBIS_USE=true
OGG_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.
YAMLCPP_DEV="libyaml-cpp-dev"
check_package_DEB $YAMLCPP_DEV
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"
else
PRINT ""
@@ -2413,37 +2377,6 @@ install_DEB() {
PRINT ""
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
_packages="$_packages libspnav-dev"
# Only install jack if jack2 is not already installed!
@@ -2477,20 +2410,11 @@ install_DEB() {
if [ "$WITH_ALL" = true ]; then
PRINT ""
- # Grmpf, debian is libxvidcore-dev and ubuntu libxvidcore4-dev!
- # Note: not since ubuntu 10.04
XVID_DEV="libxvidcore-dev"
check_package_DEB $XVID_DEV
if [ $? -eq 0 ]; then
install_packages_DEB $XVID_DEV
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
PRINT ""
@@ -2510,6 +2434,23 @@ install_DEB() {
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 ""
_do_compile_python=false
@@ -2564,15 +2505,8 @@ install_DEB() {
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
- if [ $? -eq 0 ]; then
- 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
+ install_packages_DEB libboost-{filesystem,iostreams,locale,regex,system,thread,wave}$boost_version-dev
+ clean_Boost
else
compile_Boost
fi
@@ -2623,13 +2557,14 @@ install_DEB() {
INFO "Forced OpenImageIO building, as requested..."
compile_OIIO
else
- check_package_version_ge_lt_DEB libopenimageio-dev $OIIO_VERSION_MIN $OIIO_VERSION_MAX
- if [ $? -eq 0 -a "$_with_built_openexr" = false ]; then
- install_packages_DEB libopenimageio-dev
- clean_OIIO
- else
+ # 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...
+ #check_package_version_ge_lt_DEB libopenimageio-dev $OIIO_VERSION_MIN $OIIO_VERSION_MAX
+ #if [ $? -eq 0 -a "$_with_built_openexr" = false ]; then
+ # install_packages_DEB libopenimageio-dev
+ # clean_OIIO
+ #else
compile_OIIO
- fi
+ #fi
fi
@@ -2638,6 +2573,7 @@ install_DEB() {
_do_compile_llvm=false
if [ "$LLVM_SKIP" = true ]; then
WARNING "Skipping LLVM installation, as requested (this also implies skipping OSL!)..."
+ OSL_SKIP=true
elif [ "$LLVM_FORCE_BUILD" = true ]; then
INFO "Forced LLVM building, as requested..."
_do_compile_llvm=true
@@ -2649,15 +2585,7 @@ install_DEB() {
LLVM_VERSION_FOUND=$LLVM_VERSION
clean_LLVM
else
- #~ check_packa
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list