Commit 7d6ecd05 authored by Robert Scott's avatar Robert Scott
Browse files

ccextractor: fix build with leptonica 1.83

parent c6233099
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -23,7 +23,10 @@ stdenv.mkDerivation rec {
    sha256 = "sha256-usVAKBkdd8uz9cD5eLd0hnwGonOJLscRdc+iWDlNXVc=";
  };

  postPatch = lib.optionalString stdenv.isDarwin ''
  postPatch = ''
    # https://github.com/CCExtractor/ccextractor/issues/1467
    sed -i '/allheaders.h/a#include <leptonica/pix_internal.h>' src/lib_ccx/ocr.c
  '' + lib.optionalString stdenv.isDarwin ''
    substituteInPlace src/CMakeLists.txt \
    --replace 'add_definitions(-DGPAC_CONFIG_LINUX)' 'add_definitions(-DGPAC_CONFIG_DARWIN)'
  '';