[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52352] trunk/blender/build_files/ build_environment/install_deps.sh: Basic work for an ALL_STATIC option, to enable when you want to build blender in a portable way.
Bastien Montagne
montagne29 at wanadoo.fr
Mon Nov 19 12:12:34 CET 2012
Revision: 52352
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52352
Author: mont29
Date: 2012-11-19 11:12:30 +0000 (Mon, 19 Nov 2012)
Log Message:
-----------
Basic work for an ALL_STATIC option, to enable when you want to build blender in a portable way. Still WIP!
Modified Paths:
--------------
trunk/blender/build_files/build_environment/install_deps.sh
Modified: trunk/blender/build_files/build_environment/install_deps.sh
===================================================================
--- trunk/blender/build_files/build_environment/install_deps.sh 2012-11-19 10:45:03 UTC (rev 52351)
+++ trunk/blender/build_files/build_environment/install_deps.sh 2012-11-19 11:12:30 UTC (rev 52352)
@@ -8,13 +8,25 @@
# OSL is horror for manual building even
# i would want it to be setteled for manual build first,
# and only then do it automatically
-BUILD_OSL=true
+BUILD_OSL=false
+# Try to link everything statically. Use this to produce protable versions of blender.
+ALL_STATIC=false
+
THREADS=`cat /proc/cpuinfo | grep cores | uniq | sed -e "s/.*: *\(.*\)/\\1/"`
if [ -z "$THREADS" ]; then
THREADS=1
fi
+COMMON_INFO="Source code of dependencies needed to be compiled will be downloaded and extracted into '$SRC'.
+Built libs of dependencies needed to be compiled will be installed into '$INST'.
+Please edit \$SRC and/or \$INST variables at the begining of this script if you want to use other paths!
+
+Number of threads for building: $THREADS.
+Building OSL: $BUILD_OSL (edit \$BUILD_OSL var to change this).
+All static linking: $ALL_STATIC (edit \$ALL_STATIC var to change this)."
+
+
PYTHON_VERSION="3.3.0"
PYTHON_VERSION_MIN="3.3"
PYTHON_SOURCE="http://python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.bz2"
@@ -436,6 +448,9 @@
if [ -d $INST/boost ]; then
cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost -D Boost_NO_SYSTEM_PATHS=ON"
+ if $ALL_STATIC; then
+ cmake_d="$cmake_d -D Boost_USE_STATIC_LIBS=ON"
+ fi
fi
# Looks like we do not need ocio in oiio for now...
@@ -473,7 +488,7 @@
compile_OSL() {
# To be changed each time we make edits that would modify the compiled result!
- osl_magic=5
+ osl_magic=6
_src=$SRC/OpenShadingLanguage-$OSL_VERSION
_inst=$INST/osl-$OSL_VERSION
@@ -520,6 +535,9 @@
if [ -d $INST/boost ]; then
cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost -D Boost_NO_SYSTEM_PATHS=ON"
+ if $ALL_STATIC; then
+ cmake_d="$cmake_d -D Boost_USE_STATIC_LIBS=ON"
+ fi
fi
if [ -d $INST/oiio ]; then
@@ -683,9 +701,7 @@
install_DEB() {
INFO ""
INFO "Installing dependencies for DEB-based distribution"
- INFO "Source code of dependencies needed to be compiled will be downloaded and extracted into $SRC"
- INFO "Built libs of dependencies needed to be compiled will be installed into $INST"
- INFO "Please edit \$SRC and/or \$INST variables at the begining of this script if you want to use other paths!"
+ INFO "$COMMON_INFO"
INFO ""
sudo apt-get update
@@ -870,9 +886,7 @@
install_RPM() {
INFO ""
INFO "Installing dependencies for RPM-based distribution"
- INFO "Source code of dependencies needed to be compiled will be downloaded and extracted into $SRC"
- INFO "Built libs of dependencies needed to be compiled will be installed into $INST"
- INFO "Please edit \$SRC and/or \$INST variables at the begining of this script if you want to use other paths!"
+ INFO "$COMMON_INFO"
INFO ""
sudo yum -y update
@@ -1012,9 +1026,7 @@
install_SUSE() {
INFO ""
INFO "Installing dependencies for SuSE-based distribution"
- INFO "Source code of dependencies needed to be compiled will be downloaded and extracted into $SRC"
- INFO "Built libs of dependencies needed to be compiled will be installed into $INST"
- INFO "Please edit \$SRC and/or \$INST variables at the begining of this script if you want to use other paths!"
+ INFO "$COMMON_INFO"
INFO ""
sudo zypper --non-interactive update --auto-agree-with-licenses
@@ -1108,6 +1120,12 @@
if [ -d $INST/boost ]; then
INFO " -D BOOST_ROOT=$INST/boost"
INFO " -D Boost_NO_SYSTEM_PATHS=ON"
+ if $ALL_STATIC; then
+ INFO " -D Boost_USE_STATIC_LIBS=ON"
+ fi
+ elif $ALL_STATIC; then
+ INFO " -D Boost_USE_STATIC_LIBS=ON"
+ INFO " -D Boost_USE_ICU=ON"
fi
if [ -d $INST/osl ]; then
More information about the Bf-blender-cvs
mailing list