On Wed Apr 15 02:50:46 2020, RATCLIFFE wrote:
Show quoted text> Only Windows needs libtiff.a. POSIX systems prefer libtiff.so. Neither
> of these are supplied by Perl itself. Defining libtiff as a dependency
> is not a problem for Linux distros, which do it as part of the
> packaging process, so this is only a Windows problem.
If Linux is guaranteed to have an up-to-date libtiff.so, that's great if Windows is then the only platform to worry about (Mac?). Windows is far too large a market to ignore, though.
Show quoted text> Unfortunately, I don't have access to a Windows machine.
If you want to provide trial Alien::TIFF builds for me to test install on Windows, I'll be happy to try to help out here.
Show quoted text> IIRC, there are several possible build systems on Windows, e.g. the MS
> tools, the GnuWin32 tools, etc. and the build recipe would be
> different, depending on the tools available.
Perhaps the Alien owner could provide some guidance here. In the end, the tools available for CPAN (GNU?) are very Linux-like, and certainly, native MS tools can be ignored. I think that only one recipe needs to be dealt with. The resulting libtiff.a (or whatever) might only be usable with Perl, but that's life.
Show quoted textI would be leery of this unless someone promises to maintain the package and keep it up to date. Presumably there is current TIFF library source available somewhere. I don't know if there are any licensing issues in grabbing and redistributing a current, premade libtiff.a from a distribution such as Strawberry Perl (which is where my copy came from).
In the end, we may just have to write off anyone who doesn't have an up-to-date Perl that includes libtiff. That would certainly be the easiest approach, but some platforms such as ActiveState may be well behind the times. Strawberry Perl is leading edge and has had libtiff.a for a while, but who knows about other distros, which is why being able to build a missing libtiff would be nice.
Show quoted text> It is certainly possible to pass an open filehandle to a C-library
> with PerlXS. IIRC, the problem was that libtiff itself doesn't accept > an open filehandle.
>
> I suppose it might be possible to add C-code duplicating most of
> TIFFOpen(), (e.g. TIFFOpen_fh()), add support for filehandles there,
> and have a Perl wrapper call the correct method as appropriate.
Well, this is more in the "nice to have" category rather than "must have", so if it isn't something easily done (i.e., requires extension of libtiff itself, rather than just something added to the wrapper), it can go on the back burner. I was hoping that libtiff accepted a handle (provided by the wrapper) instead of opening the file itself, but it sounds like that's not the case.
TIFF support in PDF::Builder is a "nice" thing, and a few people actually build things with it using TIFF, but that image format appears to be rather niche and not worth putting tremendous effort into. If it sounds like a fun little project for you, Alien::TIFF would be a great addition, but if you have no experience with Alien and don't have the time to learn, don't sweat it.