about summary refs log tree commit diff
path: root/pkgs/applications/graphics/djv
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-11-11 17:56:28 +0000
committerSergei Trofimovich <slyich@gmail.com>2022-11-11 17:56:28 +0000
commit9b0e6f44a8a5b5cac0866064dc668dbb2ff767f5 (patch)
tree5bd7e31cd8dcfebfe04ed01722ba14828e00cd8d /pkgs/applications/graphics/djv
parented17c4db90573c12f8a5aa9478644507c662ec8b (diff)
djv: fix build against gcc-11
Without the change build fails on hydra due to `gcc` version mix
between `opencolorio` and `djv`:

    [ 51%] Linking CXX executable ../../build/bin/Render2DStressTest
    ...-binutils-2.39/bin/ld: ...-opencolorio-1.1.1/lib/libOpenColorIO.so:
      undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'

ZHF: https://github.com/NixOS/nixpkgs/issues/199919
Diffstat (limited to 'pkgs/applications/graphics/djv')
-rw-r--r--pkgs/applications/graphics/djv/default.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/djv/default.nix b/pkgs/applications/graphics/djv/default.nix
index 95a29f243e4aa..250ff2b32efa3 100644
--- a/pkgs/applications/graphics/djv/default.nix
+++ b/pkgs/applications/graphics/djv/default.nix
@@ -1,6 +1,7 @@
 { stdenv
 , cmake
 , fetchFromGitHub
+, fetchpatch
 , lib
 , alsa-lib
 , libGL
@@ -107,6 +108,25 @@ stdenv.mkDerivation rec {
   version = djvVersion;
 
   src = djvSrc;
+  patches = [
+    # Pull fix ending upstream inclusion for gcc-12+ support:
+    #   https://github.com/darbyjohnston/DJV/pull/477
+    (fetchpatch {
+      name = "gcc-11-limits.patch";
+      url = "https://github.com/darbyjohnston/DJV/commit/0544ffa1a263a6b8e8518b47277de7601b21b4f4.patch";
+      hash = "sha256-x6ye0xMwTlKyNW4cVFb64RvAayvo71kuOooPj3ROn0g=";
+    })
+    (fetchpatch {
+      name = "gcc-11-IO.patch";
+      url = "https://github.com/darbyjohnston/DJV/commit/ce79f2d2cb35d03322648323858834bff942c792.patch";
+      hash = "sha256-oPbXOnN5Y5QL+bs/bL5eJALu45YHnyTBLQcC8XcJi0c=";
+    })
+    (fetchpatch {
+      name = "gcc-11-sleep_for.patch";
+      url = "https://github.com/darbyjohnston/DJV/commit/6989f43db27f66a7691f6048a2eb3299ef43a92e.patch";
+      hash = "sha256-1kiF3VrZiO+FSoR7NHCbduQ8tMq/Uuu6Z+sQII4xBAw=";
+    })
+  ];
 
   nativeBuildInputs = [ cmake ];
   buildInputs = [