From d55edbca4a6b3cbc66f19a046234df0900183313 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 29 May 2023 21:49:40 +0100 Subject: [PATCH] openexr: backport gcc-13 fix Without the change `openexr` build on `gcc-13` fails as: [ 99%] Building CXX object src/test/OpenEXRTest/CMakeFiles/OpenEXRTest.dir/testInputPart.cpp.o openexr/src/bin/exrcheck/main.cpp: In function 'bool exrCheck(const char*, bool, bool, bool, bool)': openexr/src/bin/exrcheck/main.cpp:65:15: error: 'uintptr_t' does not name a type 65 | const uintptr_t kMaxSize = uintptr_t (-1) / 4; | ^~~~~~~~~ --- .../development/libraries/openexr/default.nix | 4 +++ .../libraries/openexr/gcc-13.patch | 33 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/libraries/openexr/gcc-13.patch diff --git a/pkgs/development/libraries/openexr/default.nix b/pkgs/development/libraries/openexr/default.nix index 126fa2796f30..38e0fadd0738 100644 --- a/pkgs/development/libraries/openexr/default.nix +++ b/pkgs/development/libraries/openexr/default.nix @@ -35,6 +35,10 @@ stdenv.mkDerivation rec { extraPrefix = "OpenEXR/IlmImf/"; sha256 = "sha256-DrpldpNgN5pWKzIuuPIrynGX3EpP8YhJlu+lLfNFGxQ="; }) + + # Backport gcc-13 fix: + # https://github.com/AcademySoftwareFoundation/openexr/pull/1264 + ./gcc-13.patch ]; # tests are determined to use /var/tmp on unix diff --git a/pkgs/development/libraries/openexr/gcc-13.patch b/pkgs/development/libraries/openexr/gcc-13.patch new file mode 100644 index 000000000000..d508b6028f76 --- /dev/null +++ b/pkgs/development/libraries/openexr/gcc-13.patch @@ -0,0 +1,33 @@ +https://github.com/AcademySoftwareFoundation/openexr/pull/1264 +https://github.com/AcademySoftwareFoundation/openexr/commit/d0088a3c6943a9a53fc24e29885414d082d531fe.patch + +--- a/OpenEXR/IlmImf/ImfDwaCompressor.cpp ++++ b/OpenEXR/IlmImf/ImfDwaCompressor.cpp +@@ -159,6 +159,7 @@ + #include + + #include ++#include + + + // Windows specific addition to prevent the indirect import of the redefined min/max macros +--- a/OpenEXR/IlmImf/ImfHuf.cpp ++++ b/OpenEXR/IlmImf/ImfHuf.cpp +@@ -53,6 +53,7 @@ + #include + #include + #include ++#include + + + using namespace std; +--- a/OpenEXR/IlmImf/ImfMisc.cpp ++++ b/OpenEXR/IlmImf/ImfMisc.cpp +@@ -52,6 +52,7 @@ + #include + #include + #include ++#include + #include "ImfNamespace.h" + + OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER