diff options
Diffstat (limited to 'build_files')
31 files changed, 232 insertions, 501 deletions
diff --git a/build_files/buildbot/config/user-config-i686.py b/build_files/buildbot/config/user-config-i686.py index 5fe3d6891fd..f2197a05501 100644 --- a/build_files/buildbot/config/user-config-i686.py +++ b/build_files/buildbot/config/user-config-i686.py @@ -5,7 +5,7 @@ BF_NUMJOBS = 2 # Python configuration BF_PYTHON_VERSION = '3.2' BF_PYTHON_ABI_FLAGS = 'mu' -BF_PYTHON = '/opt/python3.2' +BF_PYTHON = '/opt/python3' WITH_BF_STATICPYTHON = True @@ -58,8 +58,6 @@ WITH_BF_PNG = True BF_PNG_LIB = 'libpng' BF_PNG_LIBPATH = '/home/sources/staticlibs/lib32' -WITH_BF_STATICLIBSAMPLERATE = True - WITH_BF_ZLIB = True WITH_BF_STATICZLIB = True BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a' @@ -91,6 +89,9 @@ BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib32' WITH_BF_FFTW3 = True WITH_BF_STATICFFTW3 = True +# JACK +WITH_BF_JACK = True + # Compilation and optimization BF_DEBUG = False REL_CFLAGS = ['-O2'] diff --git a/build_files/buildbot/config/user-config-player-i686.py b/build_files/buildbot/config/user-config-player-i686.py index 54e66e847df..99671ecc072 100644 --- a/build_files/buildbot/config/user-config-player-i686.py +++ b/build_files/buildbot/config/user-config-player-i686.py @@ -5,7 +5,7 @@ BF_NUMJOBS = 2 # Python configuration BF_PYTHON_VERSION = '3.2' BF_PYTHON_ABI_FLAGS = 'mu' -BF_PYTHON = '/opt/python3.2' +BF_PYTHON = '/opt/python3' WITH_BF_STATICPYTHON = True @@ -52,8 +52,6 @@ WITH_BF_PNG = True BF_PNG_LIB = 'libpng' BF_PNG_LIBPATH = '/home/sources/staticlibs/lib32' -WITH_BF_STATICLIBSAMPLERATE = True - WITH_BF_ZLIB = True WITH_BF_STATICZLIB = True BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a' @@ -82,6 +80,9 @@ WITH_BF_STATIC3DMOUSE = True BF_3DMOUSE = '/home/sources/staticlibs/spnav' BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib32' +# JACK +WITH_BF_JACK = True + # Compilation and optimization BF_DEBUG = False REL_CFLAGS = ['-O2'] diff --git a/build_files/buildbot/config/user-config-player-x86_64.py b/build_files/buildbot/config/user-config-player-x86_64.py index 5d594229d3e..a1ca38880eb 100644 --- a/build_files/buildbot/config/user-config-player-x86_64.py +++ b/build_files/buildbot/config/user-config-player-x86_64.py @@ -5,7 +5,7 @@ BF_NUMJOBS = 2 # Python configuration BF_PYTHON_VERSION = '3.2' BF_PYTHON_ABI_FLAGS = 'mu' -BF_PYTHON = '/opt/python3.2' +BF_PYTHON = '/opt/python3' WITH_BF_STATICPYTHON = True @@ -52,8 +52,6 @@ WITH_BF_PNG = True BF_PNG_LIB = 'libpng' BF_PNG_LIBPATH = '/home/sources/staticlibs/lib64' -WITH_BF_STATICLIBSAMPLERATE = True - WITH_BF_ZLIB = True WITH_BF_STATICZLIB = True BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a' @@ -82,6 +80,9 @@ WITH_BF_STATIC3DMOUSE = True BF_3DMOUSE = '/home/sources/staticlibs/spnav' BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib64' +# JACK +WITH_BF_JACK = True + # Compilation and optimization BF_DEBUG = False REL_CFLAGS = ['-O2'] diff --git a/build_files/buildbot/config/user-config-x86_64.py b/build_files/buildbot/config/user-config-x86_64.py index b8b2d7f7a5f..93fe3ca2e5b 100644 --- a/build_files/buildbot/config/user-config-x86_64.py +++ b/build_files/buildbot/config/user-config-x86_64.py @@ -5,7 +5,7 @@ BF_NUMJOBS = 2 # Python configuration BF_PYTHON_VERSION = '3.2' BF_PYTHON_ABI_FLAGS = 'mu' -BF_PYTHON = '/opt/python3.2' +BF_PYTHON = '/opt/python3' WITH_BF_STATICPYTHON = True @@ -58,8 +58,6 @@ WITH_BF_PNG = True BF_PNG_LIB = 'libpng' BF_PNG_LIBPATH = '/home/sources/staticlibs/lib64' -WITH_BF_STATICLIBSAMPLERATE = True - WITH_BF_ZLIB = True WITH_BF_STATICZLIB = True BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a' @@ -91,6 +89,9 @@ BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib64' WITH_BF_FFTW3 = True WITH_BF_STATICFFTW3 = True +# JACK +WITH_BF_JACK = True + # Compilation and optimization BF_DEBUG = False REL_CFLAGS = ['-O2'] diff --git a/build_files/buildbot/master_unpack.py b/build_files/buildbot/master_unpack.py index ad7c09933c6..3df22ad8745 100644 --- a/build_files/buildbot/master_unpack.py +++ b/build_files/buildbot/master_unpack.py @@ -48,11 +48,11 @@ def get_platform(filename): tokens = filename.split("-") platforms = ('osx', 'mac', 'bsd', 'win', 'linux', 'source', - 'irix', 'solaris') + 'solaris') platform_tokens = [] found = False - for i, token in enumerate(tokens): + for token in tokens: if not found: for platform in platforms: if platform in token.lower(): diff --git a/build_files/cmake/Modules/FindPythonLibsUnix.cmake b/build_files/cmake/Modules/FindPythonLibsUnix.cmake index 882f1e2ea77..fd5d20920da 100644 --- a/build_files/cmake/Modules/FindPythonLibsUnix.cmake +++ b/build_files/cmake/Modules/FindPythonLibsUnix.cmake @@ -34,67 +34,71 @@ IF(NOT PYTHON_ROOT_DIR AND NOT $ENV{PYTHON_ROOT_DIR} STREQUAL "") SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR}) ENDIF() -IF(DEFINED PYTHON_VERSION) - SET(PYTHON_VERSION "${PYTHON_VERSION}" CACHE STRING "") -ELSE() - SET(PYTHON_VERSION 3.2 CACHE STRING "") -ENDIF() +SET(PYTHON_VERSION 3.2 CACHE STRING "Python Version (major and minor only)") MARK_AS_ADVANCED(PYTHON_VERSION) -SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic") + +# See: http://docs.python.org/extending/embedding.html#linking-requirements +# for why this is needed +SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic" CACHE STRING "Linker flags for python") MARK_AS_ADVANCED(PYTHON_LINKFLAGS) -SET(_python_ABI_FLAGS - "m;mu;u; " # release - "md;mud;ud;d" # debug -) - -STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION}) - -SET(_python_SEARCH_DIRS - ${PYTHON_ROOT_DIR} - "$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}" - "/opt/py${_PYTHON_VERSION_NO_DOTS}" -) - -FOREACH(_CURRENT_ABI_FLAGS ${_python_ABI_FLAGS}) - #IF(CMAKE_BUILD_TYPE STREQUAL Debug) - # SET(_CURRENT_ABI_FLAGS "d${_CURRENT_ABI_FLAGS}") - #ENDIF() - STRING(REPLACE " " "" _CURRENT_ABI_FLAGS ${_CURRENT_ABI_FLAGS}) - - FIND_PATH(PYTHON_INCLUDE_DIR - NAMES - Python.h - HINTS - ${_python_SEARCH_DIRS} - PATH_SUFFIXES - include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS} - ) - FIND_LIBRARY(PYTHON_LIBRARY - NAMES - "python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}" - HINTS - ${_python_SEARCH_DIRS} - PATH_SUFFIXES - lib64 lib +# only search for the dirs if we havn't already +IF((NOT DEFINED PYTHON_INCLUDE_DIR) OR (NOT DEFINED PYTHON_LIBRARY)) + + SET(_python_ABI_FLAGS + "m;mu;u; " # release + "md;mud;ud;d" # debug ) - IF(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR) - break() - ELSE() - # ensure we dont find values from 2 different ABI versions - UNSET(PYTHON_INCLUDE_DIR CACHE) - UNSET(PYTHON_LIBRARY CACHE) - ENDIF() -ENDFOREACH() + STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION}) -UNSET(_CURRENT_ABI_FLAGS) -UNSET(_CURRENT_PATH) + SET(_python_SEARCH_DIRS + ${PYTHON_ROOT_DIR} + "$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}" + "/opt/py${_PYTHON_VERSION_NO_DOTS}" + ) -UNSET(_python_ABI_FLAGS) -UNSET(_python_SEARCH_DIRS) + FOREACH(_CURRENT_ABI_FLAGS ${_python_ABI_FLAGS}) + #IF(CMAKE_BUILD_TYPE STREQUAL Debug) + # SET(_CURRENT_ABI_FLAGS "d${_CURRENT_ABI_FLAGS}") + #ENDIF() + STRING(REPLACE " " "" _CURRENT_ABI_FLAGS ${_CURRENT_ABI_FLAGS}) + + FIND_PATH(PYTHON_INCLUDE_DIR + NAMES + Python.h + HINTS + ${_python_SEARCH_DIRS} + PATH_SUFFIXES + include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS} + ) + + FIND_LIBRARY(PYTHON_LIBRARY + NAMES + "python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}" + HINTS + ${_python_SEARCH_DIRS} + PATH_SUFFIXES + lib64 lib + ) + + IF(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR) + break() + ELSE() + # ensure we dont find values from 2 different ABI versions + UNSET(PYTHON_INCLUDE_DIR CACHE) + UNSET(PYTHON_LIBRARY CACHE) + ENDIF() + ENDFOREACH() + + UNSET(_CURRENT_ABI_FLAGS) + UNSET(_CURRENT_PATH) + + UNSET(_python_ABI_FLAGS) + UNSET(_python_SEARCH_DIRS) +ENDIF() # handle the QUIETLY and REQUIRED arguments and SET PYTHONLIBSUNIX_FOUND to TRUE IF # all listed variables are TRUE diff --git a/build_files/cmake/Modules/FindSamplerate.cmake b/build_files/cmake/Modules/FindSamplerate.cmake deleted file mode 100644 index ea7a0d7a18c..00000000000 --- a/build_files/cmake/Modules/FindSamplerate.cmake +++ /dev/null @@ -1,70 +0,0 @@ -# - Find Samplerate library -# Find the native Samplerate includes and library -# This module defines -# SAMPLERATE_INCLUDE_DIRS, where to find samplerate.h, Set when -# SAMPLERATE_INCLUDE_DIR is found. -# SAMPLERATE_LIBRARIES, libraries to link against to use Samplerate. -# SAMPLERATE_ROOT_DIR, The base directory to search for Samplerate. -# This can also be an environment variable. -# SAMPLERATE_FOUND, If false, do not try to use Samplerate. -# -# also defined, but not for general use are -# SAMPLERATE_LIBRARY, where to find the Samplerate library. - -#============================================================================= -# Copyright 2011 Blender Foundation. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= - -# If SAMPLERATE_ROOT_DIR was defined in the environment, use it. -IF(NOT SAMPLERATE_ROOT_DIR AND NOT $ENV{SAMPLERATE_ROOT_DIR} STREQUAL "") - SET(SAMPLERATE_ROOT_DIR $ENV{SAMPLERATE_ROOT_DIR}) -ENDIF() - -SET(_samplerate_SEARCH_DIRS - ${SAMPLERATE_ROOT_DIR} - /usr/local - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave -) - -FIND_PATH(SAMPLERATE_INCLUDE_DIR - NAMES - samplerate.h - HINTS - ${_samplerate_SEARCH_DIRS} - PATH_SUFFIXES - include -) - -FIND_LIBRARY(SAMPLERATE_LIBRARY - NAMES - samplerate - HINTS - ${_samplerate_SEARCH_DIRS} - PATH_SUFFIXES - lib64 lib - ) - -# handle the QUIETLY and REQUIRED arguments and set SAMPLERATE_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Samplerate DEFAULT_MSG - SAMPLERATE_LIBRARY SAMPLERATE_INCLUDE_DIR) - -IF(SAMPLERATE_FOUND) - SET(SAMPLERATE_LIBRARIES ${SAMPLERATE_LIBRARY}) - SET(SAMPLERATE_INCLUDE_DIRS ${SAMPLERATE_INCLUDE_DIR}) -ENDIF(SAMPLERATE_FOUND) - -MARK_AS_ADVANCED( - SAMPLERATE_INCLUDE_DIR - SAMPLERATE_LIBRARY -) diff --git a/build_files/cmake/cmake_static_check_cppcheck.py b/build_files/cmake/cmake_static_check_cppcheck.py index f6d46904794..1c8d619a513 100644 --- a/build_files/cmake/cmake_static_check_cppcheck.py +++ b/build_files/cmake/cmake_static_check_cppcheck.py @@ -37,12 +37,13 @@ CHECKER_BIN = "cppcheck" CHECKER_ARGS = [ # not sure why this is needed, but it is. - "-I" + os.path.join(project_source_info.SOURCE_DIR, "extern/glew/include"), + "-I" + os.path.join(project_source_info.SOURCE_DIR, "extern", "glew", "include"), # "--check-config", # when includes are missing # "--enable=all", # if you want sixty hundred pedantic suggestions ] + def main(): source_info = project_source_info.build_info(ignore_prefix_list=CHECKER_IGNORE_PREFIX) @@ -57,19 +58,21 @@ def main(): check_commands.append((c, cmd)) - for i, (c, cmd) in enumerate(check_commands): - percent = 100.0 * (i / (len(check_commands)-1)) + process_functions = [] + + def my_process(i, c, cmd): + percent = 100.0 * (i / (len(check_commands) - 1)) percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:" - - # if percent < 27.9: - # continue - - # let cppcheck finish the line off... - sys.stdout.write("%s " % percent_str) sys.stdout.flush() - process = subprocess.Popen(cmd) - process.wait() + sys.stdout.write("%s " % percent_str) + + return subprocess.Popen(cmd) + + for i, (c, cmd) in enumerate(check_commands): + process_functions.append((my_process, (i, c, cmd))) + + project_source_info.queue_processes(process_functions) if __name__ == "__main__": diff --git a/build_files/cmake/cmake_static_check_sparse.py b/build_files/cmake/cmake_static_check_sparse.py index 9af53ed8008..aa2d56e5509 100644 --- a/build_files/cmake/cmake_static_check_sparse.py +++ b/build_files/cmake/cmake_static_check_sparse.py @@ -52,15 +52,21 @@ def main(): check_commands.append((c, cmd)) - for i, (c, cmd) in enumerate(check_commands): + def my_process(i, c, cmd): percent = 100.0 * (i / (len(check_commands) - 1)) percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:" - sys.stdout.write("%s %s\n" % (percent_str, c)) sys.stdout.flush() + sys.stdout.write("%s %s\n" % (percent_str, c)) + + return subprocess.Popen(cmd) + + process_functions = [] + for i, (c, cmd) in enumerate(check_commands): + process_functions.append((my_process, (i, c, cmd))) + + project_source_info.queue_processes(process_functions) - process = subprocess.Popen(cmd) - process.wait() if __name__ == "__main__": main() diff --git a/build_files/cmake/cmake_static_check_splint.py b/build_files/cmake/cmake_static_check_splint.py index 3614ab48cf8..08d83337426 100644 --- a/build_files/cmake/cmake_static_check_splint.py +++ b/build_files/cmake/cmake_static_check_splint.py @@ -58,9 +58,9 @@ CHECKER_ARGS = [ # re-definitions, rna causes most of these "-redef", "-syntax", - + # dummy, witjout this splint complains with: - # /usr/include/bits/confname.h:31:27: *** Internal Bug at cscannerHelp.c:2428: Unexpanded macro not function or constant: int _PC_MAX_CANON + # /usr/include/bits/confname.h:31:27: *** Internal Bug at cscannerHelp.c:2428: Unexpanded macro not function or constant: int _PC_MAX_CANON "-D_PC_MAX_CANON=0", ] @@ -84,15 +84,21 @@ def main(): check_commands.append((c, cmd)) - for i, (c, cmd) in enumerate(check_commands): + def my_process(i, c, cmd): percent = 100.0 * (i / (len(check_commands) - 1)) percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:" sys.stdout.write("%s %s\n" % (percent_str, c)) sys.stdout.flush() - process = subprocess.Popen(cmd) - process.wait() + return subprocess.Popen(cmd) + + process_functions = [] + for i, (c, cmd) in enumerate(check_commands): + process_functions.append((my_process, (i, c, cmd))) + + project_source_info.queue_processes(process_functions) + if __name__ == "__main__": main() diff --git a/build_files/cmake/config/blender_headless.cmake b/build_files/cmake/config/blender_headless.cmake index bd69eed30dd..c4d64125744 100644 --- a/build_files/cmake/config/blender_headless.cmake +++ b/build_files/cmake/config/blender_headless.cmake @@ -11,7 +11,6 @@ set(WITH_GAMEENGINE OFF CACHE FORCE BOOL) # disable audio, its possible some devs may want this but for now disable # so the python module doesnt hold the audio device and loads quickly. set(WITH_AUDASPACE OFF CACHE FORCE BOOL) -set(WITH_SAMPLERATE OFF CACHE FORCE BOOL) set(WITH_FFTW3 OFF CACHE FORCE BOOL) set(WITH_JACK OFF CACHE FORCE BOOL) set(WITH_SDL OFF CACHE FORCE BOOL) diff --git a/build_files/cmake/config/blender_lite.cmake b/build_files/cmake/config/blender_lite.cmake index f09a8058f14..6791028a888 100644 --- a/build_files/cmake/config/blender_lite.cmake +++ b/build_files/cmake/config/blender_lite.cmake @@ -38,6 +38,5 @@ set(WITH_OPENCOLLADA OFF CACHE FORCE BOOL) set(WITH_OPENMP OFF CACHE FORCE BOOL) set(WITH_PYTHON_INSTALL OFF CACHE FORCE BOOL) set(WITH_RAYOPTIMIZATION OFF CACHE FORCE BOOL) -set(WITH_SAMPLERATE OFF CACHE FORCE BOOL) set(WITH_SDL OFF CACHE FORCE BOOL) set(WITH_X11_XINPUT OFF CACHE FORCE BOOL) diff --git a/build_files/cmake/config/bpy_module.cmake b/build_files/cmake/config/bpy_module.cmake index 5392705f0dc..6279f06214f 100644 --- a/build_files/cmake/config/bpy_module.cmake +++ b/build_files/cmake/config/bpy_module.cmake @@ -18,7 +18,6 @@ set(WITH_GAMEENGINE OFF CACHE FORCE BOOL) # disable audio, its possible some devs may want this but for now disable # so the python module doesnt hold the audio device and loads quickly. set(WITH_AUDASPACE OFF CACHE FORCE BOOL) -set(WITH_SAMPLERATE OFF CACHE FORCE BOOL) set(WITH_FFTW3 OFF CACHE FORCE BOOL) set(WITH_JACK OFF CACHE FORCE BOOL) set(WITH_SDL OFF CACHE FORCE BOOL) diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 9671bffe2bd..db6c080d98d 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -187,9 +187,6 @@ macro(SETUP_LIBDIRS) if(WITH_CODEC_SNDFILE) link_directories(${SNDFILE_LIBPATH}) endif() - if(WITH_SAMPLERATE) - link_directories(${SAMPLERATE_LIBPATH}) - endif() if(WITH_FFTW3) link_directories(${FFTW3_LIBPATH}) endif() @@ -219,6 +216,7 @@ macro(setup_liblinks ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} + ${FREETYPE_LIBRARY} ${PLATFORM_LINKLIBS}) # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions @@ -239,15 +237,8 @@ macro(setup_liblinks target_link_libraries(${target} ${GLEW_LIBRARY}) endif() - target_link_libraries(${target} - ${OPENGL_glu_LIBRARY} - ${JPEG_LIBRARIES} - ${PNG_LIBRARIES} - ${ZLIB_LIBRARIES} - ${FREETYPE_LIBRARY}) - if(WITH_INTERNATIONAL) - target_link_libraries(${target} ${GETTEXT_LIB}) + target_link_libraries(${target} ${GETTEXT_LIBRARIES}) if(WIN32 AND NOT UNIX) target_link_libraries(${target} ${ICONV_LIBRARIES}) @@ -266,9 +257,6 @@ macro(setup_liblinks if(WITH_CODEC_SNDFILE) target_link_libraries(${target} ${SNDFILE_LIBRARIES}) endif() - if(WITH_SAMPLERATE) - target_link_libraries(${target} ${SAMPLERATE_LIBRARIES}) - endif() if(WITH_SDL) target_link_libraries(${target} ${SDL_LIBRARY}) endif() @@ -298,6 +286,11 @@ macro(setup_liblinks target_link_libraries(${target} ${OPENJPEG_LIBRARIES}) endif() if(WITH_CODEC_FFMPEG) + + # Strange!, without this ffmpeg gives linking errors (on linux) + # even though its linked above + target_link_libraries(${target} ${OPENGL_glu_LIBRARY}) + target_link_libraries(${target} ${FFMPEG_LIBRARIES}) endif() if(WITH_OPENCOLLADA) @@ -338,44 +331,59 @@ macro(setup_liblinks endif() endmacro() -macro(TEST_SSE_SUPPORT) +macro(TEST_SSE_SUPPORT + _sse_flags + _sse2_flags) + include(CheckCSourceRuns) # message(STATUS "Detecting SSE support") - if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) - set(CMAKE_REQUIRED_FLAGS "-msse -msse2") + if(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang")) + set(${_sse_flags} "-msse") + set(${_sse2_flags} "-msse2") elseif(MSVC) - set(CMAKE_REQUIRED_FLAGS "/arch:SSE2") # TODO, SSE 1 ? + set(${_sse_flags} "/arch:SSE") + set(${_sse2_flags} "/arch:SSE2") + elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") + set(${_sse_flags} "") # icc defaults to -msse + set(${_sse2_flags} "-msse2") + else() + message(WARNING "SSE flags for this compiler: '${CMAKE_C_COMPILER_ID}' not known") + set(${_sse_flags}) + set(${_sse2_flags}) endif() - if(NOT DEFINED ${SUPPORT_SSE_BUILD}) + set(CMAKE_REQUIRED_FLAGS "${${_sse_flags}} ${${_sse2_flags}}") + + if(NOT DEFINED SUPPORT_SSE_BUILD) + # result cached check_c_source_runs(" #include <xmmintrin.h> - int main() { __m128 v = _mm_setzero_ps(); return 0; }" + int main(void) { __m128 v = _mm_setzero_ps(); return 0; }" SUPPORT_SSE_BUILD) - + if(SUPPORT_SSE_BUILD) message(STATUS "SSE Support: detected.") else() message(STATUS "SSE Support: missing.") endif() - set(${SUPPORT_SSE_BUILD} ${SUPPORT_SSE_BUILD} CACHE INTERNAL "SSE Test") - endif() + endif() - if(NOT DEFINED ${SUPPORT_SSE2_BUILD}) + if(NOT DEFINED SUPPORT_SSE2_BUILD) + # result cached check_c_source_runs(" #include <emmintrin.h> - int main() { __m128d v = _mm_setzero_pd(); return 0; }" + int main(void) { __m128d v = _mm_setzero_pd(); return 0; }" SUPPORT_SSE2_BUILD) if(SUPPORT_SSE2_BUILD) message(STATUS "SSE2 Support: detected.") else() message(STATUS "SSE2 Support: missing.") - endif() - set(${SUPPORT_SSE2_BUILD} ${SUPPORT_SSE2_BUILD} CACHE INTERNAL "SSE2 Test") + endif() endif() + unset(CMAKE_REQUIRED_FLAGS) endmacro() # when we have warnings as errors applied globally this @@ -494,7 +502,7 @@ macro(get_blender_version) if(${_out_version_char_empty}) set(BLENDER_VERSION_CHAR_INDEX "0") else() - set(_char_ls a b c d e f g h i j k l m n o p q r s t u v w q y z) + set(_char_ls a b c d e f g h i j k l m n o p q r s t u v w x y z) list(FIND _char_ls ${BLENDER_VERSION_CHAR} _out_version_char_index) math(EXPR BLENDER_VERSION_CHAR_INDEX "${_out_version_char_index} + 1") unset(_char_ls) @@ -511,7 +519,7 @@ endmacro() # hacks to override initial project settings -# these macros must be called directly before/after project(Blender) +# these macros must be called directly before/after project(Blender) macro(blender_project_hack_pre) # ---------------- # MINGW HACK START @@ -553,8 +561,10 @@ macro(blender_project_hack_post) # have libs we define and that cmake & scons builds match. set(CMAKE_C_STANDARD_LIBRARIES "" CACHE STRING "" FORCE) set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "" FORCE) - mark_as_advanced(CMAKE_C_STANDARD_LIBRARIES) - mark_as_advanced(CMAKE_CXX_STANDARD_LIBRARIES) + mark_as_advanced( + CMAKE_C_STANDARD_LIBRARIES + CMAKE_CXX_STANDARD_LIBRARIES + ) endif() unset(_reset_standard_libraries) diff --git a/build_files/cmake/project_source_info.py b/build_files/cmake/project_source_info.py index c4b83d20ea5..c636d778aaa 100644 --- a/build_files/cmake/project_source_info.py +++ b/build_files/cmake/project_source_info.py @@ -27,7 +27,6 @@ __all__ = ( ) import os -import sys from os.path import join, dirname, normpath, abspath SOURCE_DIR = join(dirname(__file__), "..", "..") @@ -40,11 +39,6 @@ def is_c_header(filename): return (ext in (".h", ".hpp", ".hxx")) -def is_c_header(filename): - ext = os.path.splitext(filename)[1] - return (ext in (".h", ".hpp", ".hxx")) - - def is_c(filename): ext = os.path.splitext(filename)[1] return (ext in (".c", ".cpp", ".cxx", ".m", ".mm", ".rc")) @@ -79,6 +73,7 @@ def do_ignore(filepath, ignore_prefix_list): def makefile_log(): import subprocess + import time # Check blender is not 2.5x until it supports playback again print("running make with --dry-run ...") process = subprocess.Popen(["make", "--always-make", "--dry-run", "--keep-going", "VERBOSE=1"], @@ -153,6 +148,45 @@ def build_info(use_c=True, use_cxx=True, ignore_prefix_list=None): return source +# could be moved elsewhere!, this just happens to be used by scripts that also +# use this module. +def queue_processes(process_funcs, job_total=-1): + """ Takes a list of function arg pairs, each function must return a process + """ + import sys + + if job_total == -1: + import multiprocessing + job_total = multiprocessing.cpu_count() + del multiprocessing + + if job_total == 1: + for func, args in process_funcs: + sys.stdout.flush() + sys.stderr.flush() + + process = func(*args) + process.wait() + else: + import time + + processes = [] + for func, args in process_funcs: + # wait until a thread is free + while 1: + processes[:] = [p for p in processes if p.poll() is None] + + if len(processes) <= job_total: + break + else: + time.sleep(0.1) + + sys.stdout.flush() + sys.stderr.flush() + + processes.append(func(*args)) + + def main(): if not os.path.exists(join(CMAKE_DIR, "CMakeCache.txt")): print("This script must run from the cmake build dir") diff --git a/build_files/package_spec/debian/control b/build_files/package_spec/debian/control index be703e05071..addd71760d8 100644 --- a/build_files/package_spec/debian/control +++ b/build_files/package_spec/debian/control @@ -2,7 +2,7 @@ Source: blender Section: graphics Priority: extra Maintainer: Dan Eicher <dan@trollwerks.org> -Build-Depends: debhelper (>= 7.0.50~), cmake, python3, python, libfreetype6-dev, libglu1-mesa-dev, libilmbase-dev, libopenexr-dev, libjpeg62-dev, libopenal-dev, libpng12-dev, libsamplerate0-dev, libsdl-dev, libtiff4-dev, libx11-dev, libxi-dev, zlib1g-dev, python3.2-dev, libopenjpeg-dev +Build-Depends: debhelper (>= 7.0.50~), cmake, python3, python, libfreetype6-dev, libglu1-mesa-dev, libilmbase-dev, libopenexr-dev, libjpeg62-dev, libopenal-dev, libpng12-dev, libsdl-dev, libtiff4-dev, libx11-dev, libxi-dev, zlib1g-dev, python3.2-dev, libopenjpeg-dev Standards-Version: 3.9.1 Homepage: http://blender.org/ X-Python3-Version: >= 3.2, << 3.3 diff --git a/build_files/package_spec/pacman/PKGBUILD b/build_files/package_spec/pacman/PKGBUILD index 0c4164b1242..e59d1cf31d7 100644 --- a/build_files/package_spec/pacman/PKGBUILD +++ b/build_files/package_spec/pacman/PKGBUILD @@ -4,7 +4,7 @@ blender_srcdir=$(dirname $startdir)"/../.." # value may be formatted: 35042:35051M blender_revision=$(svnversion $blender_srcdir | cut -d: -f2 | awk '{print $3}') -blender_version=$(grep BLENDER_VERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}') +blender_version=$(grep "BLENDER_VERSION\s" $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}') blender_version=$(expr $blender_version / 100).$(expr $blender_version % 100) # 256 -> 2.56 blender_version_char=$(sed -ne 's/.*BLENDER_VERSION_CHAR.*\([a-z]\)$/\1/p' $blender_srcdir/source/blender/blenkernel/BKE_blender.h) # blender_subversion=$(grep BLENDER_SUBVERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}') @@ -12,10 +12,12 @@ blender_version_char=$(sed -ne 's/.*BLENDER_VERSION_CHAR.*\([a-z]\)$/\1/p' $blen # map the version a -> 1 # not to be confused with blender's internal subversions if [ "$blender_version_char" ]; then - blender_version=${blender_version}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char) + blender_version_full=${blender_version}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char) +else + blender_version_full=${blender_version} fi -blender_ver_string=$blender_version+svn$blender_revision +blender_ver_string=$blender_version+svn$blender_version_full pkgname=blender-snapshot pkgver=$blender_ver_string @@ -25,7 +27,7 @@ arch=('i686' 'x86_64') url="www.blender.org" license=('GPL') groups=() -depends=('libjpeg' 'libpng' 'openjpeg' 'libtiff' 'openexr' 'python>=3.2' 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl' 'libsndfile' 'libsamplerate' 'ffmpeg') +depends=('libjpeg' 'libpng' 'openjpeg' 'libtiff' 'openexr' 'python>=3.2' 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl' 'libsndfile' 'ffmpeg') makedepends=('cmake' 'svn') optdepends=() provides=() @@ -61,5 +63,8 @@ build() { package() { cd $srcdir/build make DESTDIR="$pkgdir" install - python -m compileall $pkgdir/usr/share/blender + python -m compileall \ + $pkgdir/usr/share/blender/$blender_version/scripts/startup \ + $pkgdir/usr/share/blender/$blender_version/scripts/modules \ + $pkgdir/usr/share/blender/$blender_version/scripts/addons } diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py index 29d2b39323e..0c132041d82 100644 --- a/build_files/scons/config/darwin-config.py +++ b/build_files/scons/config/darwin-config.py @@ -90,9 +90,10 @@ LIBDIR = '${LCGDIR}' ################### Dependency settings ################## ############################################################################# -#Defaults openMP to true if compiler handles it -if CC == 'gcc-4.2' or CC == 'llvm-gcc-4.2': - WITH_BF_OPENMP = True # multithreading for fluids, cloth and smoke +#Defaults openMP to true if compiler handles it ( only gcc 4.6.1 and newer ) +# if your compiler does not have accurate suffix you may have to enable it by hand ! +if CC.endswith('4.6.1'): + WITH_BF_OPENMP = True # multithreading for fluids, cloth, sculpt and smoke else: WITH_BF_OPENMP = False @@ -147,11 +148,6 @@ BF_CXX = '/usr' WITH_BF_STATICCXX = False BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a' -BF_LIBSAMPLERATE = LIBDIR + '/samplerate' -BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' -BF_LIBSAMPLERATE_LIB = 'samplerate' -BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' - # TODO - set proper paths here (add precompiled to lib/ ? ) WITH_BF_JACK = False BF_JACK = '/usr' diff --git a/build_files/scons/config/freebsd7-config.py b/build_files/scons/config/freebsd7-config.py index a73574abf67..fec7531b3c7 100644 --- a/build_files/scons/config/freebsd7-config.py +++ b/build_files/scons/config/freebsd7-config.py @@ -25,11 +25,6 @@ BF_CXX = '/usr/local' WITH_BF_STATICCXX = False BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a' -BF_LIBSAMPLERATE = '/usr/local' -BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' -BF_LIBSAMPLERATE_LIB = 'samplerate' -BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' - WITH_BF_JACK = True BF_JACK = '/usr/local' BF_JACK_INC = '${BF_JACK}/include/jack' diff --git a/build_files/scons/config/freebsd8-config.py b/build_files/scons/config/freebsd8-config.py index dd7ab5f9ab9..eea89bf24ff 100644 --- a/build_files/scons/config/freebsd8-config.py +++ b/build_files/scons/config/freebsd8-config.py @@ -25,11 +25,6 @@ BF_CXX = '/usr/local' WITH_BF_STATICCXX = False BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a' -BF_LIBSAMPLERATE = '/usr/local' -BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' -BF_LIBSAMPLERATE_LIB = 'samplerate' -BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' - WITH_BF_JACK = True BF_JACK = '/usr/local' BF_JACK_INC = '${BF_JACK}/include/jack' diff --git a/build_files/scons/config/freebsd9-config.py b/build_files/scons/config/freebsd9-config.py index 9c53d52ce71..a63da6e35f9 100644 --- a/build_files/scons/config/freebsd9-config.py +++ b/build_files/scons/config/freebsd9-config.py @@ -25,11 +25,6 @@ BF_CXX = '/usr/local' WITH_BF_STATICCXX = False BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a' -BF_LIBSAMPLERATE = '/usr/local' -BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' -BF_LIBSAMPLERATE_LIB = 'samplerate' -BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' - WITH_BF_JACK = True BF_JACK = '/usr/local' BF_JACK_INC = '${BF_JACK}/include/jack' diff --git a/build_files/scons/config/irix6-config.py b/build_files/scons/config/irix6-config.py index 4ca7bcc7b64..e69de29bb2d 100644 --- a/build_files/scons/config/irix6-config.py +++ b/build_files/scons/config/irix6-config.py @@ -1,208 +0,0 @@ -import os - -LCGDIR = os.getcwd()+"/../lib/irix-6.5-mips" -LIBDIR = LCGDIR - -BF_PYTHON = LCGDIR+'/python' -BF_PYTHON_VERSION = '3.2' -WITH_BF_STATICPYTHON = 'true' -BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}' -BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}' -BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a' -BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic'] -BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}/config/libpython${BF_PYTHON_VERSION}.a' - -WITH_BF_OPENAL = 'true' -WITH_BF_STATICOPENAL = 'true' -BF_OPENAL = LCGDIR+'/openal' -BF_OPENAL_INC = '${BF_OPENAL}/include' -BF_OPENAL_LIB = 'openal' -BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a' -BF_OPENAL_LIBPATH = LIBDIR + '/lib' - -BF_CXX = '/usr' -WITH_BF_STATICCXX = 'false' -BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a' - -BF_LIBSAMPLERATE = LCGDIR+'/samplerate' -BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' -BF_LIBSAMPLERATE_LIB = 'samplerate' -BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' - -WITH_BF_SDL = 'true' -BF_SDL = LCGDIR+'/sdl' #$(shell sdl-config --prefix) -BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags) -BF_SDL_LIB = 'SDL audio iconv charset' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer -BF_SDL_LIBPATH = '${BF_SDL}/lib' - -WITH_BF_OPENEXR = 'false' -WITH_BF_STATICOPENEXR = 'false' -BF_OPENEXR = '/usr' -# when compiling with your own openexr lib you might need to set... -# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include' - -BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR' -BF_OPENEXR_LIB = 'Half IlmImf Iex Imath ' -BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a' -# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib' - - -WITH_BF_DDS = 'false' - -WITH_BF_JPEG = 'false' -BF_JPEG = LCGDIR+'/jpeg' -BF_JPEG_INC = '${BF_JPEG}/include' -BF_JPEG_LIB = 'jpeg' -BF_JPEG_LIBPATH = '${BF_JPEG}/lib' - -WITH_BF_PNG = 'false' -BF_PNG = LCGDIR+"/png" -BF_PNG_INC = '${BF_PNG}/include' -BF_PNG_LIB = 'png' -BF_PNG_LIBPATH = '${BF_PNG}/lib' - -BF_TIFF = '/usr/nekoware' -BF_TIFF_INC = '${BF_TIFF}/include' - -WITH_BF_ZLIB = 'true' -BF_ZLIB = LCGDIR+"/zlib" -BF_ZLIB_INC = '${BF_ZLIB}/include' -BF_ZLIB_LIB = 'z' -BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib' - -WITH_BF_INTERNATIONAL = 'true' - -BF_GETTEXT = LCGDIR+'/gettext' -BF_GETTEXT_INC = '${BF_GETTEXT}/include' -BF_GETTEXT_LIB = 'gettextpo intl' -BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib' - -WITH_BF_GAMEENGINE='false' -WITH_BF_PLAYER = 'false' - -WITH_BF_BULLET = 'true' -BF_BULLET = '#extern/bullet2/src' -BF_BULLET_INC = '${BF_BULLET}' -BF_BULLET_LIB = 'extern_bullet' - -#WITH_BF_NSPR = 'true' -#BF_NSPR = $(LIBDIR)/nspr -#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr -#BF_NSPR_LIB = - -# Uncomment the following line to use Mozilla inplace of netscape -#CPPFLAGS += -DMOZ_NOT_NET -# Location of MOZILLA/Netscape header files... -#BF_MOZILLA = $(LIBDIR)/mozilla -#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl -#BF_MOZILLA_LIB = -# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB -# if this is not set. -# -# Be paranoid regarding library creation (do not update archives) -#BF_PARANOID = 'true' - -# enable freetype2 support for text objects -BF_FREETYPE = LCGDIR+'/freetype' -BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2' -BF_FREETYPE_LIB = 'freetype' -BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib' - -WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME -BF_QUICKTIME = '/usr/local' -BF_QUICKTIME_INC = '${BF_QUICKTIME}/include' - -WITH_BF_ICONV = 'true' -BF_ICONV = LIBDIR + "/iconv" -BF_ICONV_INC = '${BF_ICONV}/include' -BF_ICONV_LIB = 'iconv charset' -BF_ICONV_LIBPATH = '${BF_ICONV}/lib' - -WITH_BF_BINRELOC = 'false' - -# enable ffmpeg support -WITH_BF_FFMPEG = 'true' # -DWITH_FFMPEG -# Uncomment the following two lines to use system's ffmpeg -BF_FFMPEG = LCGDIR+'/ffmpeg' -BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice faad faac vorbis x264 ogg mp3lame z' -BF_FFMPEG_INC = '${BF_FFMPEG}/include' -BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib' - -# enable ogg, vorbis and theora in ffmpeg -WITH_BF_OGG = 'false' # -DWITH_OGG -BF_OGG = '/usr' -BF_OGG_INC = '${BF_OGG}/include' -BF_OGG_LIB = 'ogg vorbis theoraenc theoradec' - -WITH_BF_OPENJPEG = 'false' -BF_OPENJPEG = '#extern/libopenjpeg' -BF_OPENJPEG_LIB = '' -BF_OPENJPEG_INC = '${BF_OPENJPEG}' -BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib' - -WITH_BF_REDCODE = 'false' -BF_REDCODE = '#extern/libredcode' -BF_REDCODE_LIB = '' -BF_REDCODE_INC = '${BF_REDCODE}/include' -BF_REDCODE_LIBPATH='${BF_REDCODE}/lib' - -# Mesa Libs should go here if your using them as well.... -WITH_BF_STATICOPENGL = 'false' -BF_OPENGL = '/usr' -BF_OPENGL_INC = '${BF_OPENGL}/include' -BF_OPENGL_LIB = 'GL GLU X11 Xi Xext' -BF_OPENGL_LIBPATH = '/usr/X11R6/lib' -BF_OPENGL_LIB_STATIC = '${BF_OPENGL}/libGL.a ${BF_OPENGL}/libGLU.a ${BF_OPENGL}/libXxf86vm.a ${BF_OPENGL}/libX11.a ${BF_OPENGL}/libXi.a ${BF_OPENGL}/libXext.a ${BF_OPENGL}/libXxf86vm.a' - - -CC = 'c99' -CXX = 'CC' - - -CCFLAGS = ['-pipe','-fPIC', '-n32'] - -CPPFLAGS = [] -CXXFLAGS = ['-pipe','-fPIC', '-n32'] -REL_CFLAGS = ['-DNDEBUG', '-O2'] -REL_CCFLAGS = ['-DNDEBUG', '-O2'] -##BF_DEPEND = 'true' -## -##AR = ar -##ARFLAGS = ruv -##ARFLAGSQUIET = ru -## -C_WARN = ['-no_prelink', '-ptused'] - -CC_WARN = ['-no_prelink', '-ptused'] - -##FIX_STUBS_WARNINGS = -Wno-unused - -LLIBS = 'c m dl pthread dmedia movie' -##LOPTS = --dynamic -##DYNLDFLAGS = -shared $(LDFLAGS) - -BF_PROFILE_FLAGS = ['-pg','-g'] -BF_PROFILE = 'false' - -BF_DEBUG = 'false' -BF_DEBUG_CCFLAGS = ['-g'] - -BF_BUILDDIR = '../build/irix6' -BF_INSTALLDIR='../install/irix6' - -#Link against pthread -LDIRS = [] -LDIRS.append(BF_FREETYPE_LIBPATH) -LDIRS.append(BF_PNG_LIBPATH) -LDIRS.append(BF_ZLIB_LIBPATH) -LDIRS.append(BF_SDL_LIBPATH) -LDIRS.append(BF_OPENAL_LIBPATH) -LDIRS.append(BF_ICONV_LIBPATH) - -PLATFORM_LINKFLAGS = [] -for x in LDIRS: - PLATFORM_LINKFLAGS.append("-L"+x) - -PLATFORM_LINKFLAGS += ['-L${LCGDIR}/jpeg/lib' , '-L/usr/lib32', '-n32', '-v', '-no_prelink'] -print PLATFORM_LINKFLAGS -LINKFLAGS= PLATFORM_LINKFLAGS diff --git a/build_files/scons/config/linux-config.py b/build_files/scons/config/linux-config.py index c6613ec0ac1..a26748cd8dc 100644 --- a/build_files/scons/config/linux-config.py +++ b/build_files/scons/config/linux-config.py @@ -23,13 +23,6 @@ BF_CXX = '/usr' WITH_BF_STATICCXX = False BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a' -BF_LIBSAMPLERATE = '/usr' -WITH_BF_STATICLIBSAMPLERATE = False -BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' -BF_LIBSAMPLERATE_LIB = 'samplerate' -BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' -BF_LIBSAMPLERATE_LIB_STATIC = '${BF_LIBSAMPLERATE}/lib/libsamplerate.a' - WITH_BF_JACK = False BF_JACK = '/usr' BF_JACK_INC = '${BF_JACK}/include/jack' diff --git a/build_files/scons/config/linuxcross-config.py b/build_files/scons/config/linuxcross-config.py index 8057d478c31..070e18a5af0 100644 --- a/build_files/scons/config/linuxcross-config.py +++ b/build_files/scons/config/linuxcross-config.py @@ -23,11 +23,6 @@ BF_CXX = '/usr' WITH_BF_STATICCXX = False BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a' -BF_LIBSAMPLERATE = LIBDIR + '/samplerate' -BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' -BF_LIBSAMPLERATE_LIB = 'samplerate' -BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' - WITH_BF_SDL = True BF_SDL = LIBDIR + '/sdl' BF_SDL_INC = '${BF_SDL}/include' diff --git a/build_files/scons/config/openbsd3-config.py b/build_files/scons/config/openbsd3-config.py index 67d850ff48d..83c515d52f3 100644 --- a/build_files/scons/config/openbsd3-config.py +++ b/build_files/scons/config/openbsd3-config.py @@ -16,11 +16,6 @@ WITH_BF_OPENAL = False #BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib' #BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a' -BF_LIBSAMPLERATE = '/usr/local' -BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' -BF_LIBSAMPLERATE_LIB = 'samplerate' -BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' - WITH_BF_SDL = True BF_SDL = '/usr/local' #$(shell sdl-config --prefix) BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags) diff --git a/build_files/scons/config/sunos5-config.py b/build_files/scons/config/sunos5-config.py index 828e286efee..0cf78c9220f 100644 --- a/build_files/scons/config/sunos5-config.py +++ b/build_files/scons/config/sunos5-config.py @@ -22,11 +22,6 @@ BF_CXX = '/usr' WITH_BF_STATICCXX = False BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a' -BF_LIBSAMPLERATE = '/usr/local' -BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' -BF_LIBSAMPLERATE_LIB = 'samplerate' -BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' - WITH_BF_SDL = True BF_SDL = '/usr/local' #$(shell sdl-config --prefix) BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags) diff --git a/build_files/scons/config/win32-mingw-config.py b/build_files/scons/config/win32-mingw-config.py index 37d693db560..167ed502bf6 100644 --- a/build_files/scons/config/win32-mingw-config.py +++ b/build_files/scons/config/win32-mingw-config.py @@ -23,11 +23,6 @@ BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib' BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include' BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll' -BF_LIBSAMPLERATE = LIBDIR + '/samplerate' -BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' -BF_LIBSAMPLERATE_LIB = 'libsamplerate' -BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' - WITH_BF_JACK = False BF_JACK = LIBDIR + '/jack' BF_JACK_INC = '${BF_JACK}/include' diff --git a/build_files/scons/config/win32-vc-config.py b/build_files/scons/config/win32-vc-config.py index 2950ca9380f..9604eb5d320 100644 --- a/build_files/scons/config/win32-vc-config.py +++ b/build_files/scons/config/win32-vc-config.py @@ -29,11 +29,6 @@ BF_ICONV_INC = '${BF_ICONV}/include' BF_ICONV_LIB = 'iconv' BF_ICONV_LIBPATH = '${BF_ICONV}/lib' -BF_LIBSAMPLERATE = LIBDIR + '/samplerate' -BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' -BF_LIBSAMPLERATE_LIB = 'libsamplerate' -BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' - WITH_BF_JACK = False BF_JACK = LIBDIR + '/jack' BF_JACK_INC = '${BF_JACK}/include ${BF_FFMPEG}/include/msvc' @@ -152,6 +147,8 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib' WITH_BF_3DMOUSE = True +WITH_BF_OPENMP = True + #Ray trace optimization WITH_BF_RAYOPTIMIZATION = True BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE'] diff --git a/build_files/scons/config/win64-vc-config.py b/build_files/scons/config/win64-vc-config.py index 280ba3dd3f1..049b7eb5d40 100644 --- a/build_files/scons/config/win64-vc-config.py +++ b/build_files/scons/config/win64-vc-config.py @@ -17,7 +17,7 @@ BF_PYTHON_LIB = 'python32' BF_PYTHON_DLL = '${BF_PYTHON_LIB}' BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib' -WITH_BF_OPENAL = False +WITH_BF_OPENAL = True BF_OPENAL = LIBDIR + '/openal' BF_OPENAL_INC = '${BF_OPENAL}/include ' BF_OPENAL_LIB = 'wrap_oal' @@ -40,11 +40,6 @@ BF_ICONV_INC = '${BF_ICONV}/include' BF_ICONV_LIB = 'iconv' BF_ICONV_LIBPATH = '${BF_ICONV}/lib' -BF_LIBSAMPLERATE = LIBDIR + '/samplerate' -BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include' -BF_LIBSAMPLERATE_LIB = 'libsamplerate' -BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib' - WITH_BF_SDL = True BF_SDL = LIBDIR + '/sdl' BF_SDL_INC = '${BF_SDL}/include' @@ -156,6 +151,8 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib' WITH_BF_3DMOUSE = True +WITH_BF_OPENMP = True + #Ray trace optimization WITH_BF_RAYOPTIMIZATION = True BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE','/arch:SSE2'] diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index 54fa6077bf7..b9632bfffa7 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -131,7 +131,6 @@ def setup_staticlibs(lenv): lenv['BF_JPEG_LIBPATH'], lenv['BF_ZLIB_LIBPATH'], lenv['BF_PNG_LIBPATH'], - lenv['BF_LIBSAMPLERATE_LIBPATH'], lenv['BF_ICONV_LIBPATH'] ]) @@ -194,9 +193,6 @@ def setup_staticlibs(lenv): if lenv['OURPLATFORM'] == 'linuxcross': libincs += Split(lenv['BF_OPENMP_LIBPATH']) - if lenv['WITH_BF_STATICLIBSAMPLERATE']: - statlibs += Split(lenv['BF_LIBSAMPLERATE_LIB_STATIC']) - # setting this last so any overriding of manually libs could be handled if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'): libincs.append('/usr/lib') @@ -270,9 +266,6 @@ def setup_syslibs(lenv): syslibs += Split(lenv['BF_OPENCOLLADA_LIB']) syslibs.append(lenv['BF_EXPAT_LIB']) - if not lenv['WITH_BF_STATICLIBSAMPLERATE']: - syslibs += Split(lenv['BF_LIBSAMPLERATE_LIB']) - if lenv['WITH_BF_JEMALLOC']: if not lenv['WITH_BF_STATICJEMALLOC']: syslibs += Split(lenv['BF_JEMALLOC_LIB']) @@ -561,25 +554,24 @@ def AppIt(target=None, source=None, env=None): cmd = 'cp %s/%s %s/%s.app/Contents/MacOS/%s'%(builddir, binary,installdir, binary, binary) commands.getoutput(cmd) cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/'%(installdir, binary, VERSION) -# print cmd commands.getoutput(cmd) cmd = installdir + '/%s.app/Contents/MacOS/%s'%(binary,VERSION) - cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles'%(installdir, binary, VERSION) - commands.getoutput(cmd) - cmd = 'cp -R %s/release/bin/.blender/locale %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION) - commands.getoutput(cmd) - cmd = 'cp -R %s/release/bin/.blender/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION) - commands.getoutput(cmd) - cmd = 'cp %s/release/bin/%s/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary) - commands.getoutput(cmd) + + # blenderplayer doesn't need all the files + if binary == 'blender': + cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles'%(installdir, binary, VERSION) + commands.getoutput(cmd) + cmd = 'cp -R %s/release/bin/.blender/locale %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION) + commands.getoutput(cmd) + cmd = 'cp -R %s/release/bin/.blender/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION) + commands.getoutput(cmd) + cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION) + commands.getoutput(cmd) + if env['WITH_OSX_STATICPYTHON']: cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(installdir,binary, VERSION) commands.getoutput(cmd) cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,installdir,binary,VERSION) - commands.getoutput(cmd) - - if binary == 'blender':#not copy everything for blenderplayer - cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION) commands.getoutput(cmd) cmd = 'chmod +x %s/%s.app/Contents/MacOS/%s'%(installdir,binary, binary) @@ -633,7 +625,11 @@ def UnixPyBundle(target=None, source=None, env=None): run("rm -rf '%s/distutils'" % py_target) run("rm -rf '%s/lib2to3'" % py_target) run("rm -rf '%s/config'" % py_target) - run("rm -rf '%s/config-*'" % py_target) + + for f in os.listdir(py_target): + if f.startswith("config-"): + run("rm -rf '%s/%s'" % (py_target, f)) + run("rm -rf '%s/site-packages'" % py_target) run("mkdir '%s/site-packages'" % py_target) # python needs it.' run("rm -rf '%s/idlelib'" % py_target) @@ -695,7 +691,7 @@ class BlenderEnvironment(SConsEnvironment): SConsEnvironment.Default(self, res) resources.append(res) - def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None, cc_compileflags=None, cxx_compileflags=None): + def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None, cc_compileflags=None, cxx_compileflags=None, cc_compilerchange=None, cxx_compilerchange=None): global vcp if not self or not libname or not sources: print bc.FAIL+'Cannot continue. Missing argument for BuildBlenderLib '+libname+bc.ENDC @@ -733,6 +729,10 @@ class BlenderEnvironment(SConsEnvironment): lenv.Replace(CCFLAGS = cc_compileflags) if cxx_compileflags: lenv.Replace(CXXFLAGS = cxx_compileflags) + if cc_compilerchange: + lenv.Replace(CC = cc_compilerchange) + if cxx_compilerchange: + lenv.Replace(CXX = cxx_compilerchange) lenv.Append(CFLAGS = lenv['C_WARN']) lenv.Append(CCFLAGS = lenv['CC_WARN']) lenv.Append(CXXFLAGS = lenv['CXX_WARN']) diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py index caa83ea41be..fe56d40ea56 100644 --- a/build_files/scons/tools/btools.py +++ b/build_files/scons/tools/btools.py @@ -99,7 +99,6 @@ def validate_arguments(args, bc): 'WITH_BF_PYTHON', 'WITH_BF_PYTHON_SAFETY', 'BF_PYTHON', 'BF_PYTHON_VERSION', 'BF_PYTHON_INC', 'BF_PYTHON_BINARY', 'BF_PYTHON_LIB', 'BF_PYTHON_LIBPATH', 'WITH_BF_STATICPYTHON', 'WITH_OSX_STATICPYTHON', 'BF_PYTHON_LIB_STATIC', 'BF_PYTHON_DLL', 'BF_PYTHON_ABI_FLAGS', 'WITH_BF_OPENAL', 'BF_OPENAL', 'BF_OPENAL_INC', 'BF_OPENAL_LIB', 'BF_OPENAL_LIBPATH', 'WITH_BF_STATICOPENAL', 'BF_OPENAL_LIB_STATIC', 'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH', - 'BF_LIBSAMPLERATE', 'BF_LIBSAMPLERATE_INC', 'BF_LIBSAMPLERATE_LIB', 'BF_LIBSAMPLERATE_LIBPATH', 'WITH_BF_STATICLIBSAMPLERATE', 'BF_LIBSAMPLERATE_LIB_STATIC', 'WITH_BF_JACK', 'BF_JACK', 'BF_JACK_INC', 'BF_JACK_LIB', 'BF_JACK_LIBPATH', 'WITH_BF_SNDFILE', 'BF_SNDFILE', 'BF_SNDFILE_INC', 'BF_SNDFILE_LIB', 'BF_SNDFILE_LIBPATH', 'WITH_BF_STATICSNDFILE', 'BF_SNDFILE_LIB_STATIC', 'BF_PTHREADS', 'BF_PTHREADS_INC', 'BF_PTHREADS_LIB', 'BF_PTHREADS_LIBPATH', @@ -267,13 +266,6 @@ def read_opts(env, cfg, args): ('BF_SDL_LIB', 'SDL library', ''), ('BF_SDL_LIBPATH', 'SDL library path', ''), - ('BF_LIBSAMPLERATE', 'libsamplerate aka SRC base path', ''), - ('BF_LIBSAMPLERATE_INC', 'libsamplerate aka SRC include path', ''), - ('BF_LIBSAMPLERATE_LIB', 'libsamplerate aka SRC library', ''), - ('BF_LIBSAMPLERATE_LIBPATH', 'libsamplerate aka SRC library path', ''), - ('BF_LIBSAMPLERATE_LIB_STATIC', 'Path to libsamplerate static library', ''), - (BoolVariable('WITH_BF_STATICLIBSAMPLERATE', 'Staticly link to libsamplerate', False)), - (BoolVariable('WITH_BF_JACK', 'Enable jack support if true', True)), ('BF_JACK', 'jack base path', ''), ('BF_JACK_INC', 'jack include path', ''), |