From b2c7671262e7a3b3fc331d00ce161e5f901e7e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D9=87=D8=AF=D9=8A=20=D8=B4=D9=8A=D9=86=D9=88=D9=86?= =?UTF-8?q?=20=28Mehdi=20Chinoune=29?= Date: Sun, 12 Mar 2023 14:07:30 +0100 Subject: [PATCH] blender: update to 3.2.2 --- .../0001-mingw-buildsystem.patch | 1173 +++++++++-------- .../0002-fix-mingw-w64-definitions.patch | 657 ++++----- ...disable-static_assert_align-on-mingw.patch | 151 +++ .../0005-fix-WINTAB_PRINTF-on-mingw.patch | 86 ++ .../0005-fix-define-syntax.patch | 12 - ...-DEBUG-libmv-avoid-too-many-sections.patch | 9 +- .../0007-disable-compiler-warnings.patch | 20 + .../0008-mingw-use-X11-like-path-layout.patch | 29 +- .../0009-include-missing-headers.patch | 10 + .../0010-do-not-link-to-extern_bullet.patch | 15 + ...0011-c++11-defines-__i386__-not-i386.patch | 96 -- .../0011-no-TIME_UTC-on-msvcrt.patch | 11 + ...0012-re-enable-SSE-on-mingw-w64-i686.patch | 60 - ...014-libstdc++-not-support-utf-stream.patch | 34 +- .../0015-mingw-python-like-msvc.patch | 18 +- mingw-w64-blender/0016-mingw-windres.patch | 21 +- mingw-w64-blender/0019-fix-casts.patch | 43 +- mingw-w64-blender/0020-blendthumb-build.patch | 95 +- mingw-w64-blender/0023-link-errors.patch | 149 ++- mingw-w64-blender/0026-embree-shared.patch | 16 +- mingw-w64-blender/0028-use-std-min-max.patch | 47 +- ...e-CMake-to-support-OpenImageIO-2.3.4.patch | 87 -- ...30-update-CMake-to-support-OpenEXR-3.patch | 146 -- ...ges-update-code-to-support-OpenEXR-3.patch | 174 --- mingw-w64-blender/0034-Fix-ARM64-Build.patch | 8 +- .../0035-Enable-SSE2NEON-on-Windows-ARM.patch | 6 +- .../0037-build-with-ffmpeg4.4.patch | 30 - .../0037-build-with-ffmpeg6.patch | 63 + mingw-w64-blender/PKGBUILD | 147 +-- mingw-w64-blender/blender-CLANG32.install | 7 - mingw-w64-blender/blender-MINGW32.install | 7 - 31 files changed, 1620 insertions(+), 1807 deletions(-) create mode 100644 mingw-w64-blender/0003-disable-static_assert_align-on-mingw.patch create mode 100644 mingw-w64-blender/0005-fix-WINTAB_PRINTF-on-mingw.patch delete mode 100644 mingw-w64-blender/0005-fix-define-syntax.patch create mode 100644 mingw-w64-blender/0007-disable-compiler-warnings.patch create mode 100644 mingw-w64-blender/0009-include-missing-headers.patch create mode 100644 mingw-w64-blender/0010-do-not-link-to-extern_bullet.patch delete mode 100644 mingw-w64-blender/0011-c++11-defines-__i386__-not-i386.patch create mode 100644 mingw-w64-blender/0011-no-TIME_UTC-on-msvcrt.patch delete mode 100644 mingw-w64-blender/0012-re-enable-SSE-on-mingw-w64-i686.patch delete mode 100644 mingw-w64-blender/0029-update-CMake-to-support-OpenImageIO-2.3.4.patch delete mode 100644 mingw-w64-blender/0030-update-CMake-to-support-OpenEXR-3.patch delete mode 100644 mingw-w64-blender/0031-Images-update-code-to-support-OpenEXR-3.patch delete mode 100644 mingw-w64-blender/0037-build-with-ffmpeg4.4.patch create mode 100644 mingw-w64-blender/0037-build-with-ffmpeg6.patch delete mode 100644 mingw-w64-blender/blender-CLANG32.install delete mode 100644 mingw-w64-blender/blender-MINGW32.install diff --git a/mingw-w64-blender/0001-mingw-buildsystem.patch b/mingw-w64-blender/0001-mingw-buildsystem.patch index 3053707ac5..224fddc1a8 100644 --- a/mingw-w64-blender/0001-mingw-buildsystem.patch +++ b/mingw-w64-blender/0001-mingw-buildsystem.patch @@ -1,15 +1,33 @@ ---- blender-2.80/CMakeLists.txt.orig 2019-08-01 09:34:24.337794500 +0300 -+++ blender-2.80/CMakeLists.txt 2019-08-01 09:51:40.828741800 +0300 -@@ -285,6 +285,8 @@ - if(UNIX AND NOT APPLE) +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -254,7 +254,7 @@ + option(WITH_X11_ALPHA "Enable X11 transparent background" ON) + endif() + +-if(UNIX AND NOT APPLE) ++if((UNIX AND NOT APPLE) OR MINGW) option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library provided by the operating system" OFF) option(WITH_SYSTEM_GLES "Use OpenGL ES library provided by the operating system" ON) -+elseif(MINGW) -+ set(WITH_SYSTEM_GLEW ON) - else() - # not an option for other OS's - set(WITH_SYSTEM_GLEW OFF) -@@ -366,7 +368,7 @@ + option(WITH_SYSTEM_FREETYPE "Use the freetype library provided by the operating system" OFF) +@@ -266,7 +266,7 @@ + endif() + + +-if(UNIX AND NOT APPLE) ++if((UNIX AND NOT APPLE) OR MINGW) + option(WITH_SYSTEM_EIGEN3 "Use the systems Eigen3 library" OFF) + endif() + +@@ -335,7 +335,7 @@ + # Compression + option(WITH_LZO "Enable fast LZO compression (used for pointcache)" ON) + option(WITH_LZMA "Enable best LZMA compression, (used for pointcache)" ON) +-if(UNIX AND NOT APPLE) ++if((UNIX AND NOT APPLE) OR MINGW) + option(WITH_SYSTEM_LZO "Use the system LZO library" OFF) + endif() + option(WITH_DRACO "Enable Draco mesh compression Python module (used for glTF)" ON) +@@ -359,7 +359,7 @@ option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON) endif() option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON) @@ -18,8 +36,8 @@ 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) if(WITH_STATIC_LIBS) -@@ -490,7 +492,7 @@ - set(WITH_SYSTEM_GLEW OFF) +@@ -552,7 +552,7 @@ + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE) endif() -if(WIN32) @@ -27,8 +45,8 @@ getDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES) set(CPACK_INSTALL_PREFIX ${CMAKE_GENERIC_PROGRAM_FILES}/${}) endif() -@@ -544,7 +546,7 @@ - endif() +@@ -650,7 +650,7 @@ + mark_as_advanced(WITH_COMPILER_SHORT_FILE_MACRO) endif() -if(WIN32) @@ -36,7 +54,16 @@ # Use hardcoded paths or find_package to find externals option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF) mark_as_advanced(WITH_WINDOWS_FIND_MODULES) -@@ -897,8 +899,10 @@ +@@ -698,7 +698,7 @@ + mark_as_advanced(WITH_NINJA_POOL_JOBS) + endif() + +-if(UNIX AND NOT APPLE) ++if((UNIX AND NOT APPLE) OR MINGW) + option(WITH_CXX11_ABI "Use native C++11 ABI of compiler" ON) + mark_as_advanced(WITH_CXX11_ABI) + endif() +@@ -1001,8 +1001,10 @@ if(UNIX AND NOT APPLE) include(platform_unix) @@ -48,7 +75,7 @@ elseif(APPLE) include(platform_apple) endif() -@@ -990,7 +990,7 @@ +@@ -1117,7 +1119,7 @@ endif() if(WITH_IMAGE_OPENJPEG) # Special handling of Windows platform where openjpeg is always static. @@ -57,16 +84,16 @@ set(OPENJPEG_DEFINES "-DOPJ_STATIC") else() set(OPENJPEG_DEFINES "") -@@ -1586,7 +1590,7 @@ +@@ -1776,7 +1776,7 @@ ) endif() - if(WIN32 OR APPLE) + if(MSVC OR APPLE) # Windows and macOS have this bundled with Python libraries. - elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)) + elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR WITH_PYTHON_NUMPY) if(("${PYTHON_NUMPY_PATH}" STREQUAL "") OR (${PYTHON_NUMPY_PATH} MATCHES NOTFOUND)) -@@ -1597,7 +1601,7 @@ +@@ -1784,13 +1784,13 @@ endif() endif() @@ -74,520 +101,17 @@ + if(MSVC OR APPLE) # pass, we have this in lib/python/site-packages elseif(WITH_PYTHON_INSTALL_REQUESTS) - find_python_package(requests) ---- blender-2.78/build_files/cmake/Modules/FindOpenImageIO.cmake.orig 2016-10-09 13:01:04.500104400 +0300 -+++ blender-2.78/build_files/cmake/Modules/FindOpenImageIO.cmake 2016-10-09 13:01:20.038306000 +0300 -@@ -59,6 +59,7 @@ - FIND_FILE(OPENIMAGEIO_IDIFF - NAMES - idiff -+ idiff.exe - HINTS - ${OPENIMAGEIO_ROOT_DIR} - PATH_SUFFIXES ---- blender-2.80/build_files/cmake/platform/platform_win32_mingw64.cmake.orig 1970-01-01 03:00:00.000000000 +0300 -+++ blender-2.80/build_files/cmake/platform/platform_win32_mingw64.cmake 2019-08-01 10:07:13.714675300 +0300 -@@ -0,0 +1,497 @@ -+# ***** BEGIN GPL LICENSE BLOCK ***** -+# -+# This program is free software; you can redistribute it and/or -+# modify it under the terms of the GNU General Public License -+# as published by the Free Software Foundation; either version 2 -+# of the License, or (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software Foundation, -+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+# -+# The Original Code is Copyright (C) 2016, Blender Foundation -+# All rights reserved. -+# -+# Contributor(s): Sergey Sharybin. -+# -+# ***** END GPL LICENSE BLOCK ***** -+ -+# Libraries configuration for Windows when compiling with MinGW. -+ -+# keep GCC specific stuff here -+include(CheckCSourceCompiles) -+# Setup 64bit and 64bit windows systems -+CHECK_C_SOURCE_COMPILES(" -+ #ifndef __MINGW64__ -+ #error -+ #endif -+ int main(void) { return 0; } -+ " -+ WITH_MINGW64 -+) -+ -+set(LIBDIR ${MINGW_LIBS}) -+if(WITH_MINGW64) -+ message(STATUS "Compiling for 64 bit with MinGW-w64.") -+else() -+ message(STATUS "Compiling for 32 bit with MinGW-w32.") -+endif() -+ -+set(WINTAB_INC ${LIBDIR}/include) -+ -+if(NOT EXISTS "${LIBDIR}/") -+ message(FATAL_ERROR "Windows requires pre-compiled libs at: '${LIBDIR}'") -+endif() -+ -+list(APPEND PLATFORM_LINKLIBS -+ -lshell32 -lvfw32 -ladvapi32 -lshfolder -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -+ -lz -lstdc++ -lshell32 -lole32 -luuid -lwsock32 -lpsapi -ldbghelp -lshlwapi -lglu32 -lcomctl32 -+) -+ -+if(WITH_INPUT_IME) -+ list(APPEND PLATFORM_LINKLIBS -limm32) -+endif() -+ -+# We want to support Windows 7 level ABI -+add_definitions(-D_WIN32_WINNT=0x601) -+include(build_files/cmake/platform/platform_win32_bundle_crt.cmake) -+ -+set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing") -+ -+# GNU Compiler -+if(CMAKE_COMPILER_IS_GNUCC) -+ # `maybe-uninitialized` is unreliable in release builds, but fine in debug builds. -+ set(GCC_EXTRA_FLAGS_RELEASE "-Wno-maybe-uninitialized") -+ set(CMAKE_C_FLAGS_RELEASE "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELEASE}") -+ set(CMAKE_C_FLAGS_RELWITHDEBINFO "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELWITHDEBINFO}") -+ set(CMAKE_CXX_FLAGS_RELEASE "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELEASE}") -+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") -+ unset(GCC_EXTRA_FLAGS_RELEASE) -+endif() -+ -+if(WITH_MINGW64) -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive") -+ find_package(Threads REQUIRED) -+ list(APPEND PLATFORM_LINKLIBS ${CMAKE_THREAD_LIBS_INIT}) -+ set(PTHREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) -+ add_definitions(-DFREE_WINDOWS64 -DMS_WIN64) -+endif() -+ -+add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE) -+ -+add_definitions(-DFREE_WINDOWS -D_XOPEN_SOURCE -DWIN32) -+ -+macro(find_package_wrapper) -+ if(WITH_STATIC_LIBS) -+ find_package_static(${ARGV}) -+ else() -+ find_package(${ARGV}) -+ endif() -+endmacro() -+ -+find_package_wrapper(JPEG REQUIRED) -+find_package_wrapper(PNG REQUIRED) -+find_package_wrapper(ZLIB REQUIRED) -+find_package_wrapper(Freetype REQUIRED) -+ -+if(WITH_LZO AND WITH_SYSTEM_LZO) -+ find_package_wrapper(LZO) -+ if(NOT LZO_FOUND) -+ message(FATAL_ERROR "Failed finding system LZO version!") -+ endif() -+endif() -+ -+if(WITH_SYSTEM_EIGEN3) -+ find_package_wrapper(Eigen3) -+ if(NOT EIGEN3_FOUND) -+ message(FATAL_ERROR "Failed finding system Eigen3 version!") -+ endif() -+endif() -+# else values are set below for all platforms -+ -+if(WITH_PYTHON) -+ # normally cached but not since we include them with blender -+ #set(PYTHON_VERSION 3.7) # CACHE STRING) -+ #set(PYTHON_INCLUDE_DIR "${LIBDIR}/include/python${PYTHON_VERSION}m") # CACHE PATH) -+ #set(PYTHON_LIBRARY "${LIBDIR}/lib/libpython${PYTHON_VERSION}m.dll.a") # CACHE FILEPATH) -+ # uncached vars -+ #set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}") -+ #set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}") -+ find_package(PythonLibsUnix REQUIRED) -+endif() -+ -+if(WITH_IMAGE_OPENEXR) -+ find_package_wrapper(OpenEXR) # our own module -+ if(NOT OPENEXR_FOUND) -+ set(WITH_IMAGE_OPENEXR OFF) -+ endif() -+endif() -+ -+if(WITH_IMAGE_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) -+ endif() -+endif() -+ -+# Audio IO -+if(WITH_SYSTEM_AUDASPACE) -+ find_package_wrapper(Audaspace) -+ if(NOT AUDASPACE_FOUND OR NOT AUDASPACE_C_FOUND) -+ message(FATAL_ERROR "Audaspace external library not found!") -+ endif() -+endif() -+ -+if(WITH_OPENAL) -+ find_package_wrapper(OpenAL) -+ if(NOT OPENAL_FOUND) -+ set(WITH_OPENAL OFF) -+ endif() -+endif() -+ -+if(WITH_SDL) -+ find_package_wrapper(SDL2) -+ if(SDL2_FOUND) -+ # Use same names for both versions of SDL until we move to 2.x. -+ set(SDL_INCLUDE_DIR "${SDL2_INCLUDE_DIR}") -+ set(SDL_LIBRARY "${SDL2_LIBRARY}") -+ set(SDL_FOUND "${SDL2_FOUND}") -+ else() -+ find_package_wrapper(SDL) -+ endif() -+ mark_as_advanced( -+ SDL_INCLUDE_DIR -+ SDL_LIBRARY -+ ) -+ # unset(SDLMAIN_LIBRARY CACHE) -+ if(NOT SDL_FOUND) -+ set(WITH_SDL OFF) -+ endif() -+endif() -+ -+if(WITH_JACK) -+ find_package_wrapper(Jack) -+ if(NOT JACK_FOUND) -+ set(WITH_JACK OFF) -+ endif() -+endif() -+ -+# Codecs -+if(WITH_CODEC_SNDFILE) -+ find_package_wrapper(SndFile) -+ if(NOT SNDFILE_FOUND) -+ set(WITH_CODEC_SNDFILE OFF) -+ endif() -+endif() -+ -+if(WITH_CODEC_FFMPEG) -+ set(FFMPEG ${LIBDIR} CACHE PATH "FFMPEG Directory") -+ set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries") -+ -+ mark_as_advanced(FFMPEG) -+ -+ # lame, but until we have proper find module for ffmpeg -+ if(EXISTS "${FFMPEG}/include/ffmpeg/") -+ list(APPEND FFMPEG_INCLUDE_DIRS "${FFMPEG}/include/ffmpeg") -+ endif() -+ # end lameness -+ -+ mark_as_advanced(FFMPEG_LIBRARIES) -+ set(FFMPEG_LIBPATH ${FFMPEG}/lib) -+endif() -+ -+if(WITH_FFTW3) -+ find_package_wrapper(Fftw3) -+ if(NOT FFTW3_FOUND) -+ set(WITH_FFTW3 OFF) -+ endif() -+endif() -+ -+if(WITH_OPENCOLLADA) -+ find_package_wrapper(OpenCOLLADA) -+ if(OPENCOLLADA_FOUND) -+ find_package_wrapper(XML2) -+ find_package_wrapper(PCRE) -+ list(APPEND OPENCOLLADA_LIBRARIES ${XML2_LIBRARY}) -+ else() -+ set(WITH_OPENCOLLADA OFF) -+ endif() -+endif() -+ -+if(WITH_MEM_JEMALLOC) -+ find_package_wrapper(JeMalloc) -+ if(NOT JEMALLOC_FOUND) -+ set(WITH_MEM_JEMALLOC OFF) -+ endif() -+endif() -+ -+if(WITH_INPUT_NDOF) -+ find_package_wrapper(Spacenav) -+ if(SPACENAV_FOUND) -+ # use generic names within blenders buildsystem. -+ set(NDOF_INCLUDE_DIRS ${SPACENAV_INCLUDE_DIRS}) -+ set(NDOF_LIBRARIES ${SPACENAV_LIBRARIES}) -+ else() -+ set(WITH_INPUT_NDOF OFF) -+ endif() -+endif() -+ -+if(WITH_CYCLES_OSL) -+ set(CYCLES_OSL ${LIBDIR} CACHE PATH "Path to OpenShadingLanguage installation") -+ if(EXISTS ${CYCLES_OSL} AND NOT OSL_ROOT) -+ set(OSL_ROOT ${CYCLES_OSL}) -+ endif() -+ find_package_wrapper(OSL) -+ if(OSL_FOUND) -+ if(${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6") -+ list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} ${OSL_LIB_EXEC} ${OSL_LIB_QUERY}) -+ endif() -+ else() -+ message(STATUS "OSL not found, disabling it from Cycles") -+ set(WITH_CYCLES_OSL OFF) -+ endif() -+endif() -+ -+if(WITH_OPENVDB) -+ find_package_wrapper(OpenVDB) -+ find_package_wrapper(Blosc) -+ if(NOT OPENVDB_FOUND) -+ set(WITH_OPENVDB OFF) -+ set(WITH_OPENVDB_BLOSC OFF) -+ message(STATUS "OpenVDB not found, disabling it") -+ elseif(NOT BLOSC_FOUND) -+ set(WITH_OPENVDB_BLOSC OFF) -+ message(STATUS "Blosc not found, disabling it for OpenVBD") -+ endif() -+ set(OPENVDB_DEFINITIONS -DOPENVDB_DLL -D_USE_MATH_DEFINES) -+endif() -+ -+if(WITH_NANOVDB) -+ find_package_wrapper(NanoVDB) -+ -+ if(NOT NANOVDB_FOUND) -+ set(WITH_NANOVDB OFF) -+ message(STATUS "NanoVDB not found, disabling it") -+ endif() -+endif() -+ -+if(WITH_ALEMBIC) -+ find_package_wrapper(Alembic) -+ -+ if(WITH_ALEMBIC_HDF5) -+ set(HDF5_ROOT_DIR ${LIBDIR}/hdf5) -+ find_package_wrapper(HDF5) -+ endif() -+ -+ if(NOT ALEMBIC_FOUND OR (WITH_ALEMBIC_HDF5 AND NOT HDF5_FOUND)) -+ set(WITH_ALEMBIC OFF) -+ set(WITH_ALEMBIC_HDF5 OFF) -+ endif() -+endif() -+ -+if(WITH_USD) -+ find_package_wrapper(USD) -+ -+ if(NOT USD_FOUND) -+ set(WITH_USD OFF) -+ endif() -+endif() -+ -+if(WITH_BOOST) -+ # uses in build instructions to override include and library variables -+ if(NOT BOOST_CUSTOM) -+ if(WITH_STATIC_LIBS) -+ set(Boost_USE_STATIC_LIBS ON) -+ endif() -+ set(Boost_USE_MULTITHREADED ON) -+ set(__boost_packages filesystem regex thread date_time) -+ if(WITH_CYCLES_OSL) -+ if(NOT (${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6")) -+ list(APPEND __boost_packages wave) -+ else() -+ endif() -+ endif() -+ if(WITH_INTERNATIONAL) -+ list(APPEND __boost_packages locale) -+ endif() -+ if(WITH_CYCLES_NETWORK) -+ list(APPEND __boost_packages serialization) -+ endif() -+ if(WITH_OPENVDB) -+ list(APPEND __boost_packages iostreams) -+ endif() -+ list(APPEND __boost_packages system) -+ find_package(Boost 1.48 COMPONENTS ${__boost_packages}) -+ if(NOT Boost_FOUND) -+ # try to find non-multithreaded if -mt not found, this flag -+ # doesn't matter for us, it has nothing to do with thread -+ # safety, but keep it to not disturb build setups -+ set(Boost_USE_MULTITHREADED OFF) -+ find_package(Boost 1.48 COMPONENTS ${__boost_packages}) -+ endif() -+ unset(__boost_packages) -+ if(Boost_USE_STATIC_LIBS AND WITH_BOOST_ICU) -+ find_package(IcuLinux) -+ endif() -+ mark_as_advanced(Boost_DIR) # why doesnt boost do this? -+ endif() -+ -+ set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS}) -+ set(BOOST_LIBRARIES ${Boost_LIBRARIES}) -+ set(BOOST_LIBPATH ${Boost_LIBRARY_DIRS}) -+ set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB") -+endif() -+ -+if(WITH_OPENIMAGEIO) -+ find_package_wrapper(OpenImageIO) -+ if(NOT OPENIMAGEIO_PUGIXML_FOUND AND WITH_CYCLES_STANDALONE) -+ find_package_wrapper(PugiXML) -+ else() -+ set(PUGIXML_INCLUDE_DIR "${OPENIMAGEIO_INCLUDE_DIR/OpenImageIO}") -+ set(PUGIXML_LIBRARIES "") -+ endif() -+ -+ set(OPENIMAGEIO_LIBRARIES -+ ${OPENIMAGEIO_LIBRARIES} -+ ${PNG_LIBRARIES} -+ ${JPEG_LIBRARIES} -+ ${ZLIB_LIBRARIES} -+ ${BOOST_LIBRARIES} -+ ) -+ set(OPENIMAGEIO_LIBPATH) # TODO, remove and reference the absolute path everywhere -+ set(OPENIMAGEIO_DEFINITIONS "") -+ -+ if(WITH_IMAGE_TIFF) -+ list(APPEND OPENIMAGEIO_LIBRARIES "${TIFF_LIBRARY}") -+ endif() -+ if(WITH_IMAGE_OPENEXR) -+ list(APPEND OPENIMAGEIO_LIBRARIES "${OPENEXR_LIBRARIES}") -+ endif() -+ -+ if(NOT OPENIMAGEIO_FOUND) -+ set(WITH_OPENIMAGEIO OFF) -+ message(STATUS "OpenImageIO not found, disabling WITH_CYCLES") -+ endif() -+endif() -+ -+if(WITH_OPENCOLORIO) -+ find_package_wrapper(OpenColorIO) -+ -+ set(OPENCOLORIO_LIBRARIES ${OPENCOLORIO_LIBRARIES}) -+ set(OPENCOLORIO_LIBPATH) # TODO, remove and reference the absolute path everywhere -+ set(OPENCOLORIO_DEFINITIONS) -+ -+ if(NOT OPENCOLORIO_FOUND) -+ set(WITH_OPENCOLORIO OFF) -+ message(STATUS "OpenColorIO not found") -+ endif() -+endif() -+ -+if(WITH_CYCLES_EMBREE) -+ find_package(Embree 3.8.0 REQUIRED) -+endif() -+ -+if(WITH_OPENIMAGEDENOISE) -+ find_package_wrapper(OpenImageDenoise) -+ -+ if(NOT OPENIMAGEDENOISE_FOUND) -+ set(WITH_OPENIMAGEDENOISE OFF) -+ message(STATUS "OpenImageDenoise not found") -+ endif() -+endif() -+ -+if(WITH_LLVM) -+ find_package_wrapper(LLVM) -+ -+ if(NOT LLVM_FOUND) -+ set(WITH_LLVM OFF) -+ message(STATUS "LLVM not found") -+ else() -+ # imagehelp is needed by LLVM 3.1 on MinGW, check lib\Support\Windows\Signals.inc -+ list(APPEND PLATFORM_LINKLIBS -limagehlp) -+ endif() -+endif() -+ -+if(WITH_OPENSUBDIV OR WITH_CYCLES_OPENSUBDIV) -+ find_package_wrapper(OpenSubdiv) -+ -+ set(OPENSUBDIV_LIBRARIES ${OPENSUBDIV_LIBRARIES}) -+ set(OPENSUBDIV_LIBPATH) # TODO, remove and reference the absolute path everywhere -+ -+ if(NOT OPENSUBDIV_FOUND) -+ set(WITH_OPENSUBDIV OFF) -+ set(WITH_CYCLES_OPENSUBDIV OFF) -+ message(STATUS "OpenSubdiv not found") -+ endif() -+endif() -+ -+if(WITH_TBB) -+ find_package_wrapper(TBB) -+endif() -+ -+if(NOT WITH_TBB OR NOT TBB_FOUND) -+ if(WITH_OPENIMAGEDENOISE) -+ message(STATUS "TBB not found, disabling OpenImageDenoise") -+ set(WITH_OPENIMAGEDENOISE OFF) -+ endif() -+ if(WITH_OPENVDB) -+ message(STATUS "TBB not found, disabling OpenVDB") -+ set(WITH_OPENVDB OFF) -+ endif() -+ if(WITH_MOD_FLUID) -+ message(STATUS "TBB disabled, disabling Fluid modifier") -+ set(WITH_MOD_FLUID OFF) -+ endif() -+endif() -+ -+if(WITH_XR_OPENXR) -+ find_package(XR_OpenXR_SDK) -+ if(NOT XR_OPENXR_SDK_FOUND) -+ message(WARNING "OpenXR-SDK not found, disabling WITH_XR_OPENXR") -+ set(WITH_XR_OPENXR OFF) -+ endif() -+endif() -+ -+if(WITH_GMP) -+ find_package_wrapper(GMP) -+ if(NOT GMP_FOUND) -+ message(WARNING "GMP not found, disabling WITH_GMP") -+ set(WITH_GMP OFF) -+ endif() -+endif() -+ -+if(WITH_POTRACE) -+ find_package_wrapper(Potrace) -+ if(NOT POTRACE_FOUND) -+ message(WARNING "potrace not found, disabling WITH_POTRACE") -+ set(WITH_POTRACE OFF) -+ endif() -+endif() -+ -+if(WITH_HARU) -+ find_package_wrapper(Haru) -+ if(NOT HARU_FOUND) -+ message(WARNING "Haru not found, disabling WITH_HARU") -+ set(WITH_HARU OFF) -+ endif() -+endif() -+ -+set(PLATFORM_LINKFLAGS "-Xlinker --stack=2097152") -+ -+## DISABLE - causes linking errors -+## for re-distribution, so users dont need mingw installed -+# set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-libgcc -static-libstdc++") ---- blender-2.80/source/creator/CMakeLists.txt.orig 2019-08-01 11:08:03.806515200 +0300 -+++ blender-2.80/source/creator/CMakeLists.txt 2019-08-01 11:18:49.638850100 +0300 -@@ -318,7 +318,7 @@ + find_python_package(requests "") + endif() + +- if(WIN32 OR APPLE) ++ if(MSVC OR APPLE) + # pass, we have this in lib/python/site-packages + elseif(WITH_PYTHON_INSTALL_ZSTANDARD) + find_python_package(zstandard "") +--- a/source/creator/CMakeLists.txt ++++ b/source/creator/CMakeLists.txt +@@ -298,7 +298,7 @@ # ----------------------------------------------------------------------------- # Platform Specific Var: TARGETDIR_VER @@ -596,7 +120,7 @@ if(WITH_PYTHON_MODULE) if(WITH_INSTALL_PORTABLE) set(TARGETDIR_VER ${BLENDER_VERSION}) -@@ -460,13 +460,13 @@ +@@ -456,13 +456,13 @@ # ----------------------------------------------------------------------------- # Install Targets (Platform Specific) @@ -612,7 +136,7 @@ --blender ${EXECUTABLE_OUTPUT_PATH}/blender --output ${CMAKE_CURRENT_BINARY_DIR}/blender.1) add_dependencies(blender_man_page blender) -@@ -1054,7 +1054,7 @@ +@@ -1345,7 +1345,7 @@ # ----------------------------------------------------------------------------- # Setup launcher @@ -621,9 +145,19 @@ install( TARGETS blender COMPONENT Blender ---- blender-2.80/build_files/cmake/Modules/FindPythonLibsUnix.cmake.orig 2019-08-01 15:48:36.544120800 +0300 -+++ blender-2.80/build_files/cmake/Modules/FindPythonLibsUnix.cmake 2019-08-01 15:49:05.123371000 +0300 -@@ -44,7 +44,9 @@ +--- a/build_files/cmake/Modules/FindOpenImageIO.cmake ++++ b/build_files/cmake/Modules/FindOpenImageIO.cmake +@@ -49,6 +49,7 @@ + FIND_FILE(OPENIMAGEIO_IDIFF + NAMES + idiff ++ idiff.exe + HINTS + ${_openimageio_SEARCH_DIRS} + PATH_SUFFIXES +--- a/build_files/cmake/Modules/FindPythonLibsUnix.cmake ++++ b/build_files/cmake/Modules/FindPythonLibsUnix.cmake +@@ -36,7 +36,9 @@ # See: http://docs.python.org/extending/embedding.html#linking-requirements # for why this is needed @@ -633,3 +167,566 @@ MARK_AS_ADVANCED(PYTHON_LINKFLAGS) +--- a/build_files/cmake/platform/platform_win32_mingw64.cmake ++++ b/build_files/cmake/platform/platform_win32_mingw64.cmake +@@ -0,0 +1,560 @@ ++# SPDX-License-Identifier: GPL-2.0-or-later ++# Copyright 2016 Blender Foundation. All rights reserved. ++ ++# Libraries configuration for MINGW ++ ++add_definitions(-DWIN32 -D_WIN32_WINNT=0x603) ++ ++# Support restoring this value once pre-compiled libraries have been handled. ++set(WITH_STATIC_LIBS_INIT ${WITH_STATIC_LIBS}) ++ ++if(WITH_STATIC_LIBS) ++ string(APPEND CMAKE_EXE_LINKER_FLAGS " -static-libstdc++") ++endif() ++ ++# Wrapper to prefer static libraries ++macro(find_package_wrapper) ++ if(WITH_STATIC_LIBS) ++ find_package_static(${ARGV}) ++ else() ++ find_package(${ARGV}) ++ endif() ++endmacro() ++ ++# ---------------------------------------------------------------------------- ++# Precompiled Libraries ++# ++ ++find_package_wrapper(JPEG REQUIRED) ++find_package_wrapper(PNG REQUIRED) ++find_package_wrapper(ZLIB REQUIRED) ++find_package_wrapper(Zstd REQUIRED) ++ ++if(NOT WITH_SYSTEM_FREETYPE) ++ # FreeType compiled with Brotli compression for woff2. ++ find_package_wrapper(Freetype REQUIRED) ++endif() ++ ++if(WITH_PYTHON) ++ # No way to set py35, remove for now. ++ # find_package(PythonLibs) ++ ++ # Use our own instead, since without 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_wrapper(OpenEXR) # our own module ++ if(NOT OPENEXR_FOUND) ++ set(WITH_IMAGE_OPENEXR OFF) ++ endif() ++endif() ++ ++if(WITH_IMAGE_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) ++ endif() ++endif() ++ ++if(WITH_OPENAL) ++ find_package_wrapper(OpenAL) ++ if(NOT OPENAL_FOUND) ++ set(WITH_OPENAL OFF) ++ endif() ++endif() ++ ++if(WITH_SDL) ++ find_package_wrapper(SDL2) ++ if(SDL2_FOUND) ++ # Use same names for both versions of SDL until we move to 2.x. ++ set(SDL_INCLUDE_DIR "${SDL2_INCLUDE_DIR}") ++ set(SDL_LIBRARY "${SDL2_LIBRARY}") ++ set(SDL_FOUND "${SDL2_FOUND}") ++ else() ++ find_package_wrapper(SDL) ++ endif() ++ mark_as_advanced( ++ SDL_INCLUDE_DIR ++ SDL_LIBRARY ++ ) ++ # unset(SDLMAIN_LIBRARY CACHE) ++ if(NOT SDL_FOUND) ++ set(WITH_SDL OFF) ++ endif() ++endif() ++ ++# Codecs ++if(WITH_CODEC_SNDFILE) ++ find_package_wrapper(SndFile) ++ if(NOT SNDFILE_FOUND) ++ set(WITH_CODEC_SNDFILE OFF) ++ endif() ++endif() ++ ++if(WITH_CODEC_FFMPEG) ++ set(FFMPEG_ROOT_DIR ${FFMPEG}) ++ find_package(FFmpeg) ++ if(NOT FFMPEG_FOUND) ++ set(WITH_CODEC_FFMPEG OFF) ++ message(STATUS "FFmpeg not found, disabling it") ++ endif() ++endif() ++ ++if(WITH_FFTW3) ++ find_package_wrapper(Fftw3) ++ if(NOT FFTW3_FOUND) ++ set(WITH_FFTW3 OFF) ++ endif() ++endif() ++ ++if(WITH_OPENCOLLADA) ++ find_package_wrapper(OpenCOLLADA) ++ if(OPENCOLLADA_FOUND) ++ find_package_wrapper(PCRE) ++ find_package_wrapper(XML2) ++ else() ++ set(WITH_OPENCOLLADA OFF) ++ endif() ++endif() ++ ++if(WITH_MEM_JEMALLOC) ++ find_package_wrapper(JeMalloc) ++ if(NOT JEMALLOC_FOUND) ++ set(WITH_MEM_JEMALLOC OFF) ++ endif() ++endif() ++ ++if(WITH_INPUT_NDOF) ++ find_package_wrapper(Spacenav) ++ if(SPACENAV_FOUND) ++ # use generic names within blenders buildsystem. ++ set(NDOF_INCLUDE_DIRS ${SPACENAV_INCLUDE_DIRS}) ++ set(NDOF_LIBRARIES ${SPACENAV_LIBRARIES}) ++ else() ++ set(WITH_INPUT_NDOF OFF) ++ endif() ++endif() ++ ++if(WITH_CYCLES AND WITH_CYCLES_OSL) ++ find_package_wrapper(OSL) ++ if(OSL_FOUND) ++ if(${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6") ++ # Note: --whole-archive is needed to force loading of all symbols in liboslexec, ++ # otherwise LLVM is missing the osl_allocate_closure_component function ++ set(OSL_LIBRARIES ++ ${OSL_OSLCOMP_LIBRARY} ++ -Wl,--whole-archive ${OSL_OSLEXEC_LIBRARY} ++ -Wl,--no-whole-archive ${OSL_OSLQUERY_LIBRARY} ++ ) ++ endif() ++ else() ++ message(STATUS "OSL not found, disabling it from Cycles") ++ set(WITH_CYCLES_OSL OFF) ++ endif() ++endif() ++ ++if(WITH_OPENVDB) ++ find_package_wrapper(OpenVDB) ++ find_package_wrapper(Blosc) ++ ++ if(NOT OPENVDB_FOUND) ++ set(WITH_OPENVDB OFF) ++ set(WITH_OPENVDB_BLOSC OFF) ++ message(STATUS "OpenVDB not found, disabling it") ++ elseif(NOT BLOSC_FOUND) ++ set(WITH_OPENVDB_BLOSC OFF) ++ message(STATUS "Blosc not found, disabling it for OpenVBD") ++ endif() ++endif() ++ ++if(WITH_NANOVDB) ++ find_package_wrapper(NanoVDB) ++ ++ if(NOT NANOVDB_FOUND) ++ set(WITH_NANOVDB OFF) ++ message(STATUS "NanoVDB not found, disabling it") ++ endif() ++endif() ++ ++if(WITH_CPU_SIMD AND SUPPORT_NEON_BUILD) ++ find_package_wrapper(sse2neon) ++endif() ++ ++if(WITH_ALEMBIC) ++ find_package_wrapper(Alembic) ++ ++ if(NOT ALEMBIC_FOUND) ++ set(WITH_ALEMBIC OFF) ++ endif() ++endif() ++ ++if(WITH_USD) ++ find_package_wrapper(USD) ++ ++ if(NOT USD_FOUND) ++ set(WITH_USD OFF) ++ endif() ++endif() ++ ++if(WITH_BOOST) ++ # uses in build instructions to override include and library variables ++ if(NOT BOOST_CUSTOM) ++ if(WITH_STATIC_LIBS) ++ set(Boost_USE_STATIC_LIBS ON) ++ endif() ++ set(Boost_USE_MULTITHREADED ON) ++ set(__boost_packages filesystem regex thread date_time) ++ if(WITH_CYCLES AND WITH_CYCLES_OSL) ++ if(NOT (${OSL_LIBRARY_VERSION_MAJOR} EQUAL "1" AND ${OSL_LIBRARY_VERSION_MINOR} LESS "6")) ++ list(APPEND __boost_packages wave) ++ else() ++ endif() ++ endif() ++ if(WITH_INTERNATIONAL) ++ list(APPEND __boost_packages locale) ++ endif() ++ if(WITH_OPENVDB) ++ list(APPEND __boost_packages iostreams) ++ endif() ++ list(APPEND __boost_packages system) ++ find_package(Boost 1.48 COMPONENTS ${__boost_packages}) ++ if(NOT Boost_FOUND) ++ # try to find non-multithreaded if -mt not found, this flag ++ # doesn't matter for us, it has nothing to do with thread ++ # safety, but keep it to not disturb build setups ++ set(Boost_USE_MULTITHREADED OFF) ++ find_package(Boost 1.48 COMPONENTS ${__boost_packages}) ++ endif() ++ unset(__boost_packages) ++ if(Boost_USE_STATIC_LIBS AND WITH_BOOST_ICU) ++ find_package(IcuLinux) ++ endif() ++ mark_as_advanced(Boost_DIR) # why doesn't boost do this? ++ mark_as_advanced(Boost_INCLUDE_DIR) # why doesn't boost do this? ++ endif() ++ ++ set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS}) ++ set(BOOST_LIBRARIES ${Boost_LIBRARIES}) ++ set(BOOST_LIBPATH ${Boost_LIBRARY_DIRS}) ++ set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB") ++ ++ if(Boost_USE_STATIC_LIBS AND WITH_BOOST_ICU) ++ find_package(IcuLinux) ++ list(APPEND BOOST_LIBRARIES ${ICU_LIBRARIES}) ++ endif() ++endif() ++ ++if(WITH_PUGIXML) ++ find_package_wrapper(PugiXML) ++ ++ if(NOT PUGIXML_FOUND) ++ set(WITH_PUGIXML OFF) ++ message(STATUS "PugiXML not found, disabling WITH_PUGIXML") ++ endif() ++endif() ++ ++if(WITH_IMAGE_WEBP) ++ set(WEBP_ROOT_DIR ${LIBDIR}/webp) ++ find_package_wrapper(WebP) ++ if(NOT WEBP_FOUND) ++ set(WITH_IMAGE_WEBP OFF) ++ message(WARNING "WebP not found, disabling WITH_IMAGE_WEBP") ++ endif() ++endif() ++ ++if(WITH_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 ++ set(OPENIMAGEIO_DEFINITIONS "") ++ ++ if(WITH_IMAGE_TIFF) ++ list(APPEND OPENIMAGEIO_LIBRARIES "${TIFF_LIBRARY}") ++ endif() ++ if(WITH_IMAGE_OPENEXR) ++ list(APPEND OPENIMAGEIO_LIBRARIES "${OPENEXR_LIBRARIES}") ++ endif() ++ if(WITH_IMAGE_WEBP) ++ list(APPEND OPENIMAGEIO_LIBRARIES "${WEBP_LIBRARIES}") ++ endif() ++ ++ if(NOT OPENIMAGEIO_FOUND) ++ set(WITH_OPENIMAGEIO OFF) ++ message(STATUS "OpenImageIO not found, disabling WITH_CYCLES") ++ endif() ++endif() ++ ++if(WITH_OPENCOLORIO) ++ find_package_wrapper(OpenColorIO 2.0.0) ++ ++ set(OPENCOLORIO_LIBRARIES ${OPENCOLORIO_LIBRARIES}) ++ set(OPENCOLORIO_LIBPATH) # TODO, remove and reference the absolute path everywhere ++ set(OPENCOLORIO_DEFINITIONS) ++ ++ if(NOT OPENCOLORIO_FOUND) ++ set(WITH_OPENCOLORIO OFF) ++ message(STATUS "OpenColorIO not found") ++ endif() ++endif() ++ ++if(WITH_CYCLES AND WITH_CYCLES_EMBREE) ++ find_package(Embree 3.8.0 REQUIRED) ++endif() ++ ++if(WITH_OPENIMAGEDENOISE) ++ find_package_wrapper(OpenImageDenoise) ++ ++ if(NOT OPENIMAGEDENOISE_FOUND) ++ set(WITH_OPENIMAGEDENOISE OFF) ++ message(STATUS "OpenImageDenoise not found") ++ endif() ++endif() ++ ++if(WITH_LLVM) ++ if(EXISTS ${LIBDIR}) ++ set(LLVM_STATIC ON) ++ endif() ++ ++ find_package_wrapper(LLVM) ++ if(WITH_CLANG) ++ find_package_wrapper(Clang) ++ endif() ++ # Symbol conflicts with same UTF library used by OpenCollada ++ if(EXISTS ${LIBDIR}) ++ if(WITH_OPENCOLLADA AND (${LLVM_VERSION} VERSION_LESS "4.0.0")) ++ list(REMOVE_ITEM OPENCOLLADA_LIBRARIES ${OPENCOLLADA_UTF_LIBRARY}) ++ endif() ++ endif() ++ ++ if(NOT LLVM_FOUND) ++ set(WITH_LLVM OFF) ++ set(WITH_CLANG OFF) ++ message(STATUS "LLVM not found") ++ else() ++ if(NOT CLANG_FOUND) ++ set(WITH_CLANG OFF) ++ message(STATUS "Clang not found") ++ endif() ++ endif() ++endif() ++ ++if(WITH_OPENSUBDIV) ++ find_package_wrapper(OpenSubdiv) ++ ++ set(OPENSUBDIV_LIBRARIES ${OPENSUBDIV_LIBRARIES}) ++ set(OPENSUBDIV_LIBPATH) # TODO, remove and reference the absolute path everywhere ++ ++ if(NOT OPENSUBDIV_FOUND) ++ set(WITH_OPENSUBDIV OFF) ++ message(STATUS "OpenSubdiv not found") ++ endif() ++endif() ++ ++if(WITH_TBB) ++ find_package_wrapper(TBB) ++ if(NOT TBB_FOUND) ++ message(WARNING "TBB not found, disabling WITH_TBB") ++ set(WITH_TBB OFF) ++ endif() ++endif() ++ ++if(WITH_XR_OPENXR) ++ find_package(XR_OpenXR_SDK) ++ if(NOT XR_OPENXR_SDK_FOUND) ++ message(WARNING "OpenXR-SDK not found, disabling WITH_XR_OPENXR") ++ set(WITH_XR_OPENXR OFF) ++ endif() ++endif() ++ ++if(WITH_GMP) ++ find_package_wrapper(GMP) ++ if(NOT GMP_FOUND) ++ message(WARNING "GMP not found, disabling WITH_GMP") ++ set(WITH_GMP OFF) ++ endif() ++endif() ++ ++if(WITH_POTRACE) ++ find_package_wrapper(Potrace) ++ if(NOT POTRACE_FOUND) ++ message(WARNING "potrace not found, disabling WITH_POTRACE") ++ set(WITH_POTRACE OFF) ++ endif() ++endif() ++ ++if(WITH_HARU) ++ find_package_wrapper(Haru) ++ if(NOT HARU_FOUND) ++ message(WARNING "Haru not found, disabling WITH_HARU") ++ set(WITH_HARU OFF) ++ endif() ++endif() ++ ++# ---------------------------------------------------------------------------- ++# Build and Link Flags ++ ++list(APPEND PLATFORM_LINKLIBS ++ ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 comctl32 version ++ advapi32 shfolder shell32 ole32 oleaut32 uuid psapi dbghelp shlwapi ++ pathcch shcore ++) ++ ++if(WITH_INPUT_IME) ++ list(APPEND PLATFORM_LINKLIBS imm32) ++endif() ++ ++find_package(Threads REQUIRED) ++list(APPEND PLATFORM_LINKLIBS ${CMAKE_THREAD_LIBS_INIT}) ++# used by other platforms ++set(PTHREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) ++ ++if(WITH_SYSTEM_FREETYPE) ++ find_package_wrapper(Freetype) ++ if(NOT FREETYPE_FOUND) ++ message(FATAL_ERROR "Failed finding system FreeType version!") ++ endif() ++endif() ++ ++if(WITH_LZO AND WITH_SYSTEM_LZO) ++ find_package_wrapper(LZO) ++ if(NOT LZO_FOUND) ++ message(FATAL_ERROR "Failed finding system LZO version!") ++ endif() ++endif() ++ ++if(WITH_SYSTEM_EIGEN3) ++ find_package_wrapper(Eigen3) ++ if(NOT EIGEN3_FOUND) ++ message(FATAL_ERROR "Failed finding system Eigen3 version!") ++ endif() ++endif() ++ ++# Jack is intended to use the system library. ++if(WITH_JACK) ++ find_package_wrapper(Jack) ++ if(NOT JACK_FOUND) ++ set(WITH_JACK OFF) ++ endif() ++endif() ++ ++# Pulse is intended to use the system library. ++if(WITH_PULSEAUDIO) ++ find_package_wrapper(Pulse) ++ if(NOT PULSE_FOUND) ++ set(WITH_PULSEAUDIO OFF) ++ endif() ++endif() ++ ++# Audio IO ++if(WITH_SYSTEM_AUDASPACE) ++ find_package_wrapper(Audaspace) ++ if(NOT AUDASPACE_FOUND OR NOT AUDASPACE_C_FOUND) ++ message(FATAL_ERROR "Audaspace external library not found!") ++ endif() ++endif() ++ ++# ---------------------------------------------------------------------------- ++# Compilers ++ ++# GNU Compiler ++if(CMAKE_COMPILER_IS_GNUCC) ++ # ffp-contract=off: ++ # Automatically turned on when building with "-march=native". This is ++ # explicitly turned off here as it will make floating point math give a bit ++ # different results. This will lead to automated test failures. So disable ++ # this until we support it. Seems to default to off in clang and the intel ++ # compiler. ++ set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off") ++ ++ # `maybe-uninitialized` is unreliable in release builds, but fine in debug builds. ++ set(GCC_EXTRA_FLAGS_RELEASE "-Wno-maybe-uninitialized") ++ set(CMAKE_C_FLAGS_RELEASE "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELEASE}") ++ set(CMAKE_C_FLAGS_RELWITHDEBINFO "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELWITHDEBINFO}") ++ set(CMAKE_CXX_FLAGS_RELEASE "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELEASE}") ++ string(PREPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO "${GCC_EXTRA_FLAGS_RELEASE} ") ++ unset(GCC_EXTRA_FLAGS_RELEASE) ++ ++# CLang is the same as GCC for now. ++elseif(CMAKE_C_COMPILER_ID MATCHES "Clang") ++ set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing") ++endif() ++ ++# Don't use position independent executable for portable install since file ++# browsers can't properly detect blender as an executable then. Still enabled ++# for non-portable installs as typically used by Linux distributions. ++if(WITH_INSTALL_PORTABLE) ++ string(APPEND CMAKE_EXE_LINKER_FLAGS " -no-pie") ++endif() ++ ++if(WITH_COMPILER_CCACHE) ++ find_program(CCACHE_PROGRAM ccache) ++ if(CCACHE_PROGRAM) ++ # Makefiles and ninja ++ set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE) ++ set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE) ++ else() ++ message(WARNING "Ccache NOT found, disabling WITH_COMPILER_CCACHE") ++ set(WITH_COMPILER_CCACHE OFF) ++ endif() ++endif() ++ ++# On some platforms certain atomic operations are not possible with assembly and/or intrinsics and ++# they are emulated in software with locks. For example, on armel there is no intrinsics to grant ++# 64 bit atomic operations and STL library uses libatomic to offload software emulation of atomics ++# to. ++# This function will check whether libatomic is required and if so will configure linker flags. ++# If atomic operations are possible without libatomic then linker flags are left as-is. ++function(CONFIGURE_ATOMIC_LIB_IF_NEEDED) ++ # Source which is used to enforce situation when software emulation of atomics is required. ++ # Assume that using 64bit integer gives a definitive answer (as in, if 64bit atomic operations ++ # are possible using assembly/intrinsics 8, 16, and 32 bit operations will also be possible. ++ set(_source ++ "#include ++ #include ++ int main(int argc, char **argv) { ++ std::atomic uint64; uint64++; ++ return 0; ++ }") ++ ++ include(CheckCXXSourceCompiles) ++ check_cxx_source_compiles("${_source}" ATOMIC_OPS_WITHOUT_LIBATOMIC) ++ ++ if(NOT ATOMIC_OPS_WITHOUT_LIBATOMIC) ++ # Compilation of the test program has failed. ++ # Try it again with -latomic to see if this is what is needed, or whether something else is ++ # going on. ++ ++ set(CMAKE_REQUIRED_LIBRARIES atomic) ++ check_cxx_source_compiles("${_source}" ATOMIC_OPS_WITH_LIBATOMIC) ++ ++ if(ATOMIC_OPS_WITH_LIBATOMIC) ++ set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -latomic" PARENT_SCOPE) ++ else() ++ # Atomic operations are required part of Blender and it is not possible to process forward. ++ # We expect that either standard library or libatomic will make atomics to work. If both ++ # cases has failed something fishy o na bigger scope is going on. ++ message(FATAL_ERROR "Failed to detect required configuration for atomic operations") ++ endif() ++ endif() ++endfunction() ++ ++CONFIGURE_ATOMIC_LIB_IF_NEEDED() diff --git a/mingw-w64-blender/0002-fix-mingw-w64-definitions.patch b/mingw-w64-blender/0002-fix-mingw-w64-definitions.patch index 409ac111b3..71df3a5e0c 100644 --- a/mingw-w64-blender/0002-fix-mingw-w64-definitions.patch +++ b/mingw-w64-blender/0002-fix-mingw-w64-definitions.patch @@ -1,6 +1,23 @@ -diff -Naur blender-2.77a-orig/extern/glog/src/windows/config.h blender-2.77a/extern/glog/src/windows/config.h ---- blender-2.77a-orig/extern/glog/src/windows/config.h 2016-03-23 11:49:49.000000000 +0300 -+++ blender-2.77a/extern/glog/src/windows/config.h 2016-07-12 13:40:19.613595000 +0300 +--- a/extern/ceres/include/ceres/jet.h ++++ b/extern/ceres/include/ceres/jet.h +@@ -590,6 +590,7 @@ + return Jet(erfc(x.a), -x.v * M_2_SQRTPI * exp(-x.a * x.a)); + } + ++#ifndef __MINGW32__ + // Bessel functions of the first kind with integer order equal to 0, 1, n. + // + // Microsoft has deprecated the j[0,1,n]() POSIX Bessel functions in favour of +@@ -647,6 +648,7 @@ + BesselJn(n, f.a), + T(0.5) * (BesselJn(n - 1, f.a) - BesselJn(n + 1, f.a)) * f.v); + } ++#endif + + // Jet Classification. It is not clear what the appropriate semantics are for + // these classifications. This picks that std::isfinite and std::isnormal are +--- a/extern/glog/src/windows/config.h ++++ b/extern/glog/src/windows/config.h @@ -15,6 +15,10 @@ #if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER >= 1900)) # define HAVE_SNPRINTF @@ -12,9 +29,8 @@ diff -Naur blender-2.77a-orig/extern/glog/src/windows/config.h blender-2.77a/ext /* Always the empty-string on non-windows systems. On windows, should be "__declspec(dllexport)". This way, when we compile the dll, we export our -diff -Naur blender-2.77a-orig/extern/glog/src/windows/port.h blender-2.77a/extern/glog/src/windows/port.h ---- blender-2.77a-orig/extern/glog/src/windows/port.h 2016-03-23 11:49:49.000000000 +0300 -+++ blender-2.77a/extern/glog/src/windows/port.h 2016-07-12 13:40:19.613595000 +0300 +--- a/extern/glog/src/windows/port.h ++++ b/extern/glog/src/windows/port.h @@ -62,7 +62,7 @@ * used by both C and C++ code, so we put all the C++ together. */ @@ -24,8 +40,8 @@ diff -Naur blender-2.77a-orig/extern/glog/src/windows/port.h blender-2.77a/exter /* 4244: otherwise we get problems when substracting two size_t's to an int * 4251: it's complaining about a private struct I've chosen not to dllexport -@@ -74,17 +74,19 @@ - #pragma warning(disable:4244 4251 4355 4715 4800 4996) +@@ -77,17 +77,19 @@ + #pragma warning(disable:4244 4251 4355 4715 4800 4996 4267 4312 4722) /* file I/O */ -#define PATH_MAX 1024 @@ -38,28 +54,107 @@ diff -Naur blender-2.77a-orig/extern/glog/src/windows/port.h blender-2.77a/exter #define close _close #define popen _popen #define pclose _pclose -+#ifndef __MINGW64_VERSION_MAJOR ++#ifndef __MINGW32__ +#define lseek _lseek +#define PATH_MAX 1024 #define R_OK 04 /* read-only (for access()) */ +#endif #define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) - #ifndef __MINGW32__ - enum { STDIN_FILENO = 0, STDOUT_FILENO = 1, STDERR_FILENO = 2 }; -@@ -130,7 +132,9 @@ + + #define O_WRONLY _O_WRONLY +@@ -138,7 +138,9 @@ #define DEFAULT_TEMPLATE_ROOTDIR ".." // ----------------------------------- SYSTEM/PROCESS -+#ifndef __MINGW64_VERSION_MAJOR ++#ifndef __MINGW32__ typedef int pid_t; +#endif #define getpid _getpid #endif // _MSC_VER -diff -Naur blender-2.77a-orig/intern/cycles/util/util_logging.h blender-2.77a/intern/cycles/util/util_logging.h ---- blender-2.77a-orig/intern/cycles/util/util_logging.h 2016-03-23 11:49:49.000000000 +0300 -+++ blender-2.77a/intern/cycles/util/util_logging.h 2016-07-12 13:40:19.646095000 +0300 -@@ -18,7 +18,9 @@ +--- a/extern/mantaflow/helper/util/vectorbase.h ++++ b/extern/mantaflow/helper/util/vectorbase.h +@@ -32,7 +32,7 @@ + #endif + + // redefine usage of some windows functions +-#if defined(WIN32) || defined(_WIN32) ++#if defined(_MSC_VER) + # ifndef snprintf + # define snprintf _snprintf + # endif +--- a/extern/quadriflow/src/dedge.cpp ++++ b/extern/quadriflow/src/dedge.cpp +@@ -10,6 +10,11 @@ + #ifdef WITH_TBB + #include "tbb/tbb.h" + #endif ++ ++#ifdef _WIN32 ++#include ++#endif ++ + namespace qflow { + + inline int dedge_prev(int e, int deg) { return (e % deg == 0u) ? e + (deg - 1) : e - 1; } +--- a/intern/clog/clog.c ++++ b/intern/clog/clog.c +@@ -24,8 +24,8 @@ + # include + #endif + +-#if defined(_MSC_VER) +-# include ++#if defined(_WIN32) ++# include + + # include /* This needs to be included after Windows.h. */ + # include +@@ -384,7 +384,7 @@ + static uint64_t clg_timestamp_ticks_get(void) + { + uint64_t tick; +-#if defined(_MSC_VER) ++#if defined(_WIN32) + tick = GetTickCount64(); + #else + struct timeval tv; +--- a/intern/cycles/device/cuda/device.cpp ++++ b/intern/cycles/device/cuda/device.cpp +@@ -74,7 +74,7 @@ + #ifdef WITH_CUDA + static CUresult device_cuda_safe_init() + { +-# ifdef _WIN32 ++# ifdef _MSC_VER + __try { + return cuInit(0); + } +--- a/intern/cycles/device/hip/device.cpp ++++ b/intern/cycles/device/hip/device.cpp +@@ -80,7 +80,7 @@ + #ifdef WITH_HIP + static hipError_t device_hip_safe_init() + { +-# ifdef _WIN32 ++# ifdef _MSC_VER + __try { + return hipInit(0); + } +--- a/intern/cycles/util/defines.h ++++ b/intern/cycles/util/defines.h +@@ -47,7 +47,7 @@ + # define ccl_device_forceinline static inline __attribute__((always_inline)) + # define ccl_device_inline_method __attribute__((always_inline)) + # define ccl_align(...) __attribute__((aligned(__VA_ARGS__))) +-# ifndef FREE_WINDOWS64 ++# ifndef __MINGW32__ + # define __forceinline inline __attribute__((always_inline)) + # endif + # define ccl_try_align(...) __attribute__((aligned(__VA_ARGS__))) +--- a/intern/cycles/util/log.h ++++ b/intern/cycles/util/log.h +@@ -6,7 +6,9 @@ #if defined(WITH_CYCLES_LOGGING) && !defined(__KERNEL_GPU__) # include @@ -69,10 +164,20 @@ diff -Naur blender-2.77a-orig/intern/cycles/util/util_logging.h blender-2.77a/in #endif #include -diff -Naur blender-2.80-orig/intern/cycles/util/util_simd.h blender-2.80/intern/cycles/util/util_simd.h ---- blender-2.80-orig/intern/cycles/util/util_simd.h 2016-03-23 11:49:49.000000000 +0300 -+++ blender-2.80/intern/cycles/util/util_simd.h 2016-07-12 13:40:19.681095000 +0300 -@@ -26,12 +16,8 @@ +--- a/intern/cycles/util/murmurhash.cpp ++++ b/intern/cycles/util/murmurhash.cpp +@@ -13,7 +13,7 @@ + #include "util/math.h" + #include "util/murmurhash.h" + +-#if defined(_MSC_VER) ++#if defined(_WIN32) + # define ROTL32(x, y) _rotl(x, y) + # define ROTL64(x, y) _rotl64(x, y) + # define BIG_CONSTANT(x) (x) +--- a/intern/cycles/util/simd.h ++++ b/intern/cycles/util/simd.h +@@ -13,12 +13,8 @@ /* SSE Intrinsics includes * * We assume __KERNEL_SSEX__ flags to have been defined at this point. @@ -80,29 +185,16 @@ diff -Naur blender-2.80-orig/intern/cycles/util/util_simd.h blender-2.80/intern/ - * MinGW64 has conflicting declarations for these SSE headers in . - * Since we can't avoid including , better only include that */ -#if defined(FREE_WINDOWS64) --# include "util/util_windows.h" +-# include "util/windows.h" -#elif defined(_MSC_VER) + */ +#if defined(_WIN32) # include #elif (defined(__x86_64__) || defined(__i386__)) # include -diff -Naur blender-2.80-orig/intern/cycles/util/util_defines.h blender-2.80/intern/cycles/util/util_defines.h ---- blender-2.80-orig/intern/cycles/util/util_defines.h 2016-03-23 11:49:49.000000000 +0300 -+++ blender-2.80/intern/cycles/util/util_defines.h 2016-07-12 13:40:19.712595000 +0300 -@@ -59,7 +59,7 @@ - # define ccl_device_inline static inline __attribute__((always_inline)) - # define ccl_device_forceinline static inline __attribute__((always_inline)) - # define ccl_align(...) __attribute__((aligned(__VA_ARGS__))) --# ifndef FREE_WINDOWS64 -+# ifndef __MINGW64_VERSION_MAJOR - # define __forceinline inline __attribute__((always_inline)) - # endif - # define ccl_try_align(...) __attribute__((aligned(__VA_ARGS__))) -diff -Naur blender-2.80-orig/intern/dualcon/intern/Projections.h blender-2.80/intern/dualcon/intern/Projections.h ---- blender-2.80-orig/intern/dualcon/intern/Projections.h 2016-03-23 11:49:49.000000000 +0300 -+++ blender-2.80/intern/dualcon/intern/Projections.h 2016-07-12 13:40:19.712595000 +0300 -@@ -23,7 +23,7 @@ +--- a/intern/dualcon/intern/Projections.h ++++ b/intern/dualcon/intern/Projections.h +@@ -9,7 +9,7 @@ #define CONTAINS_INDEX #define GRID_DIMENSION 20 @@ -111,43 +203,24 @@ diff -Naur blender-2.80-orig/intern/dualcon/intern/Projections.h blender-2.80/in # define isnan(n) _isnan(n) # define LONG __int64 # define int64_t __int64 -diff -Naur blender-2.80-orig/intern/ghost/intern/GHOST_WindowWin32.cpp blender-2.80/intern/ghost/intern/GHOST_WindowWin32.cpp ---- blender-2.80-orig/intern/ghost/intern/GHOST_WindowWin32.cpp 2016-03-23 11:49:43.000000000 +0300 -+++ blender-2.80/intern/ghost/intern/GHOST_WindowWin32.cpp 2016-07-12 13:40:19.800595000 +0300 -@@ -23,6 +23,12 @@ +--- a/intern/ghost/intern/GHOST_ContextWGL.h ++++ b/intern/ghost/intern/GHOST_ContextWGL.h +@@ -11,6 +11,7 @@ - #define _USE_MATH_DEFINES + #include "GHOST_Context.h" -+#if defined(WITH_GL_EGL) -+# include "GHOST_ContextEGL.h" -+#else -+# include "GHOST_ContextWGL.h" -+#endif -+ - #include "GHOST_WindowWin32.h" - #include "GHOST_ContextD3D.h" - #include "GHOST_ContextNone.h" -@@ -36,11 +42,6 @@ - #include "utfconv.h" - #include "utf_winfunc.h" ++#undef INT + #include --#if defined(WITH_GL_EGL) --# include "GHOST_ContextEGL.h" --#else --# include "GHOST_ContextWGL.h" --#endif - #ifdef WIN32_COMPOSITING - # include - #endif -diff -Naur blender-2.77a-orig/intern/libmv/libmv/numeric/numeric.h blender-2.77a/intern/libmv/libmv/numeric/numeric.h ---- blender-2.77a-orig/intern/libmv/libmv/numeric/numeric.h 2016-03-23 11:49:49.000000000 +0300 -+++ blender-2.77a/intern/libmv/libmv/numeric/numeric.h 2016-07-12 13:40:19.817095000 +0300 + #ifndef GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY +--- a/intern/libmv/libmv/numeric/numeric.h ++++ b/intern/libmv/libmv/numeric/numeric.h @@ -33,7 +33,7 @@ #include #include -#if !defined(__MINGW64__) -+#if !defined(__MINGW64_VERSION_MAJOR) ++#if !defined(__MINGW32__) # if defined(_WIN32) || defined(__APPLE__) || defined(__FreeBSD__) || \ defined(__NetBSD__) || defined(__HAIKU__) inline void sincos(double x, double* sinx, double* cosx) { @@ -156,53 +229,53 @@ diff -Naur blender-2.77a-orig/intern/libmv/libmv/numeric/numeric.h blender-2.77a } # endif -#endif // !__MINGW64__ -+#endif // !__MINGW64_VERSION_MAJOR ++#endif // !__MINGW32__ - #if (defined(WIN32) || defined(WIN64)) && !defined(__MINGW32__) + #if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__) inline long lround(double d) { -diff --Naur a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h +@@ -449,7 +449,7 @@ + } + + inline bool isnan(double i) { +-#ifdef WIN32 ++#ifdef _MSC_VER + return _isnan(i) > 0; + #else + return std::isnan(i); --- a/source/blender/blenlib/BLI_fileops.h +++ b/source/blender/blenlib/BLI_fileops.h -@@ -65,8 +65,10 @@ int BLI_create_symlink(const char *path, const char *to) ATTR_NONNULL(); +@@ -64,7 +64,7 @@ int BLI_create_symlink(const char *path, const char *to) ATTR_NONNULL(); - /* keep in sync with the definition of struct direntry in BLI_fileops_types.h */ + /* Keep in sync with the definition of struct `direntry` in `BLI_fileops_types.h`. */ #ifdef WIN32 -# if defined(_MSC_VER) -+# if defined(_MSC_VER) || defined(__MINGW64__) ++# if defined(_MSC_VER) || defined(__MINGW32__) typedef struct _stat64 BLI_stat_t; -+# elif defined(__MINGW32__) -+typedef struct _stati64 BLI_stat_t; # else typedef struct _stat BLI_stat_t; - # endif -diff -Naur blender-2.79-orig/source/blender/blenlib/BLI_fileops_types.h blender-2.79/source/blender/blenlib/BLI_fileops_types.h ---- blender-2.79-orig/source/blender/blenlib/BLI_fileops_types.h 2016-03-23 11:49:43.000000000 +0300 -+++ blender-2.79/source/blender/blenlib/BLI_fileops_types.h 2016-07-12 13:40:19.827095000 +0300 -@@ -35,7 +35,7 @@ - - #include +--- a/source/blender/blenlib/BLI_fileops_types.h ++++ b/source/blender/blenlib/BLI_fileops_types.h +@@ -14,7 +14,7 @@ + extern "C" { + #endif -#if defined(WIN32) +#if defined(_MSC_VER) typedef unsigned int mode_t; #endif -@@ -50,8 +50,10 @@ struct direntry { +@@ -29,7 +29,7 @@ struct direntry { const char *relname; const char *path; #ifdef WIN32 /* keep in sync with the definition of BLI_stat_t in BLI_fileops.h */ -# if defined(_MSC_VER) -+# if defined(_MSC_VER) || defined(__MINGW64__) ++# if defined(_MSC_VER) || defined(__MINGW32__) struct _stat64 s; -+# elif defined(__MINGW32__) -+ struct _stati64 s; # else struct _stat s; - # endif -diff -Naur blender-2.77a-orig/source/blender/blenlib/BLI_winstuff.h blender-2.77a/source/blender/blenlib/BLI_winstuff.h ---- blender-2.77a-orig/source/blender/blenlib/BLI_winstuff.h 2016-03-23 11:49:43.000000000 +0300 -+++ blender-2.77a/source/blender/blenlib/BLI_winstuff.h 2016-07-12 13:40:19.827095000 +0300 -@@ -65,7 +65,7 @@ +--- a/source/blender/blenlib/BLI_winstuff.h ++++ b/source/blender/blenlib/BLI_winstuff.h +@@ -49,7 +49,7 @@ #endif /* Defines for using ISO C++ conferment names. */ @@ -211,7 +284,7 @@ diff -Naur blender-2.77a-orig/source/blender/blenlib/BLI_winstuff.h blender-2.77 # define snprintf _snprintf #endif -@@ -82,10 +95,13 @@ +@@ -56,10 +56,13 @@ # define F_OK 0 #endif @@ -227,154 +300,24 @@ diff -Naur blender-2.77a-orig/source/blender/blenlib/BLI_winstuff.h blender-2.77 /* python uses HAVE_SSIZE_T */ # ifndef HAVE_SSIZE_T # define HAVE_SSIZE_T 1 ---- blender-2.79b/source/blender/blenlib/intern/system.c.orig 2018-05-11 10:10:42.876493200 +0300 -+++ blender-2.79b/source/blender/blenlib/intern/system.c 2018-05-11 10:10:49.927705600 +0300 -@@ -72,7 +72,7 @@ - } - - /* Windows stack-walk lives in system_win32.c */ --#if !defined(_MSC_VER) -+#if !defined(_WIN32) - /** - * Write a backtrace into a file for systems which support it. - */ -@@ -110,7 +110,7 @@ - - /* NOTE: The code for CPU brand string is adopted from Cycles. */ - --#if !defined(_WIN32) || defined(FREE_WINDOWS) -+#if !defined(_WIN32) || (defined(FREE_WINDOWS) && !defined(__MINGW32__)) - static void __cpuid( - /* Cannot be const, because it is modified below. - * NOLINTNEXTLINE: readability-non-const-parameter. */ ---- blender-2.79b/source/blender/imbuf/intern/openexr/openexr_api.cpp.orig 2018-05-11 10:10:42.876493200 +0300 -+++ blender-2.79b/source/blender/imbuf/intern/openexr/openexr_api.cpp 2018-05-11 10:10:49.927705600 +0300 -@@ -77,7 +77,7 @@ - { - - // The following prevents a linking error in debug mode for MSVC using the libs in CVS --#if defined(WITH_OPENEXR) && defined(_WIN32) && defined(DEBUG) && _MSC_VER < 1900 -+#if defined(WITH_OPENEXR) && defined(_MSC_VER) && defined(DEBUG) && _MSC_VER < 1900 - _CRTIMP void __cdecl _invalid_parameter_noinfo(void) - { - } -diff -Naur blender-2.80-orig/source/blender/blenlib/intern/math_solvers.c blender-2.80/source/blender/blenlib/intern/math_solvers.c ---- blender-2.80-orig/source/blender/blenlib/intern/math_solvers.c 2016-09-28 12:26:55.000000000 +0300 -+++ blender-2.80/source/blender/blenlib/intern/math_solvers.c 2016-10-14 13:53:56.430617800 +0300 -@@ -121,7 +121,7 @@ - - MEM_freeN(c1); - -- return isfinite(x_prev); -+ return isfinite((float)x_prev); - } - - /** -diff -Naur blender-2.81a-orig/source/creator/creator.c blender-2.81a/source/creator/creator.c ---- blender-2.81a-orig/source/creator/creator.c 2016-09-28 12:26:55.000000000 +0300 -+++ blender-2.81a/source/creator/creator.c 2016-10-14 14:45:36.982849100 +0300 -@@ -23,8 +23,9 @@ - - #include - #include -+#include - --#ifdef WIN32 -+#ifdef _WIN32 - # include "utfconv.h" - # include - #endif -diff -Naur a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h ---- a/source/blender/imbuf/intern/IMB_anim.h -+++ b/source/blender/imbuf/intern/IMB_anim.h -@@ -31,7 +31,10 @@ - # include - # include - # include --# include -+ -+# ifndef FREE_WINDOWS -+# include -+# endif - # include - # include - -@@ -112,7 +115,7 @@ struct anim { - /* avi */ - struct _AviMovie *avi; - --#if defined(_WIN32) -+#if defined(_WIN32) && !defined(FREE_WINDOWS) - /* windows avi */ - int avistreams; - int firstvideo; -diff -Naur a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c ---- a/source/blender/imbuf/intern/anim_movie.c -+++ b/source/blender/imbuf/intern/anim_movie.c -@@ -28,7 +28,10 @@ - - #ifdef _WIN32 - # include "BLI_winstuff.h" -+ -+#ifndef FREE_WINDOWS - # include -+#endif - - # undef AVIIF_KEYFRAME /* redefined in AVI_avi.h */ - # undef AVIIF_LIST /* redefined in AVI_avi.h */ -@@ -165,7 +168,7 @@ static void an_stringenc(char *string, const char *head, const char *tail, unsig - #ifdef WITH_AVI - static void free_anim_avi(struct anim *anim) - { --# if defined(_WIN32) -+# if defined(_WIN32) && !defined(FREE_WINDOWS) - int i; - # endif - -@@ -180,7 +183,7 @@ static void free_anim_avi(struct anim *anim) - MEM_freeN(anim->avi); - anim->avi = NULL; - --# if defined(_WIN32) -+# if defined(_WIN32) && !defined(FREE_WINDOWS) - - if (anim->pgf) { - AVIStreamGetFrameClose(anim->pgf); -@@ -319,7 +322,7 @@ static int startavi(struct anim *anim) - { - - AviError avierror; --# if defined(_WIN32) -+# if defined(_WIN32) && !defined(FREE_WINDOWS) - HRESULT hr; - int i, firstvideo = -1; - int streamcount; -@@ -340,7 +343,7 @@ static int startavi(struct anim *anim) - - avierror = AVI_open_movie(anim->name, anim->avi); - --# if defined(_WIN32) -+# if defined(_WIN32) && !defined(FREE_WINDOWS) - if (avierror == AVI_ERROR_COMPRESSION) { - AVIFileInit(); - hr = AVIFileOpen(&anim->pfile, anim->name, OF_READ, 0L); -@@ -444,7 +447,7 @@ static ImBuf *avi_fetchibuf(struct anim *anim, int position) - return NULL; +--- a/source/blender/blenlib/intern/BLI_mmap.c ++++ b/source/blender/blenlib/intern/BLI_mmap.c +@@ -183,7 +183,7 @@ + return false; } --# if defined(_WIN32) -+# if defined(_WIN32) && !defined(FREE_WINDOWS) - if (anim->avistreams) { - LPBITMAPINFOHEADER lpbi; - -diff -Naur a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c +-#ifndef WIN32 ++#ifndef _MSC_VER + /* If an error occurs in this call, sigbus_handler will be called and will set + * file->io_error to true. */ + memcpy(dest, file->memory + offset, length); --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c -@@ -1263,7 +1263,18 @@ bool BLI_path_program_search( +@@ -1186,7 +1186,18 @@ bool BLI_path_program_search( { /* free windows */ --#if (defined(WIN32) || defined(WIN64)) +-#if (defined(_WIN32) || defined(_WIN64)) +#if defined(__MINGW32__) + char *envstr; + @@ -390,22 +333,18 @@ diff -Naur a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/ uputenv(env, val); #else -diff -Naur a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c -@@ -266,8 +266,10 @@ int BLI_stat(const char *path, BLI_stat_t *buffer) +@@ -376,7 +376,7 @@ int BLI_stat(const char *path, BLI_stat_t *buffer) int BLI_wstat(const wchar_t *path, BLI_stat_t *buffer) { -# if defined(_MSC_VER) -+# if defined(_MSC_VER) || defined(__MINGW64__) ++# if defined(_MSC_VER) || defined(__MINGW32__) return _wstat64(path, buffer); -+# elif defined(__MINGW32__) -+ return _wstati64(path, buffer); # else return _wstat(path, buffer); - # endif -@@ -457,17 +460,30 @@ void BLI_file_free_lines(LinkNode *lines) +@@ -569,17 +569,30 @@ void BLI_file_free_lines(LinkNode *lines) bool BLI_file_older(const char *file1, const char *file2) { #ifdef WIN32 @@ -437,143 +376,110 @@ diff -Naur a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/in UTF16_UN_ENCODE(file2); UTF16_UN_ENCODE(file1); ---- blender-2.80/intern/clog/clog.c.orig 2019-08-01 12:18:33.240672100 +0300 -+++ blender-2.80/intern/clog/clog.c 2019-08-01 12:18:45.784094200 +0300 -@@ -38,8 +38,8 @@ - # include - #endif +--- a/source/blender/blenlib/intern/system.c ++++ b/source/blender/blenlib/intern/system.c +@@ -60,7 +60,7 @@ + } --#if defined(_MSC_VER) --# include -+#if defined(_WIN32) -+# include - - # include /* This needs to be included after Windows.h. */ - # include -@@ -365,7 +365,7 @@ - static uint64_t clg_timestamp_ticks_get(void) + /* Windows stack-walk lives in system_win32.c */ +-#if !defined(_MSC_VER) ++#if !defined(_WIN32) + void BLI_system_backtrace(FILE *fp) { - uint64_t tick; --#if defined(_MSC_VER) -+#if defined(_WIN32) - tick = GetTickCount64(); - #else - struct timeval tv; ---- blender-2.80/intern/ghost/intern/GHOST_DisplayManagerWin32.h.orig 2019-08-01 13:25:18.577130500 +0300 -+++ blender-2.80/intern/ghost/intern/GHOST_DisplayManagerWin32.h 2019-08-01 13:25:57.358798600 +0300 -@@ -25,7 +25,7 @@ - #ifndef __GHOST_DISPLAYMANAGERWIN32_H__ - #define __GHOST_DISPLAYMANAGERWIN32_H__ + /* ----------------------- */ +@@ -95,7 +95,7 @@ --#ifndef WIN32 -+#ifndef _WIN32 - # error WIN32 only! - #endif // WIN32 + /* NOTE: The code for CPU brand string is adopted from Cycles. */ ---- blender-2.80/intern/ghost/intern/GHOST_SystemWin32.h.orig 2019-08-01 13:27:05.485718300 +0300 -+++ blender-2.80/intern/ghost/intern/GHOST_SystemWin32.h 2019-08-01 13:27:09.713325700 +0300 -@@ -25,7 +25,7 @@ - #ifndef __GHOST_SYSTEMWIN32_H__ - #define __GHOST_SYSTEMWIN32_H__ - --#ifndef WIN32 -+#ifndef _WIN32 - # error WIN32 only! - #endif // WIN32 - ---- blender-2.80/intern/ghost/intern/GHOST_TaskbarWin32.h.orig 2019-08-01 13:26:35.424465500 +0300 -+++ blender-2.80/intern/ghost/intern/GHOST_TaskbarWin32.h 2019-08-01 13:26:37.764469600 +0300 -@@ -20,7 +20,7 @@ - #ifndef __GHOST_TASKBARWIN32_H__ - #define __GHOST_TASKBARWIN32_H__ - --#ifndef WIN32 -+#ifndef _WIN32 - # error WIN32 only! - #endif // WIN32 - ---- blender-2.80/intern/ghost/intern/GHOST_WindowWin32.h.orig 2019-08-01 13:26:03.333609100 +0300 -+++ blender-2.80/intern/ghost/intern/GHOST_WindowWin32.h 2019-08-01 13:26:07.077615600 +0300 -@@ -25,7 +25,7 @@ - #ifndef __GHOST_WINDOWWIN32_H__ - #define __GHOST_WINDOWWIN32_H__ - --#ifndef WIN32 -+#ifndef _WIN32 - # error WIN32 only! - #endif // WIN32 - ---- blender-2.80/intern/ghost/intern/GHOST_ContextWGL.h.orig 2019-08-01 13:26:03.333609100 +0300 -+++ blender-2.80/intern/ghost/intern/GHOST_ContextWGL.h 2019-08-01 13:26:07.077615600 +0300 -@@ -28,6 +28,7 @@ - - #include "GHOST_Context.h" - -+#undef INT; - #include - - #ifndef GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY ---- blender-2.80/intern/cycles/util/util_murmurhash.cpp.orig 2019-08-01 15:24:38.522454900 +0300 -+++ blender-2.80/intern/cycles/util/util_murmurhash.cpp 2019-08-01 14:58:05.222223800 +0300 -@@ -26,7 +26,7 @@ - #include "util/util_algorithm.h" - #include "util/util_murmurhash.h" - --#if defined(_MSC_VER) -+#if defined(_WIN32) - # define ROTL32(x, y) _rotl(x, y) - # define ROTL64(x, y) _rotl64(x, y) - # define BIG_CONSTANT(x) (x) ---- blender-2.80/intern/cycles/device/device_cuda.cpp.orig 2019-08-01 15:26:37.073620900 +0300 -+++ blender-2.80/intern/cycles/device/device_cuda.cpp 2019-08-01 15:26:46.043633500 +0300 -@@ -2584,7 +2584,7 @@ - - static CUresult device_cuda_safe_init() - { --# ifdef _WIN32 -+# ifdef _MSC_VER - __try { - return cuInit(0); - } ---- blender-2.80/intern/cycles/device/device_opencl.cpp.orig 2019-08-01 15:26:37.073620900 +0300 -+++ blender-2.80/intern/cycles/device/device_opencl.cpp 2019-08-01 15:26:46.043633500 +0300 -@@ -64,7 +64,7 @@ - - static cl_int device_opencl_get_num_platforms_safe(cl_uint *num_platforms) - { --# ifdef _WIN32 -+# ifdef _MSC_VER - __try { - return clGetPlatformIDs(0, NULL, num_platforms); - } ---- blender-2.81a/extern/quadriflow/src/dedge.cpp.orig 2019-12-06 11:45:08.681059300 +0300 -+++ blender-2.81a/extern/quadriflow/src/dedge.cpp 2019-12-06 11:45:54.841540400 +0300 -@@ -10,6 +10,11 @@ - #ifdef WITH_TBB - #include "tbb/tbb.h" - #endif +-#if !defined(_WIN32) || defined(FREE_WINDOWS) ++#if !defined(_WIN32) + static void __cpuid( + /* Cannot be const, because it is modified below. + * NOLINTNEXTLINE: readability-non-const-parameter. */ +--- a/source/blender/imbuf/intern/IMB_anim.h ++++ b/source/blender/imbuf/intern/IMB_anim.h +@@ -12,7 +12,10 @@ + # include + # include + # include +-# include + -+#ifdef _WIN32 -+#include ++# ifndef __MINGW32__ ++# include ++# endif + # include + # include + +@@ -95,7 +98,7 @@ struct anim { + /* avi */ + struct _AviMovie *avi; + +-#if defined(_WIN32) ++#if defined(_WIN32) && !defined(__MINGW32__) + /* windows avi */ + int avistreams; + int firstvideo; +--- a/source/blender/imbuf/intern/anim_movie.c ++++ b/source/blender/imbuf/intern/anim_movie.c +@@ -7,7 +7,10 @@ + + #ifdef _WIN32 + # include "BLI_winstuff.h" ++ ++#ifndef __MINGW32__ + # include +#endif -+ - namespace qflow { - inline int dedge_prev(int e, int deg) { return (e % deg == 0u) ? e + (deg - 1) : e - 1; } ---- a/source/blender/blenlib/intern/BLI_mmap.c -+++ b/source/blender/blenlib/intern/BLI_mmap.c -@@ -199,7 +199,7 @@ - return false; + # undef AVIIF_KEYFRAME /* redefined in AVI_avi.h */ + # undef AVIIF_LIST /* redefined in AVI_avi.h */ +@@ -147,7 +150,7 @@ static void an_stringenc(char *string, const char *head, const char *tail, unsig + #ifdef WITH_AVI + static void free_anim_avi(struct anim *anim) + { +-# if defined(_WIN32) ++# if defined(_WIN32) && !defined(__MINGW32__) + int i; + # endif + +@@ -162,7 +165,7 @@ static void free_anim_avi(struct anim *anim) + MEM_freeN(anim->avi); + anim->avi = NULL; + +-# if defined(_WIN32) ++# if defined(_WIN32) && !defined(__MINGW32__) + + if (anim->pgf) { + AVIStreamGetFrameClose(anim->pgf); +@@ -320,7 +323,7 @@ static int startavi(struct anim *anim) + { + + AviError avierror; +-# if defined(_WIN32) ++# if defined(_WIN32) && !defined(__MINGW32__) + HRESULT hr; + int i, firstvideo = -1; + int streamcount; +@@ -341,7 +344,7 @@ static int startavi(struct anim *anim) + + avierror = AVI_open_movie(anim->name, anim->avi); + +-# if defined(_WIN32) ++# if defined(_WIN32) && !defined(__MINGW32__) + if (avierror == AVI_ERROR_COMPRESSION) { + AVIFileInit(); + hr = AVIFileOpen(&anim->pfile, anim->name, OF_READ, 0L); +@@ -445,7 +448,7 @@ static ImBuf *avi_fetchibuf(struct anim *anim, int position) + return NULL; } --#ifndef WIN32 -+#ifndef _MSC_VER - /* If an error occurs in this call, sigbus_handler will be called and will set - * file->io_error to true. */ - memcpy(dest, file->memory + offset, length); +-# if defined(_WIN32) ++# if defined(_WIN32) && !defined(__MINGW32__) + if (anim->avistreams) { + LPBITMAPINFOHEADER lpbi; + --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c -@@ -39,7 +39,7 @@ +@@ -25,7 +25,7 @@ #include "rna_internal.h" @@ -582,14 +488,13 @@ diff -Naur a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/in # ifndef snprintf # define snprintf _snprintf # endif ---- a/extern/mantaflow/helper/util/vectorbase.h -+++ b/extern/mantaflow/helper/util/vectorbase.h -@@ -32,7 +32,7 @@ - #endif +--- a/source/creator/creator.c ++++ b/source/creator/creator.c +@@ -7,6 +7,7 @@ - // redefine usage of some windows functions --#if defined(WIN32) || defined(_WIN32) -+#if defined(_MSC_VER) - # ifndef snprintf - # define snprintf _snprintf - # endif + #include + #include ++#include + + #ifdef WIN32 + # include "utfconv.h" diff --git a/mingw-w64-blender/0003-disable-static_assert_align-on-mingw.patch b/mingw-w64-blender/0003-disable-static_assert_align-on-mingw.patch new file mode 100644 index 0000000000..3feedabc87 --- /dev/null +++ b/mingw-w64-blender/0003-disable-static_assert_align-on-mingw.patch @@ -0,0 +1,151 @@ +--- a/intern/cycles/kernel/types.h ++++ b/intern/cycles/kernel/types.h +@@ -1060,7 +1060,7 @@ + + int motion_position; + } KernelCamera; +-static_assert_align(KernelCamera, 16); ++// static_assert_align(KernelCamera, 16); + + typedef struct KernelFilm { + float exposure; +@@ -1148,7 +1148,7 @@ + + int pad1; + } KernelFilm; +-static_assert_align(KernelFilm, 16); ++// static_assert_align(KernelFilm, 16); + + typedef struct KernelFilmConvert { + int pass_offset; +@@ -1189,7 +1189,7 @@ + /* Padding. */ + int pad1; + } KernelFilmConvert; +-static_assert_align(KernelFilmConvert, 16); ++// static_assert_align(KernelFilmConvert, 16); + + typedef struct KernelBackground { + /* only shader index */ +@@ -1222,7 +1222,7 @@ + /* Padding */ + int pad1, pad2; + } KernelBackground; +-static_assert_align(KernelBackground, 16); ++// static_assert_align(KernelBackground, 16); + + typedef struct KernelIntegrator { + /* emission */ +@@ -1291,7 +1291,7 @@ + /* padding */ + int pad1; + } KernelIntegrator; +-static_assert_align(KernelIntegrator, 16); ++// static_assert_align(KernelIntegrator, 16); + + typedef enum KernelBVHLayout { + BVH_LAYOUT_NONE = 0, +@@ -1335,13 +1335,13 @@ + # endif + #endif + } KernelBVH; +-static_assert_align(KernelBVH, 16); ++// static_assert_align(KernelBVH, 16); + + typedef struct KernelTables { + int beckmann_offset; + int pad1, pad2, pad3; + } KernelTables; +-static_assert_align(KernelTables, 16); ++// static_assert_align(KernelTables, 16); + + typedef struct KernelBake { + int use; +@@ -1349,7 +1349,7 @@ + int tri_offset; + int pad1; + } KernelBake; +-static_assert_align(KernelBake, 16); ++// static_assert_align(KernelBake, 16); + + typedef struct KernelData { + uint kernel_features; +@@ -1365,7 +1365,7 @@ + KernelTables tables; + KernelBake bake; + } KernelData; +-static_assert_align(KernelData, 16); ++// static_assert_align(KernelData, 16); + + /* Kernel data structures. */ + +@@ -1407,7 +1407,7 @@ + /* Volume velocity scale. */ + float velocity_scale; + } KernelObject; +-static_assert_align(KernelObject, 16); ++// static_assert_align(KernelObject, 16); + + typedef struct KernelCurve { + int shader_id; +@@ -1415,13 +1415,13 @@ + int num_keys; + int type; + } KernelCurve; +-static_assert_align(KernelCurve, 16); ++// static_assert_align(KernelCurve, 16); + + typedef struct KernelCurveSegment { + int prim; + int type; + } KernelCurveSegment; +-static_assert_align(KernelCurveSegment, 8); ++// static_assert_align(KernelCurveSegment, 8); + + typedef struct KernelSpotLight { + float radius; +@@ -1467,7 +1467,7 @@ + KernelDistantLight distant; + }; + } KernelLight; +-static_assert_align(KernelLight, 16); ++// static_assert_align(KernelLight, 16); + + typedef struct KernelLightDistribution { + float totarea; +@@ -1483,7 +1483,7 @@ + } lamp; + }; + } KernelLightDistribution; +-static_assert_align(KernelLightDistribution, 16); ++// static_assert_align(KernelLightDistribution, 16); + + typedef struct KernelParticle { + int index; +@@ -1497,7 +1497,7 @@ + float4 velocity; + float4 angular_velocity; + } KernelParticle; +-static_assert_align(KernelParticle, 16); ++// static_assert_align(KernelParticle, 16); + + typedef struct KernelShader { + float constant_emission[3]; +@@ -1506,7 +1506,7 @@ + int pass_id; + int pad2, pad3; + } KernelShader; +-static_assert_align(KernelShader, 16); ++// static_assert_align(KernelShader, 16); + + /* Patches */ + +@@ -1545,7 +1545,7 @@ + int prim; + float u, v; + } KernelShaderEvalInput; +-static_assert_align(KernelShaderEvalInput, 16); ++// static_assert_align(KernelShaderEvalInput, 16); + + /* Pre-computed sample table sizes for PMJ02 sampler. */ + #define NUM_PMJ_DIVISIONS 32 diff --git a/mingw-w64-blender/0005-fix-WINTAB_PRINTF-on-mingw.patch b/mingw-w64-blender/0005-fix-WINTAB_PRINTF-on-mingw.patch new file mode 100644 index 0000000000..7c44eb511a --- /dev/null +++ b/mingw-w64-blender/0005-fix-WINTAB_PRINTF-on-mingw.patch @@ -0,0 +1,86 @@ +--- a/intern/ghost/intern/GHOST_SystemWin32.cpp ++++ b/intern/ghost/intern/GHOST_SystemWin32.cpp +@@ -948,11 +948,11 @@ + /* Test for Win32/Wintab button down match. */ + useWintabPos = wt->testCoordinates(msg.pt.x, msg.pt.y, info.x, info.y); + if (!useWintabPos) { +- WINTAB_PRINTF(" ... but associated system button mismatched position\n"); ++ WINTAB_PRINTF(" ... but associated system button mismatched position\n", ""); + continue; + } + +- WINTAB_PRINTF(" ... associated to system button\n"); ++ WINTAB_PRINTF(" ... associated to system button\n", ""); + + /* Steal the Win32 event which was previously peeked. */ + PeekMessage(&msg, window->getHWND(), message, message, PM_REMOVE | PM_NOYIELD); +@@ -971,13 +971,13 @@ + break; + } + else { +- WINTAB_PRINTF(" ... but no system button\n"); ++ WINTAB_PRINTF(" ... but no system button\n", ""); + } + } + case GHOST_kEventButtonUp: { + WINTAB_PRINTF("HWND %p Wintab button up", window->getHWND()); + if (!useWintabPos) { +- WINTAB_PRINTF(" ... but Wintab position isn't trusted\n"); ++ WINTAB_PRINTF(" ... but Wintab position isn't trusted\n", ""); + continue; + } + +@@ -1003,13 +1003,13 @@ + if (PeekMessage(&msg, window->getHWND(), message, message, PM_REMOVE | PM_NOYIELD) && + msg.message != WM_QUIT) { + +- WINTAB_PRINTF(" ... associated to system button\n"); ++ WINTAB_PRINTF(" ... associated to system button\n", ""); + window->updateMouseCapture(MouseReleased); + system->pushEvent( + new GHOST_EventButton(info.time, info.type, window, info.button, info.tabletData)); + } + else { +- WINTAB_PRINTF(" ... but no system button\n"); ++ WINTAB_PRINTF(" ... but no system button\n", ""); + } + break; + } +@@ -1631,16 +1631,16 @@ + case WT_PROXIMITY: { + WINTAB_PRINTF("HWND %p HCTX %p WT_PROXIMITY\n", window->getHWND(), (void *)wParam); + if (LOWORD(lParam)) { +- WINTAB_PRINTF(" Cursor entering context.\n"); ++ WINTAB_PRINTF(" Cursor entering context.\n", ""); + } + else { +- WINTAB_PRINTF(" Cursor leaving context.\n"); ++ WINTAB_PRINTF(" Cursor leaving context.\n", ""); + } + if (HIWORD(lParam)) { +- WINTAB_PRINTF(" Cursor entering or leaving hardware proximity.\n"); ++ WINTAB_PRINTF(" Cursor entering or leaving hardware proximity.\n", ""); + } + else { +- WINTAB_PRINTF(" Cursor neither entering nor leaving hardware proximity.\n"); ++ WINTAB_PRINTF(" Cursor neither entering nor leaving hardware proximity.\n", ""); + } + + GHOST_Wintab *wt = window->getWintab(); +@@ -1690,13 +1690,13 @@ + WINTAB_PRINTF("HWND %p HCTX %p WT_CTXOVERLAP", window->getHWND(), (void *)wParam); + switch (lParam) { + case CXS_DISABLED: +- WINTAB_PRINTF(" CXS_DISABLED\n"); ++ WINTAB_PRINTF(" CXS_DISABLED\n", ""); + break; + case CXS_OBSCURED: +- WINTAB_PRINTF(" CXS_OBSCURED\n"); ++ WINTAB_PRINTF(" CXS_OBSCURED\n", ""); + break; + case CXS_ONTOP: +- WINTAB_PRINTF(" CXS_ONTOP\n"); ++ WINTAB_PRINTF(" CXS_ONTOP\n", ""); + break; + } + break; diff --git a/mingw-w64-blender/0005-fix-define-syntax.patch b/mingw-w64-blender/0005-fix-define-syntax.patch deleted file mode 100644 index afb149f0e9..0000000000 --- a/mingw-w64-blender/0005-fix-define-syntax.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur blender-2.77a-orig/extern/clew/include/clew.h blender-2.77a/extern/clew/include/clew.h ---- blender-2.77a-orig/extern/clew/include/clew.h 2016-03-21 19:16:12.000000000 +0300 -+++ blender-2.77a/extern/clew/include/clew.h 2016-07-12 13:40:29.182095000 +0300 -@@ -493,7 +493,7 @@ - /* Define alignment keys */ - #if defined( __GNUC__ ) - #define CL_ALIGNED(_x) __attribute__ ((aligned(_x))) --#elif defined( _WIN32) && (_MSC_VER) -+#elif defined( _WIN32) && defined(_MSC_VER) - /* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */ - /* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */ - /* #include */ diff --git a/mingw-w64-blender/0006-mingw-DEBUG-libmv-avoid-too-many-sections.patch b/mingw-w64-blender/0006-mingw-DEBUG-libmv-avoid-too-many-sections.patch index 1b420ee1f3..7799ba9cc5 100644 --- a/mingw-w64-blender/0006-mingw-DEBUG-libmv-avoid-too-many-sections.patch +++ b/mingw-w64-blender/0006-mingw-DEBUG-libmv-avoid-too-many-sections.patch @@ -1,7 +1,6 @@ -diff -Naur blender-2.77a-orig/intern/libmv/CMakeLists.txt blender-2.77a/intern/libmv/CMakeLists.txt ---- blender-2.77a-orig/intern/libmv/CMakeLists.txt 2016-03-23 11:49:49.000000000 +0300 -+++ blender-2.77a/intern/libmv/CMakeLists.txt 2016-07-12 13:40:32.165095000 +0300 -@@ -199,6 +199,9 @@ +--- a/intern/libmv/CMakeLists.txt ++++ b/intern/libmv/CMakeLists.txt +@@ -195,6 +195,9 @@ third_party/msinttypes/stdint.h ) @@ -10,4 +9,4 @@ diff -Naur blender-2.77a-orig/intern/libmv/CMakeLists.txt blender-2.77a/intern/l + set_source_files_properties(libmv/simple_pipeline/resect.cc PROPERTIES COMPILE_FLAGS "-g0") if(WITH_GTESTS) - blender_add_lib(libmv_test_dataset "./libmv/multiview/test_data_sets.cc" "" "" "") + include(GTestTesting) diff --git a/mingw-w64-blender/0007-disable-compiler-warnings.patch b/mingw-w64-blender/0007-disable-compiler-warnings.patch new file mode 100644 index 0000000000..c769f88272 --- /dev/null +++ b/mingw-w64-blender/0007-disable-compiler-warnings.patch @@ -0,0 +1,20 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1537,7 +1537,7 @@ + + #----------------------------------------------------------------------------- + # Extra compile flags +- ++if(NOT MINGW) + if(CMAKE_COMPILER_IS_GNUCC) + + ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall) +@@ -1762,7 +1762,7 @@ + set(CXX_WARNINGS "${_WARNINGS}") + unset(_WARNINGS) + endif() +- ++endif() + # ensure python header is found since detection can fail, this could happen + # with _any_ library but since we used a fixed python version this tends to + # be most problematic. diff --git a/mingw-w64-blender/0008-mingw-use-X11-like-path-layout.patch b/mingw-w64-blender/0008-mingw-use-X11-like-path-layout.patch index dcc032c183..4a006f4992 100644 --- a/mingw-w64-blender/0008-mingw-use-X11-like-path-layout.patch +++ b/mingw-w64-blender/0008-mingw-use-X11-like-path-layout.patch @@ -1,19 +1,18 @@ -diff -Naur blender-2.77a-orig/intern/ghost/intern/GHOST_SystemPathsWin32.cpp blender-2.77a/intern/ghost/intern/GHOST_SystemPathsWin32.cpp ---- blender-2.77a-orig/intern/ghost/intern/GHOST_SystemPathsWin32.cpp 2016-03-16 15:57:57.000000000 +0300 -+++ blender-2.77a/intern/ghost/intern/GHOST_SystemPathsWin32.cpp 2016-07-12 13:40:38.182595000 +0300 -@@ -69,6 +69,44 @@ +--- a/intern/ghost/intern/GHOST_SystemPathsWin32.cpp ++++ b/intern/ghost/intern/GHOST_SystemPathsWin32.cpp +@@ -22,6 +22,44 @@ { } +#if defined(__MINGW32__) + -+const GHOST_TUns8 *GHOST_SystemPathsWin32::getSystemDir(int, const char *versionstr) const ++const char *GHOST_SystemPathsWin32::getSystemDir(int, const char *versionstr) const +{ + static char knownpath[MAX_PATH * 3 + 128] = {0}; + + char temppath[MAX_PATH + 1]; + char temppath2[MAX_PATH + 1]; -+ const GHOST_TUns8 *binary_dir = getBinaryDir(); ++ const char *binary_dir = getBinaryDir(); + strcpy(temppath2, reinterpret_cast(binary_dir)); + char* lastslash = strrchr(temppath2, '\\'); + if (lastslash != NULL) { @@ -22,16 +21,16 @@ diff -Naur blender-2.77a-orig/intern/ghost/intern/GHOST_SystemPathsWin32.cpp ble + snprintf(temppath, sizeof(temppath), "%s\\..\\share\\blender\\%s", temppath2, versionstr); + temppath[MAX_PATH] = '\0'; + GetFullPathNameA(temppath, sizeof(knownpath), knownpath, NULL); -+ return (GHOST_TUns8*)knownpath; ++ return (char*)knownpath; +} + -+const GHOST_TUns8 *GHOST_SystemPathsWin32::getUserDir(int, const char *versionstr) const ++const char *GHOST_SystemPathsWin32::getUserDir(int, const char *versionstr) const +{ + static char knownpath[MAX_PATH * 3 + 128] = {0}; + + char temppath[MAX_PATH + 1]; + char temppath2[MAX_PATH + 1]; -+ const GHOST_TUns8 *binary_dir = getBinaryDir(); ++ const char *binary_dir = getBinaryDir(); + strcpy(temppath2, reinterpret_cast(binary_dir)); + char* lastslash = strrchr(temppath2, '\\'); + if (lastslash != NULL) { @@ -40,18 +39,18 @@ diff -Naur blender-2.77a-orig/intern/ghost/intern/GHOST_SystemPathsWin32.cpp ble + snprintf(temppath, sizeof(temppath), "%s\\..\\..\\home\\%s\\.blender\\%s", temppath2, getenv("USERNAME") ?: "unknown", versionstr); + temppath[MAX_PATH] = '\0'; + GetFullPathNameA(temppath, sizeof(knownpath), knownpath, NULL); -+ return (GHOST_TUns8*)knownpath; ++ return (char*)knownpath; +} +#else - const GHOST_TUns8 *GHOST_SystemPathsWin32::getSystemDir(int, const char *versionstr) const + const char *GHOST_SystemPathsWin32::getSystemDir(int, const char *versionstr) const { - static char knownpath[MAX_PATH * 3 + 128] = {0}; /* 1 utf-16 might translante into 3 utf-8. 2 utf-16 translates into 4 utf-8*/ -@@ -105,6 +143,8 @@ - return NULL; + /* 1 utf-16 might translate into 3 utf-8. 2 utf-16 translates into 4 utf-8. */ +@@ -61,6 +99,8 @@ + return NULL; } +#endif + - const GHOST_TUns8 *GHOST_SystemPathsWin32::getUserSpecialDir(GHOST_TUserSpecialDirTypes type) const + const char *GHOST_SystemPathsWin32::getUserSpecialDir(GHOST_TUserSpecialDirTypes type) const { GUID folderid; diff --git a/mingw-w64-blender/0009-include-missing-headers.patch b/mingw-w64-blender/0009-include-missing-headers.patch new file mode 100644 index 0000000000..c33af285bd --- /dev/null +++ b/mingw-w64-blender/0009-include-missing-headers.patch @@ -0,0 +1,10 @@ +--- a/intern/ghost/intern/GHOST_Wintab.cpp ++++ b/intern/ghost/intern/GHOST_Wintab.cpp +@@ -5,6 +5,7 @@ + */ + + #define _USE_MATH_DEFINES ++#include + + #include "GHOST_Wintab.h" + diff --git a/mingw-w64-blender/0010-do-not-link-to-extern_bullet.patch b/mingw-w64-blender/0010-do-not-link-to-extern_bullet.patch new file mode 100644 index 0000000000..ee2e6e44cf --- /dev/null +++ b/mingw-w64-blender/0010-do-not-link-to-extern_bullet.patch @@ -0,0 +1,15 @@ +--- a/intern/rigidbody/CMakeLists.txt ++++ b/intern/rigidbody/CMakeLists.txt +@@ -20,8 +20,11 @@ + ) + + set(LIB +- extern_bullet + ${BULLET_LIBRARIES} + ) ++ ++if(NOT WITH_SYSTEM_BULLET) ++ list(APPEND LIB extern_bullet) ++endif() + + blender_add_lib(bf_intern_rigidbody "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") diff --git a/mingw-w64-blender/0011-c++11-defines-__i386__-not-i386.patch b/mingw-w64-blender/0011-c++11-defines-__i386__-not-i386.patch deleted file mode 100644 index b041706f0c..0000000000 --- a/mingw-w64-blender/0011-c++11-defines-__i386__-not-i386.patch +++ /dev/null @@ -1,96 +0,0 @@ -diff -urN blender-2.78a.orig/extern/sdlew/include/SDL2/SDL_stdinc.h blender-2.78a/extern/sdlew/include/SDL2/SDL_stdinc.h ---- blender-2.78a.orig/extern/sdlew/include/SDL2/SDL_stdinc.h 2017-01-21 23:15:35.942200500 +0000 -+++ blender-2.78a/extern/sdlew/include/SDL2/SDL_stdinc.h 2017-01-21 23:16:13.040308500 +0000 -@@ -181,7 +181,7 @@ - - SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t dwords) - { --#if defined(__GNUC__) && defined(i386) -+#if defined(__GNUC__) && defined(__i386__) - int u0, u1, u2; - __asm__ __volatile__ ( - "cld \n\t" -diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp ---- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp 2017-01-21 23:15:38.437603200 +0000 -+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp 2017-01-21 23:16:39.527894100 +0000 -@@ -19,7 +19,7 @@ - # define KERNEL_STUB - #else - /* SSE optimization disabled for now on 32 bit, see bug T36316. */ --# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86))) -+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) - # define __KERNEL_SSE__ - # define __KERNEL_SSE2__ - # define __KERNEL_SSE3__ -diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp ---- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp 2017-01-21 23:15:38.442605600 +0000 -+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp 2017-01-21 23:16:45.798993000 +0000 -@@ -19,7 +19,7 @@ - # define KERNEL_STUB - #else - /* SSE optimization disabled for now on 32 bit, see bug T36316. */ --# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86))) -+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) - # define __KERNEL_SSE__ - # define __KERNEL_SSE2__ - # define __KERNEL_SSE3__ -diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp ---- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp 2017-01-21 23:15:38.466624100 +0000 -+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp 2017-01-21 23:16:55.150783300 +0000 -@@ -19,7 +19,7 @@ - # define KERNEL_STUB - #else - /* SSE optimization disabled for now on 32 bit, see bug T36316. */ --# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86))) -+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) - # define __KERNEL_SSE2__ - # endif - #endif /* WITH_CYCLES_OPTIMIZED_KERNEL_SSE2 */ -diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp ---- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp 2017-01-21 23:15:38.471623800 +0000 -+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp 2017-01-21 23:17:01.336263900 +0000 -@@ -19,7 +19,7 @@ - # define KERNEL_STUB - #else - /* SSE optimization disabled for now on 32 bit, see bug T36316. */ --# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86))) -+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) - # define __KERNEL_SSE2__ - # define __KERNEL_SSE3__ - # define __KERNEL_SSSE3__ -diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp ---- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp 2017-01-21 23:15:38.457118700 +0000 -+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp 2017-01-21 23:17:06.789600800 +0000 -@@ -19,7 +19,7 @@ - # define KERNEL_STUB - #else - /* SSE optimization disabled for now on 32 bit, see bug T36316. */ --# if !(defined(__GNUC__) && (defined(i386) || defined(_M_IX86))) -+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) - # define __KERNEL_SSE2__ - # define __KERNEL_SSE3__ - # define __KERNEL_SSSE3__ -diff -urN blender-2.78a.orig/intern/cycles/util/util_optimization.h blender-2.78a/intern/cycles/util/util_optimization.h ---- blender-2.78a.orig/intern/cycles/util/util_optimization.h 2017-01-21 23:15:39.999924200 +0000 -+++ blender-2.78a/intern/cycles/util/util_optimization.h 2017-01-21 23:17:18.261111800 +0000 -@@ -23,7 +23,7 @@ - * - * Compile a regular, SSE2 and SSE3 kernel. */ - --# if defined(i386) || defined(_M_IX86) -+# if defined(__i386__) || defined(_M_IX86) - - /* We require minimum SSE2 support on x86, so auto enable. */ - # define __KERNEL_SSE2__ -diff -urN blender-2.78a.orig/source/blender/blenlib/intern/system.c blender-2.78a/source/blender/blenlib/intern/system.c ---- blender-2.78a.orig/source/blender/blenlib/intern/system.c 2017-01-21 23:15:56.216596800 +0000 -+++ blender-2.78a/source/blender/blenlib/intern/system.c 2017-01-21 23:19:07.797217100 +0000 -@@ -47,7 +47,7 @@ - #if defined(__x86_64__) || defined(_M_X64) - /* x86_64 always has SSE2 instructions */ - return 1; --#elif defined(__GNUC__) && defined(i386) -+#elif defined(__GNUC__) && defined(__i386__) - /* for GCC x86 we check cpuid */ - unsigned int d; - __asm__( diff --git a/mingw-w64-blender/0011-no-TIME_UTC-on-msvcrt.patch b/mingw-w64-blender/0011-no-TIME_UTC-on-msvcrt.patch new file mode 100644 index 0000000000..499b9e5dde --- /dev/null +++ b/mingw-w64-blender/0011-no-TIME_UTC-on-msvcrt.patch @@ -0,0 +1,11 @@ +--- a/source/blender/blenlib/intern/uuid.cc ++++ b/source/blender/blenlib/intern/uuid.cc +@@ -28,7 +28,7 @@ + static_assert(std::mt19937_64::max() == 0xffffffffffffffffLL); + + struct timespec ts; +-#ifdef __APPLE__ ++#if defined(__APPLE__) || (defined(__MINGW32__) && !defined(_UCRT)) + /* `timespec_get()` is only available on macOS 10.15+, so until that's the minimum version + * supported by Blender, use another function to get the timespec. + * diff --git a/mingw-w64-blender/0012-re-enable-SSE-on-mingw-w64-i686.patch b/mingw-w64-blender/0012-re-enable-SSE-on-mingw-w64-i686.patch deleted file mode 100644 index 542cceab26..0000000000 --- a/mingw-w64-blender/0012-re-enable-SSE-on-mingw-w64-i686.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp ---- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp 2017-01-21 23:34:42.502290800 +0000 -+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx.cpp 2017-01-21 23:35:05.135410900 +0000 -@@ -19,7 +19,7 @@ - * is compiled without for other CPU's. */ - - /* SSE optimization disabled for now on 32 bit, see bug T36316. */ --# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) -+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) || defined(WIN32) - # define __KERNEL_SSE__ - # define __KERNEL_SSE2__ - # define __KERNEL_SSE3__ -diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp ---- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp 2017-01-21 23:34:42.535294300 +0000 -+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_avx2.cpp 2017-01-21 23:35:11.368213100 +0000 -@@ -19,7 +19,7 @@ - # define KERNEL_STUB - #else - /* SSE optimization disabled for now on 32 bit, see bug T36316. */ --# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) -+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) || defined(WIN32) - # define __KERNEL_SSE__ - # define __KERNEL_SSE2__ - # define __KERNEL_SSE3__ -diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp ---- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp 2017-01-21 23:34:42.509291800 +0000 -+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse2.cpp 2017-01-21 23:35:16.535104100 +0000 -@@ -19,7 +19,7 @@ - # define KERNEL_STUB - #else - /* SSE optimization disabled for now on 32 bit, see bug T36316. */ --# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) -+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) || defined(WIN32) - # define __KERNEL_SSE2__ - # endif - #endif /* WITH_CYCLES_OPTIMIZED_KERNEL_SSE2 */ -diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp ---- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp 2017-01-21 23:34:42.521290800 +0000 -+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse3.cpp 2017-01-21 23:35:21.888140600 +0000 -@@ -19,7 +19,7 @@ - # define KERNEL_STUB - #else - /* SSE optimization disabled for now on 32 bit, see bug T36316. */ --# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) -+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) || defined(WIN32) - # define __KERNEL_SSE2__ - # define __KERNEL_SSE3__ - # define __KERNEL_SSSE3__ -diff -urN blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp ---- blender-2.78a.orig/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp 2017-01-21 23:34:42.528291800 +0000 -+++ blender-2.78a/intern/cycles/kernel/kernels/cpu/kernel_sse41.cpp 2017-01-21 23:35:41.958064000 +0000 -@@ -19,7 +19,7 @@ - # define KERNEL_STUB - #else - /* SSE optimization disabled for now on 32 bit, see bug T36316. */ --# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) -+# if !(defined(__GNUC__) && (defined(__i386__) || defined(_M_IX86))) || defined(WIN32) - # define __KERNEL_SSE2__ - # define __KERNEL_SSE3__ - # define __KERNEL_SSSE3__ diff --git a/mingw-w64-blender/0014-libstdc++-not-support-utf-stream.patch b/mingw-w64-blender/0014-libstdc++-not-support-utf-stream.patch index 6e3f23a274..8c4aa7380f 100644 --- a/mingw-w64-blender/0014-libstdc++-not-support-utf-stream.patch +++ b/mingw-w64-blender/0014-libstdc++-not-support-utf-stream.patch @@ -1,6 +1,6 @@ ---- blender-2.79/source/blender/imbuf/intern/dds/dds_api.cpp.orig 2017-09-14 15:29:21.477036100 +0300 -+++ blender-2.79/source/blender/imbuf/intern/dds/dds_api.cpp 2017-09-14 15:29:30.667254000 +0300 -@@ -59,7 +59,7 @@ +--- a/source/blender/imbuf/intern/dds/dds_api.cpp ++++ b/source/blender/imbuf/intern/dds/dds_api.cpp +@@ -43,7 +43,7 @@ /* open file for writing */ std::ofstream fildes; @@ -9,23 +9,23 @@ wchar_t *wname = alloc_utf16_from_8(name, 0); fildes.open(wname); free(wname); ---- blender-2.79/source/blender/imbuf/intern/openexr/openexr_api.cpp.orig 2017-09-14 15:27:43.677657600 +0300 -+++ blender-2.79/source/blender/imbuf/intern/openexr/openexr_api.cpp 2017-09-14 15:28:07.224301900 +0300 -@@ -167,7 +167,7 @@ - IFileStream(const char *filename) : IStream(filename) +--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp ++++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp +@@ -216,7 +216,7 @@ + IFileStream(const char *filepath) : IStream(filepath) { /* utf-8 file path support on windows */ -#if defined(WIN32) -+#if defined (_MSC_VER) - wchar_t *wfilename = alloc_utf16_from_8(filename, 0); - ifs.open(wfilename, std::ios_base::binary); - free(wfilename); -@@ -273,7 +273,7 @@ - OFileStream(const char *filename) : OStream(filename) ++#if defined(_MSC_VER) + wchar_t *wfilepath = alloc_utf16_from_8(filepath, 0); + ifs.open(wfilepath, std::ios_base::binary); + free(wfilepath); +@@ -322,7 +322,7 @@ + OFileStream(const char *filepath) : OStream(filepath) { /* utf-8 file path support on windows */ -#if defined(WIN32) -+#if defined (_MSC_VER) - wchar_t *wfilename = alloc_utf16_from_8(filename, 0); - ofs.open(wfilename, std::ios_base::binary); - free(wfilename); ++#if defined(_MSC_VER) + wchar_t *wfilepath = alloc_utf16_from_8(filepath, 0); + ofs.open(wfilepath, std::ios_base::binary); + free(wfilepath); diff --git a/mingw-w64-blender/0015-mingw-python-like-msvc.patch b/mingw-w64-blender/0015-mingw-python-like-msvc.patch index 0d9cd6eb46..7cc0b6435b 100644 --- a/mingw-w64-blender/0015-mingw-python-like-msvc.patch +++ b/mingw-w64-blender/0015-mingw-python-like-msvc.patch @@ -1,6 +1,6 @@ ---- blender-2.79/source/blender/python/intern/bpy_app_handlers.c.orig 2017-09-14 15:41:13.142883900 +0300 -+++ blender-2.79/source/blender/python/intern/bpy_app_handlers.c 2017-09-14 15:41:34.396030100 +0300 -@@ -128,7 +128,7 @@ +--- a/source/blender/python/intern/bpy_app_handlers.c ++++ b/source/blender/python/intern/bpy_app_handlers.c +@@ -135,7 +135,7 @@ /* dummy type because decorators can't be PyCFunctions */ static PyTypeObject BPyPersistent_Type = { @@ -9,7 +9,7 @@ PyVarObject_HEAD_INIT(NULL, 0) #else PyVarObject_HEAD_INIT(&PyType_Type, 0) -@@ -207,7 +207,7 @@ +@@ -214,7 +214,7 @@ { PyObject *ret; @@ -18,9 +18,9 @@ BPyPersistent_Type.ob_base.ob_base.ob_type = &PyType_Type; #endif ---- blender-2.79/source/blender/python/intern/bpy_rna.c.orig 2017-09-14 15:41:13.142883900 +0300 -+++ blender-2.79/source/blender/python/intern/bpy_rna.c 2017-09-14 15:41:34.396030100 +0300 -@@ -6254,7 +6254,7 @@ +--- a/source/blender/python/intern/bpy_rna.c ++++ b/source/blender/python/intern/bpy_rna.c +@@ -6543,7 +6543,7 @@ NULL, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ NULL, /* struct PyGetSetDef *tp_getset; */ @@ -29,12 +29,12 @@ NULL, /* defer assignment */ #else &PyType_Type, /* struct _typeobject *tp_base; */ -@@ -7380,7 +7380,7 @@ +@@ -7679,7 +7679,7 @@ #endif /* For some reason MSVC complains of these. */ -#if defined(_MSC_VER) +#if defined(_WIN32) pyrna_struct_meta_idprop_Type.tp_base = &PyType_Type; + #endif - pyrna_prop_collection_iter_Type.tp_iter = PyObject_SelfIter; diff --git a/mingw-w64-blender/0016-mingw-windres.patch b/mingw-w64-blender/0016-mingw-windres.patch index bf97a9cb5e..36371315ad 100644 --- a/mingw-w64-blender/0016-mingw-windres.patch +++ b/mingw-w64-blender/0016-mingw-windres.patch @@ -1,7 +1,7 @@ --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt -@@ -140,10 +140,18 @@ if(WIN32 AND NOT UNIX) - -DBLEN_VER_RC_3=${bver3} +@@ -123,11 +123,19 @@ if(WIN32 AND NOT UNIX) + -DBLEN_VER_RC_3=${BLENDER_VERSION_PATCH} -DBLEN_VER_RC_4=0 ) + if(MINGW) @@ -21,6 +21,19 @@ ) endif() +@@ -275,10 +283,10 @@ + add_executable(blender-launcher WIN32 + blender_launcher_win32.c + ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.rc +- ${CMAKE_BINARY_DIR}/blender.exe.manifest ++ ${CMAKE_SOURCE_DIR}/release/windows/icons/blender.exe.manifest + ) + target_compile_definitions (blender-launcher PRIVATE -D_UNICODE -DUNICODE) +- target_link_libraries(blender-launcher Pathcch.lib) ++ target_link_libraries(blender-launcher pathcch) + endif() + endif() + --- a/release/windows/icons/winblender.rc +++ b/release/windows/icons/winblender.rc @@ -3,10 +3,13 @@ @@ -37,8 +50,8 @@ #endif APPICON ICON DISCARDABLE "winblender.ico" ---- /dev/null 2020-02-18 15:56:11.000000000 +0300 -+++ b/release/windows/icons/blender.exe.manifest 2020-02-18 15:56:02.230820700 +0300 +--- /dev/null ++++ b/release/windows/icons/blender.exe.manifest @@ -0,0 +1,36 @@ + + diff --git a/mingw-w64-blender/0019-fix-casts.patch b/mingw-w64-blender/0019-fix-casts.patch index df93a872cb..ef75e2c930 100644 --- a/mingw-w64-blender/0019-fix-casts.patch +++ b/mingw-w64-blender/0019-fix-casts.patch @@ -1,7 +1,6 @@ -diff -Naur blender-2.78-orig/source/blender/blenlib/intern/math_base.c blender-2.78/source/blender/blenlib/intern/math_base.c ---- blender-2.78-orig/source/blender/blenlib/intern/math_base.c 2016-09-28 12:26:55.000000000 +0300 -+++ blender-2.78/source/blender/blenlib/intern/math_base.c 2016-10-14 13:53:56.430617800 +0300 -@@ -53,7 +53,7 @@ +--- a/source/blender/blenlib/intern/math_base.c ++++ b/source/blender/blenlib/intern/math_base.c +@@ -34,7 +34,7 @@ pow2 = 1.0; y = (x * pow1) * pow2; /* if y overflows, then rounded value is exactly x */ @@ -10,27 +9,25 @@ diff -Naur blender-2.78-orig/source/blender/blenlib/intern/math_base.c blender-2 return x; } } -diff -Naur blender-2.78-orig/source/blender/blenlib/intern/math_geom.c blender-2.78/source/blender/blenlib/intern/math_geom.c ---- blender-2.78-orig/source/blender/blenlib/intern/math_geom.c 2016-09-28 12:26:55.000000000 +0300 -+++ blender-2.78/source/blender/blenlib/intern/math_geom.c 2016-10-14 13:53:56.430617800 +0300 -@@ -4296,7 +4296,7 @@ - const double dot = dot_v2v2_db(d_curr->dir, d_next->dir); - const double len = d_curr->len * d_next->len; - const double result = (len - dot) / area; +--- a/source/blender/blenlib/intern/math_geom.c ++++ b/source/blender/blenlib/intern/math_geom.c +@@ -4039,7 +4039,7 @@ + const float dot = dot_v3v3(d_curr->dir, d_next->dir); + const float len = d_curr->len * d_next->len; + const float result = (len - dot) / area; - if (isfinite(result)) { + if (isfinite((float)result)) { return result; } } -diff -Naur blender-2.92.0-orig/source/blender/blenlib/intern/string_utf8.c blender-2.92.0/source/blender/blenlib/intern/string_utf8.c ---- blender-2.92.0-orig/source/blender/blenlib/intern/string_utf8.c 2021-03-28 12:26:55.000000000 +0300 -+++ blender-2.92.0/source/blender/blenlib/intern/string_utf8.c 2021-03-14 13:53:56.430617800 +0300 -@@ -396,7 +396,7 @@ - const size_t maxncpy) - { - #ifdef WIN32 -- return conv_utf_8_to_16(src_c, dst_w, maxncpy); -+ return (size_t)conv_utf_8_to_16(src_c, dst_w, maxncpy); - #else - return BLI_str_utf8_as_utf32((char32_t *)dst_w, src_c, maxncpy); - #endif +--- a/source/blender/blenlib/intern/math_solvers.c ++++ b/source/blender/blenlib/intern/math_solvers.c +@@ -80,7 +80,7 @@ + + MEM_freeN(c1); + +- return isfinite(x_prev); ++ return isfinite((float)x_prev); + } + + bool BLI_tridiagonal_solve_cyclic( diff --git a/mingw-w64-blender/0020-blendthumb-build.patch b/mingw-w64-blender/0020-blendthumb-build.patch index 7c7f13be7d..e2a450a7d1 100644 --- a/mingw-w64-blender/0020-blendthumb-build.patch +++ b/mingw-w64-blender/0020-blendthumb-build.patch @@ -1,29 +1,25 @@ ---- blender-2.81a/source/blender/blendthumb/CMakeLists.txt.orig 2019-12-08 12:20:39.042905800 +0300 -+++ blender-2.81a/source/blender/blendthumb/CMakeLists.txt 2019-12-08 12:20:45.308264200 +0300 -@@ -29,10 +29,10 @@ +--- a/source/blender/blendthumb/CMakeLists.txt ++++ b/source/blender/blendthumb/CMakeLists.txt +@@ -36,8 +29,12 @@ - add_library(BlendThumb SHARED ${SRC}) - setup_platform_linker_flags(BlendThumb) --target_link_libraries(BlendThumb ${ZLIB_LIBRARIES}) -+target_link_libraries(BlendThumb ${ZLIB_LIBRARIES} shlwapi windowscodecs) + add_library(BlendThumb SHARED ${SRC} ${SRC_WIN32}) - install( - FILES $ - COMPONENT Blender -- DESTINATION "." -+ DESTINATION "bin" - ) ---- blender-2.81a/source/blender/blenlib/intern/winstuff.c.orig 2019-12-08 12:27:42.467124300 +0300 -+++ blender-2.81a/source/blender/blenlib/intern/winstuff.c 2019-12-08 12:30:11.497648300 +0300 -@@ -1,4 +1,5 @@ - /* -+/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 -@@ -172,7 +173,11 @@ +- target_link_libraries(BlendThumb bf_blenlib dbghelp.lib Version.lib) +- set_target_properties(BlendThumb PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB:msvcrt") ++ target_link_libraries(BlendThumb bf_blenlib dbghelp version shlwapi) ++ if(MSVC) ++ set_target_properties(BlendThumb PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB:msvcrt") ++ elseif(MINGW) ++ target_link_libraries(BlendThumb ${PTHREADS_LIBRARIES}) ++ endif() - BLI_getInstallationDir(InstallDir); + else() + # ----------------------------------------------------------------------------- +--- a/source/blender/blenlib/intern/winstuff.c ++++ b/source/blender/blenlib/intern/winstuff.c +@@ -157,7 +157,11 @@ + # ifdef WITH_BLENDER_THUMBNAILER + BLI_windows_get_executable_dir(InstallDir); GetSystemDirectory(SysDir, FILE_MAXDIR); +#ifdef __MINGW32__ + ThumbHandlerDLL = "libBlendThumb.dll"; @@ -33,35 +29,34 @@ snprintf( RegCmd, MAX_PATH * 2, "%s\\regsvr32 /s \"%s\\%s\"", SysDir, InstallDir, ThumbHandlerDLL); system(RegCmd); ---- blender-2.81a/source/blender/blendthumb/src/BlenderThumb.cpp.orig 2019-12-08 12:08:05.045779600 +0300 -+++ blender-2.81a/source/blender/blendthumb/src/BlenderThumb.cpp 2019-12-08 12:32:20.265013400 +0300 -@@ -17,8 +17,11 @@ - #include - #include - #include // For IThumbnailProvider. -+#include +--- a/source/blender/blendthumb/src/blendthumb_win32.cc ++++ b/source/blender/blendthumb/src/blendthumb_win32.cc +@@ -18,7 +18,9 @@ + + #include "BLI_filereader.h" +#ifdef _MSC_VER #pragma comment(lib, "shlwapi.lib") +#endif - // this thumbnail provider implements IInitializeWithStream to enable being hosted - // in an isolated process for robustness -@@ -137,7 +140,7 @@ - //_pStream->Read(&dest_size,4,&BytesRead); // dest - dest_size = 1024 * 70; // thumbnail is currently always inside the first 65KB...if it moves or - // enlargens this line will have to change or go! -- source_size = (uLong)max(SeekPos.QuadPart, dest_size); // for safety, assume no compression -+ source_size = (uLong)std::max((uLong)SeekPos.QuadPart, dest_size); // for safety, assume no compression - - // Input - Bytef *src = new Bytef[source_size]; -@@ -264,7 +267,7 @@ - - // Scale down if required - if ((unsigned)width > cx || (unsigned)height > cx) { -- float scale = 1.0f / (max(width, height) / (float)cx); -+ float scale = 1.0f / (std::max(width, height) / (float)cx); - LONG NewWidth = (LONG)(width * scale); - LONG NewHeight = (LONG)(height * scale); - + /** + * This thumbnail provider implements #IInitializeWithStream to enable being hosted +--- a/source/creator/CMakeLists.txt ++++ b/source/creator/CMakeLists.txt +@@ -557,9 +557,14 @@ + DESTINATION share/icons/hicolor/symbolic/apps + ) + if(WITH_BLENDER_THUMBNAILER) ++ if(MINGW) ++ set(BLENDER_THUMBNAILER_TARGET BlendThumb) ++ else() ++ set(BLENDER_THUMBNAILER_TARGET blender-thumbnailer) ++ endif() + install( +- TARGETS blender-thumbnailer +- DESTINATION bin ++ TARGETS ${BLENDER_THUMBNAILER_TARGET} ++ RUNTIME DESTINATION bin + ) + endif() + set(BLENDER_TEXT_FILES_DESTINATION share/doc/blender) diff --git a/mingw-w64-blender/0023-link-errors.patch b/mingw-w64-blender/0023-link-errors.patch index 6a23bbba3a..e1fa87bcce 100644 --- a/mingw-w64-blender/0023-link-errors.patch +++ b/mingw-w64-blender/0023-link-errors.patch @@ -1,44 +1,113 @@ -diff -Naur blender-2.82/intern/cycles/render/CMakeLists.txt.orig blender-2.82/intern/cycles/render/CMakeLists.txt ---- blender-2.82/intern/cycles/render/CMakeLists.txt.orig 2019-12-04 14:00:31.000000000 +0300 -+++ blender-2.82/intern/cycles/render/CMakeLists.txt 2020-02-12 13:15:01.000000000 +0300 -@@ -136,9 +136,6 @@ +--- a/extern/glog/CMakeLists.txt ++++ b/extern/glog/CMakeLists.txt +@@ -66,6 +66,7 @@ + list(APPEND INC + src/windows + ) ++ list(APPEND LIB dbghelp) + if(MSVC) + # Suppress warning about google::LogMessageFatal::~LogMessageFatal + # not returning. +--- a/intern/cycles/app/CMakeLists.txt ++++ b/intern/cycles/app/CMakeLists.txt +@@ -80,7 +80,7 @@ + add_executable(cycles ${SRC} ${INC} ${INC_SYS}) + unset(SRC) + +- target_link_libraries(cycles PRIVATE ${LIB}) ++ target_link_libraries(cycles PRIVATE ${LIB} version) + + if(APPLE) + if(WITH_CYCLES_STANDALONE_GUI) +--- a/intern/cycles/scene/CMakeLists.txt ++++ b/intern/cycles/scene/CMakeLists.txt +@@ -112,7 +112,7 @@ list(APPEND LIB ${OPENCOLORIO_LIBRARIES} ) -- if(WIN32) -- add_definitions(-DOpenColorIO_SKIP_IMPORTS) -- endif() +- if(WIN32 AND NOT USD_OVERRIDE_OPENCOLORIO) ++ if(MSVC AND NOT USD_OVERRIDE_OPENCOLORIO) + add_definitions(-DOpenColorIO_SKIP_IMPORTS) + endif() endif() +--- a/intern/cycles/util/CMakeLists.txt ++++ b/intern/cycles/util/CMakeLists.txt +@@ -32,6 +32,7 @@ - if(WITH_OPENVDB) ---- blender-2.90.1/source/blender/blenlib/CMakeLists.txt.orig 2020-02-18 11:21:38.444947500 +0300 -+++ blender-2.90.1/source/blender/blenlib/CMakeLists.txt 2020-02-18 11:22:09.099292800 +0300 -@@ -311,6 +311,7 @@ + set(LIB + ${TBB_LIBRARIES} ++ ${OPENIMAGEIO_LIBRARIES} + ) + + set(SRC_HEADERS +--- a/intern/ghost/CMakeLists.txt ++++ b/intern/ghost/CMakeLists.txt +@@ -387,6 +387,7 @@ + intern/GHOST_WindowWin32.h + intern/GHOST_Wintab.h + ) ++ list(APPEND LIB comctl32 shcore) + + if(NOT WITH_GL_EGL) + list(APPEND SRC +@@ -404,6 +405,7 @@ + + intern/GHOST_ImeWin32.h + ) ++ list(APPEND LIB imm32) + endif() + + if(WITH_INPUT_NDOF) +--- a/source/blender/blenlib/CMakeLists.txt ++++ b/source/blender/blenlib/CMakeLists.txt +@@ -403,6 +403,8 @@ ) list(APPEND LIB bf_intern_utfconv + version ++ dbghelp ) list(APPEND SRC intern/system_win32.c ---- blender-2.82/source/blender/gpu/CMakeLists.txt.orig 2020-02-18 11:21:38.444947500 +0300 -+++ blender-2.82/source/blender/gpu/CMakeLists.txt 2020-02-18 11:22:09.099292800 +0300 -@@ -132,7 +132,11 @@ - ${BLENDER_GL_LIBRARIES} +--- a/source/blender/editors/interface/CMakeLists.txt ++++ b/source/blender/editors/interface/CMakeLists.txt +@@ -98,6 +98,10 @@ + add_definitions(-DWITH_PYTHON) + endif() + ++if(WITH_TBB) ++ add_definitions(-DWITH_TBB) ++endif() ++ + if(WIN32 OR APPLE) + if(WITH_INPUT_IME) + add_definitions(-DWITH_INPUT_IME) +--- a/source/blender/editors/space_spreadsheet/CMakeLists.txt ++++ b/source/blender/editors/space_spreadsheet/CMakeLists.txt +@@ -62,6 +62,10 @@ + add_definitions(-DWITH_OPENVDB ${OPENVDB_DEFINITIONS}) + endif() + ++if(WITH_TBB) ++ add_definitions(-DWITH_TBB) ++endif() ++ + blender_add_lib(bf_editor_space_spreadsheet "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") + + # RNA_prototypes.h +--- a/source/blender/python/generic/CMakeLists.txt ++++ b/source/blender/python/generic/CMakeLists.txt +@@ -41,6 +41,7 @@ ) --if(NOT WITH_SYSTEM_GLEW) -+if(WITH_SYSTEM_GLEW) -+ list(APPEND LIB -+ ${GLEW_LIBRARY} -+ ) -+else() - list(APPEND LIB - ${BLENDER_GLEW_LIBRARIES} - ) ---- blender-2.82/source/blender/render/CMakeLists.txt.orig 2020-02-18 12:07:41.740701100 +0300 -+++ blender-2.82/source/blender/render/CMakeLists.txt 2020-02-18 12:09:20.740485400 +0300 -@@ -100,6 +100,12 @@ + set(LIB ++ ${OPENGL_gl_LIBRARY} + ${GLEW_LIBRARY} + ${PYTHON_LINKFLAGS} + ${PYTHON_LIBRARIES} +--- a/source/blender/render/CMakeLists.txt ++++ b/source/blender/render/CMakeLists.txt +@@ -79,5 +79,10 @@ add_definitions(-DWITH_FREESTYLE) endif() @@ -47,17 +116,17 @@ diff -Naur blender-2.82/intern/cycles/render/CMakeLists.txt.orig blender-2.82/in + ${OPENCOLORIO_LIBRARIES} + ) +endif() -+ - if(WITH_INTERNATIONAL) - add_definitions(-DWITH_INTERNATIONAL) - endif() ---- blender-2.82/intern/cycles/util/CMakeLists.txt.orig 2020-02-18 12:00:41.215804900 +0300 -+++ blender-2.82/intern/cycles/util/CMakeLists.txt 2020-02-18 12:03:21.654539300 +0300 -@@ -29,6 +29,7 @@ - set(LIB - ${TBB_LIBRARIES} -+ ${OPENIMAGEIO_LIBRARIES} - ) - - if(WITH_CYCLES_STANDALONE) + blender_add_lib_nolist(bf_render "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") +--- a/source/creator/CMakeLists.txt ++++ b/source/creator/CMakeLists.txt +@@ -285,6 +285,9 @@ + ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.rc + ${CMAKE_SOURCE_DIR}/release/windows/icons/blender.exe.manifest + ) ++ if(MINGW) ++ target_link_options(blender-launcher PRIVATE "-municode") ++ endif() + target_compile_definitions (blender-launcher PRIVATE -D_UNICODE -DUNICODE) + target_link_libraries(blender-launcher pathcch) + endif() diff --git a/mingw-w64-blender/0026-embree-shared.patch b/mingw-w64-blender/0026-embree-shared.patch index 5843b7759f..88b6ac9fcc 100644 --- a/mingw-w64-blender/0026-embree-shared.patch +++ b/mingw-w64-blender/0026-embree-shared.patch @@ -1,16 +1,6 @@ ---- blender-2.90.1/intern/cycles/CMakeLists.txt.orig 2020-10-08 21:28:57.427384700 +0300 -+++ blender-2.90.1/intern/cycles/CMakeLists.txt 2020-10-08 21:29:04.707761700 +0300 -@@ -233,7 +233,6 @@ - - if(WITH_CYCLES_EMBREE) - add_definitions(-DWITH_EMBREE) -- add_definitions(-DEMBREE_STATIC_LIB) - include_directories( - SYSTEM - ${EMBREE_INCLUDE_DIRS} ---- blender-2.90.1/build_files/cmake/Modules/FindEmbree.cmake.orig 2020-10-08 22:57:05.690074300 +0300 -+++ blender-2.90.1/build_files/cmake/Modules/FindEmbree.cmake 2020-10-08 22:59:36.200482300 +0300 -@@ -44,12 +44,6 @@ +--- a/build_files/cmake/Modules/FindEmbree.cmake ++++ b/build_files/cmake/Modules/FindEmbree.cmake +@@ -40,12 +40,6 @@ SET(_embree_FIND_COMPONENTS embree3 diff --git a/mingw-w64-blender/0028-use-std-min-max.patch b/mingw-w64-blender/0028-use-std-min-max.patch index 9caf9fe47d..9135c6e7cc 100644 --- a/mingw-w64-blender/0028-use-std-min-max.patch +++ b/mingw-w64-blender/0028-use-std-min-max.patch @@ -1,17 +1,38 @@ --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp -@@ -124,10 +124,10 @@ +@@ -267,11 +267,11 @@ + GetMonitorInfo(hmonitor, &monitor); - /* Adjust our requested size to allow for caption and borders and constrain to monitor. */ - AdjustWindowRectEx(&win_rect, WS_CAPTION, FALSE, 0); -- width = min(monitor.rcWork.right - monitor.rcWork.left, win_rect.right - win_rect.left); -- left = min(max(monitor.rcWork.left, win_rect.left), monitor.rcWork.right - width); -- height = min(monitor.rcWork.bottom - monitor.rcWork.top, win_rect.bottom - win_rect.top); -- top = min(max(monitor.rcWork.top, win_rect.top), monitor.rcWork.bottom - height); -+ width = std::min(monitor.rcWork.right - monitor.rcWork.left, win_rect.right - win_rect.left); -+ left = std::min(std::max(monitor.rcWork.left, win_rect.left), static_cast(monitor.rcWork.right - width)); -+ height = std::min(monitor.rcWork.bottom - monitor.rcWork.top, win_rect.bottom - win_rect.top); -+ top = std::min(std::max(monitor.rcWork.top, win_rect.top), static_cast(monitor.rcWork.bottom - height)); + /* Constrain requested size and position to fit within this monitor. */ +- LONG width = min(monitor.rcWork.right - monitor.rcWork.left, win_rect->right - win_rect->left); +- LONG height = min(monitor.rcWork.bottom - monitor.rcWork.top, win_rect->bottom - win_rect->top); +- win_rect->left = min(max(monitor.rcWork.left, win_rect->left), monitor.rcWork.right - width); ++ LONG width = std::min(monitor.rcWork.right - monitor.rcWork.left, win_rect->right - win_rect->left); ++ LONG height = std::min(monitor.rcWork.bottom - monitor.rcWork.top, win_rect->bottom - win_rect->top); ++ win_rect->left = std::min(std::max(monitor.rcWork.left, win_rect->left), monitor.rcWork.right - width); + win_rect->right = win_rect->left + width; +- win_rect->top = min(max(monitor.rcWork.top, win_rect->top), monitor.rcWork.bottom - height); ++ win_rect->top = std::min(std::max(monitor.rcWork.top, win_rect->top), monitor.rcWork.bottom - height); + win_rect->bottom = win_rect->top + height; - m_hWnd = ::CreateWindowExW(extended_style, // window extended style - s_windowClassName, // pointer to registered class name + /* With Windows 10 and newer we can adjust for chrome that differs with DPI and scale. */ +@@ -293,7 +293,7 @@ + } + + /* But never allow a top position that can hide part of the title bar. */ +- win_rect->top = max(monitor.rcWork.top, win_rect->top); ++ win_rect->top = std::max(monitor.rcWork.top, win_rect->top); + } + + bool GHOST_WindowWin32::getValid() const +--- a/intern/ghost/intern/GHOST_Wintab.cpp ++++ b/intern/ghost/intern/GHOST_Wintab.cpp +@@ -91,7 +91,7 @@ + int queueSize = queueSizeGet(hctx.get()); + + while (queueSize < maxQueue) { +- int testSize = min(queueSize + 16, maxQueue); ++ int testSize = std::min(queueSize + 16, maxQueue); + if (queueSizeSet(hctx.get(), testSize)) { + queueSize = testSize; + } diff --git a/mingw-w64-blender/0029-update-CMake-to-support-OpenImageIO-2.3.4.patch b/mingw-w64-blender/0029-update-CMake-to-support-OpenImageIO-2.3.4.patch deleted file mode 100644 index feb0f84783..0000000000 --- a/mingw-w64-blender/0029-update-CMake-to-support-OpenImageIO-2.3.4.patch +++ /dev/null @@ -1,87 +0,0 @@ -From e5100ca3ad17b1b9a40ffd8a8edccb6cb553e558 Mon Sep 17 00:00:00 2001 -From: Brecht Van Lommel -Date: Wed, 16 Feb 2022 17:40:20 +0100 -Subject: [PATCH] Build: update CMake to support OpenImageIO 2.3.4 - -FindOpenImageIO was updated to link to separate OpenImageIO_Util for new -versions, where it is required. For older versions, we can not link to it -because there will be duplicated symbols. - -Ref D14128 ---- - .../cmake/Modules/FindOpenImageIO.cmake | 41 ++++++++++++++++++- - 1 file changed, 39 insertions(+), 2 deletions(-) - -diff --git a/build_files/cmake/Modules/FindOpenImageIO.cmake b/build_files/cmake/Modules/FindOpenImageIO.cmake -index aac5b5ce0a85..54b6d95e809d 100644 ---- a/build_files/cmake/Modules/FindOpenImageIO.cmake -+++ b/build_files/cmake/Modules/FindOpenImageIO.cmake -@@ -48,6 +48,8 @@ FIND_LIBRARY(OPENIMAGEIO_LIBRARY - lib64 lib - ) - -+set(_openimageio_LIBRARIES ${OPENIMAGEIO_LIBRARY}) -+ - FIND_FILE(OPENIMAGEIO_IDIFF - NAMES - idiff -@@ -57,14 +59,47 @@ FIND_FILE(OPENIMAGEIO_IDIFF - bin - ) - -+# Additionally find util library if needed. In old versions this library was -+# included in libOpenImageIO and linking to both would duplicate symbols. In -+# new versions we need to link to both. -+FIND_FILE(_openimageio_export -+ NAMES -+ export.h -+ PATHS -+ ${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO -+ NO_DEFAULT_PATH -+) -+ -+# Use existence of OIIO_UTIL_API to check if it's a separate lib. -+FILE(STRINGS "${_openimageio_export}" _openimageio_util_define -+ REGEX "^[ \t]*#[ \t]*define[ \t]+OIIO_UTIL_API.*$") -+ -+IF(_openimageio_util_define) -+ FIND_LIBRARY(OPENIMAGEIO_UTIL_LIBRARY -+ NAMES -+ OpenImageIO_Util -+ HINTS -+ ${_openimageio_SEARCH_DIRS} -+ PATH_SUFFIXES -+ lib64 lib -+ ) -+ -+ LIST(APPEND _openimageio_LIBRARIES ${OPENIMAGEIO_UTIL_LIBRARY}) -+ENDIF() -+ -+# In cmake version 3.21 and up, we can instead use the NO_CACHE option for -+# FIND_FILE so we don't need to clear it from the cache here. -+UNSET(_openimageio_export CACHE) -+UNSET(_openimageio_util_define) -+ - # handle the QUIETLY and REQUIRED arguments and set OPENIMAGEIO_FOUND to TRUE if - # all listed variables are TRUE - INCLUDE(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenImageIO DEFAULT_MSG -- OPENIMAGEIO_LIBRARY OPENIMAGEIO_INCLUDE_DIR) -+ _openimageio_LIBRARIES OPENIMAGEIO_INCLUDE_DIR) - - IF(OPENIMAGEIO_FOUND) -- SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY}) -+ SET(OPENIMAGEIO_LIBRARIES ${_openimageio_LIBRARIES}) - SET(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR}) - IF(EXISTS ${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO/pugixml.hpp) - SET(OPENIMAGEIO_PUGIXML_FOUND TRUE) -@@ -78,7 +113,9 @@ ENDIF() - MARK_AS_ADVANCED( - OPENIMAGEIO_INCLUDE_DIR - OPENIMAGEIO_LIBRARY -+ OPENIMAGEIO_UTIL_LIBRARY - OPENIMAGEIO_IDIFF - ) - - UNSET(_openimageio_SEARCH_DIRS) -+UNSET(_openimageio_LIBRARIES) diff --git a/mingw-w64-blender/0030-update-CMake-to-support-OpenEXR-3.patch b/mingw-w64-blender/0030-update-CMake-to-support-OpenEXR-3.patch deleted file mode 100644 index 683aa28ce4..0000000000 --- a/mingw-w64-blender/0030-update-CMake-to-support-OpenEXR-3.patch +++ /dev/null @@ -1,146 +0,0 @@ -From 2c9931699e2080639bb836357e116b8e340335d9 Mon Sep 17 00:00:00 2001 -From: Brecht Van Lommel -Date: Wed, 16 Feb 2022 17:38:44 +0100 -Subject: [PATCH] Build: update CMake to support OpenEXR 3 - -FindOpenEXR was updated to find new lib names and separate Imath. It's all -added to the list of OpenEXR include dirs and libs. - -This keeps it compatible with both version 2 and 3 for now, and doesn't -require changes outside the find module. - -Ref D14128 ---- - build_files/cmake/Modules/FindOpenEXR.cmake | 93 ++++++++++++++++++--- - 1 file changed, 83 insertions(+), 10 deletions(-) - -diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake -index 090f80b8df76..85e2cb557058 100644 ---- a/build_files/cmake/Modules/FindOpenEXR.cmake -+++ b/build_files/cmake/Modules/FindOpenEXR.cmake -@@ -33,14 +33,6 @@ ENDIF() - # Old versions (before 2.0?) do not have any version string, just assuming this should be fine though. - SET(_openexr_libs_ver_init "2.0") - --SET(_openexr_FIND_COMPONENTS -- Half -- Iex -- IlmImf -- IlmThread -- Imath --) -- - SET(_openexr_SEARCH_DIRS - ${OPENEXR_ROOT_DIR} - /opt/lib/openexr -@@ -93,6 +85,24 @@ UNSET(_openexr_libs_ver_init) - - STRING(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION}) - -+# Different library names in 3.0, and Imath and Half moved out. -+IF(OPENEXR_VERSION VERSION_GREATER_EQUAL "3.0.0") -+ SET(_openexr_FIND_COMPONENTS -+ Iex -+ IlmThread -+ OpenEXR -+ OpenEXRCore -+ ) -+ELSE() -+ SET(_openexr_FIND_COMPONENTS -+ Half -+ Iex -+ IlmImf -+ IlmThread -+ Imath -+ ) -+ENDIF() -+ - SET(_openexr_LIBRARIES) - FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS}) - STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT) -@@ -111,6 +121,57 @@ ENDFOREACH() - - UNSET(_openexr_libs_ver) - -+IF(OPENEXR_VERSION VERSION_GREATER_EQUAL "3.0.0") -+ # For OpenEXR 3.x, we also need to find the now separate Imath library. -+ # For simplicity we add it to the OpenEXR includes and libraries, as we -+ # have no direct dependency on Imath and it's simpler to support both -+ # 2.x and 3.x this way. -+ -+ # Find include directory -+ FIND_PATH(IMATH_INCLUDE_DIR -+ NAMES -+ Imath/ImathMath.h -+ HINTS -+ ${_openexr_SEARCH_DIRS} -+ PATH_SUFFIXES -+ include -+ ) -+ -+ # Find version -+ FIND_FILE(_imath_config -+ NAMES -+ ImathConfig.h -+ PATHS -+ ${IMATH_INCLUDE_DIR}/Imath -+ NO_DEFAULT_PATH -+ ) -+ -+ # Find line with version, extract string, and format for library suffix. -+ FILE(STRINGS "${_imath_config}" _imath_build_specification -+ REGEX "^[ \t]*#define[ \t]+IMATH_VERSION_STRING[ \t]+\"[.0-9]+\".*$") -+ STRING(REGEX REPLACE ".*#define[ \t]+IMATH_VERSION_STRING[ \t]+\"([.0-9]+)\".*" -+ "\\1" _imath_libs_ver ${_imath_build_specification}) -+ STRING(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _imath_libs_ver ${_imath_libs_ver}) -+ -+ # Find library, with or without version number. -+ FIND_LIBRARY(IMATH_LIBRARY -+ NAMES -+ Imath-${_imath_libs_ver} Imath -+ NAMES_PER_DIR -+ HINTS -+ ${_openexr_SEARCH_DIRS} -+ PATH_SUFFIXES -+ lib64 lib -+ ) -+ LIST(APPEND _openexr_LIBRARIES "${IMATH_LIBRARY}") -+ -+ # In cmake version 3.21 and up, we can instead use the NO_CACHE option for -+ # FIND_FILE so we don't need to clear it from the cache here. -+ UNSET(_imath_config CACHE) -+ UNSET(_imath_libs_ver) -+ UNSET(_imath_build_specification) -+ENDIF() -+ - # handle the QUIETLY and REQUIRED arguments and set OPENEXR_FOUND to TRUE if - # all listed variables are TRUE - INCLUDE(FindPackageHandleStandardArgs) -@@ -119,13 +180,25 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG - - IF(OPENEXR_FOUND) - SET(OPENEXR_LIBRARIES ${_openexr_LIBRARIES}) -- # Both include paths are needed because of dummy OSL headers mixing #include and #include :( -- SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR}/OpenEXR) -+ # Both include paths are needed because of dummy OSL headers mixing -+ # #include and #include , as well as Alembic -+ # include directly. -+ SET(OPENEXR_INCLUDE_DIRS -+ ${OPENEXR_INCLUDE_DIR} -+ ${OPENEXR_INCLUDE_DIR}/OpenEXR) -+ -+ IF(OPENEXR_VERSION VERSION_GREATER_EQUAL "3.0.0") -+ LIST(APPEND OPENEXR_INCLUDE_DIRS -+ ${IMATH_INCLUDE_DIR} -+ ${IMATH_INCLUDE_DIR}/Imath) -+ ENDIF() - ENDIF() - - MARK_AS_ADVANCED( - OPENEXR_INCLUDE_DIR - OPENEXR_VERSION -+ IMATH_INCLUDE_DIR -+ IMATH_LIBRARY - ) - FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS}) - STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT) diff --git a/mingw-w64-blender/0031-Images-update-code-to-support-OpenEXR-3.patch b/mingw-w64-blender/0031-Images-update-code-to-support-OpenEXR-3.patch deleted file mode 100644 index 7dc179b9fd..0000000000 --- a/mingw-w64-blender/0031-Images-update-code-to-support-OpenEXR-3.patch +++ /dev/null @@ -1,174 +0,0 @@ -From cd7550cfe712598727b548d1c90565ac98a274c2 Mon Sep 17 00:00:00 2001 -From: Sebastian Parborg -Date: Wed, 16 Feb 2022 17:36:47 +0100 -Subject: [PATCH] Images: update code to support OpenEXR 3 - -Compatibility with OpenEXR 2 is preserved, since Blender releases and Linux -distribution packages can be on different versions. - -Ref D14128 ---- - .../imbuf/intern/openexr/openexr_api.cpp | 84 +++++++++++-------- - 1 file changed, 50 insertions(+), 34 deletions(-) - -diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp -index ec8cf36dd49..46abb986259 100644 ---- a/source/blender/imbuf/intern/openexr/openexr_api.cpp -+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp -@@ -32,30 +32,46 @@ - #include - #include - --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include -+/* The OpenEXR version can reliably be found in this header file from OpenEXR, -+ * for both 2.x and 3.x: -+ */ -+#include -+#define COMBINED_OPENEXR_VERSION \ -+ ((10000 * OPENEXR_VERSION_MAJOR) + (100 * OPENEXR_VERSION_MINOR) + OPENEXR_VERSION_PATCH) -+ -+#if COMBINED_OPENEXR_VERSION >= 20599 -+/* >=2.5.99 -> OpenEXR >=3.0 */ -+# include -+# include -+# define exr_file_offset_t uint64_t -+#else -+/* OpenEXR 2.x, use the old locations. */ -+# include -+# define exr_file_offset_t Int64 -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - - /* multiview/multipart */ --#include --#include --#include --#include --#include --#include --#include --#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include - - #include "DNA_scene_types.h" /* For OpenEXR compression constants */ - -@@ -131,12 +147,12 @@ class IMemStream : public Imf::IStream { - return false; - } - -- Int64 tellg() override -+ exr_file_offset_t tellg() override - { - return _exrpos; - } - -- void seekg(Int64 pos) override -+ void seekg(exr_file_offset_t pos) override - { - _exrpos = pos; - } -@@ -146,8 +162,8 @@ class IMemStream : public Imf::IStream { - } - - private: -- Int64 _exrpos; -- Int64 _exrsize; -+ exr_file_offset_t _exrpos; -+ exr_file_offset_t _exrsize; - unsigned char *_exrbuf; - }; - -@@ -182,12 +198,12 @@ class IFileStream : public Imf::IStream { - return check_error(); - } - -- Int64 tellg() override -+ exr_file_offset_t tellg() override - { - return std::streamoff(ifs.tellg()); - } - -- void seekg(Int64 pos) override -+ void seekg(exr_file_offset_t pos) override - { - ifs.seekg(pos); - check_error(); -@@ -231,19 +247,19 @@ class OMemStream : public OStream { - ibuf->encodedsize += n; - } - -- Int64 tellp() override -+ exr_file_offset_t tellp() override - { - return offset; - } - -- void seekp(Int64 pos) override -+ void seekp(exr_file_offset_t pos) override - { - offset = pos; - ensure_size(offset); - } - - private: -- void ensure_size(Int64 size) -+ void ensure_size(exr_file_offset_t size) - { - /* if buffer is too small increase it. */ - while (size > ibuf->encodedbuffersize) { -@@ -254,7 +270,7 @@ class OMemStream : public OStream { - } - - ImBuf *ibuf; -- Int64 offset; -+ exr_file_offset_t offset; - }; - - /* File Output Stream */ -@@ -284,12 +300,12 @@ class OFileStream : public OStream { - check_error(); - } - -- Int64 tellp() override -+ exr_file_offset_t tellp() override - { - return std::streamoff(ofs.tellp()); - } - -- void seekp(Int64 pos) override -+ void seekp(exr_file_offset_t pos) override - { - ofs.seekp(pos); - check_error(); diff --git a/mingw-w64-blender/0034-Fix-ARM64-Build.patch b/mingw-w64-blender/0034-Fix-ARM64-Build.patch index f89ce75e80..8167e7d3bd 100644 --- a/mingw-w64-blender/0034-Fix-ARM64-Build.patch +++ b/mingw-w64-blender/0034-Fix-ARM64-Build.patch @@ -4,15 +4,15 @@ Date: Sun, 4 Dec 2022 21:48:38 +0800 Subject: [PATCH 1/2] Fix ARM64 Build --- - intern/cycles/util/util_system.cpp | 4 ++-- + intern/cycles/util/system.cpp | 4 ++-- source/blender/blenlib/intern/system.c | 4 ++++ source/blender/blenlib/intern/system_win32.c | 16 +++++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) -diff --git a/intern/cycles/util/util_system.cpp b/intern/cycles/util/util_system.cpp +diff --git a/intern/cycles/util/system.cpp b/intern/cycles/util/system.cpp index 03bc5ae..be27a93 100644 ---- a/intern/cycles/util/util_system.cpp -+++ b/intern/cycles/util/util_system.cpp +--- a/intern/cycles/util/system.cpp ++++ b/intern/cycles/util/system.cpp @@ -174,8 +174,8 @@ string system_cpu_brand_string() if (sysctlbyname("machdep.cpu.brand_string", &modelname, &bufferlen, NULL, 0) == 0) { return modelname; diff --git a/mingw-w64-blender/0035-Enable-SSE2NEON-on-Windows-ARM.patch b/mingw-w64-blender/0035-Enable-SSE2NEON-on-Windows-ARM.patch index 8f03ae7c43..0ff0021ab1 100644 --- a/mingw-w64-blender/0035-Enable-SSE2NEON-on-Windows-ARM.patch +++ b/mingw-w64-blender/0035-Enable-SSE2NEON-on-Windows-ARM.patch @@ -23,10 +23,10 @@ index 060845b..3037cb6 100644 if(WITH_LLVM) find_package_wrapper(LLVM) -diff --git a/intern/cycles/util/util_simd.h b/intern/cycles/util/util_simd.h +diff --git a/intern/cycles/util/simd.h b/intern/cycles/util/simd.h index e3e4127..6fe576b 100644 ---- a/intern/cycles/util/util_simd.h -+++ b/intern/cycles/util/util_simd.h +--- a/intern/cycles/util/simd.h ++++ b/intern/cycles/util/simd.h @@ -31,7 +31,9 @@ # include #elif (defined(__x86_64__) || defined(__i386__)) diff --git a/mingw-w64-blender/0037-build-with-ffmpeg4.4.patch b/mingw-w64-blender/0037-build-with-ffmpeg4.4.patch deleted file mode 100644 index 6437d7aef0..0000000000 --- a/mingw-w64-blender/0037-build-with-ffmpeg4.4.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- blender-2.93.14/build_files/cmake/platform/platform_win32_mingw64.cmake.orig 2023-02-22 19:42:08.991589800 +0100 -+++ blender-2.93.14/build_files/cmake/platform/platform_win32_mingw64.cmake 2023-02-22 19:55:59.658475000 +0100 -@@ -205,13 +205,13 @@ - mark_as_advanced(FFMPEG) - - # lame, but until we have proper find module for ffmpeg -- if(EXISTS "${FFMPEG}/include/ffmpeg/") -- list(APPEND FFMPEG_INCLUDE_DIRS "${FFMPEG}/include/ffmpeg") -+ if(EXISTS "${FFMPEG}/include/ffmpeg4.4/") -+ list(APPEND FFMPEG_INCLUDE_DIRS "${FFMPEG}/include/ffmpeg4.4") - endif() - # end lameness - - mark_as_advanced(FFMPEG_LIBRARIES) -- set(FFMPEG_LIBPATH ${FFMPEG}/lib) -+ set(FFMPEG_LIBPATH ${FFMPEG}/lib/ffmpeg4.4) - endif() - - if(WITH_FFTW3) -@@ -414,6 +414,10 @@ - endif() - endif() - -+if(WITH_CPU_SIMD AND SUPPORT_NEON_BUILD) -+ find_package_wrapper(sse2neon) -+endif() -+ - if(WITH_LLVM) - find_package_wrapper(LLVM) - diff --git a/mingw-w64-blender/0037-build-with-ffmpeg6.patch b/mingw-w64-blender/0037-build-with-ffmpeg6.patch new file mode 100644 index 0000000000..0e62a33e64 --- /dev/null +++ b/mingw-w64-blender/0037-build-with-ffmpeg6.patch @@ -0,0 +1,63 @@ +diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h +index f311e04d8e0..4f474d0c267 100644 +--- a/intern/ffmpeg/ffmpeg_compat.h ++++ b/intern/ffmpeg/ffmpeg_compat.h +@@ -36,6 +36,10 @@ + # define FFMPEG_INLINE static inline + #endif + ++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,132,100) ++# define AV_CODEC_CAP_OTHER_THREADS AV_CODEC_CAP_AUTO_THREADS ++#endif ++ + #if (LIBAVFORMAT_VERSION_MAJOR < 58) || \ + ((LIBAVFORMAT_VERSION_MAJOR == 58) && (LIBAVFORMAT_VERSION_MINOR < 76)) + # define FFMPEG_USE_DURATION_WORKAROUND 1 +diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c +index 1d4cbc48833..c812c2e8f26 100644 +--- a/source/blender/blenkernel/intern/writeffmpeg.c ++++ b/source/blender/blenkernel/intern/writeffmpeg.c +@@ -855,7 +855,7 @@ static AVStream *alloc_video_stream(FFMpegContext *context, + 255); + st->avg_frame_rate = av_inv_q(c->time_base); + +- if (codec->capabilities & AV_CODEC_CAP_AUTO_THREADS) { ++ if (codec->capabilities & AV_CODEC_CAP_OTHER_THREADS) { + c->thread_count = 0; + } + else { +diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c +index 94c0555dcf0..52314c2ca21 100644 +--- a/source/blender/imbuf/intern/anim_movie.c ++++ b/source/blender/imbuf/intern/anim_movie.c +@@ -554,7 +554,7 @@ static int startffmpeg(struct anim *anim) + avcodec_parameters_to_context(pCodecCtx, video_stream->codecpar); + pCodecCtx->workaround_bugs = FF_BUG_AUTODETECT; + +- if (pCodec->capabilities & AV_CODEC_CAP_AUTO_THREADS) { ++ if (pCodec->capabilities & AV_CODEC_CAP_OTHER_THREADS) { + pCodecCtx->thread_count = 0; + } + else { +diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c +index 63836690ee4..fb0dd4f3e3e 100644 +--- a/source/blender/imbuf/intern/indexer.c ++++ b/source/blender/imbuf/intern/indexer.c +@@ -559,7 +559,7 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg( + av_dict_set(&codec_opts, "preset", "veryfast", 0); + av_dict_set(&codec_opts, "tune", "fastdecode", 0); + +- if (rv->codec->capabilities & AV_CODEC_CAP_AUTO_THREADS) { ++ if (rv->codec->capabilities & AV_CODEC_CAP_OTHER_THREADS) { + rv->c->thread_count = 0; + } + else { +@@ -872,7 +872,7 @@ static IndexBuildContext *index_ffmpeg_create_context(struct anim *anim, + avcodec_parameters_to_context(context->iCodecCtx, context->iStream->codecpar); + context->iCodecCtx->workaround_bugs = FF_BUG_AUTODETECT; + +- if (context->iCodec->capabilities & AV_CODEC_CAP_AUTO_THREADS) { ++ if (context->iCodec->capabilities & AV_CODEC_CAP_OTHER_THREADS) { + context->iCodecCtx->thread_count = 0; + } + else { diff --git a/mingw-w64-blender/PKGBUILD b/mingw-w64-blender/PKGBUILD index ee46d12448..6bea5397e4 100644 --- a/mingw-w64-blender/PKGBUILD +++ b/mingw-w64-blender/PKGBUILD @@ -11,7 +11,7 @@ _realname=blender pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=2.93.15 +pkgver=3.2.2 pkgrel=1 pkgdesc="A fully integrated 3D graphics creation suite (mingw-w64)" arch=('any') @@ -21,25 +21,29 @@ license=('GPL') url="https://www.blender.org" depends=("${MINGW_PACKAGE_PREFIX}-alembic" #"${MINGW_PACKAGE_PREFIX}-audaspace" - "${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-llvm" - "${MINGW_PACKAGE_PREFIX}-eigen3" + #"${MINGW_PACKAGE_PREFIX}-bullet" blender required bullet to built with USE_DOUBLE_PRECISION=ON "${MINGW_PACKAGE_PREFIX}-embree" + "${MINGW_PACKAGE_PREFIX}-gcc-libs" "${MINGW_PACKAGE_PREFIX}-glew" "${MINGW_PACKAGE_PREFIX}-gmp" - "${MINGW_PACKAGE_PREFIX}-ffmpeg4.4" + "${MINGW_PACKAGE_PREFIX}-ffmpeg" "${MINGW_PACKAGE_PREFIX}-fftw" "${MINGW_PACKAGE_PREFIX}-freetype" #"${MINGW_PACKAGE_PREFIX}-gflags" #"${MINGW_PACKAGE_PREFIX}-glog" - "${MINGW_PACKAGE_PREFIX}-hdf5" - "${MINGW_PACKAGE_PREFIX}-tbb" + "${MINGW_PACKAGE_PREFIX}-icu" #"${MINGW_PACKAGE_PREFIX}-jemalloc" "${MINGW_PACKAGE_PREFIX}-libharu" + "${MINGW_PACKAGE_PREFIX}-libiconv" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" "${MINGW_PACKAGE_PREFIX}-libpng" "${MINGW_PACKAGE_PREFIX}-libsndfile" "${MINGW_PACKAGE_PREFIX}-libtiff" + "${MINGW_PACKAGE_PREFIX}-libwebp" + "${MINGW_PACKAGE_PREFIX}-libwinpthread-git" + "${MINGW_PACKAGE_PREFIX}-libxml2" "${MINGW_PACKAGE_PREFIX}-lzo2" + "${MINGW_PACKAGE_PREFIX}-omp" "${MINGW_PACKAGE_PREFIX}-openal" "${MINGW_PACKAGE_PREFIX}-opencollada" "${MINGW_PACKAGE_PREFIX}-opencolorio" @@ -49,7 +53,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-alembic" "${MINGW_PACKAGE_PREFIX}-openimageio" "${MINGW_PACKAGE_PREFIX}-openshadinglanguage" #"${MINGW_PACKAGE_PREFIX}-opensubdiv" - #$([[ ${MINGW_PACKAGE_PREFIX} != *-clang-* ]] || echo "${MINGW_PACKAGE_PREFIX}-openvdb") + "${MINGW_PACKAGE_PREFIX}-openvdb" "${MINGW_PACKAGE_PREFIX}-openxr-sdk" "${MINGW_PACKAGE_PREFIX}-pcre" "${MINGW_PACKAGE_PREFIX}-potrace" @@ -57,22 +61,30 @@ depends=("${MINGW_PACKAGE_PREFIX}-alembic" "${MINGW_PACKAGE_PREFIX}-python" "${MINGW_PACKAGE_PREFIX}-python-numpy" "${MINGW_PACKAGE_PREFIX}-SDL2" - "${MINGW_PACKAGE_PREFIX}-wintab-sdk" - "${MINGW_PACKAGE_PREFIX}-zlib") + "${MINGW_PACKAGE_PREFIX}-tbb" + "${MINGW_PACKAGE_PREFIX}-zlib" + "${MINGW_PACKAGE_PREFIX}-zstd") makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" "${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-ninja" + "${MINGW_PACKAGE_PREFIX}-boost" + "${MINGW_PACKAGE_PREFIX}-eigen3" + "${MINGW_PACKAGE_PREFIX}-llvm" + "${MINGW_PACKAGE_PREFIX}-wintab-sdk" $([[ "$CARCH" == "aarch64" ]] && echo "${MINGW_PACKAGE_PREFIX}-sse2neon")) install=blender-${MSYSTEM}.install source=(https://download.blender.org/source/${_realname}-${pkgver}.tar.xz 0001-mingw-buildsystem.patch 0002-fix-mingw-w64-definitions.patch + 0003-disable-static_assert_align-on-mingw.patch 0004-fix-finding-glew.patch - 0005-fix-define-syntax.patch + 0005-fix-WINTAB_PRINTF-on-mingw.patch 0006-mingw-DEBUG-libmv-avoid-too-many-sections.patch + 0007-disable-compiler-warnings.patch 0008-mingw-use-X11-like-path-layout.patch - 0011-c++11-defines-__i386__-not-i386.patch - 0012-re-enable-SSE-on-mingw-w64-i686.patch + 0009-include-missing-headers.patch + 0010-do-not-link-to-extern_bullet.patch + 0011-no-TIME_UTC-on-msvcrt.patch 0014-libstdc++-not-support-utf-stream.patch 0015-mingw-python-like-msvc.patch 0016-mingw-windres.patch @@ -84,44 +96,41 @@ source=(https://download.blender.org/source/${_realname}-${pkgver}.tar.xz 0025-callback-function-prototype-fix.patch 0026-embree-shared.patch 0028-use-std-min-max.patch - 0029-update-CMake-to-support-OpenImageIO-2.3.4.patch - 0030-update-CMake-to-support-OpenEXR-3.patch - 0031-Images-update-code-to-support-OpenEXR-3.patch 0032-fix-finding-tbb.patch 0033-dont-add-fno-rtti-compile-option.patch 0034-Fix-ARM64-Build.patch 0035-Enable-SSE2NEON-on-Windows-ARM.patch 0036-fix-building-against-boost-1.81.patch - 0037-build-with-ffmpeg4.4.patch) -sha256sums=('36ac5e4abef18404d50eec64839e5c6b6f3e5e30ff1386cf6906c21a553ed624' - '6f76d7cbfcbbb9fc823250bfbe9c8eea112aef33880a4665b2be19247048e449' - 'c301c9c06d11cc801d5c6d061cc42972e7a5ae770ffc7eca8fb84f60ae2d5050' + 0037-build-with-ffmpeg6.patch) +sha256sums=('0c4a6b571863fd5423c62f6a03d2a415babff83dd21a321b52deb5826962d803' + '9891901a958ea9004d3578636329af6e82386cfbfbf74f0ce62f40f68ad92a60' + '26fd511916ce858f7403c4b11782762afd55bb0a827ba379af9485bc50c21964' + '2a0d796df047b6f1188e0fe9131ff7cc726d867dadfe8c7cfed82264c09302d1' 'bcaa5b105463aa2dd9ab0f69ed4d422c23f9ae1a00a93e012c62113489f3db56' - '87036a005a817bce9edd5fb7f18ba3b7a0b8d309d6f1f9bb0f813c931d889c0d' - 'cb603fd30a2e1421f653a187c3beb8e767d043a0d948213e884095cf0a27a411' - '10d5d251132d2fd19d44e15249e8f80692ba613dd77cc8b7526cfdd5faa5a19b' - '8774ed212ab365315e82b922c93b2018c90913bfcea8496205dee6d9e448b2a3' - 'f3e4a0cdec45a08df28f4d93dea508352df683d2fc8cf4b73f289db83eaf5d9e' - '6c3e47c8051345bd7c98acdc8ea592889f650498793fd5053728cec4ac659303' - 'ed57c2bec0a48c2b946b48ea822874a69f578973c1334f8aefff51241db36c3d' - '87684da9c11edd811ea939290bde8426e6aa5bb4003fe967f35b98055a60421c' - '2f5967bbf0244fbd85e2fd7ffeb0b988bc5db3f9f520f7370cdd87b747f271ab' - '23d7a41bff2d924a9232b78d39df1b8db79192c9e2940bb313daa18442cc0811' + 'e9b8047bcf57ed092e9f2124a5f58fe8e82efc8400b1c0ed98503d7a71dced70' + '1ccbf571e8dae23d0bff4ac848825788ac0a838261c5b02578c30852061238c8' + '0ca75d18527c1440c74336de3c61b48c1c048b8fdb83429b26f58ad257e38b06' + '9493c3f8a648302aae082d84ee55f0f0ed97f8345dd0d24db0eaaf6282f19de2' + 'e182116789a0b9855b42828fd9d6205561356ed5cd1f9d943b33e89702112a8f' + 'b080e86dd8042864ccda3a53a066d04dbc7038d7d16359c588f8d1f6063038a3' + 'bb28ef424c63a53b788255e8752359313933a87bbe802764eb5d8aedf3ca525d' + '88a920a31022e125565cce87437d2a36cdded5af86a9a1e19b024c9c0757496f' + 'b24c356419577fc1979f0f17ec147153cb3b63a8a80bb2c76ae086603528a018' + '8e028a7cf7808664e133656b0efc54a858900e9483be08482b72dd0821f539a4' + 'a1a2e9aa9950e4438576291518c649074b6a0c473429bc16494995a981de614b' + 'b09851c61524cd8116cd016dca7ee086233c07696cd79ca1a5e88ca32ef469f5' '8be734582b9980ad0a3c5a82c200767ce558084f18e3cca11947991a14b0d68a' - '5a93bb201ab6bcff79b87a64cc931008f8911a3d4bfca9488d9b1f0d6fc0f3dc' + '8efbe16258b8bc6654153502cc5db220e65cddbac9d049ecc94ad08277a27374' 'c39bfb8c5e4f6d26601e9cb03b979265ff0bbbcb2d2758005a4d0b0ed9616c7f' '61c0873f9c661f80eb189b7391a4c4c1eef2f7db4178177ce7ff7c47342384ae' - '1e92e8be2e8e1c54df2608b064818a4ed0691a92b2d6c3066fe25a718fbf76b2' - '26e296fa6b806282670a5688e8eaa334f5bab1dfb171d6f2fd37f9de5c574698' - 'ba7f6c1bfcf9c767225836f7874ea8d02675bd720a46946baf7e4c7a9459c72f' - 'fc46aab771d7791a0c97a50eb010cac452fa3c21f1c2299a1dfbbf9b4ba077c4' - '25441ca67be1e8f2a2b792aa2c757620d08e4c98982b78a1cd3297f0ea422369' + '5c50872ee0b8ab9f12d46092979fa7113090ff2867c2b858c7052610ad244f6c' + 'e52e8ed75f333fd8b3fd54b7ecedda2dfb1f19e157a564b286d586d8e1f629a6' 'd24fab2e66b6fa736923cbe765a52162880cdd71dce179f9aa50ec251955c31f' '16b560363717357a0e69d3b46269cace9bf978126e08b604ad18a532a8dfd0b2' - '4eed05d38519354f83f70dd3bf3b88682948fc7c56ae998308f911312bb3306f' - '9e4edfb6e7f19d0398e98017ce1fc3640d88002711dec5d49c8c46fbcfb5eb13' + 'a48e49b9e6034ccd3b448bc44f4f30a4d64682e8820f68d470069c9cbcf8b6c7' + '96d8f968b5c138ed2663c98c7e61df20fa219086109a350de000aeeb7f66422d' 'dd70c472701632018c4e38b64697d8217506c7ab29182003f431031a16dac343' - '618bf8a25d5c6a4ff85b4b04c3eb6347c584e0b627fe2b33555459fb6f0e30be') + '78528aebbb13b7e74071f15886271bcd004069d74e614fd2eeb3f62303ccdebc') apply_patch_with_msg() { for _patch in "$@" @@ -134,17 +143,20 @@ apply_patch_with_msg() { prepare() { cd ${srcdir}/${_realname}-${pkgver} - [[ -d build_files/cmake/platform/platform_win32_mingw64.cmake ]] && rm build_files/cmake/platform/platform_win32_mingw64.cmake + rm -f build_files/cmake/platform/platform_win32_mingw64.cmake + rm -f release/windows/icons/blender.exe.manifest apply_patch_with_msg \ 0001-mingw-buildsystem.patch \ 0002-fix-mingw-w64-definitions.patch \ + 0003-disable-static_assert_align-on-mingw.patch \ 0004-fix-finding-glew.patch \ - 0005-fix-define-syntax.patch \ + 0005-fix-WINTAB_PRINTF-on-mingw.patch \ 0006-mingw-DEBUG-libmv-avoid-too-many-sections.patch \ + 0007-disable-compiler-warnings.patch \ 0008-mingw-use-X11-like-path-layout.patch \ - 0011-c++11-defines-__i386__-not-i386.patch \ - 0012-re-enable-SSE-on-mingw-w64-i686.patch \ + 0009-include-missing-headers.patch \ + 0011-no-TIME_UTC-on-msvcrt.patch \ 0014-libstdc++-not-support-utf-stream.patch \ 0015-mingw-python-like-msvc.patch \ 0016-mingw-windres.patch \ @@ -156,49 +168,33 @@ prepare() { 0025-callback-function-prototype-fix.patch \ 0026-embree-shared.patch \ 0028-use-std-min-max.patch \ - 0029-update-CMake-to-support-OpenImageIO-2.3.4.patch \ - 0030-update-CMake-to-support-OpenEXR-3.patch \ - 0031-Images-update-code-to-support-OpenEXR-3.patch \ 0032-fix-finding-tbb.patch \ 0033-dont-add-fno-rtti-compile-option.patch \ 0034-Fix-ARM64-Build.patch \ 0035-Enable-SSE2NEON-on-Windows-ARM.patch \ 0036-fix-building-against-boost-1.81.patch \ - 0037-build-with-ffmpeg4.4.patch + 0037-build-with-ffmpeg6.patch } build() { - [[ -d "${srcdir}"/build-${MSYSTEM} ]] && rm -rf ${srcdir}/build-${MSYSTEM} - mkdir "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM} + mkdir -p "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM} - # i686 SSE is problematic with Cycles: https://developer.blender.org/T36316 - # .. but commit: - # https://lists.blender.org/pipermail/bf-blender-cvs/2013-October/059705.html - # .. breaks the build: - # undefined reference to `ccl::kernel_cpu_sse2_path_trace` .. etc - # This is because it prevents the definition of __KERNEL_SSE2__ without having - # ensured WITH_CYCLES_OPTIMIZED_KERNEL_SSE2 is undefined. Let's hope that the - # bugs have been fixed as patch 0011 re-enables __KERNEL_SSE2__. If they're not - # fixed then we'll have to pass ENABLESSE2 to cmake instead, -DWITH_CPU_SSE being - # the correct one (probably!) - # [[ $CARCH == i686 ]] && ENABLESSE2="-DSUPPORT_SSE2_BUILD=OFF -DWITH_CPU_SSE=OFF" - declare -a _btype - if check_option "debug" "y"; then - _btype=Debug + declare -a _extra_config + if check_option "debug" "n"; then + _extra_config+=("-DCMAKE_BUILD_TYPE=Release") else - _btype=Release + _extra_config+=("-DCMAKE_BUILD_TYPE=Debug") fi + CXXFLAGS+=" -w" + CFLAGS+=" -w" if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]]; then - CXXFLAGS+=" -Wno-c++11-narrowing -Wno-array-parameter -Wno-unreachable-code-generic-assoc" - else - CXXFLAGS+=" -Wno-narrowing -Wno-stringop-truncation -Wno-array-parameter" + CXXFLAGS+=" -Wno-c++11-narrowing" + CFLAGS+=" -Wno-unreachable-code-generic-assoc" fi if [[ $CARCH == "aarch64" ]]; then - _sse2neon="${MINGW_PREFIX}/include/sse2neon" - else - _sse2neon="" + _extra_config+=("-DSSE2NEON_ROOT_DIR=${MINGW_PREFIX}/include/sse2neon") fi export XR_OPENXR_SDK_ROOT_DIR=${MINGW_PREFIX} @@ -210,8 +206,7 @@ build() { ${MINGW_PREFIX}/bin/cmake \ -G"Ninja" \ -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ - -DMINGW_LIBS=${MINGW_PREFIX} \ - -DCMAKE_BUILD_TYPE=${_btype} \ + "${_extra_config[@]}" \ -DWITH_SYSTEM_AUDASPACE=OFF \ -DWITH_SYSTEM_GLEW=ON \ -DWITH_SYSTEM_GFLAGS=OFF \ @@ -219,6 +214,7 @@ build() { -DWITH_SYSTEM_BULLET=OFF \ -DWITH_SYSTEM_LZO=ON \ -DWITH_SYSTEM_EIGEN3=ON \ + -DWITH_SYSTEM_FREETYPE=ON \ -DWITH_INSTALL_PORTABLE=OFF \ -DWITH_OPENCOLLADA=ON \ -DWITH_ALEMBIC=ON \ @@ -231,23 +227,18 @@ build() { -DWITH_CYCLES_CUDA_BINARIES=OFF \ -DWITH_CYCLES_OSL=ON \ -DWITH_FFTW3=ON \ - -DWITH_OPENVDB=OFF \ + -DWITH_OPENVDB=ON \ -DWITH_MEM_JEMALLOC=OFF \ -DWITH_MOD_OCEANSIM=ON \ - -DPython_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe \ - -DPython_ROOT_DIR=${MINGW_PREFIX} \ - -DPython_FIND_REGISTRY=NEVER \ -DPYTHON_VERSION=${_pyver} \ -DPYTHON_LIBPATH=${MINGW_PREFIX}/lib \ -DPYTHON_LIBRARY=${MINGW_PREFIX}/lib/libpython${_pyver}.dll.a \ -DPYTHON_INCLUDE_DIR=${MINGW_PREFIX}/include/python${_pyver} \ -DWITH_PYTHON_INSTALL=OFF \ -DWITH_PYTHON_INSTALL_NUMPY=OFF \ - -DCYCLES_OSL=${MINGW_PREFIX} \ -DWITH_OPENMP=ON \ -DWITH_LLVM=ON \ -DLLVM_STATIC=ON \ - -DSSE2NEON_ROOT_DIR=${_sse2neon} \ ../${_realname}-${pkgver} ${MINGW_PREFIX}/bin/cmake --build . diff --git a/mingw-w64-blender/blender-CLANG32.install b/mingw-w64-blender/blender-CLANG32.install deleted file mode 100644 index bcdc69f0c4..0000000000 --- a/mingw-w64-blender/blender-CLANG32.install +++ /dev/null @@ -1,7 +0,0 @@ -post_install() { - find "clang32/bin" -type d -iname '2.*' | xargs -rt rm -rf -} - -post_upgrade() { - post_install -} diff --git a/mingw-w64-blender/blender-MINGW32.install b/mingw-w64-blender/blender-MINGW32.install deleted file mode 100644 index 3b1e4d9047..0000000000 --- a/mingw-w64-blender/blender-MINGW32.install +++ /dev/null @@ -1,7 +0,0 @@ -post_install() { - find "mingw32/bin" -type d -iname '2.*' | xargs -rt rm -rf -} - -post_upgrade() { - post_install -}