Merging r51923 through r52851 from trunk into soc-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 10 Dec 2012 15:18:00 +0000 (15:18 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 10 Dec 2012 15:18:00 +0000 (15:18 +0000)
978 files changed:
CMakeLists.txt
GNUmakefile
SConstruct
build_files/build_environment/install_deps.sh [new file with mode: 0755]
build_files/build_environment/prepare_release_env.sh
build_files/buildbot/config/user-config-glibc211-i686.py
build_files/buildbot/config/user-config-glibc211-x86_64.py
build_files/buildbot/config/user-config-glibc27-i686.py
build_files/buildbot/config/user-config-glibc27-x86_64.py
build_files/buildbot/config/user-config-player-glibc211-i686.py
build_files/buildbot/config/user-config-player-glibc211-x86_64.py
build_files/buildbot/config/user-config-player-glibc27-i686.py
build_files/buildbot/config/user-config-player-glibc27-x86_64.py
build_files/buildbot/master.cfg
build_files/buildbot/slave_rsync.py [new file with mode: 0644]
build_files/cmake/Modules/FindIcuLinux.cmake [new file with mode: 0644]
build_files/cmake/Modules/FindOpenColorIO.cmake
build_files/cmake/Modules/FindOpenImageIO.cmake
build_files/cmake/Modules/FindPythonLibsUnix.cmake
build_files/cmake/cmake_consistency_check.py
build_files/cmake/cmake_netbeans_project.py
build_files/cmake/cmake_qtcreator_project.py
build_files/cmake/cmake_static_check_clang_array.py
build_files/cmake/cmake_static_check_cppcheck.py
build_files/cmake/cmake_static_check_smatch.py
build_files/cmake/cmake_static_check_sparse.py
build_files/cmake/cmake_static_check_splint.py
build_files/cmake/example_scripts/make_quicky.py
build_files/cmake/macros.cmake
build_files/cmake/project_info.py
build_files/scons/config/darwin-config.py
build_files/scons/config/freebsd7-config.py
build_files/scons/config/freebsd8-config.py
build_files/scons/config/freebsd9-config.py
build_files/scons/config/linux-config.py
build_files/scons/config/linuxcross-config.py
build_files/scons/config/win32-mingw-config.py
build_files/scons/config/win32-vc-config.py
build_files/scons/config/win64-mingw-config.py
build_files/scons/config/win64-vc-config.py
build_files/scons/tools/Blender.py
build_files/scons/tools/btools.py
doc/blender_file_format/BlendFileDnaExporter_25.py
doc/blender_file_format/BlendFileReader.py
doc/manpage/blender.1
doc/python_api/examples/bmesh.ops.1.py [new file with mode: 0644]
doc/python_api/rst/bge.logic.rst
doc/python_api/rst/bge.types.rst
doc/python_api/rst/bgl.rst
doc/python_api/rst/gpu.rst
doc/python_api/rst/include__bmesh.rst
doc/python_api/rst/info_api_reference.rst [new file with mode: 0644]
doc/python_api/rst/info_gotcha.rst
doc/python_api/rst/info_overview.rst
doc/python_api/rst/info_quickstart.rst
doc/python_api/rst/info_tips_and_tricks.rst
doc/python_api/rst/info_tutorial_addon.rst [new file with mode: 0644]
doc/python_api/rst_from_bmesh_opdefines.py [new file with mode: 0644]
doc/python_api/sphinx_doc_gen.py
extern/CMakeLists.txt
extern/SConscript
extern/glew/src/glew.c
extern/libmv/CMakeLists.txt
extern/libmv/libmv-capi.cpp
extern/libmv/libmv/simple_pipeline/resect.cc
extern/xdnd/xdnd.c
intern/CMakeLists.txt
intern/SConscript
intern/audaspace/intern/AUD_FileWriter.h
intern/audaspace/intern/AUD_LinearResampleReader.cpp
intern/bsp/intern/BOP_CarveInterface.cpp
intern/container/CTR_HashedPtr.h
intern/cycles/CMakeLists.txt
intern/cycles/SConscript
intern/cycles/app/CMakeLists.txt
intern/cycles/app/cycles_test.cpp
intern/cycles/blender/CCL_api.h
intern/cycles/blender/addon/__init__.py
intern/cycles/blender/addon/engine.py
intern/cycles/blender/addon/enums.py
intern/cycles/blender/addon/osl.py
intern/cycles/blender/addon/ui.py
intern/cycles/blender/blender_camera.cpp
intern/cycles/blender/blender_mesh.cpp
intern/cycles/blender/blender_object.cpp
intern/cycles/blender/blender_particles.cpp
intern/cycles/blender/blender_python.cpp
intern/cycles/blender/blender_session.cpp
intern/cycles/blender/blender_session.h
intern/cycles/blender/blender_shader.cpp
intern/cycles/blender/blender_sync.cpp
intern/cycles/blender/blender_sync.h
intern/cycles/blender/blender_util.h
intern/cycles/cmake/external_libs.cmake
intern/cycles/device/device.cpp
intern/cycles/device/device.h
intern/cycles/device/device_cpu.cpp
intern/cycles/device/device_cuda.cpp
intern/cycles/device/device_intern.h
intern/cycles/device/device_task.cpp
intern/cycles/kernel/CMakeLists.txt
intern/cycles/kernel/SConscript
intern/cycles/kernel/closure/bsdf_phong_ramp.h [new file with mode: 0644]
intern/cycles/kernel/closure/bsdf_ward.h
intern/cycles/kernel/kernel.cpp
intern/cycles/kernel/kernel_accumulate.h
intern/cycles/kernel/kernel_attribute.h
intern/cycles/kernel/kernel_camera.h
intern/cycles/kernel/kernel_globals.h
intern/cycles/kernel/kernel_light.h
intern/cycles/kernel/kernel_object.h
intern/cycles/kernel/kernel_passes.h
intern/cycles/kernel/kernel_path.h
intern/cycles/kernel/kernel_projection.h
intern/cycles/kernel/kernel_shader.h
intern/cycles/kernel/kernel_triangle.h
intern/cycles/kernel/kernel_types.h
intern/cycles/kernel/osl/CMakeLists.txt
intern/cycles/kernel/osl/SConscript [new file with mode: 0644]
intern/cycles/kernel/osl/background.cpp
intern/cycles/kernel/osl/bsdf_phong_ramp.cpp [new file with mode: 0644]
intern/cycles/kernel/osl/osl_closures.cpp
intern/cycles/kernel/osl/osl_closures.h
intern/cycles/kernel/osl/osl_globals.h
intern/cycles/kernel/osl/osl_services.cpp
intern/cycles/kernel/osl/osl_services.h
intern/cycles/kernel/osl/osl_shader.cpp
intern/cycles/kernel/osl/osl_shader.h
intern/cycles/kernel/shaders/CMakeLists.txt
intern/cycles/kernel/shaders/SConscript [new file with mode: 0644]
intern/cycles/kernel/shaders/node_ambient_occlusion.osl [new file with mode: 0644]
intern/cycles/kernel/shaders/node_brick_texture.osl
intern/cycles/kernel/shaders/node_brightness.osl
intern/cycles/kernel/shaders/node_checker_texture.osl
intern/cycles/kernel/shaders/node_convert_from_color.osl
intern/cycles/kernel/shaders/node_convert_from_float.osl
intern/cycles/kernel/shaders/node_convert_from_int.osl
intern/cycles/kernel/shaders/node_convert_from_normal.osl
intern/cycles/kernel/shaders/node_convert_from_point.osl
intern/cycles/kernel/shaders/node_convert_from_string.osl [new file with mode: 0644]
intern/cycles/kernel/shaders/node_convert_from_vector.osl
intern/cycles/kernel/shaders/node_environment_texture.osl
intern/cycles/kernel/shaders/node_geometry.osl
intern/cycles/kernel/shaders/node_gradient_texture.osl
intern/cycles/kernel/shaders/node_hsv.osl
intern/cycles/kernel/shaders/node_image_texture.osl
intern/cycles/kernel/shaders/node_light_falloff.osl
intern/cycles/kernel/shaders/node_magic_texture.osl
intern/cycles/kernel/shaders/node_mapping.osl
intern/cycles/kernel/shaders/node_mix.osl
intern/cycles/kernel/shaders/node_musgrave_texture.osl
intern/cycles/kernel/shaders/node_noise_texture.osl
intern/cycles/kernel/shaders/node_normal_map.osl [new file with mode: 0644]
intern/cycles/kernel/shaders/node_refraction_bsdf.osl [new file with mode: 0644]
intern/cycles/kernel/shaders/node_rgb_ramp.osl
intern/cycles/kernel/shaders/node_sky_texture.osl
intern/cycles/kernel/shaders/node_tangent.osl [new file with mode: 0644]
intern/cycles/kernel/shaders/node_texture_coordinate.osl
intern/cycles/kernel/shaders/node_voronoi_texture.osl
intern/cycles/kernel/shaders/node_ward_bsdf.osl
intern/cycles/kernel/shaders/node_wave_texture.osl
intern/cycles/kernel/shaders/stdosl.h
intern/cycles/kernel/svm/svm.h
intern/cycles/kernel/svm/svm_brick.h
intern/cycles/kernel/svm/svm_bsdf.h
intern/cycles/kernel/svm/svm_closure.h
intern/cycles/kernel/svm/svm_geometry.h
intern/cycles/kernel/svm/svm_hsv.h
intern/cycles/kernel/svm/svm_math.h
intern/cycles/kernel/svm/svm_ramp.h
intern/cycles/kernel/svm/svm_tex_coord.h
intern/cycles/kernel/svm/svm_texture.h
intern/cycles/kernel/svm/svm_types.h
intern/cycles/kernel/svm/svm_voronoi.h
intern/cycles/render/attribute.cpp
intern/cycles/render/camera.cpp
intern/cycles/render/camera.h
intern/cycles/render/graph.cpp
intern/cycles/render/graph.h
intern/cycles/render/image.cpp
intern/cycles/render/image.h
intern/cycles/render/light.cpp
intern/cycles/render/mesh.cpp
intern/cycles/render/nodes.cpp
intern/cycles/render/nodes.h
intern/cycles/render/object.cpp
intern/cycles/render/object.h
intern/cycles/render/osl.cpp
intern/cycles/render/osl.h
intern/cycles/render/particles.cpp
intern/cycles/render/scene.cpp
intern/cycles/render/scene.h
intern/cycles/render/session.cpp
intern/cycles/render/session.h
intern/cycles/render/shader.cpp
intern/cycles/render/shader.h
intern/cycles/render/svm.cpp
intern/cycles/render/svm.h
intern/cycles/util/CMakeLists.txt
intern/cycles/util/util_attribute.cpp
intern/cycles/util/util_boundbox.h
intern/cycles/util/util_opencl.cpp
intern/cycles/util/util_progress.h
intern/cycles/util/util_stats.h
intern/cycles/util/util_task.cpp
intern/cycles/util/util_task.h
intern/cycles/util/util_thread.h
intern/cycles/util/util_transform.cpp
intern/cycles/util/util_transform.h
intern/cycles/util/util_types.h
intern/elbeem/intern/ntl_geometryobject.cpp
intern/elbeem/intern/ntl_world.cpp
intern/elbeem/intern/ntl_world.h
intern/ghost/CMakeLists.txt
intern/ghost/GHOST_C-api.h
intern/ghost/intern/GHOST_NDOFManagerX11.cpp
intern/ghost/intern/GHOST_SystemCocoa.h
intern/ghost/intern/GHOST_SystemCocoa.mm
intern/ghost/intern/GHOST_SystemSDL.cpp
intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_WindowCocoa.mm
intern/ghost/intern/GHOST_WindowSDL.cpp
intern/ghost/intern/GHOST_WindowWin32.cpp
intern/ghost/intern/GHOST_WindowX11.cpp
intern/guardedalloc/cpp/mallocn.cpp
intern/guardedalloc/intern/mallocn.c
intern/iksolver/intern/IK_QJacobianSolver.cpp
intern/itasc/CMakeLists.txt
intern/itasc/kdl/chain.hpp
intern/itasc/kdl/tree.hpp
intern/locale/CMakeLists.txt [new file with mode: 0644]
intern/locale/SConscript [new file with mode: 0644]
intern/locale/boost_locale_wrapper.cpp [new file with mode: 0644]
intern/locale/boost_locale_wrapper.h [new file with mode: 0644]
intern/memutil/MEM_CacheLimiter.h
intern/memutil/MEM_SmartPtr.h
intern/opencolorio/ocio_impl.cc
intern/opennl/CMakeLists.txt
intern/smoke/intern/FFT_NOISE.h
intern/smoke/intern/WTURBULENCE.cpp
intern/utfconv/utfconv.h
release/darwin/blender.app/Contents/Info.plist [moved from source/darwin/blender.app/Contents/Info.plist with 100% similarity]
release/darwin/blender.app/Contents/MacOS/blender [moved from source/darwin/blender.app/Contents/MacOS/blender with 100% similarity]
release/darwin/blender.app/Contents/PkgInfo [moved from source/darwin/blender.app/Contents/PkgInfo with 100% similarity]
release/darwin/blender.app/Contents/Resources/blender file icon.icns [moved from source/darwin/blender.app/Contents/Resources/blender file icon.icns with 100% similarity]
release/darwin/blender.app/Contents/Resources/blender icon.icns [moved from source/darwin/blender.app/Contents/Resources/blender icon.icns with 100% similarity]
release/darwin/blenderplayer.app/Contents/Info.plist [moved from source/darwin/blenderplayer.app/Contents/Info.plist with 100% similarity]
release/darwin/blenderplayer.app/Contents/MacOS/blenderplayer [moved from source/darwin/blenderplayer.app/Contents/MacOS/blenderplayer with 100% similarity]
release/darwin/blenderplayer.app/Contents/PkgInfo [moved from source/darwin/blenderplayer.app/Contents/PkgInfo with 100% similarity]
release/darwin/blenderplayer.app/Contents/Resources/blender file icon.icns [moved from source/darwin/blenderplayer.app/Contents/Resources/blender file icon.icns with 100% similarity]
release/darwin/blenderplayer.app/Contents/Resources/blender player icon.icns [moved from source/darwin/blenderplayer.app/Contents/Resources/blender player icon.icns with 100% similarity]
release/darwin/set_simulation_threads.app/Contents/Info.plist [moved from source/darwin/set_simulation_threads.app/Contents/Info.plist with 100% similarity]
release/darwin/set_simulation_threads.app/Contents/MacOS/applet [moved from source/darwin/set_simulation_threads.app/Contents/MacOS/applet with 100% similarity]
release/darwin/set_simulation_threads.app/Contents/PkgInfo [moved from source/darwin/set_simulation_threads.app/Contents/PkgInfo with 100% similarity]
release/darwin/set_simulation_threads.app/Contents/Resources/Scripts/main.scpt [moved from source/darwin/set_simulation_threads.app/Contents/Resources/Scripts/main.scpt with 100% similarity]
release/darwin/set_simulation_threads.app/Contents/Resources/applet.icns [moved from source/darwin/set_simulation_threads.app/Contents/Resources/applet.icns with 100% similarity]
release/darwin/set_simulation_threads.app/Contents/Resources/applet.rsrc [moved from source/darwin/set_simulation_threads.app/Contents/Resources/applet.rsrc with 100% similarity]
release/darwin/set_simulation_threads.app/Contents/Resources/description.rtfd/TXT.rtf [moved from source/darwin/set_simulation_threads.app/Contents/Resources/description.rtfd/TXT.rtf with 100% similarity]
release/datafiles/blender_icons.png
release/datafiles/prvicons.png
release/datafiles/splash.png
release/datafiles/startup.blend
release/scripts/modules/addon_utils.py
release/scripts/modules/bl_i18n_utils/settings.py
release/scripts/modules/bl_i18n_utils/spell_check_utils.py
release/scripts/modules/bl_i18n_utils/update_languages_menu.py
release/scripts/modules/bl_i18n_utils/update_pot.py
release/scripts/modules/bl_i18n_utils/update_trunk.py
release/scripts/modules/bpy/ops.py
release/scripts/modules/bpy/utils.py
release/scripts/modules/bpy_extras/mesh_utils.py
release/scripts/modules/bpy_types.py
release/scripts/modules/rna_xml.py
release/scripts/presets/interface_theme/back_to_black.xml
release/scripts/presets/interface_theme/blender_24x.xml
release/scripts/presets/interface_theme/elsyiun.xml
release/scripts/presets/interface_theme/hexagon.xml
release/scripts/presets/interface_theme/ubuntu_ambiance.xml
release/scripts/presets/keyconfig/maya.py
release/scripts/startup/bl_operators/image.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_operators/presets.py
release/scripts/startup/bl_operators/screen_play_rendered_anim.py
release/scripts/startup/bl_operators/uvcalc_follow_active.py
release/scripts/startup/bl_operators/uvcalc_lightmap.py
release/scripts/startup/bl_operators/uvcalc_smart_project.py
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/properties_data_armature.py
release/scripts/startup/bl_ui/properties_data_bone.py
release/scripts/startup/bl_ui/properties_data_camera.py
release/scripts/startup/bl_ui/properties_data_curve.py
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/properties_object_constraint.py
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/space_console.py
release/scripts/startup/bl_ui/space_dopesheet.py
release/scripts/startup/bl_ui/space_graph.py
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_sequencer.py
release/scripts/startup/bl_ui/space_text.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
release/scripts/templates/bmesh_simple.py
release/scripts/templates/bmesh_simple_editmode.py [new file with mode: 0644]
release/scripts/templates/script_stub.py
release/text/readme.html
source/blender/avi/intern/avi.c
source/blender/avi/intern/avi_rgb.c
source/blender/blenfont/BLF_translation.h
source/blender/blenfont/CMakeLists.txt
source/blender/blenfont/SConscript
source/blender/blenfont/intern/blf.c
source/blender/blenfont/intern/blf_lang.c
source/blender/blenfont/intern/blf_translation.c
source/blender/blenkernel/BKE_DerivedMesh.h
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/BKE_global.h
source/blender/blenkernel/BKE_icons.h
source/blender/blenkernel/BKE_image.h
source/blender/blenkernel/BKE_lamp.h
source/blender/blenkernel/BKE_mesh.h
source/blender/blenkernel/BKE_modifier.h
source/blender/blenkernel/BKE_multires.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/BKE_text.h
source/blender/blenkernel/BKE_utildefines.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/bmfont.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/camera.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/collision.c
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/context.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/blenkernel/intern/idcode.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/lamp.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/mask.c
source/blender/blenkernel/intern/mask_evaluate.c
source/blender/blenkernel/intern/mask_rasterize.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/modifiers_bmesh.c
source/blender/blenkernel/intern/movieclip.c
source/blender/blenkernel/intern/multires.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/ocean.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenkernel/intern/seqmodifier.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/sound.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/suggestions.c
source/blender/blenkernel/intern/text.c
source/blender/blenkernel/intern/tracking.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenlib/BLI_array.h
source/blender/blenlib/BLI_bpath.h
source/blender/blenlib/BLI_endian_switch.h
source/blender/blenlib/BLI_endian_switch_inline.h
source/blender/blenlib/BLI_ghash.h
source/blender/blenlib/BLI_math.h
source/blender/blenlib/BLI_math_base.h
source/blender/blenlib/BLI_math_color.h
source/blender/blenlib/BLI_math_geom.h
source/blender/blenlib/BLI_math_inline.h
source/blender/blenlib/BLI_math_interp.h [new file with mode: 0644]
source/blender/blenlib/BLI_math_matrix.h
source/blender/blenlib/BLI_math_vector.h
source/blender/blenlib/BLI_pbvh.h
source/blender/blenlib/BLI_quadric.h
source/blender/blenlib/BLI_rect.h
source/blender/blenlib/BLI_scanfill.h
source/blender/blenlib/BLI_string_utf8.h
source/blender/blenlib/BLI_threads.h
source/blender/blenlib/BLI_utildefines.h
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/PIL_time.h
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/blenlib/intern/bpath.c
source/blender/blenlib/intern/math_base_inline.c
source/blender/blenlib/intern/math_color_inline.c
source/blender/blenlib/intern/math_geom.c
source/blender/blenlib/intern/math_geom_inline.c
source/blender/blenlib/intern/math_interp.c [new file with mode: 0644]
source/blender/blenlib/intern/math_matrix.c
source/blender/blenlib/intern/math_rotation.c
source/blender/blenlib/intern/math_vector.c
source/blender/blenlib/intern/math_vector_inline.c
source/blender/blenlib/intern/noise.c
source/blender/blenlib/intern/pbvh.c
source/blender/blenlib/intern/quadric.c
source/blender/blenlib/intern/scanfill.c
source/blender/blenlib/intern/smallhash.c
source/blender/blenlib/intern/string.c
source/blender/blenlib/intern/string_cursor_utf8.c
source/blender/blenlib/intern/string_utf8.c
source/blender/blenlib/intern/threads.c
source/blender/blenlib/intern/voronoi.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_250.c
source/blender/blenloader/intern/writefile.c
source/blender/bmesh/CMakeLists.txt
source/blender/bmesh/bmesh.h
source/blender/bmesh/bmesh_class.h
source/blender/bmesh/intern/bmesh_construct.c
source/blender/bmesh/intern/bmesh_construct.h
source/blender/bmesh/intern/bmesh_core.c
source/blender/bmesh/intern/bmesh_core.h
source/blender/bmesh/intern/bmesh_interp.c
source/blender/bmesh/intern/bmesh_iterators.c
source/blender/bmesh/intern/bmesh_iterators.h
source/blender/bmesh/intern/bmesh_mesh.c
source/blender/bmesh/intern/bmesh_mesh.h
source/blender/bmesh/intern/bmesh_mesh_conv.c
source/blender/bmesh/intern/bmesh_mods.c
source/blender/bmesh/intern/bmesh_opdefines.c
source/blender/bmesh/intern/bmesh_operator_api.h
source/blender/bmesh/intern/bmesh_operator_api_inline.h
source/blender/bmesh/intern/bmesh_operators.c
source/blender/bmesh/intern/bmesh_operators.h
source/blender/bmesh/intern/bmesh_operators_private.h
source/blender/bmesh/intern/bmesh_polygon.c
source/blender/bmesh/intern/bmesh_private.h
source/blender/bmesh/intern/bmesh_queries.c
source/blender/bmesh/intern/bmesh_queries.h
source/blender/bmesh/operators/bmo_bevel.c
source/blender/bmesh/operators/bmo_connect.c
source/blender/bmesh/operators/bmo_create.c
source/blender/bmesh/operators/bmo_dissolve.c
source/blender/bmesh/operators/bmo_dupe.c
source/blender/bmesh/operators/bmo_edgesplit.c
source/blender/bmesh/operators/bmo_extrude.c
source/blender/bmesh/operators/bmo_hull.c
source/blender/bmesh/operators/bmo_inset.c
source/blender/bmesh/operators/bmo_join_triangles.c
source/blender/bmesh/operators/bmo_mesh_conv.c
source/blender/bmesh/operators/bmo_mirror.c
source/blender/bmesh/operators/bmo_primitive.c
source/blender/bmesh/operators/bmo_removedoubles.c
source/blender/bmesh/operators/bmo_similar.c
source/blender/bmesh/operators/bmo_slide.c
source/blender/bmesh/operators/bmo_smooth_laplacian.c
source/blender/bmesh/operators/bmo_subdivide.c
source/blender/bmesh/operators/bmo_subdivide.h
source/blender/bmesh/operators/bmo_symmetrize.c
source/blender/bmesh/operators/bmo_triangulate.c
source/blender/bmesh/operators/bmo_unsubdivide.c
source/blender/bmesh/operators/bmo_utils.c
source/blender/bmesh/operators/bmo_wireframe.c
source/blender/bmesh/tools/BME_bevel.c
source/blender/bmesh/tools/bmesh_bevel.c [new file with mode: 0644]
source/blender/bmesh/tools/bmesh_bevel.h [new file with mode: 0644]
source/blender/bmesh/tools/bmesh_decimate.h [moved from source/blender/bmesh/intern/bmesh_decimate.h with 86% similarity]
source/blender/bmesh/tools/bmesh_decimate_collapse.c [moved from source/blender/bmesh/intern/bmesh_decimate_collapse.c with 85% similarity]
source/blender/bmesh/tools/bmesh_decimate_dissolve.c [moved from source/blender/bmesh/intern/bmesh_decimate_dissolve.c with 97% similarity]
source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c [moved from source/blender/bmesh/intern/bmesh_decimate_unsubdivide.c with 97% similarity]
source/blender/collada/AnimationImporter.cpp
source/blender/collada/DocumentImporter.cpp
source/blender/collada/DocumentImporter.h
source/blender/collada/ImageExporter.cpp
source/blender/collada/MaterialExporter.cpp
source/blender/collada/MeshImporter.cpp
source/blender/collada/TransformReader.cpp
source/blender/collada/collada_utils.cpp
source/blender/compositor/CMakeLists.txt
source/blender/compositor/intern/COM_Converter.cpp
source/blender/compositor/intern/COM_ExecutionGroup.cpp
source/blender/compositor/intern/COM_ExecutionGroup.h
source/blender/compositor/intern/COM_ExecutionSystem.cpp
source/blender/compositor/intern/COM_Node.cpp
source/blender/compositor/intern/COM_Node.h
source/blender/compositor/intern/COM_NodeOperation.h
source/blender/compositor/intern/COM_WorkPackage.h
source/blender/compositor/nodes/COM_BlurNode.cpp
source/blender/compositor/nodes/COM_ImageNode.cpp
source/blender/compositor/nodes/COM_MapRangeNode.cpp [new file with mode: 0644]
source/blender/compositor/nodes/COM_MapRangeNode.h [new file with mode: 0644]
source/blender/compositor/nodes/COM_MuteNode.cpp
source/blender/compositor/nodes/COM_NormalNode.cpp
source/blender/compositor/nodes/COM_OutputFileNode.cpp
source/blender/compositor/nodes/COM_ScaleNode.cpp
source/blender/compositor/nodes/COM_Stabilize2dNode.cpp
source/blender/compositor/operations/COM_CropOperation.cpp
source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
source/blender/compositor/operations/COM_ImageOperation.cpp
source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
source/blender/compositor/operations/COM_MapRangeOperation.cpp [new file with mode: 0644]
source/blender/compositor/operations/COM_MapRangeOperation.h [new file with mode: 0644]
source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
source/blender/compositor/operations/COM_MovieDistortionOperation.h
source/blender/compositor/operations/COM_NormalizeOperation.cpp
source/blender/compositor/operations/COM_PixelateOperation.h
source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp
source/blender/compositor/operations/COM_RenderLayersBaseProg.h
source/blender/compositor/operations/COM_ScaleOperation.cpp
source/blender/compositor/operations/COM_ScaleOperation.h
source/blender/compositor/operations/COM_TrackPositionOperation.cpp
source/blender/compositor/operations/COM_ViewerBaseOperation.cpp
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_draw.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/anim_markers.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editfont.c
source/blender/editors/gpencil/editaction_gpencil.c
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/include/ED_gpencil.h
source/blender/editors/include/ED_image.h
source/blender/editors/include/ED_mask.h
source/blender/editors/include/ED_mesh.h
source/blender/editors/include/ED_view3d.h
source/blender/editors/include/UI_icons.h
source/blender/editors/include/UI_interface.h
source/blender/editors/include/UI_resources.h
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_intern.h
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_ops.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/interface/resources.c
source/blender/editors/mask/mask_editaction.c
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/mesh/editmesh_bvh.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/mesh/editmesh_loopcut.c
source/blender/editors/mesh/editmesh_rip.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_slide.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/editmesh_utils.c
source/blender/editors/mesh/mesh_intern.h
source/blender/editors/mesh/mesh_navmesh.c
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_bake.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_shapekey.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_opengl.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_shading.c
source/blender/editors/render/render_update.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/screen/screendump.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/sculpt_paint/paint_utils.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/buttons_texture.c
source/blender/editors/space_buttons/space_buttons.c
source/blender/editors/space_clip/clip_draw.c
source/blender/editors/space_clip/clip_editor.c
source/blender/editors/space_clip/clip_ops.c
source/blender/editors/space_clip/clip_utils.c
source/blender/editors/space_clip/space_clip.c
source/blender/editors/space_clip/tracking_ops.c
source/blender/editors/space_console/console_draw.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_console/space_console.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_graph/graph_ops.c
source/blender/editors/space_graph/space_graph.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_image/image_draw.c
source/blender/editors/space_image/image_edit.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_info/info_ops.c
source/blender/editors/space_info/space_info.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_add.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_group.c
source/blender/editors/space_node/node_view.c
source/blender/editors/space_node/space_node.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/outliner_select.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_outliner/space_outliner.c
source/blender/editors/space_sequencer/SConscript
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_text/space_text.c
source/blender/editors/space_text/text_draw.c
source/blender/editors/space_text/text_intern.h
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_text/text_python.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_fly.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_iterators.c
source/blender/editors/space_view3d/view3d_ops.c
source/blender/editors/space_view3d/view3d_project.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_toolbar.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/CMakeLists.txt
source/blender/editors/transform/SConscript
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_constraints.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/util/numinput.c
source/blender/editors/uvedit/uvedit_buttons.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_parametrizer.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/gpu/GPU_material.h
source/blender/gpu/SConscript
source/blender/gpu/intern/gpu_codegen.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/gpu/intern/gpu_material.c
source/blender/gpu/shaders/gpu_shader_material.glsl
source/blender/gpu/shaders/gpu_shader_vertex.glsl
source/blender/ikplugin/intern/ikplugin_api.c
source/blender/ikplugin/intern/iksolver_plugin.c
source/blender/ikplugin/intern/itasc_plugin.cpp
source/blender/imbuf/intern/anim_movie.c
source/blender/imbuf/intern/cineon/cineon_dpx.c
source/blender/imbuf/intern/cineon/cineonlib.c
source/blender/imbuf/intern/cineon/dpxlib.c
source/blender/imbuf/intern/colormanagement.c
source/blender/imbuf/intern/dds/BlockDXT.h
source/blender/imbuf/intern/dds/FlipDXT.cpp
source/blender/imbuf/intern/dds/SConscript
source/blender/imbuf/intern/dds/Stream.h
source/blender/imbuf/intern/divers.c
source/blender/imbuf/intern/imageprocess.c
source/blender/imbuf/intern/indexer.c
source/blender/imbuf/intern/jp2.c
source/blender/imbuf/intern/jpeg.c
source/blender/imbuf/intern/openexr/openexr_api.cpp
source/blender/imbuf/intern/openexr/openexr_multi.h
source/blender/imbuf/intern/openexr/openexr_stub.cpp
source/blender/imbuf/intern/radiance_hdr.c
source/blender/imbuf/intern/readimage.c
source/blender/imbuf/intern/rectop.c
source/blender/imbuf/intern/scaling.c
source/blender/imbuf/intern/util.c
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_curve_types.h
source/blender/makesdna/DNA_gpencil_types.h
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesdna/DNA_node_types.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_text_types.h
source/blender/makesdna/DNA_tracking_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_action.c
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_animation.c
source/blender/makesrna/intern/rna_boid.c
source/blender/makesrna/intern/rna_brush.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_image.c
source/blender/makesrna/intern/rna_image_api.c
source/blender/makesrna/intern/rna_lamp.c
source/blender/makesrna/intern/rna_mask.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_nodetree_types.h
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_scene_api.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_speaker.c
source/blender/makesrna/intern/rna_text.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_tracking.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/makesrna/intern/rna_wm_api.c
source/blender/makesrna/rna_cleanup/rna_cleaner.py
source/blender/makesrna/rna_cleanup/rna_cleaner_merge.py
source/blender/modifiers/CMakeLists.txt
source/blender/modifiers/MOD_modifiertypes.h
source/blender/modifiers/intern/MOD_armature.c
source/blender/modifiers/intern/MOD_array.c
source/blender/modifiers/intern/MOD_bevel.c
source/blender/modifiers/intern/MOD_decimate.c
source/blender/modifiers/intern/MOD_edgesplit.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_fluidsim_util.c
source/blender/modifiers/intern/MOD_laplaciansmooth.c
source/blender/modifiers/intern/MOD_skin.c
source/blender/modifiers/intern/MOD_solidify.c
source/blender/modifiers/intern/MOD_triangulate.c [new file with mode: 0644]
source/blender/modifiers/intern/MOD_util.c
source/blender/nodes/CMakeLists.txt
source/blender/nodes/NOD_composite.h
source/blender/nodes/NOD_shader.h
source/blender/nodes/NOD_socket.h
source/blender/nodes/NOD_texture.h
source/blender/nodes/composite/node_composite_tree.c
source/blender/nodes/composite/nodes/node_composite_blur.c
source/blender/nodes/composite/nodes/node_composite_colorSpill.c
source/blender/nodes/composite/nodes/node_composite_colorbalance.c
source/blender/nodes/composite/nodes/node_composite_image.c
source/blender/nodes/composite/nodes/node_composite_keyingscreen.c
source/blender/nodes/composite/nodes/node_composite_mapRange.c [new file with mode: 0644]
source/blender/nodes/composite/nodes/node_composite_math.c
source/blender/nodes/composite/nodes/node_composite_normal.c
source/blender/nodes/composite/nodes/node_composite_outputFile.c
source/blender/nodes/composite/nodes/node_composite_splitViewer.c
source/blender/nodes/composite/nodes/node_composite_viewer.c
source/blender/nodes/intern/node_socket.c
source/blender/nodes/shader/nodes/node_shader_ambient_occlusion.c [new file with mode: 0644]
source/blender/nodes/shader/nodes/node_shader_bsdf_refraction.c [new file with mode: 0644]
source/blender/nodes/shader/nodes/node_shader_bump.c
source/blender/nodes/shader/nodes/node_shader_material.c
source/blender/nodes/shader/nodes/node_shader_math.c
source/blender/nodes/shader/nodes/node_shader_normal.c
source/blender/nodes/shader/nodes/node_shader_normal_map.c [new file with mode: 0644]
source/blender/nodes/shader/nodes/node_shader_script.c
source/blender/nodes/shader/nodes/node_shader_tangent.c [new file with mode: 0644]
source/blender/nodes/shader/nodes/node_shader_tex_environment.c
source/blender/nodes/shader/nodes/node_shader_tex_image.c
source/blender/nodes/shader/nodes/node_shader_texture.c
source/blender/nodes/shader/nodes/node_shader_vectMath.c
source/blender/nodes/texture/nodes/node_texture_image.c
source/blender/python/bmesh/CMakeLists.txt
source/blender/python/bmesh/bmesh_py_api.c
source/blender/python/bmesh/bmesh_py_ops.c
source/blender/python/bmesh/bmesh_py_ops_call.c [new file with mode: 0644]
source/blender/python/bmesh/bmesh_py_ops_call.h [new file with mode: 0644]
source/blender/python/bmesh/bmesh_py_types.c
source/blender/python/bmesh/bmesh_py_types.h
source/blender/python/bmesh/bmesh_py_types_customdata.c
source/blender/python/bmesh/bmesh_py_types_meshdata.c
source/blender/python/bmesh/bmesh_py_types_select.c
source/blender/python/bmesh/bmesh_py_utils.c
source/blender/python/generic/bgl.c
source/blender/python/generic/bpy_internal_import.c
source/blender/python/generic/idprop_py_api.c
source/blender/python/generic/py_capi_utils.c
source/blender/python/intern/bpy_app.c
source/blender/python/intern/bpy_interface.c
source/blender/python/intern/bpy_intern_string.c
source/blender/python/intern/bpy_intern_string.h
source/blender/python/intern/bpy_rna.c
source/blender/python/intern/bpy_rna_array.c
source/blender/python/intern/bpy_traceback.c
source/blender/python/intern/bpy_util.h
source/blender/python/mathutils/mathutils.c
source/blender/python/mathutils/mathutils.h
source/blender/python/mathutils/mathutils_Color.c
source/blender/python/mathutils/mathutils_Euler.c
source/blender/python/mathutils/mathutils_Matrix.c
source/blender/python/mathutils/mathutils_Quaternion.c
source/blender/python/mathutils/mathutils_Vector.c
source/blender/python/mathutils/mathutils_geometry.c
source/blender/quicktime/quicktime_export.h
source/blender/render/extern/include/RE_engine.h
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/intern/include/initrender.h
source/blender/render/intern/include/render_types.h
source/blender/render/intern/raytrace/rayobject_internal.h
source/blender/render/intern/raytrace/rayobject_octree.cpp
source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/external_engine.c
source/blender/render/intern/source/imagetexture.c
source/blender/render/intern/source/initrender.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/render_texture.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/renderdatabase.c
source/blender/render/intern/source/shadbuf.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/sunsky.c
source/blender/render/intern/source/voxeldata.c
source/blender/render/intern/source/zbuf.c
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/WM_types.h
source/blender/windowmanager/intern/wm_draw.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_gesture.c
source/blender/windowmanager/intern/wm_jobs.c
source/blender/windowmanager/intern/wm_keymap.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_playanim.c
source/blender/windowmanager/intern/wm_window.c
source/blender/windowmanager/wm_event_types.h
source/blenderplayer/CMakeLists.txt
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/CMakeLists.txt
source/creator/blender.map [new file with mode: 0644]
source/creator/creator.c
source/creator/osx_locals.map [new file with mode: 0644]
source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
source/gameengine/BlenderRoutines/KX_BlenderKeyboardDevice.cpp
source/gameengine/BlenderRoutines/KX_BlenderMouseDevice.cpp
source/gameengine/Converter/BL_ArmatureChannel.cpp
source/gameengine/Converter/BL_ArmatureConstraint.cpp
source/gameengine/Converter/BL_ArmatureObject.cpp
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.cpp
source/gameengine/Converter/SConscript
source/gameengine/Expressions/IntValue.cpp
source/gameengine/Expressions/ListValue.cpp
source/gameengine/Expressions/PyObjectPlus.cpp
source/gameengine/Expressions/PyObjectPlus.h
source/gameengine/GameLogic/SCA_IController.cpp
source/gameengine/GameLogic/SCA_ILogicBrick.cpp
source/gameengine/GameLogic/SCA_ISensor.cpp
source/gameengine/GameLogic/SCA_JoystickSensor.cpp
source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
source/gameengine/GameLogic/SCA_MouseSensor.cpp
source/gameengine/GameLogic/SCA_PropertySensor.cpp
source/gameengine/GameLogic/SCA_PythonController.cpp
source/gameengine/GameLogic/SCA_PythonController.h
source/gameengine/GameLogic/SCA_PythonKeyboard.cpp
source/gameengine/GameLogic/SCA_PythonMouse.cpp
source/gameengine/GameLogic/SCA_RandomActuator.cpp
source/gameengine/GameLogic/SCA_RandomSensor.cpp
source/gameengine/GamePlayer/common/SConscript
source/gameengine/GamePlayer/common/bmfont.cpp
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/GamePlayer/ghost/SConscript
source/gameengine/Ketsji/BL_Material.cpp
source/gameengine/Ketsji/BL_Material.h
source/gameengine/Ketsji/BL_Shader.cpp
source/gameengine/Ketsji/BL_Shader.h
source/gameengine/Ketsji/BL_Texture.cpp
source/gameengine/Ketsji/CMakeLists.txt
source/gameengine/Ketsji/KX_BlenderMaterial.cpp
source/gameengine/Ketsji/KX_BlenderMaterial.h
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_CameraActuator.cpp
source/gameengine/Ketsji/KX_CharacterWrapper.h
source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
source/gameengine/Ketsji/KX_Dome.cpp
source/gameengine/Ketsji/KX_Dome.h
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_GameObject.h
source/gameengine/Ketsji/KX_KetsjiEngine.cpp
source/gameengine/Ketsji/KX_Light.cpp
source/gameengine/Ketsji/KX_MeshProxy.cpp
source/gameengine/Ketsji/KX_MeshProxy.h
source/gameengine/Ketsji/KX_ObjectActuator.cpp
source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp [deleted file]
source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h [deleted file]
source/gameengine/Ketsji/KX_PolyProxy.cpp
source/gameengine/Ketsji/KX_PolygonMaterial.cpp
source/gameengine/Ketsji/KX_PolygonMaterial.h
source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_PythonInitTypes.cpp
source/gameengine/Ketsji/KX_PythonSeq.cpp
source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_Scene.h
source/gameengine/Ketsji/KX_VehicleWrapper.cpp
source/gameengine/Ketsji/KX_VertexProxy.cpp
source/gameengine/Ketsji/KX_VertexProxy.h
source/gameengine/Network/NG_NetworkDeviceInterface.h
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.cpp
source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h
source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
source/gameengine/Rasterizer/RAS_ICanvas.h
source/gameengine/Rasterizer/RAS_MaterialBucket.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
source/gameengine/Rasterizer/RAS_TexVert.cpp
source/gameengine/Rasterizer/RAS_TexVert.h
source/gameengine/SceneGraph/SG_IObject.h
source/gameengine/VideoTexture/BlendType.h
source/gameengine/VideoTexture/Common.h
source/gameengine/VideoTexture/Exception.cpp
source/gameengine/VideoTexture/Exception.h
source/gameengine/VideoTexture/FilterBase.cpp
source/gameengine/VideoTexture/FilterBase.h
source/gameengine/VideoTexture/FilterBlueScreen.cpp
source/gameengine/VideoTexture/FilterBlueScreen.h
source/gameengine/VideoTexture/FilterColor.cpp
source/gameengine/VideoTexture/FilterColor.h
source/gameengine/VideoTexture/FilterNormal.cpp
source/gameengine/VideoTexture/FilterNormal.h
source/gameengine/VideoTexture/FilterSource.cpp
source/gameengine/VideoTexture/FilterSource.h
source/gameengine/VideoTexture/ImageBase.cpp
source/gameengine/VideoTexture/ImageBase.h
source/gameengine/VideoTexture/ImageBuff.cpp
source/gameengine/VideoTexture/ImageBuff.h
source/gameengine/VideoTexture/ImageMix.cpp
source/gameengine/VideoTexture/ImageMix.h
source/gameengine/VideoTexture/ImageRender.cpp
source/gameengine/VideoTexture/ImageRender.h
source/gameengine/VideoTexture/ImageViewport.cpp
source/gameengine/VideoTexture/ImageViewport.h
source/gameengine/VideoTexture/PyTypeList.cpp
source/gameengine/VideoTexture/PyTypeList.h
source/gameengine/VideoTexture/Texture.cpp
source/gameengine/VideoTexture/Texture.h
source/gameengine/VideoTexture/VideoBase.cpp
source/gameengine/VideoTexture/VideoBase.h
source/gameengine/VideoTexture/VideoFFmpeg.cpp
source/gameengine/VideoTexture/VideoFFmpeg.h
source/gameengine/VideoTexture/blendVideoTex.cpp
source/tests/bl_rst_completeness.py [new file with mode: 0644]
source/tests/bl_run_operators.py
source/tests/rst_to_doctree_mini.py [new file with mode: 0644]

index b53c6f6..3e1c8fe 100644 (file)
@@ -127,7 +127,7 @@ option(WITH_PYTHON_MODULE "Enable building as a python module which runs without
 option(WITH_BUILDINFO     "Include extra build details (only disable for development & faster builds)" ON)
 option(WITH_IK_ITASC      "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON)
 option(WITH_IK_SOLVER     "Enable Legacy IK solver (only disable for development)" ON)
-option(WITH_FFTW3         "Enable FFTW3 support (Used for smoke and audio effects)" OFF)
+option(WITH_FFTW3         "Enable FFTW3 support (Used for smoke and audio effects)" ON)
 option(WITH_BULLET        "Enable Bullet (Physics Engine)" ON)
 option(WITH_GAMEENGINE    "Enable Game Engine" ON)
 option(WITH_PLAYER        "Build Player" OFF)
@@ -190,8 +190,8 @@ option(WITH_MOD_FLUID           "Enable Elbeem Modifier (Fluid Simulation)" ON)
 option(WITH_MOD_SMOKE           "Enable Smoke Modifier (Smoke Simulation)" ON)
 option(WITH_MOD_BOOLEAN         "Enable Boolean Modifier" ON)
 option(WITH_MOD_REMESH          "Enable Remesh Modifier" ON)
-option(WITH_MOD_CLOTH_ELTOPO    "Enable Experimental cloth solver" OFF)
-mark_as_advanced(WITH_MOD_CLOTH_ELTOPO)
+# option(WITH_MOD_CLOTH_ELTOPO    "Enable Experimental cloth solver" OFF)  # this is now only available in a branch
+mark_as_advanced(WITH_MOD_CLOTH_ELTOPO)
 option(WITH_MOD_OCEANSIM        "Enable Ocean Modifier" OFF)
 
 # Image format support
@@ -234,17 +234,13 @@ option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)"
 option(WITH_RAYOPTIMIZATION    "Enable use of SIMD (SSE) optimizations for the raytracer" ON)
 if(UNIX AND NOT APPLE)
        option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
+       option(WITH_STATIC_LIBS "Try to link with static libraries, as much as possible, to make blender more portable across distributions" OFF)
 endif()
 option(WITH_PYTHON_INSTALL       "Copy system python into the blender install folder" ON)
 option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder"  ON)
 set(PYTHON_NUMPY_PATH            "" CACHE PATH "Python to python site-packages or dist-packages containing 'numpy' module")
 mark_as_advanced(PYTHON_NUMPY_PATH)
 
-if(MINGW)
-       option(WITH_MINGW64                   "Use the 64-bit version of MinGW" OFF)
-       mark_as_advanced(WITH_MINGW64)
-endif()
-
 # Cycles
 option(WITH_CYCLES                                     "Enable cycles Render Engine" ON)
 option(WITH_CYCLES_TEST                                "Build cycles test application" OFF)
@@ -270,6 +266,9 @@ mark_as_advanced(WITH_ASSERT_ABORT)
 
 
 if(APPLE)
+       cmake_minimum_required(VERSION 2.8.8)
+       cmake_policy(VERSION 2.8.8)
+
        if(NOT CMAKE_OSX_ARCHITECTURES)
                set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING
                "Choose the architecture you want to build Blender for: i386, x86_64 or ppc"
@@ -289,18 +288,14 @@ if(APPLE)
                set(OSX_SYSTEM unsupported)
        endif()
        message(STATUS "Detected system-version: " ${OSX_SYSTEM})
-       
-       if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
-                       set(CMAKE_OSX_DEPLOYMENT_TARGET "10.5" CACHE STRING "" FORCE) # 10.5 is our minimum target, if you have higher sdk, weak linking happens
-       endif()
 
        if(${CMAKE_GENERATOR} MATCHES "Xcode")
        
-               ##### workaround for actual official cmake incompatibility with xcode 4.3 #####
+               ##### cmake incompatibility with xcode  4.3 and higher #####
                if(${XCODE_VERSION} MATCHES '') # cmake fails due looking for xcode in the wrong path, thus will be empty var
-                       message("Official cmake does not yet support Xcode 4.3, get a patched version here: http://www.jensverwiebe.de/Blender/CMake%202.8-7patched.zip")
+                       message(FATAL_ERROR "Xcode 4.3 and higher must be used with cmake 2.8-8 or higher")
                endif()
-               ### end workaround for actual official cmake incompatibility with xcode 4.3 ###
+               ### end cmake incompatibility with xcode 4.3 and higher ###
                
                if(${XCODE_VERSION} VERSION_EQUAL 4 OR ${XCODE_VERSION} VERSION_GREATER 4 AND ${XCODE_VERSION} VERSION_LESS 4.3)
                        # Xcode 4 defaults to the Apple LLVM Compiler.
@@ -315,7 +310,28 @@ if(APPLE)
        endif()
        
        message(STATUS "Detected Xcode-version: " ${XCODE_VERSION})
+
+       if(${XCODE_VERSION} VERSION_LESS 4.3)
+               set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE)  # use guaranteed existing sdk
+       else()
+               # note: i don't use xcode-select path on purpose, cause also /Applications/Xcode.app would be allowed
+               # absolute pathes are more foolproof here !
+               set(OSX_SYSROOT_PREFIX /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform)
+               set(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
+               set(CMAKE_OSX_SYSROOT ${OSX_SYSROOT_PREFIX}/${OSX_DEVELOPER_PREFIX} CACHE PATH "" FORCE)
+       endif()
        
+       if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
+                       set(CMAKE_OSX_DEPLOYMENT_TARGET "10.5" CACHE STRING "" FORCE) # 10.5 is our min. target, if you use higher sdk, weak linking happens
+       endif()
+       
+       if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode")
+               # force CMAKE_OSX_DEPLOYMENT_TARGET for makefiles, will not work else ( cmake bug ? )
+               set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
+               set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
+               add_definitions ("-DMACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}")
+       endif()
+
        option(WITH_COCOA         "Use Cocoa framework instead of deprecated Carbon" ON)
        option(USE_QTKIT          "Use QtKit instead of Carbon quicktime (needed for having partial quicktime for 64bit)" OFF)
        option(WITH_LIBS10.5  "Use 10.5 libs (needed for 64bit builds)" OFF)
@@ -336,12 +352,20 @@ if(NOT WITH_GAMEENGINE AND WITH_PLAYER)
        message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
 endif()
 
-if(NOT WITH_AUDASPACE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK OR WITH_GAMEENGINE))
-       message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK/WITH_CODEC_FFMPEG/WITH_GAMEENGINE require WITH_AUDASPACE")
+if(NOT WITH_AUDASPACE)
+       if(WITH_OPENAL)
+               message(FATAL_ERROR "WITH_OPENAL requires WITH_AUDASPACE")
+       endif()
+       if(WITH_JACK)
+               message(FATAL_ERROR "WITH_JACK requires WITH_AUDASPACE")
+       endif()
+       if(WITH_GAMEENGINE)
+               message(FATAL_ERROR "WITH_GAMEENGINE requires WITH_AUDASPACE")
+       endif()
 endif()
 
 if(NOT WITH_SDL AND WITH_GHOST_SDL)
-       message(FATAL_ERROR "WITH_GHOST_SDL requires WITH_SDL to be ON")
+       message(FATAL_ERROR "WITH_GHOST_SDL requires WITH_SDL")
 endif()
 
 if(WITH_IMAGE_REDCODE AND ((NOT WITH_IMAGE_OPENJPEG) OR (NOT WITH_CODEC_FFMPEG)))
@@ -358,10 +382,6 @@ if(WITH_PYTHON_MODULE AND WITH_PYTHON_INSTALL)
 endif()
 
 
-if(NOT WITH_FFTW3 AND WITH_MOD_OCEANSIM)
-       message(FATAL_ERROR "WITH_MOD_OCEANSIM requires WITH_FFTW3 to be ON")
-endif()
-
 # may as well build python module without a UI
 if(WITH_PYTHON_MODULE)
        set(WITH_HEADLESS ON)
@@ -372,8 +392,8 @@ if(WITH_CYCLES)
        set(WITH_OPENIMAGEIO ON)
 endif()
 
-# auto enable boost for cycles and booleans
-if(WITH_CYCLES OR WITH_MOD_BOOLEAN)
+# auto enable boost for cycles, booleans, audaspace or i18n
+if(WITH_CYCLES OR WITH_MOD_BOOLEAN OR WITH_AUDASPACE OR WITH_INTERNATIONAL)
        set(WITH_BOOST ON)
 endif()
 
@@ -461,14 +481,14 @@ set(PLATFORM_LINKFLAGS_DEBUG "")
 # For alternate Python locations the commandline can be used to override detected/default cache settings, e.g:
 # On Unix:
 #   cmake ../blender \
-#         -D PYTHON_VERSION=3.2 \
-#         -D PYTHON_INCLUDE_DIR=/opt/py32/include/python3.2d \
-#         -D PYTHON_LIBRARY=/opt/py32/lib/libpython3.2d.so
+#         -D PYTHON_VERSION=3.3 \
+#         -D PYTHON_INCLUDE_DIR=/opt/py33/include/python3.3d \
+#         -D PYTHON_LIBRARY=/opt/py33/lib/libpython3.3d.so
 #
 # On Macs:
 #   cmake ../blender \
-#         -D PYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2 \
-#         -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/config \
+#         -D PYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3 \
+#         -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/config \
 #         -G Xcode
 #
 # When changing any of this remember to update the notes in doc/build_systems/cmake.txt
@@ -477,50 +497,52 @@ set(PLATFORM_LINKFLAGS_DEBUG "")
 #Platform specifics
 
 if(UNIX AND NOT APPLE)
-
-       # set lib directory if it exists
-       if(CMAKE_SYSTEM_NAME MATCHES "Linux")
-               if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
-                       set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/linux64)
-               else()
-                       set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/linux)
+       macro(find_package_wrapper)
+               STRING(TOUPPER ${ARGV0} _NAME_UPPER)
+               if(${WITH_STATIC_LIBS})
+                       set(_cmake_find_library_suffixes_back ${CMAKE_FIND_LIBRARY_SUFFIXES})
+                       set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
                endif()
