1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-20 04:48:10 +00:00
nixpkgs/pkgs
aszlig 49cf934642
pyocr: Add patch to support Tesseract 3.05.00
This is from the commit message I've written for the upstream pull
request (jflesch/pyocr#62):

    This is a bit more involved, because Tesseract 3.05.00 comes not
    only with improvements but also with a few quirks we need to deal
    with.

    The first quirk is that the order arguments of the `tesseract'
    command now matters and the list of configurations has to be at the
    end of the command line. So we add a new attribute tesseract_flags
    to the BaseBuilder class that contains a list of all the flags to
    pass to `tesseract', the tesseract_configs attribute however remains
    pretty much the same but now only really contains a list of configs
    instead of being mixed with flag arguments.

    Another quirk has to do with Leptonica >= 1.74 which Tesseract
    3.05.00 now requires. Leptonica has special handling of files that
    reside in /tmp and assumes that it's an internal temporary file of
    Leptonica. In order to deal with it, we now run Tesseract in a
    temporary directory, which contains the input/output files and use
    the relative name of these files because Leptonica only searches for
    path names beginning with /tmp.

    Fortunately the last item we need to address is not really a quirk,
    but an API change. In Tesseract 3.05.00 there is now a new function
    called TessBaseAPIDetectOrientationScript(), which doesn't fill the
    OSResults object anymore but now allows to pass the values we're
    interested in directly by reference. We need to use this new
    function because the old function TessBaseAPIDetectOS() now *always*
    returns false.

I've tested this specifically on NixOS and in conjunction with Paperwork
(the only package that's using pyocr so far) and all the tests of the
dependency chain are now succeeding. However, I didn't do manual tests
of Paperwork though.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2017-04-11 03:21:39 +02:00
..
applications tesseract: 3.04.01 -> 3.05.00 2017-04-11 03:21:32 +02:00
build-support buildRustPackage: Fix "warning: file ... may be generated" (#24471) 2017-03-30 15:15:49 +02:00
common-updater
data fontconfig-penultimate: 0.3.2 -> 0.3.3 2017-04-08 09:42:09 -05:00
desktops gnome3.gnome_settings_daemon: use wrapGAppsHook 2017-04-09 10:00:12 +02:00
development pyocr: Add patch to support Tesseract 3.05.00 2017-04-11 03:21:39 +02:00
games steam: move libpciaccess as non-runtime dependencies 2017-04-11 01:51:46 +03:00
misc wineUnstable: 2.4 -> 2.5 2017-04-10 18:37:28 +03:00
os-specific linux: 4.11-rc5 -> 4.11-rc6 2017-04-10 08:34:23 -04:00
servers sonarr: 2.0.0.4645 -> 2.0.0.4689 (#24767) 2017-04-09 14:09:31 +01:00
shells Merge pull request #24760 from matthewbauer/linux-only-pkgs 2017-04-09 14:18:10 +02:00
stdenv darwin.make-bootstrap-tools: fix to use LLVM 4 2017-04-08 16:38:48 -04:00
test
tools btrfs-progs: 4.8.2 -> 4.10.2 2017-04-10 17:09:22 +03:00
top-level pyocr: Add patch to support Tesseract 3.05.00 2017-04-11 03:21:39 +02:00