blender: fix darwin build, use openvdb 12; openvdb_11: drop (#403854)

This commit is contained in:
Dmitry Kalinkin 2025-05-09 16:34:16 -04:00 committed by GitHub
commit cf5b55b42d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 53 additions and 45 deletions

View file

@ -1,17 +1,21 @@
--- a/CMakeLists.txt 2024-03-01 08:08:05
+++ b/CMakeLists.txt 2024-04-24 15:45:30
@@ -2134,7 +2134,7 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0611614fe18..a6dcb2f04b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2567,7 +2567,7 @@ if(WITH_COMPILER_SHORT_FILE_MACRO)
)
if(C_MACRO_PREFIX_MAP AND CXX_MACRO_PREFIX_MAP)
if(APPLE)
- if(XCODE AND ${XCODE_VERSION} VERSION_LESS 12.0)
+ if(FALSE)
# Developers may have say LLVM Clang-10.0.1 toolchain (which supports the flag)
# with Xcode-11 (the Clang of which doesn't support the flag).
# Developers may have say LLVM Clang-10.0.1 toolchain (which supports the flag)
# with Xcode-11 (the Clang of which doesn't support the flag).
message(
--- a/build_files/cmake/platform/platform_apple.cmake 2024-02-22 15:31:36
+++ b/build_files/cmake/platform/platform_apple.cmake 2024-04-24 16:06:13
@@ -55,7 +55,6 @@
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index b2db64bbd2e..aac4b552655 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -55,7 +55,6 @@ if(NOT DEFINED LIBDIR)
endif()
endif()
if(NOT EXISTS "${LIBDIR}/.git")
@ -19,7 +23,7 @@
endif()
if(FIRST_RUN)
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
@@ -115,10 +114,6 @@
@@ -121,10 +120,6 @@ if(WITH_CODEC_SNDFILE)
find_library(_sndfile_VORBIS_LIBRARY NAMES vorbis HINTS ${LIBDIR}/ffmpeg/lib)
find_library(_sndfile_VORBISENC_LIBRARY NAMES vorbisenc HINTS ${LIBDIR}/ffmpeg/lib)
list(APPEND LIBSNDFILE_LIBRARIES
@ -30,35 +34,35 @@
)
print_found_status("SndFile libraries" "${LIBSNDFILE_LIBRARIES}")
@@ -162,9 +157,7 @@
@@ -168,9 +163,7 @@ if(WITH_CODEC_FFMPEG)
set(FFMPEG_ROOT_DIR ${LIBDIR}/ffmpeg)
set(FFMPEG_FIND_COMPONENTS
avcodec avdevice avformat avutil
- mp3lame ogg opus swresample swscale
- theora theoradec theoraenc vorbis vorbisenc
- vorbisfile vpx x264)
+ swresample swscale)
+ swresample swscale)
if(EXISTS ${LIBDIR}/ffmpeg/lib/libaom.a)
list(APPEND FFMPEG_FIND_COMPONENTS aom)
endif()
@@ -275,7 +268,6 @@
@@ -285,7 +278,6 @@ endif()
add_bundled_libraries(boost/lib)
if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
- string(APPEND PLATFORM_LINKFLAGS " -liconv") # boost_locale and ffmpeg needs it !
if(WITH_CODEC_FFMPEG)
- string(APPEND PLATFORM_LINKFLAGS " -liconv") # ffmpeg needs it !
endif()
if(WITH_PUGIXML)
@@ -350,7 +342,7 @@
@@ -361,7 +353,7 @@ endif()
# CMake FindOpenMP doesn't know about AppleClang before 3.12, so provide custom flags.
if(WITH_OPENMP)
- if(CMAKE_C_COMPILER_ID MATCHES "Clang")
+ if(FALSE)
# Use OpenMP from our precompiled libraries.
message(STATUS "Using ${LIBDIR}/openmp for OpenMP")
set(OPENMP_CUSTOM ON)
@@ -427,7 +419,7 @@
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
- if(${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 17.0)
+ if(FALSE) # clang in nix was compatible with openmp
if(WITH_STRICT_BUILD_OPTIONS)
message(SEND_ERROR "OpenMP library is not compatible with the current Clang version")
else()
@@ -446,7 +438,7 @@ string(APPEND PLATFORM_LINKFLAGS
" -Wl,-unexported_symbols_list,'${PLATFORM_SYMBOLS_MAP}'"
)
@ -67,3 +71,23 @@
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
# Silence "no platform load command found in <static library>, assuming: macOS".
string(APPEND PLATFORM_LINKFLAGS " -Wl,-ld_classic")
diff --git a/source/blender/blendthumb/CMakeLists.txt b/source/blender/blendthumb/CMakeLists.txt
index 935b3f94ee1..f3d73637f71 100644
--- a/source/blender/blendthumb/CMakeLists.txt
+++ b/source/blender/blendthumb/CMakeLists.txt
@@ -65,15 +65,6 @@ elseif(APPLE)
# Prevent Xcode from overwriting the signature.
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ""
)
- # CMake needs the target defined in the same file as add_custom_command.
- # It needs to be code-signed (ad-hoc in this case)
- # even on developer machine to generate thumbnails.
- # Command taken from XCode build process.
- add_custom_command(
- TARGET blender-thumbnailer POST_BUILD
- COMMAND codesign --deep --force --sign - --entitlements "${CMAKE_SOURCE_DIR}/release/darwin/thumbnailer_entitlements.plist"
- --timestamp=none $<TARGET_BUNDLE_DIR:blender-thumbnailer>
- )
elseif(UNIX)
# -----------------------------------------------------------------------------
# Build `blender-thumbnailer` executable