-
-               if(NOT EXISTS ${LIBDIR})
-                       unset(LIBDIR)
+               find_package(${ARGV})
+               if(${WITH_STATIC_LIBS})
+                       set(CMAKE_FIND_LIBRARY_SUFFIXES ${_cmake_find_library_suffixes_back})
+                       unset(_cmake_find_library_suffixes_back)
                endif()
-       endif()
+       endmacro()
 
-       find_package(JPEG REQUIRED)
-       find_package(PNG REQUIRED)
-       find_package(ZLIB REQUIRED)
-       find_package(Freetype REQUIRED)
+       find_package_wrapper(JPEG REQUIRED)
+       find_package_wrapper(PNG REQUIRED)
+       find_package_wrapper(ZLIB REQUIRED)
+       find_package_wrapper(Freetype REQUIRED)
 
        if(WITH_PYTHON)
-               # No way to set py32. remove for now.
+               # No way to set py33. remove for now.
                # find_package(PythonLibs)
 
                # Use our own instead, since wothout py is such a rare case,
                # require this package
+               # XXX Linking errors with debian static python :/
+#              find_package_wrapper(PythonLibsUnix REQUIRED)
                find_package(PythonLibsUnix REQUIRED)
        endif()
 
-
        if(WITH_IMAGE_OPENEXR)
