On 2019/01/07 16:06, Raphael Graf wrote:
> On 1/7/19 3:46 PM, Stuart Henderson wrote:
> > On 2019/01/07 15:29, Raphael Graf wrote:
> > > The diff below fixes the pkg-config file installed by tesseract.
> > >
> > > Before:
> > > x1$ pkg-config --cflags tesseract
> > > -I/usr/local/include/tesseract -I/usr/local/include/leptonica
> > >
> > > After:
> > > x1$ pkg-config --cflags tesseract
> > > -I/usr/local/include -I/usr/local/include/tesseract -I/usr/local/include/leptonica
> > >
> > > The fix is inspired by tesseract.pc.cmake (which we do not use):
> > > https://github.com/tesseract-ocr/tesseract/blob/3.05/tesseract.pc.cmake
> > >
> > > (The issue is already fixed in upstream version 4.0.0)
> >
> > Could you explain the problem please? I don't see anything different in
> > git master for this file, and don't see why -I/usr/local/include is needed
> > when the files are all in the subdirectory?
>
> The tesseract headers are normally included like this:
> #include <tesseract/baseapi.h>
>
> For example in one of the opencv_contrib modules:
> https://github.com/opencv/opencv_contrib/blob/master/modules/text/src/precomp.hpp
>
> The git master version uses '-I/usr/local/include' only.
> (It is not obvious if you are looking at tesseract.pc.in, the value of
> @includedir@ is in fact '/usr/local/include' now).
Ah I see, thanks. Then the patch makes sense, but also needs a REVISION
bump since it changes the files in the package, and a quick build test
with the existing dependencies just to make sure it doesn't add a problem:
graphics/pdfsandwich
mail/p5-FuzzyOcr
multimedia/ogmrip
x11/gnome/ocrfeeder
Could you add a quick comment to the patch (under the CVS line) too e.g.
Add -I/usr/local/include to include path. Typical users include headers
with "#include <tesseract/XX.h>". Patch should be removed for 4.0.0 as fixed
upstream by changing @includedir@ definition.
No comments:
Post a Comment