View file

@ -2,6 +2,7 @@
SDL,
addDriverRunpath,
alembic,
apple-sdk_15,
blender,
boost,
brotli,
@ -59,7 +60,7 @@
openjpeg,
openpgl,
opensubdiv,
openvdb_11,
openvdb,
openxr-loader,
pkg-config,
potrace,
@ -252,7 +253,7 @@ stdenv'.mkDerivation (finalAttrs: {
openjpeg
openpgl
(opensubdiv.override { inherit cudaSupport; })
openvdb_11
openvdb
potrace
pugixml
python3
@ -279,6 +280,9 @@ stdenv'.mkDerivation (finalAttrs: {
else
[
SDL
# blender chooses Metal features based on runtime system version
# lets use the latest SDK and let Blender handle falling back on older systems.
apple-sdk_15
brotli
llvmPackages.openmp
sse2neon
@ -430,7 +434,6 @@ stdenv'.mkDerivation (finalAttrs: {
"x86_64-linux"
"aarch64-darwin"
];
broken = stdenv.hostPlatform.isDarwin; # fails due to too-old SDK, using newer SDK fails to compile
maintainers = with lib.maintainers; [
amarshall
veprbl

View file

@ -1,19 +0,0 @@
{
lib,
fetchFromGitHub,
openvdb,
}:
openvdb.overrideAttrs (old: rec {
name = "${old.pname}-${version}";
version = "11.0.0";
src = fetchFromGitHub {
owner = "AcademySoftwareFoundation";
repo = "openvdb";
rev = "v${version}";
sha256 = "sha256-wDDjX0nKZ4/DIbEX33PoxR43dJDj2NF3fm+Egug62GQ=";
};
meta = old.meta // {
license = lib.licenses.mpl20;
};
})

View file

@ -1379,6 +1379,7 @@ mapAliases {
openssl_3_0 = openssl_3; # Added 2022-06-27
opensycl = lib.warnOnInstantiate "'opensycl' has been renamed to 'adaptivecpp'" adaptivecpp; # Added 2024-12-04
opensyclWithRocm = lib.warnOnInstantiate "'opensyclWithRocm' has been renamed to 'adaptivecppWithRocm'" adaptivecppWithRocm; # Added 2024-12-04
openvdb_11 = throw "'openvdb_11' has been removed in favor of the latest version'"; # Added 2025-05-03
orchis = throw "'orchis' has been renamed to/replaced by 'orchis-theme'"; # Converted to throw 2024-10-17
onlyoffice-bin = onlyoffice-desktopeditors; # Added 2024-09-20
onlyoffice-bin_latest = onlyoffice-bin; # Added 2024-07-03

View file

@ -9299,7 +9299,6 @@ with pkgs;
zunclient = with python312Packages; toPythonApplication python-zunclient;
openvdb = callPackage ../development/libraries/openvdb { };
openvdb_11 = callPackage ../development/libraries/openvdb/11.nix { };
inherit (callPackages ../development/libraries/libressl { })
libressl_3_6