-               find_package(OpenEXR)  # our own module
+               find_package_wrapper(OpenEXR)  # our own module
                if(NOT OPENEXR_FOUND)
                        set(WITH_IMAGE_OPENEXR OFF)
                endif()
        endif()
 
        if(WITH_IMAGE_OPENJPEG)
-               find_package(OpenJPEG)
+               find_package_wrapper(OpenJPEG)
                if(NOT OPENJPEG_FOUND)
                        set(WITH_IMAGE_OPENJPEG OFF)
                endif()
        endif()
 
        if(WITH_IMAGE_TIFF)
+               # XXX Linking errors with debian static tiff :/
+#              find_package_wrapper(TIFF)
                find_package(TIFF)
                if(NOT TIFF_FOUND)
                        set(WITH_IMAGE_TIFF OFF)
@@ -529,14 +551,14 @@ if(UNIX AND NOT APPLE)
 
        # Audio IO
        if(WITH_OPENAL)
-               find_package(OpenAL)
+               find_package_wrapper(OpenAL)
                if(NOT OPENAL_FOUND)
                        set(WITH_OPENAL OFF)
                endif()
        endif()
 
        if(WITH_SDL)
-               find_package(SDL)
+               find_package_wrapper(SDL)
                mark_as_advanced(
                        SDLMAIN_LIBRARY
                        SDL_INCLUDE_DIR
@@ -550,7 +572,7 @@ if(UNIX AND NOT APPLE)
        endif()
 
        if(WITH_JACK)
-               find_package(Jack)
+               find_package_wrapper(Jack)
                if(NOT JACK_FOUND)
                        set(WITH_JACK OFF)
                endif()
@@ -558,22 +580,15 @@ if(UNIX AND NOT APPLE)
 
        # Codecs
        if(WITH_CODEC_SNDFILE)
-               find_package(SndFile)
+               find_package_wrapper(SndFile)
                if(NOT SNDFILE_FOUND)
                        set(WITH_CODEC_SNDFILE OFF)
                endif()
        endif()
 
        if(WITH_CODEC_FFMPEG)
-               # use lib dir if available and nothing else specified
-               if(LIBDIR AND NOT FFMPEG)
-                       set(FFMPEG ${LIBDIR}/ffmpeg CACHE PATH "FFMPEG Directory")
-                       # XXX, some distros might need 'theoraenc theoradec' too
-                       set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale dirac_encoder mp3lame ogg orc-0.4 schroedinger-1.0 theora vorbis vorbisenc vpx x264 xvidcore faad asound CACHE STRING "FFMPEG Libraries")
-               else()
-                       set(FFMPEG /usr CACHE PATH "FFMPEG Directory")
-                       set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
-               endif()
+               set(FFMPEG /usr CACHE PATH "FFMPEG Directory")
+               set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
 
                mark_as_advanced(FFMPEG)
 
