From 8996f6a2bca508f1d31dd6f7ceaa17f68ccd6f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Mancilla?= Date: Sun, 21 Nov 2021 13:49:58 -0300 Subject: [PATCH] ctl: fix build on darwin Patch the target_link_libraries CMake command for the IlmCtlMath library to fix undefined symbols. No need to make the patch darwin only. --- pkgs/development/libraries/ctl/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/libraries/ctl/default.nix b/pkgs/development/libraries/ctl/default.nix index be643e3a52c6..0a9f50a6aaa6 100644 --- a/pkgs/development/libraries/ctl/default.nix +++ b/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 ];