about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/ctl/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/ctl/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/ctl/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/ctl/default.nix b/nixpkgs/pkgs/development/libraries/ctl/default.nix
index be643e3a52c6..0a9f50a6aaa6 100644
--- a/nixpkgs/pkgs/development/libraries/ctl/default.nix
+++ b/nixpkgs/pkgs/development/libraries/ctl/default.nix
@@ -19,6 +19,16 @@ stdenv.mkDerivation rec {
     })
   ];
 
+  postPatch = ''
+    # Fix include guard name
+    substituteInPlace lib/dpx/dpx_raw.hh \
+        --replace CRL_DPX_RAW_INTERNAL_INCLUDE CTL_DPX_RAW_INTERNAL_INCLUDE
+
+    # Fix undefined symbols (link with Imath)
+    substituteInPlace lib/IlmCtlMath/CMakeLists.txt \
+        --replace "( IlmCtlMath IlmCtl )" "( IlmCtlMath IlmCtl Imath)"
+  '';
+
   nativeBuildInputs = [ cmake pkg-config ];
   buildInputs = [ libtiff ilmbase openexr ];