@@ -589,54 +604,32 @@ if(UNIX AND NOT APPLE)
                set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
        endif()
 
-       if(WITH_INTERNATIONAL)
-               find_library(INTL_LIBRARY
-                       NAMES intl
-                       PATHS
-                       /sw/lib
-               )
-
-               find_library(ICONV_LIBRARY
-                       NAMES iconv
-                       PATHS
-                       /sw/lib
-               )
-               mark_as_advanced(
-                       ICONV_LIBRARY
-                       INTL_LIBRARY
-               )
-
-               if(INTL_LIBRARY AND ICONV_LIBRARY)
-                       set(GETTEXT_LIBRARIES ${INTL_LIBRARY} ${ICONV_LIBRARY})
-               endif()
-       endif()
-
        if(WITH_FFTW3)
-               find_package(Fftw3)
+               find_package_wrapper(Fftw3)
                if(NOT FFTW3_FOUND)
                        set(WITH_FFTW3 OFF)
                endif()
        endif()
 
        if(WITH_OPENCOLLADA)
-               find_package(OpenCOLLADA)
+               find_package_wrapper(OpenCOLLADA)
                if(OPENCOLLADA_FOUND)
-                       find_package(XML2)
-                       find_package(PCRE)
+                       find_package_wrapper(XML2)
+                       find_package_wrapper(PCRE)
                else()
                        set(WITH_OPENCOLLADA OFF)
                endif()
        endif()
 
        if(WITH_MEM_JEMALLOC)
-               find_package(JeMalloc)
+               find_package_wrapper(JeMalloc)
                if(NOT JEMALLOC_FOUND)
                        set(WITH_MEM_JEMALLOC OFF)
                endif()
        endif()
 
        if (WITH_INPUT_NDOF)
-               find_package(Spacenav)
+               find_package_wrapper(Spacenav)
                if(NOT SPACENAV_FOUND)
                        set(WITH_INPUT_NDOF OFF)
                endif()
@@ -651,14 +644,23 @@ if(UNIX AND NOT APPLE)
        if(WITH_BOOST)
                # uses in build instructions to override include and library variables
                if(NOT BOOST_CUSTOM)
-                       # use lib dir if available and nothing else specified
-                       if(LIBDIR AND NOT BOOST_ROOT)
-                               set(BOOST_ROOT ${LIBDIR}/boost)
+                       # XXX No more lib dir, is this multithread stuff still needed?
+                       if(${WITH_STATIC_LIBS})
+                               set(Boost_USE_STATIC_LIBS ON)
+                       endif()
+                       if(NOT BOOST_ROOT)
                                set(Boost_USE_MULTITHREADED OFF)
                        else()
                                set(Boost_USE_MULTITHREADED ON)
                        endif()
-                       find_package(Boost 1.34 COMPONENTS filesystem regex system thread)
+                       set(__boost_packages filesystem regex system thread date_time)
+                       if (WITH_INTERNATIONAL)
+                               list(APPEND __boost_packages locale)
+                       endif()
+                       find_package(Boost 1.34 COMPONENTS ${__boost_packages})
+                       if(Boost_USE_STATIC_LIBS AND Boost_USE_ICU)
+                               find_package(IcuLinux)
+                       endif()
                        mark_as_advanced(Boost_DIR)  # why doesnt boost do this?
                endif()
 
@@ -669,12 +671,7 @@ if(UNIX AND NOT APPLE)
        endif()
 
        if(WITH_OPENIMAGEIO)
-               # use lib dir if available and nothing else specified
-               if(LIBDIR AND NOT OPENIMAGEIO_ROOT_DIR)
-                       set(OPENIMAGEIO_ROOT_DIR ${LIBDIR}/oiio)
-               endif()
-
-               find_package(OpenImageIO)
+               find_package_wrapper(OpenImageIO)
 
                set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES} ${BOOST_LIBRARIES})
                set(OPENIMAGEIO_LIBPATH)  # TODO, remove and reference the absolute path everywhere
@@ -694,12 +691,7 @@ if(UNIX AND NOT APPLE)
        endif()
 
        if(WITH_OPENCOLORIO)
-               # use lib dir if available and nothing else specified
-               if(LIBDIR AND NOT OPENCOLORIO_ROOT_DIR)
-                       set(OPENCOLORIO_ROOT_DIR ${LIBDIR}/ocio)
-               endif()
-
-               find_package(OpenColorIO)
+               find_package_wrapper(OpenColorIO)
 
                set(OPENCOLORIO_LIBRARIES ${OPENCOLORIO_LIBRARIES})
                set(OPENCOLORIO_LIBPATH)  # TODO, remove and reference the absolute path everywhere
@@ -711,14 +703,23 @@ if(UNIX AND NOT APPLE)
                endif()
        endif()
 
+       # XXX Maybe most of this section should go into an llvm module?
        if(WITH_LLVM)
-               set(LLVM_DIRECTORY ${LIBDIR}/llvm CACHE PATH    "Path to the LLVM installation")
-               set(LLVM_VERSION "3.0" CACHE STRING     "Version of LLVM to use")
+               # Set llvm version if not specified
+               if(NOT LLVM_VERSION)
+                       set(LLVM_VERSION "3.0")
+               endif()
                set(LLVM_STATIC YES)
                if(LLVM_DIRECTORY)
-                       set(LLVM_CONFIG "${LLVM_DIRECTORY}/bin/llvm-config")
+                       FIND_PROGRAM(LLVM_CONFIG llvm-config-${LLVM_VERSION} HINTS ${LLVM_DIRECTORY}/bin NO_CMAKE_PATH)
+                       if(NOT LLVM_CONFIG)
+                               FIND_PROGRAM(LLVM_CONFIG llvm-config HINTS ${LLVM_DIRECTORY}/bin NO_CMAKE_PATH)
+                       endif()
                else()
-                       set(LLVM_CONFIG llvm-config)
+                       FIND_PROGRAM(LLVM_CONFIG llvm-config-${LLVM_VERSION})
+                       if(NOT LLVM_CONFIG)
+                               FIND_PROGRAM(LLVM_CONFIG llvm-config)
+                       endif()
                endif()
                execute_process(COMMAND ${LLVM_CONFIG} --version
                                OUTPUT_VARIABLE LLVM_VERSION
@@ -730,11 +731,13 @@ if(UNIX AND NOT APPLE)
                                OUTPUT_VARIABLE LLVM_LIB_DIR
                                OUTPUT_STRIP_TRAILING_WHITESPACE)
                find_library(LLVM_LIBRARY
-                            NAMES libLLVMAnalysis.a # first of a whole bunch of libs to get
+                            NAMES LLVMAnalysis # first of a whole bunch of libs to get
                             PATHS ${LLVM_LIB_DIR})
                message(STATUS "LLVM version  = ${LLVM_VERSION}")
                message(STATUS "LLVM dir      = ${LLVM_DIRECTORY}")
                message(STATUS "LLVM lib dir  = ${LLVM_LIB_DIR}")
+               set(LLVM_VERSION ${LLVM_VERSION} CACHE STRING "Version of LLVM to use")
+               set(LLVM_DIRECTORY ${LLVM_DIRECTORY} CACHE PATH "Path to the LLVM installation")
 
                if(LLVM_LIBRARY AND LLVM_DIRECTORY AND LLVM_LIB_DIR)
                        if(LLVM_STATIC)
@@ -746,10 +749,12 @@ if(UNIX AND NOT APPLE)
                                                OUTPUT_STRIP_TRAILING_WHITESPACE)
                                string(REPLACE " " ";" LLVM_LIBRARY ${LLVM_LIBRARY})
                        endif()
-                       message(STATUS "LLVM library  = ${LLVM_LIBRARY}")
                else()
                        message(FATAL_ERROR "LLVM not found.")
                endif()
+
+               # Fix for conflict with Mesa llvmpipe
+               set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/source/creator/blender.map")
        endif()
 
        if(WITH_CYCLES_OSL)
@@ -812,7 +817,7 @@ if(UNIX AND NOT APPLE)
                endif()
        endif()
 
-       set(PLATFORM_LINKFLAGS "-pthread")
+       set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -pthread")
 
        # lfs on glibc, all compilers should use
        add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
@@ -857,10 +862,18 @@ elseif(WIN32)
 
        if(CMAKE_COMPILER_IS_GNUCC)
                set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32)
-
+               INCLUDE (CheckCSourceCompiles) 
                # Setup 64bit and 64bit windows systems
+               CHECK_C_SOURCE_COMPILES("
+                       #ifndef __MINGW64__
+                       #error
+                       #endif
+                       main(){}
+                       " 
+                       WITH_MINGW64)
+               
                if(WITH_MINGW64)
-                       message("Set 64 bit compiler for MinGW.")
+                       message("Compiling for 64 bit with MinGW-w64.")
                        set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64)
                endif()
        else()
@@ -875,13 +888,6 @@ elseif(WIN32)
                
        add_definitions(-DWIN32)
 
-       if(WITH_INTERNATIONAL)
-               set(ICONV ${LIBDIR}/iconv)
-               set(ICONV_INCLUDE_DIRS ${ICONV}/include)
-               set(ICONV_LIBRARIES iconv)
-               set(ICONV_LIBPATH ${ICONV}/lib)
-       endif()
-
        set(JPEG "${LIBDIR}/jpeg")
        set(JPEG_INCLUDE_DIR "${JPEG}/include")
        set(JPEG_LIBPATH ${JPEG}/lib) # not cmake defined
@@ -923,28 +929,22 @@ elseif(WIN32)
        if(WITH_CYCLES_OSL)
                set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
        
-               message(STATUS "CYCLES_OSL = ${CYCLES_OSL}")
-       
                find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib)
                find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib)
                find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib)
