mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
blender: 3.6.5 -> 4.0.1 (#267511)
As noted in comment, Blender is now using private libdecor APIs not in the headers, so need to patch to build against it. I think it probably works when Blender does dynamic loading at runtime since it uses the fn defs it defines in that case, but we don’t want to do that, it seems (as we already set `-DWITH_GHOST_WAYLAND_DYNLOAD=OFF`).
This commit is contained in:
parent
c64a7d15f0
commit
aa6db6ac9d
@ -3,7 +3,7 @@
|
||||
, libjpeg, libpng, libsamplerate, libsndfile
|
||||
, libtiff, libwebp, libGLU, libGL, openal, opencolorio, openexr, openimagedenoise, openimageio, openjpeg, python310Packages
|
||||
, openvdb, libXxf86vm, tbb, alembic
|
||||
, zlib, zstd, fftw, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath
|
||||
, zlib, zstd, fftw, fftwFloat, opensubdiv, freetype, jemalloc, ocl-icd, addOpenGLRunpath
|
||||
, jackaudioSupport ? false, libjack2
|
||||
, cudaSupport ? config.cudaSupport, cudaPackages ? { }
|
||||
, hipSupport ? false, rocmPackages # comes with a significantly larger closure size
|
||||
@ -30,15 +30,19 @@ let
|
||||
url = "https://developer.download.nvidia.com/redist/optix/v7.3/OptiX-7.3.0-Include.zip";
|
||||
sha256 = "0max1j4822mchj0xpz9lqzh91zkmvsn4py0r174cvqfz8z8ykjk8";
|
||||
};
|
||||
libdecor' = libdecor.overrideAttrs (old: {
|
||||
# Blender uses private APIs, need to patch to expose them
|
||||
patches = (old.patches or [ ]) ++ [ ./libdecor.patch ];
|
||||
});
|
||||
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: rec {
|
||||
pname = "blender";
|
||||
version = "3.6.5";
|
||||
version = "4.0.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.blender.org/source/${pname}-${version}.tar.xz";
|
||||
hash = "sha256-QAHA/pn22HLsfH6VX4Sp7r25raFxAPS1Gergjez38kM=";
|
||||
hash = "sha256-/jLU0noX5RxhQ+26G16nGFylm65Lzfm9s11oCWCC43Q=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@ -53,7 +57,7 @@ stdenv.mkDerivation (finalAttrs: rec {
|
||||
buildInputs =
|
||||
[ boost ffmpeg gettext glew ilmbase
|
||||
freetype libjpeg libpng libsamplerate libsndfile libtiff libwebp
|
||||
opencolorio openexr openimageio openjpeg python zlib zstd fftw jemalloc
|
||||
opencolorio openexr openimageio openjpeg python zlib zstd fftw fftwFloat jemalloc
|
||||
alembic
|
||||
(opensubdiv.override { inherit cudaSupport; })
|
||||
tbb
|
||||
@ -65,7 +69,7 @@ stdenv.mkDerivation (finalAttrs: rec {
|
||||
openpgl
|
||||
]
|
||||
++ lib.optionals waylandSupport [
|
||||
wayland wayland-protocols libffi libdecor libxkbcommon dbus
|
||||
wayland wayland-protocols libffi libdecor' libxkbcommon dbus
|
||||
]
|
||||
++ lib.optionals (!stdenv.isAarch64) [
|
||||
openimagedenoise
|
||||
|
34
pkgs/applications/misc/blender/libdecor.patch
Normal file
34
pkgs/applications/misc/blender/libdecor.patch
Normal file
@ -0,0 +1,34 @@
|
||||
diff --git a/src/libdecor-plugin.h b/src/libdecor-plugin.h
|
||||
index ba80ce6..59199dd 100644
|
||||
--- a/src/libdecor-plugin.h
|
||||
+++ b/src/libdecor-plugin.h
|
||||
@@ -132,12 +132,6 @@ struct libdecor_plugin_interface {
|
||||
struct wl_surface *
|
||||
libdecor_frame_get_wl_surface(struct libdecor_frame *frame);
|
||||
|
||||
-int
|
||||
-libdecor_frame_get_content_width(struct libdecor_frame *frame);
|
||||
-
|
||||
-int
|
||||
-libdecor_frame_get_content_height(struct libdecor_frame *frame);
|
||||
-
|
||||
enum libdecor_window_state
|
||||
libdecor_frame_get_window_state(struct libdecor_frame *frame);
|
||||
|
||||
diff --git a/src/libdecor.h b/src/libdecor.h
|
||||
index af67e2f..b5eba41 100644
|
||||
--- a/src/libdecor.h
|
||||
+++ b/src/libdecor.h
|
||||
@@ -532,6 +532,12 @@ bool
|
||||
libdecor_configuration_get_window_state(struct libdecor_configuration *configuration,
|
||||
enum libdecor_window_state *window_state);
|
||||
|
||||
+int
|
||||
+libdecor_frame_get_content_width(struct libdecor_frame *frame);
|
||||
+
|
||||
+int
|
||||
+libdecor_frame_get_content_height(struct libdecor_frame *frame);
|
||||
+
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user