diff options
Diffstat (limited to 'build_files/build_environment')
10 files changed, 63 insertions, 27 deletions
diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index 023d113b551..999223603d5 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later -#################################################################################################### +################################################################################################## # # This is a build system used by platform maintainers to build library dependencies on # Windows, macOS and Linux. @@ -22,7 +22,7 @@ # Install compiler cmake autoconf automake libtool yasm tcl # Run "make deps" from main Blender directory # -#################################################################################################### +################################################################################################## project("BlenderDependencies") cmake_minimum_required(VERSION 3.5) @@ -30,7 +30,8 @@ cmake_minimum_required(VERSION 3.5) include(ExternalProject) include(cmake/check_software.cmake) include(cmake/options.cmake) -# versions.cmake needs to be included after options.cmake due to the BLENDER_PLATFORM_ARM variable being needed. +# `versions.cmake` needs to be included after `options.cmake` +# due to the `BLENDER_PLATFORM_ARM` variable being needed. include(cmake/versions.cmake) include(cmake/boost_build_options.cmake) include(cmake/download.cmake) @@ -88,7 +89,7 @@ include(cmake/package_python.cmake) include(cmake/usd.cmake) include(cmake/potrace.cmake) include(cmake/haru.cmake) -# Boost needs to be included after python.cmake due to the PYTHON_BINARY variable being needed. +# Boost needs to be included after `python.cmake` due to the PYTHON_BINARY variable being needed. include(cmake/boost.cmake) include(cmake/pugixml.cmake) include(cmake/ispc.cmake) diff --git a/build_files/build_environment/cmake/cve_check.csv.in b/build_files/build_environment/cmake/cve_check.csv.in index 734a24f8c77..946dda5ab17 100644 --- a/build_files/build_environment/cmake/cve_check.csv.in +++ b/build_files/build_environment/cmake/cve_check.csv.in @@ -17,6 +17,12 @@ vendor,product,version,cve_number,remarks,comment @TIFF_ID@,CVE-2022-2521,Ignored,issue in tiff command line tool not used by blender @TIFF_ID@,CVE-2022-2953,Ignored,issue in tiff command line tool not used by blender @TIFF_ID@,CVE-2022-34526,Ignored,issue in tiff command line tool not used by blender +@TIFF_ID@,CVE-2022-3570,Ignored,issue in tiff command line tool not used by blender +@TIFF_ID@,CVE-2022-3597,Ignored,issue in tiff command line tool not used by blender +@TIFF_ID@,CVE-2022-3598,Ignored,issue in tiff command line tool not used by blender +@TIFF_ID@,CVE-2022-3599,Ignored,issue in tiff command line tool not used by blender +@TIFF_ID@,CVE-2022-3626,Ignored,issue in tiff command line tool not used by blender +@TIFF_ID@,CVE-2022-3627,Ignored,issue in tiff command line tool not used by blender @XML2_ID@,CVE-2016-3709,Ignored,not affecting blender and not considered a security issue upstream @GMP_ID@,CVE-2021-43618,Mitigated,patched using upstream commit 561a9c25298e @SQLITE_ID@,CVE-2022-35737,Ignored,only affects SQLITE_ENABLE_STAT4 compile option not used by blender or python diff --git a/build_files/build_environment/cmake/dpcpp.cmake b/build_files/build_environment/cmake/dpcpp.cmake index dbba97b8264..28315d1f703 100644 --- a/build_files/build_environment/cmake/dpcpp.cmake +++ b/build_files/build_environment/cmake/dpcpp.cmake @@ -80,8 +80,11 @@ ExternalProject_Add(external_dpcpp SOURCE_SUBDIR llvm LIST_SEPARATOR ^^ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/dpcpp ${DEFAULT_CMAKE_FLAGS} ${DPCPP_EXTRA_ARGS} - #CONFIGURE_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/dpcpp/src/external_dpcpp/buildbot/configure.py ${DPCPP_CONFIGURE_ARGS} - #BUILD_COMMAND echo "." #${PYTHON_BINARY} ${BUILD_DIR}/dpcpp/src/external_dpcpp/buildbot/compile.py + # CONFIGURE_COMMAND + # ${PYTHON_BINARY} + # ${BUILD_DIR}/dpcpp/src/external_dpcpp/buildbot/configure.py ${DPCPP_CONFIGURE_ARGS} + # BUILD_COMMAND + # echo "." # ${PYTHON_BINARY} ${BUILD_DIR}/dpcpp/src/external_dpcpp/buildbot/compile.py INSTALL_COMMAND ${CMAKE_COMMAND} --build . -- deploy-sycl-toolchain PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/dpcpp/src/external_dpcpp < ${PATCH_DIR}/dpcpp.diff INSTALL_DIR ${LIBDIR}/dpcpp diff --git a/build_files/build_environment/cmake/opencollada.cmake b/build_files/build_environment/cmake/opencollada.cmake index 9473aafbe88..b1a3028debd 100644 --- a/build_files/build_environment/cmake/opencollada.cmake +++ b/build_files/build_environment/cmake/opencollada.cmake @@ -4,6 +4,18 @@ if(UNIX) set(OPENCOLLADA_EXTRA_ARGS -DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2 -DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2.a) + + # WARNING: the patch contains mixed UNIX and DOS line endings + # as does the OPENCOLLADA package, if this can be corrected upstream that would be better. + # For now use `sed` to force UNIX line endings so the patch applies. + # Needed as neither ignoring white-space or applying as a binary resolve this problem. + set(PATCH_MAYBE_DOS2UNIX_CMD + sed -i "s/\\r//" + ${PATCH_DIR}/opencollada.diff + ${BUILD_DIR}/opencollada/src/external_opencollada/CMakeLists.txt + ${BUILD_DIR}/opencollada/src/external_opencollada/Externals/LibXML/CMakeLists.txt && + ) + else() set(OPENCOLLADA_EXTRA_ARGS -DCMAKE_DEBUG_POSTFIX=_d @@ -14,6 +26,7 @@ else() else() list(APPEND OPENCOLLADA_EXTRA_ARGS -DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2sd.lib) endif() + set(PATCH_MAYBE_DOS2UNIX_CMD) endif() ExternalProject_Add(external_opencollada @@ -21,11 +34,14 @@ ExternalProject_Add(external_opencollada DOWNLOAD_DIR ${DOWNLOAD_DIR} URL_HASH ${OPENCOLLADA_HASH_TYPE}=${OPENCOLLADA_HASH} PREFIX ${BUILD_DIR}/opencollada - PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff + PATCH_COMMAND + ${PATCH_MAYBE_DOS2UNIX_CMD} + ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/opencollada/src/external_opencollada < ${PATCH_DIR}/opencollada.diff CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opencollada ${DEFAULT_CMAKE_FLAGS} ${OPENCOLLADA_EXTRA_ARGS} INSTALL_DIR ${LIBDIR}/opencollada ) +unset(PATCH_MAYBE_DOS2UNIX_CMD) add_dependencies( external_opencollada diff --git a/build_files/build_environment/cmake/options.cmake b/build_files/build_environment/cmake/options.cmake index 9058e945f6d..13e7fb58be2 100644 --- a/build_files/build_environment/cmake/options.cmake +++ b/build_files/build_environment/cmake/options.cmake @@ -21,8 +21,8 @@ else() endif() set(DOWNLOAD_DIR "${CMAKE_CURRENT_BINARY_DIR}/downloads" CACHE STRING "Path for downloaded files") -# This path must be hard-coded like this, so that the GNUmakefile knows where it is and can pass it to make_source_archive.py: -set(PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/packages") + +set(PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/packages" CACHE PATH "default path for downloaded packages") option(PACKAGE_USE_UPSTREAM_SOURCES "Use sources upstream to download the package sources, when OFF the blender mirror will be used" ON) file(TO_CMAKE_PATH ${DOWNLOAD_DIR} DOWNLOAD_DIR) diff --git a/build_files/build_environment/cmake/setup_mingw64.cmake b/build_files/build_environment/cmake/setup_mingw64.cmake index fa65212e056..6f53edb38ea 100644 --- a/build_files/build_environment/cmake/setup_mingw64.cmake +++ b/build_files/build_environment/cmake/setup_mingw64.cmake @@ -1,10 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-or-later -#################################################################################################################### +################################################################################################## # Mingw64 Builds -#################################################################################################################### +################################################################################################## # This installs mingw64+msys to compile ffmpeg/iconv/libsndfile/fftw3 -#################################################################################################################### +################################################################################################## message("LIBDIR = ${LIBDIR}") macro(cmake_to_msys_path MsysPath ResultingPath) diff --git a/build_files/build_environment/cmake/usd.cmake b/build_files/build_environment/cmake/usd.cmake index 34e43383637..0661be3ba14 100644 --- a/build_files/build_environment/cmake/usd.cmake +++ b/build_files/build_environment/cmake/usd.cmake @@ -58,8 +58,9 @@ set(USD_EXTRA_ARGS -DPXR_BUILD_USD_TOOLS=OFF -DCMAKE_DEBUG_POSTFIX=_d -DBUILD_SHARED_LIBS=Off - # USD is hellbound on making a shared lib, unless you point this variable to a valid cmake file - # doesn't have to make sense, but as long as it points somewhere valid it will skip the shared lib. + # USD is hellbound on making a shared library, + # unless you point this variable to a valid CMAKE file doesn't have to make sense, + # but as long as it points somewhere valid it will skip the shared library. -DPXR_MONOLITHIC_IMPORT=${BUILD_DIR}/usd/src/external_usd/cmake/defaults/Version.cmake -DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include -DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT} @@ -86,7 +87,8 @@ add_dependencies( external_opensubdiv ) -# Since USD 21.11 the libraries are prefixed with "usd_", i.e. "libusd_m.a" became "libusd_usd_m.a". +# Since USD 21.11 the libraries are prefixed with "usd_", i.e. +# "libusd_m.a" became "libusd_usd_m.a". # See https://github.com/PixarAnimationStudios/USD/blob/release/CHANGELOG.md#2111---2021-11-01 if(NOT WIN32) if (USD_VERSION VERSION_LESS 21.11) diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index 06a923e5c22..4f4330b56f4 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -225,8 +225,9 @@ set(URLLIB3_CPE "cpe:2.3:a:urllib3:urllib3:${URLLIB3_VERSION}:*:*:*:*:*:*:*") set(CERTIFI_VERSION 2021.10.8) set(REQUESTS_VERSION 2.27.1) set(CYTHON_VERSION 0.29.26) -# The version of the zstd library used to build the Python package should match ZSTD_VERSION defined below. -# At this time of writing, 0.17.0 was already released, but built against zstd 1.5.1, while we use 1.5.0. +# The version of the zstd library used to build the Python package should match ZSTD_VERSION +# defined below. At this time of writing, 0.17.0 was already released, +# but built against zstd 1.5.1, while we use 1.5.0. set(ZSTANDARD_VERSION 0.16.0) set(AUTOPEP8_VERSION 1.6.0) set(PYCODESTYLE_VERSION 2.8.0) @@ -371,10 +372,10 @@ set(PYSTRING_HASH f2c68786b359f5e4e62bed53bc4fb86d) set(PYSTRING_HASH_TYPE MD5) set(PYSTRING_FILE pystring-${PYSTRING_VERSION}.tar.gz) -set(EXPAT_VERSION 2_4_9) -set(EXPAT_VERSION_DOTS 2.4.9) +set(EXPAT_VERSION 2_5_0) +set(EXPAT_VERSION_DOTS 2.5.0) set(EXPAT_URI https://github.com/libexpat/libexpat/archive/R_${EXPAT_VERSION}.tar.gz) -set(EXPAT_HASH b59a2aa796be1ee177bbab3b7231dfa5) +set(EXPAT_HASH d375fa3571c0abb945873f5061a8f2e2) set(EXPAT_HASH_TYPE MD5) set(EXPAT_FILE libexpat-${EXPAT_VERSION}.tar.gz) set(EXPAT_CPE "cpe:2.3:a:libexpat_project:libexpat:${EXPAT_VERSION_DOTS}:*:*:*:*:*:*:*") @@ -558,10 +559,10 @@ set(BROTLI_HASH_TYPE SHA256) set(BROTLI_FILE brotli-v${BROTLI_VERSION}.tar.gz) set(BROTLI_CPE "cpe:2.3:a:google:brotli:${BROTLI_VERSION}:*:*:*:*:*:*:*") -set(OPENPGL_VERSION v0.4.0-beta) -set(OPENPGL_SHORT_VERSION 0.4.0) +set(OPENPGL_VERSION v0.4.1-beta) +set(OPENPGL_SHORT_VERSION 0.4.1) set(OPENPGL_URI https://github.com/OpenPathGuidingLibrary/openpgl/archive/refs/tags/${OPENPGL_VERSION}.tar.gz) -set(OPENPGL_HASH 1f090f88ab2bad028e8b3619aa926f4f97cf7b2c175b904704d2fec8593dd3cd) +set(OPENPGL_HASH db63f5dac5cfa8c110ede241f0c413f00db0c4748697381c4fa23e0f9e82a754) set(OPENPGL_HASH_TYPE SHA256) set(OPENPGL_FILE openpgl-${OPENPGL_VERSION}.tar.gz) diff --git a/build_files/build_environment/patches/cmake/modules/FindIlmBase.cmake b/build_files/build_environment/patches/cmake/modules/FindIlmBase.cmake index 7611ca21708..c74ff788a75 100644 --- a/build_files/build_environment/patches/cmake/modules/FindIlmBase.cmake +++ b/build_files/build_environment/patches/cmake/modules/FindIlmBase.cmake @@ -177,7 +177,8 @@ if(ILMBASE_INCLUDE_DIR) "\\1" XYZ ${ILMBASE_BUILD_SPECIFICATION}) set("ILMBASE_VERSION" ${XYZ} CACHE STRING "Version of ILMBase lib") else() - # Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though. + # Old versions (before 2.0?) do not have any version string, + # just assuming 2.0 should be fine though. message(WARNING "Could not determine ILMBase library version, assuming 2.0.") set("ILMBASE_VERSION" "2.0" CACHE STRING "Version of ILMBase lib") endif() @@ -195,8 +196,13 @@ else() # elseif(${ILMBASE_VERSION} VERSION_LESS "2.1") set(IlmBase_Libraries Half Iex Imath IlmThread) # else() -# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION}) -# set(IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver}) + # string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION}) + # set(IlmBase_Libraries + # Half + # Iex-${_ilmbase_libs_ver} + # Imath-${_ilmbase_libs_ver} + # IlmThread-${_ilmbase_libs_ver} + # ) endif() diff --git a/build_files/build_environment/patches/cmake/modules/FindOpenEXR.cmake b/build_files/build_environment/patches/cmake/modules/FindOpenEXR.cmake index 8b08b047eac..040dfe1c16f 100644 --- a/build_files/build_environment/patches/cmake/modules/FindOpenEXR.cmake +++ b/build_files/build_environment/patches/cmake/modules/FindOpenEXR.cmake @@ -175,7 +175,8 @@ if(OPENEXR_INCLUDE_DIR) "\\1" XYZ ${OPENEXR_BUILD_SPECIFICATION}) set("OPENEXR_VERSION" ${XYZ} CACHE STRING "Version of OpenEXR lib") else() - # Old versions (before 2.0?) do not have any version string, just assuming 2.0 should be fine though. + # Old versions (before 2.0?) do not have any version string, + # just assuming 2.0 should be fine though. message(WARNING "Could not determine ILMBase library version, assuming 2.0.") set("OPENEXR_VERSION" "2.0" CACHE STRING "Version of OpenEXR lib") endif() |