-               # WARNING! depends on correct order of OSL libs linking
                list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} ${OSL_LIB_EXEC} ${OSL_LIB_QUERY})
                find_path(OSL_INCLUDES OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
                find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
        
                if(OSL_INCLUDES AND OSL_LIBRARIES AND OSL_COMPILER)
                        set(OSL_FOUND TRUE)
-                       message(STATUS "OSL includes = ${OSL_INCLUDES}")
-                       message(STATUS "OSL library = ${OSL_LIBRARIES}")
-                       message(STATUS "OSL compiler = ${OSL_COMPILER}")
                else()
                        message(STATUS "OSL not found")
                endif()
        endif()
 
        if(MSVC)
-               set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid)
+               set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid psapi)
 
                add_definitions(/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_CONSOLE /D_LIB)
 
@@ -974,13 +974,6 @@ elseif(WIN32)
                set(CXX_WARNINGS "${_WARNINGS}")
                unset(_WARNINGS)
 
-               if(WITH_INTERNATIONAL)
-                       set(GETTEXT ${LIBDIR}/gettext)
-                       set(GETTEXT_INCLUDE_DIRS ${GETTEXT}/include)
-                       set(GETTEXT_LIBPATH ${GETTEXT}/lib)
-                       set(GETTEXT_LIBRARIES gnu_gettext)
-               endif()
-               
                if(WITH_MOD_CLOTH_ELTOPO)
                        set(LAPACK ${LIBDIR}/lapack)
                        # set(LAPACK_INCLUDE_DIR ${LAPACK}/include)
@@ -1072,6 +1065,7 @@ elseif(WIN32)
                if(WITH_IMAGE_OPENEXR)
                        set_lib_path(OPENEXR "openexr")
                        set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
+                       set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
                        set(OPENEXR_LIBPATH ${OPENEXR}/lib)
                        set(OPENEXR_LIBRARIES
                                ${OPENEXR_LIBPATH}/Iex.lib
@@ -1080,12 +1074,6 @@ elseif(WIN32)
                                ${OPENEXR_LIBPATH}/Imath.lib
                                ${OPENEXR_LIBPATH}/IlmThread.lib
                        )
-                       set(OPENEXR_INCLUDE_DIRS
-                               ${OPENEXR_INCLUDE_DIR}
-                               ${OPENEXR_INCLUDE_DIR}/IlmImf
-                               ${OPENEXR_INCLUDE_DIR}/Iex
-                               ${OPENEXR_INCLUDE_DIR}/Imath
-                       )
                endif()
 
                if(WITH_IMAGE_TIFF)
@@ -1103,9 +1091,17 @@ elseif(WIN32)
 
                if(WITH_PYTHON)
                        # normally cached but not since we include them with blender
-                       set(PYTHON_VERSION 3.2) # CACHE STRING)
+                       if(MSVC10)
+                               set(PYTHON_VERSION 3.2) # CACHE STRING)
+                       else()
+                               set(PYTHON_VERSION 3.3) # CACHE STRING)
+                       endif()
+
                        set_lib_path(PYTHON "python")
-                       set(PYTHON_LIBRARY ${PYTHON}/lib/python32.lib) #CACHE FILEPATH
+                       STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
+                       set(PYTHON_LIBRARY ${PYTHON}/lib/python${_PYTHON_VERSION_NO_DOTS}.lib) #CACHE FILEPATH
+                       unset(_PYTHON_VERSION_NO_DOTS)
+
                        #Shared includes for both vc2008 and vc2010
                        set(PYTHON_INCLUDE_DIR ${LIBDIR}/python/include/python${PYTHON_VERSION})
 
@@ -1133,17 +1129,28 @@ elseif(WIN32)
                                debug libboost_date_time-${BOOST_DEBUG_POSTFIX} debug libboost_filesystem-${BOOST_DEBUG_POSTFIX}
                                debug libboost_regex-${BOOST_DEBUG_POSTFIX}
                                debug libboost_system-${BOOST_DEBUG_POSTFIX} debug libboost_thread-${BOOST_DEBUG_POSTFIX})
+                       if(WITH_INTERNATIONAL)
+                               set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
+                                       optimized libboost_locale-${BOOST_POSTFIX}
+                                       debug libboost_locale-${BOOST_DEBUG_POSTFIX})
+                       endif(WITH_INTERNATIONAL)
                        set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB")
                endif()
                        
                if(WITH_OPENIMAGEIO)
                        set(OPENIMAGEIO ${LIBDIR}/openimageio)
                        set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
-                       set(OPENIMAGEIO_LIBRARIES OpenImageIO)
+                       set(OPENIMAGEIO_LIBRARIES optimized OpenImageIO debug OpenImageIO_d)
                        set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
-                       set(OPENIMAGEIO_DEFINITIONS)
+                       set(OPENIMAGEIO_DEFINITIONS "-DUSE_TBB=0")
                endif()
 
