Open GoogleCodeExporter opened 9 years ago
Hold off on this one, Dan, I need to look closer at what ADD_LEPTONICA_SUBDIR
actually does.
Original comment by JerseyChewi@gmail.com
on 29 May 2015 at 1:12
For now, I have simply stopped using ADD_LEPTONICA_SUBDIR in the Gentoo
package. When I enabled it, I thought it only affected the test suite. A quick
glance at utils.c only confused me further.
Up till now, I've tried to limit my comments to the build system since I really
have no expert knowledge of image manipulation but I have to say that poorly
reinventing the wheel with so many helper functions is pretty bad practise. I
think Leptonica could really benefit from a dependency on glib, which would
(probably, admittedly I don't know it well) give you well-maintained
cross-platform replacements for almost all the functions in utils.c.
At the very least, Leptonica should respect the TMPDIR environment variable as
this would deal with one of the worst aspects of the file handling. It already
respects TEMP, the Windows equivalent.
Original comment by JerseyChewi@gmail.com
on 4 Jun 2015 at 11:14
Ouch.
James, as you know, I've gone through 3 iterations of this temp directory stuff.
I strongly resisted the idea of rewriting the path -- it seems like a bad idea
because it must confuse users who say to write to path P and it writes to path
Q. It was also complicated, and complicated stuff is also generally a bad idea
if there are much easier ways to do it.
However, I was assured that it was important on windows that the tests not
write to /tmp. Faced with the choice of rewriting over 100 tests or providing
the option of automatically writing to <temp>/leptonica/, I reluctantly
acquiesced.
Perhaps it was the wrong decision, and the correct decision would have been to
either ignore the suggestions or rewrite the tests.
As it is, we seem to have several different sets of users. The windows and
cygwin user gurus demanded rewriting the tmp path. I couldn't imagine unix
users wanting to rewrite the path, so I provided the simpler, more transparent
approach for everyone else. I have to ask you -- gentoo is linux; why would
you want to write to a subdir of tmp on linux?
I remain willing to rip out all this LEPTONICA SUBDIR stuff, and rewriting the
tests may not be as hard as I had originally thought, especially if I make the
regutils.c functions do some of the work.
Original comment by dan.bloo...@gmail.com
on 5 Jun 2015 at 1:44
Original issue reported on code.google.com by
goo...@doofy.speciesm.net
on 29 May 2015 at 12:20