Merge pull request #326534 from amarshall/blender-4.2

blender: 4.1.1 -> 4.2.0
This commit is contained in:
Pol Dellaiera
2024-07-16 21:15:23 +02:00
committed by GitHub
2 changed files with 40 additions and 37 deletions
+38 -35
View File
@@ -18,8 +18,7 @@
cudaSupport ? config.cudaSupport,
dbus,
embree,
fetchpatch,
fetchurl,
fetchgit,
fetchzip,
ffmpeg,
fftw,
@@ -55,7 +54,6 @@
llvmPackages,
makeWrapper,
mesa,
ocl-icd,
openal,
opencollada,
opencolorio,
@@ -102,41 +100,46 @@ in
stdenv.mkDerivation (finalAttrs: {
pname = "blender";
version = "4.1.1";
version = "4.2.0";
src = fetchurl {
url = "https://download.blender.org/source/blender-${finalAttrs.version}.tar.xz";
hash = "sha256-T7s69k0/hN9ccQN0hFQibBiFwawu1Tc9DOoegOgsCEg=";
};
patches = [
./draco.patch
(fetchpatch {
url = "https://projects.blender.org/blender/blender/commit/ae35b5758791bebb21741f9b505b9fca347ae50e.patch";
hash = "sha256-xUi55+7aiwEjtjqOi8to1YxdPlsBUThCCkCa5T6LIQc=";
srcs = [
(fetchzip {
name = "source";
url = "https://download.blender.org/source/blender-${finalAttrs.version}.tar.xz";
hash = "sha256-STG4IuEhkdA+sDPIpCAkSflyd3rSUZ9ZCS9PdB4vyTY=";
})
] ++ lib.optional stdenv.isDarwin ./darwin.patch;
(fetchgit {
name = "assets";
url = "https://projects.blender.org/blender/blender-assets.git";
rev = "6864f1832e71a31e1e04f72bb7a5a1f53f0cd01c";
fetchLFS = true;
hash = "sha256-vepK0inPMuleAJBSipwoI99nMBBiFaK/eSMHDetEtjY=";
})
];
postUnpack = ''
chmod -R u+w *
rm -r assets/working
mv assets --target-directory source/release/datafiles/
'';
sourceRoot = "source";
patches = [ ./draco.patch ] ++ lib.optional stdenv.isDarwin ./darwin.patch;
postPatch =
(
if stdenv.isDarwin then
''
: > build_files/cmake/platform/platform_apple_xcode.cmake
substituteInPlace source/creator/CMakeLists.txt \
--replace-fail '${"$"}{LIBDIR}/python' \
'${python3}' \
--replace-fail '${"$"}{LIBDIR}/materialx/' '${python3Packages.materialx}/'
substituteInPlace build_files/cmake/platform/platform_apple.cmake \
--replace-fail '${"$"}{LIBDIR}/brotli/lib/libbrotlicommon-static.a' \
'${lib.getLib brotli}/lib/libbrotlicommon.dylib' \
--replace-fail '${"$"}{LIBDIR}/brotli/lib/libbrotlidec-static.a' \
'${lib.getLib brotli}/lib/libbrotlidec.dylib'
''
else
''
substituteInPlace extern/clew/src/clew.c --replace '"libOpenCL.so"' '"${ocl-icd}/lib/libOpenCL.so"'
''
)
(lib.optionalString stdenv.isDarwin ''
: > build_files/cmake/platform/platform_apple_xcode.cmake
substituteInPlace source/creator/CMakeLists.txt \
--replace-fail '${"$"}{LIBDIR}/python' \
'${python3}' \
--replace-fail '${"$"}{LIBDIR}/materialx/' '${python3Packages.materialx}/'
substituteInPlace build_files/cmake/platform/platform_apple.cmake \
--replace-fail '${"$"}{LIBDIR}/brotli/lib/libbrotlicommon-static.a' \
'${lib.getLib brotli}/lib/libbrotlicommon.dylib' \
--replace-fail '${"$"}{LIBDIR}/brotli/lib/libbrotlidec-static.a' \
'${lib.getLib brotli}/lib/libbrotlidec.dylib'
'')
+ (lib.optionalString hipSupport ''
substituteInPlace extern/hipew/src/hipew.c --replace '"/opt/rocm/hip/lib/libamdhip64.so"' '"${rocmPackages.clr}/lib/libamdhip64.so"'
substituteInPlace extern/hipew/src/hipew.c --replace '"opt/rocm/hip/bin"' '"${rocmPackages.clr}/bin"'
@@ -375,7 +378,7 @@ stdenv.mkDerivation (finalAttrs: {
PYTHON
mkdir $out
for engine in BLENDER_EEVEE CYCLES; do
for engine in BLENDER_EEVEE_NEXT CYCLES; do
echo "Rendering with $engine..."
# Beware that argument order matters
${lib.getExe finalAttrs.finalPackage} \
+2 -2
View File
@@ -12,8 +12,8 @@
# enable boost for cycles, audaspace or i18n
# otherwise if the user disabled
--- a/scripts/addons/io_scene_gltf2/io/com/gltf2_io_draco_compression_extension.py
+++ b/scripts/addons/io_scene_gltf2/io/com/gltf2_io_draco_compression_extension.py
--- a/scripts/addons_core/io_scene_gltf2/io/com/gltf2_io_draco_compression_extension.py
+++ b/scripts/addons_core/io_scene_gltf2/io/com/gltf2_io_draco_compression_extension.py
@@ -17,7 +17,7 @@ def dll_path() -> Path:
"""
lib_name = 'extern_draco'