diff --git a/mingw-w64-blender/0002-fix-mingw-w64-definitions.patch b/mingw-w64-blender/0002-fix-mingw-w64-definitions.patch index 7cecfd98ba..786f46feaa 100644 --- a/mingw-w64-blender/0002-fix-mingw-w64-definitions.patch +++ b/mingw-w64-blender/0002-fix-mingw-w64-definitions.patch @@ -590,3 +590,66 @@ diff -Naur a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/in namespace qflow { inline int dedge_prev(int e, int deg) { return (e % deg == 0u) ? e + (deg - 1) : e - 1; } +--- 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 @@ + + BLI_getInstallationDir(InstallDir); + GetSystemDirectory(SysDir, FILE_MAXDIR); ++#ifdef __MINGW32__ ++ ThumbHandlerDLL = "libBlendThumb.dll"; ++#else + ThumbHandlerDLL = "BlendThumb.dll"; ++#endif + snprintf( + RegCmd, MAX_PATH * 2, "%s\\regsvr32 /s \"%s\\%s\"", SysDir, InstallDir, ThumbHandlerDLL); + system(RegCmd); +--- 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,7 +29,7 @@ + ) + + add_library(BlendThumb SHARED ${SRC}) +-target_link_libraries(BlendThumb ${ZLIB_LIBRARIES}) ++target_link_libraries(BlendThumb ${ZLIB_LIBRARIES} shlwapi) + + install( + FILES $ +--- 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 // For IThumbnailProvider. + #include ++#include + ++#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); + diff --git a/mingw-w64-blender/PKGBUILD b/mingw-w64-blender/PKGBUILD index cda8afb482..866eac8516 100644 --- a/mingw-w64-blender/PKGBUILD +++ b/mingw-w64-blender/PKGBUILD @@ -80,7 +80,7 @@ source=(https://download.blender.org/source/${_realname}-${_basever}${_minorchar 0019-fix-casts.patch) sha256sums=('52ac4145cef3d49ca6a36cbc6d009598ca2833143fd6c4f1caba4f5c525680fe' '48c45238950f5df8801bec5b66d02dcf3c0e3728c8f2c452f4407b23a68fb3b3' - '887cf4bf070af714087ed5306775efe4142bcb5d482714abd8610bbdbe95e198' + '26f0d63970e0fbd9a0d2ce440af0e58e9ce6a5ce75870a4fe8bf5f85de81ddf4' 'bcaa5b105463aa2dd9ab0f69ed4d422c23f9ae1a00a93e012c62113489f3db56' '87036a005a817bce9edd5fb7f18ba3b7a0b8d309d6f1f9bb0f813c931d889c0d' 'cb603fd30a2e1421f653a187c3beb8e767d043a0d948213e884095cf0a27a411'