+               if(WITH_LLVM)
+                       set(LLVM_DIRECTORY ${LIBDIR}/llvm CACHE PATH    "Path to the LLVM installation")
+                       file(GLOB LLVM_LIBRARY ${LLVM_DIRECTORY}/lib/*.lib)
+                       set(LLVM_STATIC YES)
+               endif()
+       
                if(WITH_OPENCOLORIO)
                        set(OPENCOLORIO ${LIBDIR}/opencolorio)
                        set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
@@ -1152,6 +1159,7 @@ elseif(WIN32)
                        set(OPENCOLORIO_DEFINITIONS)
                endif()
 
+
                set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib")
 
                # MSVC only, Mingw doesnt need
@@ -1186,16 +1194,8 @@ elseif(WIN32)
 
                add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
 
-
                add_definitions(-DFREE_WINDOWS)
 
-               if(WITH_INTERNATIONAL)
-                       set(GETTEXT ${LIBDIR}/gettext)
-                       set(GETTEXT_INCLUDE_DIRS ${GETTEXT}/include)
-                       set(GETTEXT_LIBPATH ${GETTEXT}/lib)
-                       set(GETTEXT_LIBRARIES intl)
-               endif()
-               
                set(PNG "${LIBDIR}/png")
                set(PNG_INCLUDE_DIR "${PNG}/include")
                set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
@@ -1215,7 +1215,7 @@ elseif(WIN32)
                #comes with own pthread library
                if(NOT WITH_MINGW64)
                        set(PTHREADS ${LIBDIR}/pthreads)
-                       set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
+                       #set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
                        set(PTHREADS_LIBPATH ${PTHREADS}/lib)
                        set(PTHREADS_LIBRARIES pthreadGC2)
                endif()
@@ -1263,6 +1263,7 @@ elseif(WIN32)
 
                if(WITH_IMAGE_OPENEXR)
                        set(OPENEXR ${LIBDIR}/openexr)
+                       set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
                        set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
                        set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread Iex)
                        set(OPENEXR_LIBPATH ${OPENEXR}/lib)
@@ -1287,9 +1288,9 @@ elseif(WIN32)
 
                if(WITH_PYTHON)
                        # normally cached but not since we include them with blender
-                       set(PYTHON_VERSION 3.2) #  CACHE STRING)
+                       set(PYTHON_VERSION 3.3) #  CACHE STRING)
                        set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}")  # CACHE PATH)
-                       set(PYTHON_LIBRARY "${LIBDIR}/python/lib/python32mw.lib")  # CACHE FILEPATH)
+                       set(PYTHON_LIBRARY "${LIBDIR}/python/lib/python33mw.lib")  # CACHE FILEPATH)
 
                        # uncached vars
                        set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
@@ -1313,6 +1314,11 @@ elseif(WIN32)
                                debug boost_date_time-${BOOST_DEBUG_POSTFIX} boost_filesystem-${BOOST_DEBUG_POSTFIX}
                                boost_regex-${BOOST_DEBUG_POSTFIX}
                                boost_system-${BOOST_DEBUG_POSTFIX} boost_thread-${BOOST_DEBUG_POSTFIX})
+                       if(WITH_INTERNATIONAL)
+                               set(BOOST_LIBRARIES ${BOOST_LIBRARIES}
+                                       optimized boost_locale-${BOOST_POSTFIX}
+                                       debug boost_locale-${BOOST_DEBUG_POSTFIX}) 
+                       endif()
                        set(BOOST_LIBPATH ${BOOST}/lib)
                        set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB -DBOOST_THREAD_USE_LIB ")
                endif()
@@ -1325,6 +1331,34 @@ elseif(WIN32)
                        set(OPENIMAGEIO_DEFINITIONS)
                endif()
                
+               if(WITH_LLVM)
+                       set(LLVM_DIRECTORY ${LIBDIR}/llvm CACHE PATH    "Path to the LLVM installation")
+                       set(LLVM_LIB_DIR ${LLVM_DIRECTORY}/lib)
+                       #Explicitly set llvm lib order.
+                       #---- WARNING ON GCC ORDER OF LIBS IS IMPORTANT, DO NOT CHANGE! ---------
+                       set(LLVM_LIBRARY LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMAnalysis LLVMArchive
+                               LLVMAsmParser LLVMAsmPrinter
+                               LLVMBitReader LLVMBitWriter
+                               LLVMDebugInfo LLVMExecutionEngine
+                               LLVMInstCombine LLVMInstrumentation
+                               LLVMInterpreter LLVMJIT
+                               LLVMLinker LLVMMC
+                               LLVMMCDisassembler LLVMMCJIT
+                               LLVMMCParser LLVMObject
+                               LLVMRuntimeDyld 
+                               LLVMSupport
+                               LLVMTableGen LLVMTarget
+                               LLVMTransformUtils LLVMVectorize
+                               LLVMX86AsmParser LLVMX86AsmPrinter
+                               LLVMX86CodeGen LLVMX86Desc
+                               LLVMX86Disassembler LLVMX86Info
+                               LLVMX86Utils LLVMipa
+                               LLVMipo LLVMCore)
+                               #imagehelp is needed by LLVM 3.1 on MinGW, check lib\Support\Windows\Signals.inc
+                               set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} -limagehlp")
+                       set(LLVM_STATIC YES)
+               endif()
+               
                if(WITH_OPENCOLORIO)
                        set(OPENCOLORIO ${LIBDIR}/opencolorio)
                        set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
@@ -1347,16 +1381,6 @@ elseif(APPLE)
                set(WITH_LIBS10.5 ON CACHE BOOL "Use 10.5 libs" FORCE) # valid also for 10.6/10.7
        endif()
 
-       if(${XCODE_VERSION} VERSION_LESS 4.3)
-               set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE)  # use guaranteed existing sdk
-       else()
-               # note: i don't use xcode-select path on purpose, cause also /Applications/Xcode.app would be allowed
-               # absolute pathes are more foolproof here !
-               set(OSX_SYSROOT_PREFIX /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform)
-               set(OSX_DEVELOPER_PREFIX /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk) # use guaranteed existing sdk
-               set(CMAKE_OSX_SYSROOT ${OSX_SYSROOT_PREFIX}/${OSX_DEVELOPER_PREFIX} CACHE PATH "" FORCE)
-       endif()
-       
        if(WITH_LIBS10.5)
                set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-9.x.universal)
        else()
@@ -1379,10 +1403,13 @@ elseif(APPLE)
        endif()
 
        if(WITH_JACK)
-               set(JACK /usr)
-               set(JACK_INCLUDE_DIRS ${JACK}/include/jack)
-               set(JACK_LIBRARIES jack)
-               set(JACK_LIBPATH ${JACK}/lib)
+               find_library(JACK_FRAMEWORK
+                       NAMES jackmp
+               )
+               set(JACK_INCLUDE_DIRS ${JACK_FRAMEWORK}/headers)
+               if(NOT JACK_FRAMEWORK)
+                       set(WITH_JACK OFF)
+               endif()
        endif()
 
        if(WITH_CODEC_SNDFILE)
@@ -1394,13 +1421,13 @@ elseif(APPLE)
 
        if(WITH_PYTHON)
                if(NOT WITH_PYTHON_MODULE)
-                       # we use precompiled libraries for py 3.2 and up by default
+                       # we use precompiled libraries for py 3.3 and up by default
 
                        # normally cached but not since we include them with blender
-                       set(PYTHON_VERSION 3.2)
-                       set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}")
+                       set(PYTHON_VERSION 3.3)
+                       set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}m")
                        # set(PYTHON_BINARY "${LIBDIR}/python/bin/python${PYTHON_VERSION}") # not used yet
-                       set(PYTHON_LIBRARY python${PYTHON_VERSION})
+                       set(PYTHON_LIBRARY python${PYTHON_VERSION}m)
                        set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
                        # set(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with this enabled
                else()
@@ -1420,13 +1447,6 @@ elseif(APPLE)
                set(PYTHON_LIBRARIES  "${PYTHON_LIBRARY}")
        endif()
 
-       if(WITH_INTERNATIONAL)
-               set(GETTEXT ${LIBDIR}/gettext)
-               set(GETTEXT_INCLUDE_DIRS "${GETTEXT}/include")
-               set(GETTEXT_LIBRARIES intl iconv)
-               set(GETTEXT_LIBPATH ${GETTEXT}/lib)
-       endif()
-
        if(WITH_FFTW3)
                set(FFTW3 ${LIBDIR}/fftw3)
                set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
@@ -1493,10 +1513,10 @@ elseif(APPLE)
                if(WITH_INPUT_NDOF)
                        # This thread it *should* work and check the framework - campbell
                        # http://www.cmake.org/pipermail/cmake/2005-December/007740.html
-                       find_library(3D_CONNEXION_CLIENT_LIBRARY
+                       find_library(3DCONNEXION_CLIENT_FRAMEWORK
                                NAMES 3DconnexionClient
                        )
-                       if(NOT 3D_CONNEXION_CLIENT_LIBRARY)
+                       if(NOT 3DCONNEXION_CLIENT_FRAMEWORK)
                                set(WITH_INPUT_NDOF OFF)
                        endif()
 
@@ -1505,6 +1525,10 @@ elseif(APPLE)
                        endif()
                endif()
 
+       if(WITH_JACK)
+               set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -weak_framework jackmp")
+       endif()
+
        else()
                set(PLATFORM_CFLAGS "-pipe -funsigned-char")
                set(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
@@ -1567,7 +1591,11 @@ elseif(APPLE)
        if(WITH_BOOST)
                set(BOOST ${LIBDIR}/boost)
                set(BOOST_INCLUDE_DIR ${BOOST}/include)
-               set(BOOST_LIBRARIES boost_date_time-mt boost_filesystem-mt boost_regex-mt boost_system-mt boost_thread-mt)
+               set(BOOST_LIBRARIES boost_date_time-mt boost_filesystem-mt boost_regex-mt boost_system-mt boost_thread-mt boost_wave-mt)
+               if (WITH_INTERNATIONAL)
+                       list(APPEND BOOST_LIBRARIES boost_locale-mt)
+                       set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -liconv") # boost_locale needs it !
+               endif()
                set(BOOST_LIBPATH ${BOOST}/lib)
                set(BOOST_DEFINITIONS)
        endif()
@@ -1592,7 +1620,7 @@ elseif(APPLE)
                set(LLVM_DIRECTORY ${LIBDIR}/llvm CACHE PATH    "Path to the LLVM installation")
                set(LLVM_VERSION "3.1" CACHE STRING     "Version of LLVM to use")
                set(LLVM_STATIC YES)
-               if(LLVM_DIRECTORY)
+               if(EXISTS "${LLVM_DIRECTORY}/bin/llvm-config")
                        set(LLVM_CONFIG "${LLVM_DIRECTORY}/bin/llvm-config")
                else()
                        set(LLVM_CONFIG llvm-config)
@@ -1607,11 +1635,8 @@ elseif(APPLE)
                                OUTPUT_VARIABLE LLVM_LIB_DIR
                                OUTPUT_STRIP_TRAILING_WHITESPACE)
                find_library(LLVM_LIBRARY
-                            NAMES libLLVMAnalysis.a # first of a whole bunch of libs to get
+                            NAMES LLVMAnalysis # first of a whole bunch of libs to get
                             PATHS ${LLVM_LIB_DIR})
-               message(STATUS "LLVM version  = ${LLVM_VERSION}")
-               message(STATUS "LLVM dir      = ${LLVM_DIRECTORY}")
-               message(STATUS "LLVM lib dir  = ${LLVM_LIB_DIR}")
 
                if(LLVM_LIBRARY AND LLVM_DIRECTORY AND LLVM_LIB_DIR)
                        if(LLVM_STATIC)
@@ -1623,7 +1648,6 @@ elseif(APPLE)
                                                OUTPUT_STRIP_TRAILING_WHITESPACE)
                                string(REPLACE " " ";" LLVM_LIBRARY ${LLVM_LIBRARY})
                        endif()
-                       message(STATUS "LLVM library  = ${LLVM_LIBRARY}")
                else()
                        message(FATAL_ERROR "LLVM not found.")
                endif()
@@ -1632,8 +1656,6 @@ elseif(APPLE)
        if(WITH_CYCLES_OSL)
                set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
        
-               message(STATUS "CYCLES_OSL = ${CYCLES_OSL}")
-       
                find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib)
                find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib)
                find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib)
@@ -1644,9 +1666,6 @@ elseif(APPLE)
        
                if(OSL_INCLUDES AND OSL_LIBRARIES AND OSL_COMPILER)
                        set(OSL_FOUND TRUE)
-                       message(STATUS "OSL includes = ${OSL_INCLUDES}")
-                       message(STATUS "OSL library = ${OSL_LIBRARIES}")
-                       message(STATUS "OSL compiler = ${OSL_COMPILER}")
                else()
                        message(STATUS "OSL not found")
                endif()
@@ -1678,6 +1697,10 @@ if(APPLE OR WIN32)
        endif()
 endif()
 
+if(NOT WITH_FFTW3 AND WITH_MOD_OCEANSIM)
+       message(FATAL_ERROR "WITH_MOD_OCEANSIM requires WITH_FFTW3 to be ON")
+endif()
+
 if(WITH_CYCLES)
        if(NOT WITH_OPENIMAGEIO)
                message(FATAL_ERROR "Cycles reqires WITH_OPENIMAGEIO, the library may not have been found. Configure OIIO or disable WITH_CYCLES")
@@ -1693,6 +1716,11 @@ if(WITH_CYCLES)
        endif()
 endif()
 
+if(WITH_INTERNATIONAL)
+       if(NOT WITH_BOOST)
+               message(FATAL_ERROR "Internationalization reqires WITH_BOOST, the library may not have been found. Configure BOOST or disable WITH_INTERNATIONAL")
+       endif()
+endif()
 
 # See TEST_SSE_SUPPORT() for how this is defined.
 
@@ -1842,7 +1870,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
        ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
 
        # gcc 4.2 gives annoying warnings on every file with this
-       if ("${CMAKE_C_COMPILER_VERSION}" VERSION_GREATER "4.2")
+       if (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
                ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNINITIALIZED -Wuninitialized)
        endif()
 
@@ -1862,7 +1890,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
        ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
 
        # gcc 4.2 gives annoying warnings on every file with this
-       if ("${CMAKE_C_COMPILER_VERSION}" VERSION_GREATER "4.2")
+       if (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
                ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNINITIALIZED -Wuninitialized)
        endif()
 
@@ -1935,12 +1963,13 @@ if(WITH_PYTHON)
 
        if(WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY)
                # set but invalid
-               if(NOT ${PYTHON_NUMPY_PATH} STREQUAL "")
-                       if(NOT EXISTS "${PYTHON_NUMPY_PATH}/numpy")
-                               message(WARNING "PYTHON_NUMPY_PATH is invalid, numpy not found in '${PYTHON_NUMPY_PATH}' "
-                                               "WITH_PYTHON_INSTALL_NUMPY option will be ignored when installing python")
-                               set(WITH_PYTHON_INSTALL_NUMPY OFF)
-                       endif()
+        # -- disabled until we make numpy bundled with blender - campbell
+               if((NOT ${PYTHON_NUMPY_PATH} STREQUAL "") AND (NOT ${PYTHON_NUMPY_PATH} MATCHES NOTFOUND))
+#                      if(NOT EXISTS "${PYTHON_NUMPY_PATH}/numpy")
+#                              message(WARNING "PYTHON_NUMPY_PATH is invalid, numpy not found in '${PYTHON_NUMPY_PATH}' "
+#                                              "WITH_PYTHON_INSTALL_NUMPY option will be ignored when installing python")
+#                              set(WITH_PYTHON_INSTALL_NUMPY OFF)
+#                      endif()
                # not set, so initialize
                else()
                        string(REPLACE "." ";" _PY_VER_SPLIT "${PYTHON_VERSION}")
index f820778..c1b67c8 100644 (file)
@@ -173,14 +173,15 @@ help:
        @echo "  * test_style_osl_qtc - checks OpenShadingLanguage conforms with blenders style guide: http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
        @echo ""
        @echo "Static Source Code Checking (not associated with building blender)"
-       @echo "  * check_cppcheck     - run blender source through cppcheck (C & C++)"
-       @echo "  * check_clang_array  - run blender source through clang array checking script (C & C++)"
-       @echo "  * check_splint       - run blenders source through splint (C only)"
-       @echo "  * check_sparse       - run blenders source through sparse (C only)"
-       @echo "  * check_smatch       - run blenders source through smatch (C only)"
-       @echo "  * check_spelling_c   - check for spelling errors (OSL only)"
-       @echo "  * check_spelling_osl - check for spelling errors (C/C++ only)"
-       @echo "  * check_spelling_py  - check for spelling errors (Python only)"
+       @echo "  * check_cppcheck       - run blender source through cppcheck (C & C++)"
+       @echo "  * check_clang_array    - run blender source through clang array checking script (C & C++)"
+       @echo "  * check_splint         - run blenders source through splint (C only)"
+       @echo "  * check_sparse         - run blenders source through sparse (C only)"
+       @echo "  * check_smatch         - run blenders source through smatch (C only)"
+       @echo "  * check_spelling_c     - check for spelling errors (OSL only)"
+       @echo "  * check_spelling_c_qtc - same as check_spelling_c but outputs QtCreator tasks format"
+       @echo "  * check_spelling_osl   - check for spelling errors (C/C++ only)"
+       @echo "  * check_spelling_py    - check for spelling errors (Python only)"
        @echo ""
        @echo "Utilities (not associated with building blender)"
        @echo "  * tbz      - create a compressed svn export 'blender_archive.tar.bz2'"
@@ -240,13 +241,13 @@ test_style_c_qtc:
 
 test_style_osl:
        # run our own checks on C/C++ style
-       PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/intern/cycles/kernel/osl
+       PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/intern/cycles/kernel/shaders
 
 
 test_style_osl_qtc:
        # run our own checks on C/C++ style
        USE_QTC_TASK=1 \
-       PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/intern/cycles/kernel/osl > \
+       PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/intern/cycles/kernel/shaders > \
        test_style.tasks
        @echo "written: test_style.tasks"
 
@@ -270,32 +271,44 @@ project_eclipse:
 
 check_cppcheck:
        $(CMAKE_CONFIG)
-       cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py
+       cd $(BUILD_DIR) ; \
+       python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py
 
 check_clang_array:
        $(CMAKE_CONFIG)
-       cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py
+       cd $(BUILD_DIR) ; \
+       python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py
 
 check_splint:
        $(CMAKE_CONFIG)
-       cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py
+       cd $(BUILD_DIR) ; \
+       python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py
 
 check_sparse:
        $(CMAKE_CONFIG)
-       cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py
+       cd $(BUILD_DIR) ; \
+       python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py
 
 check_smatch:
        $(CMAKE_CONFIG)
-       cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py
+       cd $(BUILD_DIR) ; \
+       python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py
 
 check_spelling_py:
-       cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/release/scripts
+       cd $(BUILD_DIR) ; \
+       PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/release/scripts
 
 check_spelling_c:
-       cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/source
+       cd $(BUILD_DIR) ; \
+       PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/source
+
+check_spelling_c_qtc:
+       cd $(BUILD_DIR) ; USE_QTC_TASK=1 \
+       PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/source > \
+       $(BLENDER_DIR)/check_spelling_c.tasks
 
 check_spelling_osl:
-       cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/intern/cycles/kernel/osl
+       cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/intern/cycles/kernel/shaders
 
 # -----------------------------------------------------------------------------
 # Utilities
index 064ae0b..c2bae04 100644 (file)
@@ -306,6 +306,15 @@ if env['OURPLATFORM']=='darwin':
         else:
             env.Append(LINKFLAGS=['-Xlinker','-weak_framework','-Xlinker','Jackmp'])
 
+    if env['WITH_BF_CYCLES_OSL'] == 1: 
+        OSX_OSL_LIBPATH = Dir(env.subst(env['BF_OSL_LIBPATH'])).abspath
+        # we need 2 variants of passing the oslexec with the force_load option, string and list type atm
+        env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-force_load '+ OSX_OSL_LIBPATH +'/liboslexec.a','-loslquery'])
+        env.Append(BF_PROGRAM_LINKFLAGS=['-Xlinker','-force_load','-Xlinker',OSX_OSL_LIBPATH +'/liboslexec.a'])
+
+    # Trying to get rid of eventually clashes, we export some explicite as local symbols               
+    env.Append(LINKFLAGS=['-Xlinker','-unexported_symbols_list','-Xlinker','./source/creator/osx_locals.map'])
+
 if env['WITH_BF_OPENMP'] == 1:
         if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
                 env['CCFLAGS'].append('/openmp')
@@ -422,16 +431,22 @@ if not quickie and do_clean:
 # with _any_ library but since we used a fixed python version this tends to
 # be most problematic.
 if env['WITH_BF_PYTHON']:
-    py_h = os.path.join(Dir(env.subst('${BF_PYTHON_INC}')).abspath, "Python.h")
-
-    if not os.path.exists(py_h):
-        print("\nMissing: \"" + env.subst('${BF_PYTHON_INC}') + os.sep + "Python.h\",\n"
+    found_python_h = found_pyconfig_h = False
+    for bf_python_inc in env.subst('${BF_PYTHON_INC}').split():
+        py_h = os.path.join(Dir(bf_python_inc).abspath, "Python.h")
+        if os.path.exists(py_h):
+            found_python_h = True
+        py_h = os.path.join(Dir(bf_python_inc).abspath, "pyconfig.h")
+        if os.path.exists(py_h):
+            found_pyconfig_h = True
+
+    if not (found_python_h and found_pyconfig_h):
+        print("\nMissing: Python.h and/or pyconfig.h in\"" + env.subst('${BF_PYTHON_INC}') + "\",\n"
               "  Set 'BF_PYTHON_INC' to point "
-              "to a valid python include path.\n  Containing "
-              "Python.h for python version \"" + env.subst('${BF_PYTHON_VERSION}') + "\"")
+              "to valid python include path(s).\n Containing "
+              "Python.h and pyconfig.h for python version \"" + env.subst('${BF_PYTHON_VERSION}') + "\"")
 
         Exit()
-    del py_h
 
 
 if not os.path.isdir ( B.root_build_dir):
@@ -571,11 +586,11 @@ B.init_lib_dict()
 
 Export('env')
 
-BuildDir(B.root_build_dir+'/source', 'source', duplicate=0)
+VariantDir(B.root_build_dir+'/source', 'source', duplicate=0)
 SConscript(B.root_build_dir+'/source/SConscript')
-BuildDir(B.root_build_dir+'/intern', 'intern', duplicate=0)
+VariantDir(B.root_build_dir+'/intern', 'intern', duplicate=0)
 SConscript(B.root_build_dir+'/intern/SConscript')
-BuildDir(B.root_build_dir+'/extern', 'extern', duplicate=0)
+VariantDir(B.root_build_dir+'/extern', 'extern', duplicate=0)
 SConscript(B.root_build_dir+'/extern/SConscript')
 
 # now that we have read all SConscripts, we know what
@@ -685,6 +700,8 @@ if env['OURPLATFORM']!='darwin':
             source.remove('kernel.cpp')
             source.remove('CMakeLists.txt')
             source.remove('svm')
+            source.remove('closure')
+            source.remove('shaders')
             source.remove('osl')
             source=['intern/cycles/kernel/'+s for s in source]
             source.append('intern/cycles/util/util_color.h')
@@ -700,6 +717,14 @@ if env['OURPLATFORM']!='darwin':
             if '__pycache__' in source: source.remove('__pycache__')
             source=['intern/cycles/kernel/svm/'+s for s in source]
             scriptinstall.append(env.Install(dir=dir,source=source))
+            # closure
+            dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel', 'closure')
+            source=os.listdir('intern/cycles/kernel/closure')
+            if '.svn' in source: source.remove('.svn')
+            if '_svn' in source: source.remove('_svn')
+            if '__pycache__' in source: source.remove('__pycache__')
+            source=['intern/cycles/kernel/closure/'+s for s in source]
+            scriptinstall.append(env.Install(dir=dir,source=source))
 
             # licenses
             dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'license')
@@ -719,6 +744,22 @@ if env['OURPLATFORM']!='darwin':
                     cubin_file = os.path.join(kernel_build_dir, "kernel_%s.cubin" % arch)
                     scriptinstall.append(env.Install(dir=dir,source=cubin_file))
 
+            # osl shaders
+            if env['WITH_BF_CYCLES_OSL']:
+                dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'shader')
+
+                osl_source_dir = Dir('./intern/cycles/kernel/shaders').srcnode().path
+                oso_build_dir = os.path.join(B.root_build_dir, 'intern/cycles/kernel/shaders')
+
+                headers='node_color.h node_fresnel.h node_texture.h oslutil.h stdosl.h'.split()
+                source=['intern/cycles/kernel/shaders/'+s for s in headers]
+                scriptinstall.append(env.Install(dir=dir,source=source))
+
+                for f in os.listdir(osl_source_dir):
+                    if f.endswith('.osl'):
+                        oso_file = os.path.join(oso_build_dir, f.replace('.osl', '.oso'))
+                        scriptinstall.append(env.Install(dir=dir,source=oso_file))
+
     if env['WITH_BF_OCIO']:
         colormanagement = os.path.join('release', 'datafiles', 'colormanagement')
 
@@ -819,10 +860,6 @@ else:
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
     dllsources = []
 
-    if not env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
-        # For MinGW and linuxcross static linking will be used
-        dllsources += ['${LCGDIR}/gettext/lib/gnu_gettext.dll']
-
     dllsources += ['${BF_ZLIB_LIBPATH}/zlib.dll']
     # Used when linking to libtiff was dynamic
     # keep it here until compilation on all platform would be ok
@@ -868,9 +905,6 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
         dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb.dll')
     dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb64.dll')
 
-    if env['WITH_BF_OIIO'] and env['OURPLATFORM'] != 'win32-mingw':
-        dllsources.append('${LCGDIR}/openimageio/bin/OpenImageIO.dll')
-
     if env['WITH_BF_OCIO']:
         if not env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
             dllsources.append('${LCGDIR}/opencolorio/bin/OpenColorIO.dll')
diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh
new file mode 100755 (executable)
index 0000000..072e999
--- /dev/null
@@ -0,0 +1,1875 @@
+#!/bin/bash
+
+# Parse command line!
+ARGS=$( \
+getopt \
+-o s:i:t:h \
+--long source:,install:,threads:,help,with-all,with-osl,all-static,force-all,force-python,\
+force-boost,force-ocio,force-oiio,force-llvm,force-osl,force-ffmpeg,\
+skip-python,skip-boost,skip-ocio,skip-oiio,skip-llvm,skip-osl,skip-ffmpeg \
+-- "$@" \
+)
+
+DISTRO=""
+SRC="$HOME/src/blender-deps"
+INST="/opt/lib"
+CWD=$PWD
+
+# Do not install some optional, potentially conflicting libs by default...
+WITH_ALL=false
+
+# Do not yet enable osl, use --with-osl (or --with-all) option to try it.
+WITH_OSL=false
+
+# Try to link everything statically. Use this to produce portable 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 beginning of this script,
+or use --source/--install options, if you want to use other paths!
+
+Number of threads for building: \$THREADS (automatically detected, use --threads=<nbr> to override it).
+Full install: \$WITH_ALL (use --with-all option to enable it).
+Building OSL: \$WITH_OSL (use --with-osl option to enable it).
+All static linking: \$ALL_STATIC (use --all-static option to enable it).
+
+Use --help to show all available options!\""
+
+ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
+    -h, --help
+        Show this message and exit.
+
+    -s <path>, --source=<path>
+        Use a specific path where to store downloaded libraries sources (defaults to '\$SRC').
+
+    -i <path>, --install=<path>
+        Use a specific path where to install built libraries (defaults to '\$INST').
+
+    -t n, --threads=n
+        Use a specific number of threads when building the libraries (auto-detected as '\$THREADS').
+
+    --with-all
+        By default, a number of optional and not-so-often needed libraries are not installed.
+        This option will try to install them, at the cost of potential conflicts (depending on
+        how your package system is set…).
+        Note this option also implies all other (more specific) --with-foo options below.
+
+    --with-osl
+        Try to install or build the OpenShadingLanguage libraries (and their dependencies).
+        Still experimental!
+
+    --all-static
+        Build libraries as statically as possible, to create static builds of Blender.
+
+    --force-all
+        Force the rebuild of all built libraries.
+
+    --force-python
+        Force the rebuild of Python.
+
+    --force-boost
+        Force the rebuild of Boost.
+
+    --force-ocio
+        Force the rebuild of OpenColorIO.
+
+    --force-oiio
+        Force the rebuild of OpenImageIO.
+
+    --force-llvm
+        Force the rebuild of LLVM.
+
+    --force-osl
+        Force the rebuild of OpenShadingLanguage.
+
+    --force-ffmpeg
+        Force the rebuild of FFMpeg.
+
+    Note about the --force-foo options:
+        * They obviously only have an effect if those libraries are built by this script
+          (i.e. if there is no available and satisfactory package)!
+        * If the “force-rebuilt” library is a dependency of others, it will force the rebuild
+          of those libraries too (e.g. --force-boost will also rebuild oiio and osl...).
+        * Do not forget --with-osl if you built it and still want it!
+
+    --skip-python
+        Unconditionally skip Python installation/building.
+
+    --skip-boost
+        Unconditionally skip Boost installation/building.
+
+    --skip-ocio
+        Unconditionally skip OpenColorIO installation/building.
+
+    --skip-oiio
+        Unconditionally skip OpenImageIO installation/building.
+
+    --skip-llvm
+        Unconditionally skip LLVM installation/building.
+
+    --skip-osl
+        Unconditionally skip OpenShadingLanguage installation/building.
+
+    --skip-ffmpeg
+        Unconditionally skip FFMpeg installation/building.\""
+
+PYTHON_VERSION="3.3.0"
+PYTHON_VERSION_MIN="3.3"
+PYTHON_SOURCE="http://python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.bz2"
+PYTHON_FORCE_REBUILD=false
+PYTHON_SKIP=false
+
+BOOST_VERSION="1.51.0"
+_boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'`
+BOOST_SOURCE="http://sourceforge.net/projects/boost/files/boost/$BOOST_VERSION/boost_$_boost_version_nodots.tar.bz2/download"
+BOOST_VERSION_MIN="1.49"
+BOOST_FORCE_REBUILD=false
+BOOST_SKIP=false
+
+OCIO_VERSION="1.0.7"
+OCIO_SOURCE="https://github.com/imageworks/OpenColorIO/tarball/v$OCIO_VERSION"
+OCIO_VERSION_MIN="1.0"
+OCIO_FORCE_REBUILD=false
+OCIO_SKIP=false
+
+OIIO_VERSION="1.1.1"
+OIIO_SOURCE="https://github.com/OpenImageIO/oiio/tarball/Release-$OIIO_VERSION"
+OIIO_VERSION_MIN="1.1"
+OIIO_FORCE_REBUILD=false
+OIIO_SKIP=false
+
+LLVM_VERSION="3.1"
+LLVM_VERSION_MIN="3.0"
+LLVM_VERSION_FOUND=""
+LLVM_SOURCE="http://llvm.org/releases/$LLVM_VERSION/llvm-$LLVM_VERSION.src.tar.gz"
+LLVM_CLANG_SOURCE="http://llvm.org/releases/$LLVM_VERSION/clang-$LLVM_VERSION.src.tar.gz"
+LLVM_FORCE_REBUILD=false
+LLVM_SKIP=false
+
+# OSL needs to be compiled for now!
+OSL_VERSION="1.2.0"
+OSL_SOURCE="https://github.com/mont29/OpenShadingLanguage/archive/blender-fixes.tar.gz"
+OSL_FORCE_REBUILD=false
+OSL_SKIP=false
+
+FFMPEG_VERSION="1.0"
+FFMPEG_SOURCE="http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2"
+FFMPEG_VERSION_MIN="0.7.6"
+FFMPEG_FORCE_REBUILD=false
+FFMPEG_SKIP=false
+_ffmpeg_list_sep=";"
+
+# FFMPEG optional libs.
+VORBIS_USE=false
+VORBIS_DEV=""
+SCHRO_USE=false
+SCRHO_DEV=""
+THEORA_USE=false
+THEORA_DEV=""
+XVID_USE=false
+XVID_DEV=""
+X264_USE=false
+X264_DEV=""
+X264_VERSION_MIN=0.118
+VPX_USE=false
+VPX_VERSION_MIN=0.9.7
+VPX_DEV=""
+MP3LAME_USE=false
+MP3LAME_DEV=""
+OPENJPEG_USE=false
+OPENJPEG_DEV=""
+
+# Switch to english language, else some things (like check_package_DEB()) won't work!
+LANG_BACK=$LANG
+LANG=""
+export LANG
+
+
+_echo() {
+  if [ "X$1" = "X-n" ]; then
+     shift; printf "%s" "$@"
+  else
+     printf "%s\n" "$@"
+  fi
+}
+
+ERROR() {
+  _echo "$@"
+}
+
+INFO() {
+  _echo "$@"
+}
+
+# Finish parsing the commandline args.
+eval set -- "$ARGS"
+while true; do
+  case $1 in
+    -s|--source)
+      SRC="$2"; shift; shift; continue
+    ;;
+    -i|--install)
+      INST="$2"; shift; shift; continue
+    ;;
+    -t|--threads)
+      THREADS="$2"; shift; shift; continue
+    ;;
+    -h|--help)
+      INFO ""
+      INFO "USAGE:"
+      INFO ""
+      INFO "`eval _echo "$COMMON_INFO"`"
+      INFO ""
+      INFO "`eval _echo "$ARGUMENTS_INFO"`"
+      INFO ""
+      exit 0
+    ;;
+    --with-all)
+      WITH_ALL=true; shift; continue
+    ;;
+    --with-osl)
+      WITH_OSL=true; shift; continue
+    ;;
+    --all-static)
+      ALL_STATIC=true; shift; continue
+    ;;
+    --force-all)
+      PYTHON_FORCE_REBUILD=true
+      BOOST_FORCE_REBUILD=true
+      OCIO_FORCE_REBUILD=true
+      OIIO_FORCE_REBUILD=true
+      LLVM_FORCE_REBUILD=true
+      OSL_FORCE_REBUILD=true
+      FFMPEG_FORCE_REBUILD=true
+      shift; continue
+    ;;
+    --force-python)
+      PYTHON_FORCE_REBUILD=true; shift; continue
+    ;;
+    --force-boost)
+      BOOST_FORCE_REBUILD=true; shift; continue
+    ;;
+    --force-ocio)
+      OCIO_FORCE_REBUILD=true; shift; continue
+    ;;
+    --force-oiio)
+      OIIO_FORCE_REBUILD=true; shift; continue
+    ;;
+    --force-llvm)
+      LLVM_FORCE_REBUILD=true; shift; continue
+    ;;
+    --force-osl)
+      OSL_FORCE_REBUILD=true; shift; continue
+    ;;
+    --force-ffmpeg)
+      FFMPEG_FORCE_REBUILD=true; shift; continue
+    ;;
+    --skip-python)
+      PYTHON_SKIP=true; shift; continue
+    ;;
+    --skip-boost)
+      BOOST_SKIP=true; shift; continue
+    ;;
+    --skip-ocio)
+      OCIO_SKIP=true; shift; continue
+    ;;
+    --skip-oiio)
+      OIIO_SKIP=true; shift; continue
+    ;;
+    --skip-llvm)
+      LLVM_SKIP=true; shift; continue
+    ;;
+    --skip-osl)
+      OSL_SKIP=true; shift; continue
+    ;;
+    --skip-ffmpeg)
+      FFMPEG_SKIP=true; shift; continue
+    ;;
+    --)
+      # no more arguments to parse
+      break
+    ;;
+    *)
+      INFO ""
+      INFO "Wrong parameter! Usage:"
+      INFO ""
+      INFO "`eval _echo "$COMMON_INFO"`"
+      INFO ""
+      exit 1
+    ;;
+  esac
+done
+
+if $WITH_ALL; then
+  WITH_OSL=true
+fi
+
+# Return 0 if $1 = $2 (i.e. 1.01.0 = 1.1, but 1.1.1 != 1.1), else 1.
+# $1 and $2 should be version numbers made of numbers only.
+version_eq() {
+  backIFS=$IFS
+  IFS='.'
+
+  # Split both version numbers into their numeric elements.
+  arr1=( $1 )
+  arr2=( $2 )
+
+  ret=1
+
+  count1=${#arr1[@]}
+  count2=${#arr2[@]}
+  if [ $count2 -ge $count1 ]; then
+    _t=$count1
+    count1=$count2
+    count2=$_t
+    arr1=( $2 )
+    arr2=( $1 )
+  fi
+
+  ret=0
+  for (( i=0; $i < $count2; i++ ))
+  do
+    if [ $(( 10#${arr1[$i]} )) -ne $(( 10#${arr2[$i]} )) ]; then
+      ret=1
+      break
+    fi
+  done
+
+  for (( i=$count2; $i < $count1; i++ ))
+  do
+    if [ $(( 10#${arr1[$i]} )) -ne 0 ]; then
+      ret=1
+      break
+    fi
+  done
+
+  IFS=$backIFS
+  return $ret
+}
+
+# Return 0 if $1 >= $2, else 1.
+# $1 and $2 should be version numbers made of numbers only.
+version_ge() {
+  version_eq $1 $2
+  if [ $? -eq 1 -a $(_echo "$1" "$2" | sort --version-sort | head --lines=1) = "$1" ]; then
+    return 1
+  else
+    return 0
+  fi
+}
+
+# Return 0 if $1 is into $2 (e.g. 3.3.2 is into 3.3, but not 3.3.0 or 3.3.5), else 1.
+# $1 and $2 should be version numbers made of numbers only.
+# $1 should be at least as long as $2!
+version_match() {
+  backIFS=$IFS
+  IFS='.'
+
+  # Split both version numbers into their numeric elements.
+  arr1=( $1 )
+  arr2=( $2 )
+
+  ret=1
+
+  count1=${#arr1[@]}
+  count2=${#arr2[@]}
+  if [ $count1 -ge $count2 ]; then
+    ret=0
+    for (( i=0; $i < $count2; i++ ))
+    do
+      if [ $(( 10#${arr1[$i]} )) -ne $(( 10#${arr2[$i]} )) ]; then
+        ret=1
+        break
+      fi
+    done
+  fi
+
+  IFS=$backIFS
+  return $ret
+}
+
+detect_distro() {
+  if [ -f /etc/debian_version ]; then
+    DISTRO="DEB"
+  elif [ -f /etc/redhat-release ]; then
+    DISTRO="RPM"
+  elif [ -f /etc/SuSE-release ]; then
+    DISTRO="SUSE"
+  fi
+}
+
+prepare_opt() {
+  INFO "Ensuring $INST exists and is writable by us"
+  if [ ! -d  $INST ]; then
+    sudo mkdir -p $INST
+  fi
+
+  if [ ! -w $INST ]; then
+    sudo chown $USER $INST
+    sudo chmod 775 $INST
+  fi
+}
+
+# Check whether the current package needs to be recompiled, based on a dummy file containing a magic number in its name...
+magic_compile_check() {
+  if [ -f $INST/.$1-magiccheck-$2 ]; then
+    return 0
+  else
+    return 1
+  fi
+}
+
+magic_compile_set() {
+  rm -f $INST/.$1-magiccheck-*
+  touch $INST/.$1-magiccheck-$2
+}
+
+compile_Python() {
+  # To be changed each time we make edits that would modify the compiled result!
+  py_magic=0
+
+  _src=$SRC/Python-$PYTHON_VERSION
+  _inst=$INST/python-$PYTHON_VERSION
+
+  # Clean install if needed!
+  magic_compile_check python-$PYTHON_VERSION $py_magic
+  if [ $? -eq 1 -o $PYTHON_FORCE_REBUILD == true ]; then
+    rm -rf $_inst
+  fi
+
+  if [ ! -d $_inst ]; then
+    INFO "Building Python-$PYTHON_VERSION"
+
+    prepare_opt
+
+    if [ ! -d $_src ]; then
+      mkdir -p $SRC
+      wget -c $PYTHON_SOURCE -O $_src.tar.bz2
+
+      INFO "Unpacking Python-$PYTHON_VERSION"
+      tar -C $SRC -xf $_src.tar.bz2
+    fi
+
+    cd $_src
+
+    ./configure --prefix=$_inst --enable-ipv6 \
+        --enable-loadable-sqlite-extensions --with-dbmliborder=bdb \
+        --with-computed-gotos --with-pymalloc
+
+    make -j$THREADS && make install
+    make clean
+
+    if [ -d $_inst ]; then
+      rm -f $INST/python-3.3
+      ln -s python-$PYTHON_VERSION $INST/python-3.3
+    else
+      ERROR "Python--$PYTHON_VERSION failed to compile, exiting"
+      exit 1
+    fi
+
+    magic_compile_set python-$PYTHON_VERSION $py_magic
+
+    cd $CWD
+    INFO "Done compiling Python-$PYTHON_VERSION!"
+  else
+    INFO "Own Python-$PYTHON_VERSION is up to date, nothing to do!"
+    INFO "If you want to force rebuild of this lib, use the --force-python option."
+  fi
+}
+
+compile_Boost() {
+  # To be changed each time we make edits that would modify the compiled result!
+  boost_magic=7
+
+  _src=$SRC/boost-$BOOST_VERSION
+  _inst=$INST/boost-$BOOST_VERSION
+
+  # Clean install if needed!
+  magic_compile_check boost-$BOOST_VERSION $boost_magic
+  if [ $? -eq 1 -o $BOOST_FORCE_REBUILD == true ]; then
+    rm -rf $_inst
+  fi
+
+  if [ ! -d $_inst ]; then
+    INFO "Building Boost-$BOOST_VERSION"
+
+    prepare_opt
+
+    if [ ! -d $_src ]; then
+      INFO "Downloading Boost-$BOOST_VERSION"
+      mkdir -p $SRC
+      wget -c $BOOST_SOURCE -O $_src.tar.bz2
+      tar -C $SRC --transform "s,(.*/?)boost_1_[^/]+(.*),\1boost-$BOOST_VERSION\2,x" -xf $_src.tar.bz2
+    fi
+
+    cd $_src
+    if [ ! -f $_src/b2 ]; then
+      ./bootstrap.sh
+    fi
+    ./b2 -j$THREADS -a --with-system --with-filesystem --with-thread --with-regex --with-locale --with-date_time \
+         --prefix=$_inst --disable-icu boost.locale.icu=off install
+    ./b2 --clean
+
+    if [ -d $_inst ]; then
+      rm -f $INST/boost
+      ln -s boost-$BOOST_VERSION $INST/boost
+    else
+      ERROR "Boost-$BOOST_VERSION failed to compile, exiting"
+      exit 1
+    fi
+
+    magic_compile_set boost-$BOOST_VERSION $boost_magic
+
+    # Rebuild dependecies as well!
+    OIIO_FORCE_REBUILD=true
+    OSL_FORCE_REBUILD=true
+
+    cd $CWD
+    INFO "Done compiling Boost-$BOOST_VERSION!"
+  else
+    INFO "Own Boost-$BOOST_VERSION is up to date, nothing to do!"
+    INFO "If you want to force rebuild of this lib, use the --force-boost option."
+  fi
+}
+
+compile_OCIO() {
+  # To be changed each time we make edits that would modify the compiled result!
+  ocio_magic=1
+
+  _src=$SRC/OpenColorIO-$OCIO_VERSION
+  _inst=$INST/ocio-$OCIO_VERSION
+
+  # Clean install if needed!
+  magic_compile_check ocio-$OCIO_VERSION $ocio_magic
+  if [ $? -eq 1 -o $OCIO_FORCE_REBUILD == true ]; then
+    rm -rf $_inst
+  fi
+
+  if [ ! -d $_inst ]; then
+    INFO "Building OpenColorIO-$OCIO_VERSION"
+
+    prepare_opt
+
+    if [ ! -d $_src ]; then
+      INFO "Downloading OpenColorIO-$OCIO_VERSION"
+      mkdir -p $SRC
+      wget -c $OCIO_SOURCE -O $_src.tar.gz
+
+      INFO "Unpacking OpenColorIO-$OCIO_VERSION"
+      tar -C $SRC --transform "s,(.*/?)imageworks-OpenColorIO[^/]*(.*),\1OpenColorIO-$OCIO_VERSION\2,x" \
+          -xf $_src.tar.gz
+    fi
+
+    cd $_src
+    # Always refresh the whole build!
+    if [ -d build ]; then
+      rm -rf build
+    fi    
+    mkdir build
+    cd build
+
+    if file /bin/cp | grep -q '32-bit'; then
+      cflags="-fPIC -m32 -march=i686"
+    else
+      cflags="-fPIC"
+    fi
+
+    cmake -D CMAKE_BUILD_TYPE=Release \
+          -D CMAKE_PREFIX_PATH=$_inst \
+          -D CMAKE_INSTALL_PREFIX=$_inst \
+          -D CMAKE_CXX_FLAGS="$cflags" \
+          -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" \
+          -D OCIO_BUILD_APPS=OFF \
+          -D OCIO_BUILD_PYGLUE=OFF \
+          ..
+
+    make -j$THREADS && make install
+
+    # Force linking against static libs
+    rm -f $_inst/lib/*.so*
+
+    # Additional depencencies
+    cp ext/dist/lib/libtinyxml.a $_inst/lib
+    cp ext/dist/lib/libyaml-cpp.a $_inst/lib
+
+    make clean
+
+    if [ -d $_inst ]; then
+      rm -f $INST/ocio
+      ln -s ocio-$OCIO_VERSION $INST/ocio
+    else
+      ERROR "OpenColorIO-$OCIO_VERSION failed to compile, exiting"
+      exit 1
+    fi
+
+    magic_compile_set ocio-$OCIO_VERSION $ocio_magic
+
+    cd $CWD
+    INFO "Done compiling OpenColorIO-$OCIO_VERSION!"
+  else
+    INFO "Own OpenColorIO-$OCIO_VERSION is up to date, nothing to do!"
+    INFO "If you want to force rebuild of this lib, use the --force-ocio option."
+  fi
+}
+
+compile_OIIO() {
+  # To be changed each time we make edits that would modify the compiled result!
+  oiio_magic=6
+
+  _src=$SRC/OpenImageIO-$OIIO_VERSION
+  _inst=$INST/oiio-$OIIO_VERSION
+
+  # Clean install if needed!
+  magic_compile_check oiio-$OIIO_VERSION $oiio_magic
+  if [ $? -eq 1 -o $OIIO_FORCE_REBUILD == true ]; then
+    rm -rf $_inst
+  fi
+
+  if [ ! -d $_inst ]; then
+    INFO "Building OpenImageIO-$OIIO_VERSION"
+
+    prepare_opt
+
+    if [ ! -d $_src ]; then
+      mkdir -p $SRC
+      wget -c $OIIO_SOURCE -O "$_src.tar.gz"
+
+      INFO "Unpacking OpenImageIO-$OIIO_VERSION"
+      tar -C $SRC --transform "s,(.*/?)OpenImageIO-oiio[^/]*(.*),\1OpenImageIO-$OIIO_VERSION\2,x" \
+          -xf $_src.tar.gz
+
+      cd $_src
+
+      # XXX Ugly patching hack!
+      cat << EOF | patch -p1
+diff --git a/src/libutil/SHA1.cpp b/src/libutil/SHA1.cpp
+index b9e6c8b..c761185 100644
+--- a/src/libutil/SHA1.cpp
++++ b/src/libutil/SHA1.cpp
+@@ -8,9 +8,9 @@
+ // If compiling with MFC, you might want to add #include "StdAfx.h"
++#include "SHA1.h"
+ #include "hash.h"
+ #include "dassert.h"
+-#include "SHA1.h"
+ #ifdef SHA1_UTILITY_FUNCTIONS
+ #define SHA1_MAX_FILE_BUFFER 8000
+EOF
+
+      cd $CWD
+
+    fi
+
+    cd $_src
+    # Always refresh the whole build!
+    if [ -d build ]; then
+      rm -rf build
+    fi    
+    mkdir build
+    cd build
+
+    cmake_d="-D CMAKE_BUILD_TYPE=Release"
+    cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
+    cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
+    cmake_d="$cmake_d -D BUILDSTATIC=ON"
+
+    # linking statically could give issues on Debian/Ubuntu (and probably other distros
+    # which doesn't like static linking) when linking shared oiio library due to missing
+    # text symbols (static libs should be compiled with -fPIC)
+    # cmake_d="$cmake_d -D LINKSTATIC=ON"
+
+    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...
+#    if [ -d $INST/ocio ]; then
+#      cmake_d="$cmake_d -D OCIO_PATH=$INST/ocio"
+#    fi
+
+    if file /bin/cp | grep -q '32-bit'; then
+      cflags="-fPIC -m32 -march=i686"
+    else
+      cflags="-fPIC"
+    fi
+
+    cmake $cmake_d -D CMAKE_CXX_FLAGS="$cflags" -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" ../src
+
+    make -j$THREADS && make install
+    make clean
+
+    if [ -d $_inst ]; then
+      rm -f $INST/oiio
+      ln -s oiio-$OIIO_VERSION $INST/oiio
+    else
+      ERROR "OpenImageIO-$OIIO_VERSION failed to compile, exiting"
+      exit 1
+    fi
+
+    magic_compile_set oiio-$OIIO_VERSION $oiio_magic
+
+    # Rebuild dependecies as well!
+    OSL_FORCE_REBUILD=true
+
+    cd $CWD
+    INFO "Done compiling OpenImageIO-$OIIO_VERSION!"
+  else
+    INFO "Own OpenImageIO-$OIIO_VERSION is up to date, nothing to do!"
+    INFO "If you want to force rebuild of this lib, use the --force-oiio option."
+  fi
+}
+
+compile_LLVM() {
+  # To be changed each time we make edits that would modify the compiled result!
+  llvm_magic=1
+
+  _src=$SRC/LLVM-$LLVM_VERSION
+  _inst=$INST/llvm-$LLVM_VERSION
+  _src_clang=$SRC/CLANG-$LLVM_VERSION
+
+  # Clean install if needed!
+  magic_compile_check llvm-$LLVM_VERSION $llvm_magic
+  if [ $? -eq 1 -o $LLVM_FORCE_REBUILD == true ]; then
+    rm -rf $_inst
+    rm -rf $_inst_clang
+  fi
+
+  if [ ! -d $_inst ]; then
+    INFO "Building LLVM-$LLVM_VERSION (CLANG included!)"
+
+    prepare_opt
+
+    if [ ! -d $_src -o true ]; then
+      mkdir -p $SRC
+      wget -c $LLVM_SOURCE -O "$_src.tar.gz"
+      wget -c $LLVM_CLANG_SOURCE -O "$_src_clang.tar.gz"
+
+      INFO "Unpacking LLVM-$LLVM_VERSION"
+      tar -C $SRC --transform "s,([^/]*/?)llvm-[^/]*(.*),\1LLVM-$LLVM_VERSION\2,x" \
+          -xf $_src.tar.gz
+      INFO "Unpacking CLANG-$LLVM_VERSION to $_src/tools/clang"
+      tar -C $_src/tools \
+          --transform "s,([^/]*/?)clang-[^/]*(.*),\1clang\2,x" \
+          -xf $_src_clang.tar.gz
+
+      cd $_src
+
+      # XXX Ugly patching hack!
+      cat << EOF | patch -p1
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -13,7 +13,7 @@
+ set(LLVM_VERSION_MAJOR 3)
+ set(LLVM_VERSION_MINOR 1)
+-set(PACKAGE_VERSION "\${LLVM_VERSION_MAJOR}.\${LLVM_VERSION_MINOR}svn")
++set(PACKAGE_VERSION "\${LLVM_VERSION_MAJOR}.\${LLVM_VERSION_MINOR}")
+ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+EOF
+
+      cd $CWD
+
+    fi
+
+    cd $_src
+
+    # Always refresh the whole build!
+    if [ -d build ]; then
+      rm -rf build
+    fi    
+    mkdir build
+    cd build
+
+    cmake_d="-D CMAKE_BUILD_TYPE=Release"
+    cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
+    cmake_d="$cmake_d -D LLVM_ENABLE_FFI=ON"
+
+    if [ -d $_FFI_INCLUDE_DIR ]; then
+      cmake_d="$cmake_d -D FFI_INCLUDE_DIR=$_FFI_INCLUDE_DIR"
+    fi
+
+    cmake $cmake_d ..
+
+    make -j$THREADS && make install
+    make clean
+
+    if [ -d $_inst ]; then
+      rm -f $INST/llvm
+      ln -s llvm-$LLVM_VERSION $INST/llvm
+    else
+      ERROR "LLVM-$LLVM_VERSION failed to compile, exiting"
+      exit 1
+    fi
+
+    magic_compile_set llvm-$LLVM_VERSION $llvm_magic
+
+    # Rebuild dependecies as well!
+    OSL_FORCE_REBUILD=true
+
+    cd $CWD
+    INFO "Done compiling LLVM-$LLVM_VERSION (CLANG included)!"
+  else
+    INFO "Own LLVM-$LLVM_VERSION (CLANG included) is up to date, nothing to do!"
+    INFO "If you want to force rebuild of this lib, use the --force-llvm option."
+  fi
+}
+
+compile_OSL() {
+  # To be changed each time we make edits that would modify the compiled result!
+  osl_magic=7
+
+  _src=$SRC/OpenShadingLanguage-$OSL_VERSION
+  _inst=$INST/osl-$OSL_VERSION
+
+  # Clean install if needed!
+  magic_compile_check osl-$OSL_VERSION $osl_magic
+  if [ $? -eq 1 -o $OSL_FORCE_REBUILD == true ]; then
+    rm -rf $_inst
+  fi
+
+  if [ ! -d $_inst ]; then
+    INFO "Building OpenShadingLanguage-$OSL_VERSION"
+
+    prepare_opt
+
+    if [ ! -d $_src ]; then
+      mkdir -p $SRC
+
+      # XXX Using git on my own repo for now, looks like archives are not updated immediately... :/
+#      wget -c $OSL_SOURCE -O "$_src.tar.gz"
+
+#      INFO "Unpacking OpenShadingLanguage-$OSL_VERSION"
+#      tar -C $SRC --transform "s,(.*/?)OpenShadingLanguage-[^/]*(.*),\1OpenShadingLanguage-$OSL_VERSION\2,x" \
+#          -xf $_src.tar.gz
+      git clone https://github.com/mont29/OpenShadingLanguage.git $_src
+      cd $_src
+      git checkout blender-fixes
+      cd $CWD
+    fi
+
+    cd $_src
+    # XXX For now, always update from latest repo...
+    git pull origin
+
+    # Always refresh the whole build!
+    if [ -d build ]; then
+      rm -rf build
+    fi    
+    mkdir build
+    cd build
+
+    cmake_d="-D CMAKE_BUILD_TYPE=Release"
+    cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
+    cmake_d="$cmake_d -D BUILDSTATIC=ON"
+    cmake_d="$cmake_d -D BUILD_TESTING=OFF"
+
+    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
+      cmake_d="$cmake_d -D OPENIMAGEIOHOME=$INST/oiio"
+    fi
+
+    if [ ! -z $LLVM_VERSION_FOUND ]; then
+      cmake_d="$cmake_d -D LLVM_VERSION=$LLVM_VERSION_FOUND"
+      if [ -d $INST/llvm ]; then
+        cmake_d="$cmake_d -D LLVM_DIRECTORY=$INST/llvm"
+        cmake_d="$cmake_d -D LLVM_STATIC=ON"
+      fi
+    fi
+
+    cmake $cmake_d ../src
+
+    make -j$THREADS && make install
+    make clean
+
+    if [ -d $_inst ]; then
+      rm -f $INST/osl
+      ln -s osl-$OSL_VERSION $INST/osl
+    else
+      ERROR "OpenShadingLanguage-$OSL_VERSION failed to compile, exiting"
+      exit 1
+    fi
+
+    magic_compile_set osl-$OSL_VERSION $osl_magic
+
+    cd $CWD
+    INFO "Done compiling OpenShadingLanguage-$OSL_VERSION!"
+  else
+    INFO "Own OpenShadingLanguage-$OSL_VERSION is up to date, nothing to do!"
+    INFO "If you want to force rebuild of this lib, use the --force-osl option."
+  fi
+}
+
+compile_FFmpeg() {
+  # To be changed each time we make edits that would modify the compiled result!
+  ffmpeg_magic=3
+
+  _src=$SRC/ffmpeg-$FFMPEG_VERSION
+  _inst=$INST/ffmpeg-$FFMPEG_VERSION
+
+  # Clean install if needed!
+  magic_compile_check ffmpeg-$FFMPEG_VERSION $ffmpeg_magic
+  if [ $? -eq 1 -o $FFMPEG_FORCE_REBUILD == true ]; then
+    rm -rf $_inst
+  fi
+
+  if [ ! -d $_inst ]; then
+    INFO "Building ffmpeg-$FFMPEG_VERSION"
+
+    prepare_opt
+
+    if [ ! -d $_src ]; then
+      INFO "Downloading ffmpeg-$FFMPEG_VERSION"
+      mkdir -p $SRC
+      wget -c $FFMPEG_SOURCE -O "$_src.tar.bz2"
+
+      INFO "Unpacking ffmpeg-$FFMPEG_VERSION"
+      tar -C $SRC -xf $_src.tar.bz2
+    fi
+
+    cd $_src
+
+    extra=""
+
+    if $VORBIS_USE; then
+      extra="$extra --enable-libvorbis"
+    fi
+
+    if $THEORA_USE; then
+      extra="$extra --enable-libtheora"
+    fi
+
+    # XXX At least under Debian, static schro gives problem at blender linking time... :/
+    if $SCHRO_USE && ! $ALL_STATIC; then
+      extra="$extra --enable-libschroedinger"
+    fi
+
+    if $XVID_USE; then
+      extra="$extra --enable-libxvid"
+    fi
+
+    if $X264_USE; then
+      extra="$extra --enable-libx264"
+    fi
+
+    if $VPX_USE; then
+      extra="$extra --enable-libvpx"
+    fi
+
+    if $MP3LAME_USE; then
+      extra="$extra --enable-libmp3lame"
+    fi
+
+    if $OPENJPEG_USE; then
+      extra="$extra --enable-libopenjpeg"
+    fi
+
+    ./configure --cc="gcc -Wl,--as-needed" \
+        --extra-ldflags="-pthread -static-libgcc" \
+        --prefix=$_inst --enable-static \
+        --disable-ffplay --disable-ffserver --disable-doc \
+        --enable-gray \
+        --enable-avfilter --disable-vdpau \
+        --disable-bzlib --disable-libgsm --disable-libspeex \
+        --enable-pthreads --enable-zlib --enable-stripping --enable-runtime-cpudetect \
+        --disable-vaapi  --disable-libfaac --disable-nonfree --enable-gpl \
+        --disable-postproc --disable-x11grab  --disable-librtmp  --disable-libopencore-amrnb \
+        --disable-libopencore-amrwb --disable-libdc1394 --disable-version3  --disable-outdev=sdl \
+        --disable-outdev=alsa --disable-indev=sdl --disable-indev=alsa --disable-indev=jack \
+        --disable-indev=lavfi $extra
+
+    make -j$THREADS && make install
+    make clean
+
+    if [ -d $_inst ]; then
+      rm -f $INST/ffmpeg
+      ln -s ffmpeg-$FFMPEG_VERSION $INST/ffmpeg
+    else
+      ERROR "FFmpeg-$FFMPEG_VERSION failed to compile, exiting"
+      exit 1
+    fi
+
+    magic_compile_set ffmpeg-$FFMPEG_VERSION $ffmpeg_magic
+
+    cd $CWD
+    INFO "Done compiling ffmpeg-$FFMPEG_VERSION!"
+  else
+    INFO "Own ffmpeg-$FFMPEG_VERSION is up to date, nothing to do!"
+    INFO "If you want to force rebuild of this lib, use the --force-ffmpeg option."
+  fi
+}
+
+get_package_version_DEB() {
+    dpkg-query -W -f '${Version}' $1 | sed -r 's/.*:\s*([0-9]+:)(([0-9]+\.?)+).*/\2/'
+}
+
+check_package_DEB() {
+  r=`apt-cache policy $1 | grep -c 'Candidate:'`
+
+  if [ $r -ge 1 ]; then
+    return 0
+  else
+    return 1
+  fi
+}
+
+check_package_version_match_DEB() {
+  v=`apt-cache policy $1 | grep 'Candidate:' | sed -r 's/.*:\s*([0-9]+:)(([0-9]+\.?)+).*/\2/'`
+
+  if [ -z "$v" ]; then
+    return 1
+  fi
+
+  version_match $v $2
+  return $?
+}
+
+check_package_version_ge_DEB() {
+  v=`apt-cache policy $1 | grep 'Candidate:' | sed -r 's/.*:\s*([0-9]+:)?(([0-9]+\.?)+).*/\2/'`
+
+  if [ -z "$v" ]; then
+    return 1
+  fi
+
+  version_ge $v $2
+  return $?
+}
+
+install_packages_DEB() {
+  sudo apt-get install -y $@
+  if [ $? -ge 1 ]; then
+    ERROR "apt-get failed to install requested packages, exiting."
+    exit 1
+  fi
+}
+
+install_DEB() {
+  INFO ""
+  INFO "Installing dependencies for DEB-based distribution"
+  INFO ""
+  INFO "`eval _echo "$COMMON_INFO"`"
+  INFO ""
+
+  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"
+
+      read
+      INFO ""
+    fi
+  fi
+
+  sudo apt-get update
+# XXX Why in hell? Let's let this stuff to the user's responsability!!!
<