mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
blender: fix darwin build, use openvdb 12; openvdb_11: drop (#403854)
This commit is contained in:
commit
cf5b55b42d
5 changed files with 53 additions and 45 deletions
|
@ -1,17 +1,21 @@
|
||||||
--- a/CMakeLists.txt 2024-03-01 08:08:05
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt 2024-04-24 15:45:30
|
index 0611614fe18..a6dcb2f04b6 100644
|
||||||
@@ -2134,7 +2134,7 @@
|
--- 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(C_MACRO_PREFIX_MAP AND CXX_MACRO_PREFIX_MAP)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
- if(XCODE AND ${XCODE_VERSION} VERSION_LESS 12.0)
|
- if(XCODE AND ${XCODE_VERSION} VERSION_LESS 12.0)
|
||||||
+ if(FALSE)
|
+ if(FALSE)
|
||||||
# Developers may have say LLVM Clang-10.0.1 toolchain (which supports 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).
|
# with Xcode-11 (the Clang of which doesn't support the flag).
|
||||||
message(
|
message(
|
||||||
--- a/build_files/cmake/platform/platform_apple.cmake 2024-02-22 15:31:36
|
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
|
||||||
+++ b/build_files/cmake/platform/platform_apple.cmake 2024-04-24 16:06:13
|
index b2db64bbd2e..aac4b552655 100644
|
||||||
@@ -55,7 +55,6 @@
|
--- 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()
|
||||||
endif()
|
endif()
|
||||||
if(NOT EXISTS "${LIBDIR}/.git")
|
if(NOT EXISTS "${LIBDIR}/.git")
|
||||||
|
@ -19,7 +23,7 @@
|
||||||
endif()
|
endif()
|
||||||
if(FIRST_RUN)
|
if(FIRST_RUN)
|
||||||
message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
|
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_VORBIS_LIBRARY NAMES vorbis HINTS ${LIBDIR}/ffmpeg/lib)
|
||||||
find_library(_sndfile_VORBISENC_LIBRARY NAMES vorbisenc HINTS ${LIBDIR}/ffmpeg/lib)
|
find_library(_sndfile_VORBISENC_LIBRARY NAMES vorbisenc HINTS ${LIBDIR}/ffmpeg/lib)
|
||||||
list(APPEND LIBSNDFILE_LIBRARIES
|
list(APPEND LIBSNDFILE_LIBRARIES
|
||||||
|
@ -30,35 +34,35 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
print_found_status("SndFile libraries" "${LIBSNDFILE_LIBRARIES}")
|
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_ROOT_DIR ${LIBDIR}/ffmpeg)
|
||||||
set(FFMPEG_FIND_COMPONENTS
|
set(FFMPEG_FIND_COMPONENTS
|
||||||
avcodec avdevice avformat avutil
|
avcodec avdevice avformat avutil
|
||||||
- mp3lame ogg opus swresample swscale
|
- mp3lame ogg opus swresample swscale
|
||||||
- theora theoradec theoraenc vorbis vorbisenc
|
- theora theoradec theoraenc vorbis vorbisenc
|
||||||
- vorbisfile vpx x264)
|
- vorbisfile vpx x264)
|
||||||
+ swresample swscale)
|
+ swresample swscale)
|
||||||
if(EXISTS ${LIBDIR}/ffmpeg/lib/libaom.a)
|
if(EXISTS ${LIBDIR}/ffmpeg/lib/libaom.a)
|
||||||
list(APPEND FFMPEG_FIND_COMPONENTS aom)
|
list(APPEND FFMPEG_FIND_COMPONENTS aom)
|
||||||
endif()
|
endif()
|
||||||
@@ -275,7 +268,6 @@
|
@@ -285,7 +278,6 @@ endif()
|
||||||
add_bundled_libraries(boost/lib)
|
add_bundled_libraries(boost/lib)
|
||||||
|
|
||||||
if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
|
if(WITH_CODEC_FFMPEG)
|
||||||
- string(APPEND PLATFORM_LINKFLAGS " -liconv") # boost_locale and ffmpeg needs it !
|
- string(APPEND PLATFORM_LINKFLAGS " -liconv") # ffmpeg needs it !
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_PUGIXML)
|
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.
|
# CMake FindOpenMP doesn't know about AppleClang before 3.12, so provide custom flags.
|
||||||
if(WITH_OPENMP)
|
if(WITH_OPENMP)
|
||||||
- if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
+ if(FALSE)
|
- if(${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 17.0)
|
||||||
# Use OpenMP from our precompiled libraries.
|
+ if(FALSE) # clang in nix was compatible with openmp
|
||||||
message(STATUS "Using ${LIBDIR}/openmp for OpenMP")
|
if(WITH_STRICT_BUILD_OPTIONS)
|
||||||
set(OPENMP_CUSTOM ON)
|
message(SEND_ERROR "OpenMP library is not compatible with the current Clang version")
|
||||||
@@ -427,7 +419,7 @@
|
else()
|
||||||
|
@@ -446,7 +438,7 @@ string(APPEND PLATFORM_LINKFLAGS
|
||||||
" -Wl,-unexported_symbols_list,'${PLATFORM_SYMBOLS_MAP}'"
|
" -Wl,-unexported_symbols_list,'${PLATFORM_SYMBOLS_MAP}'"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -67,3 +71,23 @@
|
||||||
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
|
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
|
||||||
# Silence "no platform load command found in <static library>, assuming: macOS".
|
# Silence "no platform load command found in <static library>, assuming: macOS".
|
||||||
string(APPEND PLATFORM_LINKFLAGS " -Wl,-ld_classic")
|
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
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
SDL,
|
SDL,
|
||||||
addDriverRunpath,
|
addDriverRunpath,
|
||||||
alembic,
|
alembic,
|
||||||
|
apple-sdk_15,
|
||||||
blender,
|
blender,
|
||||||
boost,
|
boost,
|
||||||
brotli,
|
brotli,
|
||||||
|
@ -59,7 +60,7 @@
|
||||||
openjpeg,
|
openjpeg,
|
||||||
openpgl,
|
openpgl,
|
||||||
opensubdiv,
|
opensubdiv,
|
||||||
openvdb_11,
|
openvdb,
|
||||||
openxr-loader,
|
openxr-loader,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
potrace,
|
potrace,
|
||||||
|
@ -252,7 +253,7 @@ stdenv'.mkDerivation (finalAttrs: {
|
||||||
openjpeg
|
openjpeg
|
||||||
openpgl
|
openpgl
|
||||||
(opensubdiv.override { inherit cudaSupport; })
|
(opensubdiv.override { inherit cudaSupport; })
|
||||||
openvdb_11
|
openvdb
|
||||||
potrace
|
potrace
|
||||||
pugixml
|
pugixml
|
||||||
python3
|
python3
|
||||||
|
@ -279,6 +280,9 @@ stdenv'.mkDerivation (finalAttrs: {
|
||||||
else
|
else
|
||||||
[
|
[
|
||||||
SDL
|
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
|
brotli
|
||||||
llvmPackages.openmp
|
llvmPackages.openmp
|
||||||
sse2neon
|
sse2neon
|
||||||
|
@ -430,7 +434,6 @@ stdenv'.mkDerivation (finalAttrs: {
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
"aarch64-darwin"
|
"aarch64-darwin"
|
||||||
];
|
];
|
||||||
broken = stdenv.hostPlatform.isDarwin; # fails due to too-old SDK, using newer SDK fails to compile
|
|
||||||
maintainers = with lib.maintainers; [
|
maintainers = with lib.maintainers; [
|
||||||
amarshall
|
amarshall
|
||||||
veprbl
|
veprbl
|
||||||
|
|
|
@ -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;
|
|
||||||
};
|
|
||||||
})
|
|
|
@ -1379,6 +1379,7 @@ mapAliases {
|
||||||
openssl_3_0 = openssl_3; # Added 2022-06-27
|
openssl_3_0 = openssl_3; # Added 2022-06-27
|
||||||
opensycl = lib.warnOnInstantiate "'opensycl' has been renamed to 'adaptivecpp'" adaptivecpp; # Added 2024-12-04
|
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
|
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
|
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 = onlyoffice-desktopeditors; # Added 2024-09-20
|
||||||
onlyoffice-bin_latest = onlyoffice-bin; # Added 2024-07-03
|
onlyoffice-bin_latest = onlyoffice-bin; # Added 2024-07-03
|
||||||
|
|
|
@ -9299,7 +9299,6 @@ with pkgs;
|
||||||
zunclient = with python312Packages; toPythonApplication python-zunclient;
|
zunclient = with python312Packages; toPythonApplication python-zunclient;
|
||||||
|
|
||||||
openvdb = callPackage ../development/libraries/openvdb { };
|
openvdb = callPackage ../development/libraries/openvdb { };
|
||||||
openvdb_11 = callPackage ../development/libraries/openvdb/11.nix { };
|
|
||||||
|
|
||||||
inherit (callPackages ../development/libraries/libressl { })
|
inherit (callPackages ../development/libraries/libressl { })
|
||||||
libressl_3_6
|
libressl_3_6
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue