Opened 4 years ago

Last modified 3 years ago

#62832 new enhancement

ghostscript: Enable Tesseract support

Reported by: nickgaya (Nick Gaya) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cooljeanius (Eric Gallager)
Port: ghostscript

Description

Ghostscript 9.53.0 added optional support for the Tesseract OCR engine. In 9.54.0, Tesseract/Leptonica sources were added to the release archive. However, I was not able to successfully build Ghostscript 9.54.0 with Tesseract enabled, due to errors such as this:

:info:build tesseract/include/tesseract/unichar.h:24:10: fatal error: 'cstring' 
file not found
:info:build #include <cstring>
:info:build          ^~~~~~~~~

I think this warning is relevant, but I'm not familiar enough with C++ to know how to fix it:

:info:build warning: include path for stdlibc++ headers not found; pass '-stdlib
=libc++' on the command line to use the libc++ standard library instead [-Wstdli
bcxx-not-found]

Perhaps it might be possible to use the tesseract/leptonica ports instead of the Ghostscript versions, although this might require modifying the build.

See also:

Change History (3)

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: Enable Tesseract support for ghostscriptghostscript: Enable Tesseract support

Certainly we should use MacPorts tesseract and not build another one within ghostscript.

Certainly any references to libstdc++ are highly suspect at this point, since we use libc++ on Mac OS X 10.6 and later.

comment:2 Changed 3 years ago by nickgaya (Nick Gaya)

In 9e74fae55ac60508fe0916eff0262718de4d33e5/macports-ports (master):

ghostscript: update to v9.54.0

  • Disable tesseract/leptonica for now, see #62832
  • Remove patch-jpegxr_r_strip.c.diff, fixed by ArtifexSoftware/ghostpdl@c4e7995
  • Remove patch-base_fapi_ft.c.diff, fixed by ArtifexSoftware/ghostpdl@41ef9a0
  • Update patch-base_unix-dll.mak.diff, partially fixed by ArtifexSoftware/ghostpdl@7a92c21
  • Add patch-configure.ac.diff, see https://bugs.ghostscript.com/show_bug.cgi?id=703880
  • Remove unused configure args:
    • --enable-gdpl, removed in ArtifexSoftware/ghostpdl@efafc6f
    • --without-luratech, removed in ArtifexSoftware/ghostpdl@5fc905c
  • Remove post-destroot install command for gserrrors.h, fixed in ArtifexSoftware/ghostpdl@feafe5e

comment:3 Changed 3 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.