Alien:: modules have escaped

Corion on 2006-09-23T21:34:34

I've just uploaded some Alien:: modules onto my Perl modules webpage. They aren't really fit for a CPAN release yet, mostly because I've only tested them on Win32 and geared them mostly for nmake and MSVC (7), but they are there, and comments (or adopters) are welcome.

  1. Alien::Zlib - this is a fork of Kane's Alien::Zlib, because his version doesn't build/work on Win32, and I need ::Zlib as a prerequisite for other Alien:: modules, which his API doesn't provide.
  2. Alien::Iconv - the iconv library, the second prerequisite to Alien::XML::LibXML
  3. Alien::XML::LibXML - the libxml2 library, packaged so that it can be used in theory to install XML::LibXML and XML::LibXML::Common via CPAN. The Makefile.PL of XML::LibXML and XML::LibXML::Common need to be patched, the patched versions are included.
  4. Alien::Libjpeg - libjpeg, as usable for Imager
  5. Alien::Giflib - giflib, as usable for Imager
  6. Alien::Libpng - libpng, as usable for Imager

All modules follow the same concept that Jos laid out with his Alien::Zlib release. The complete steps of downloading and building the external library are done from within Makefile.PL and the external libraries are then installed below the module.


CPANification and caseification

Alias on 2006-09-24T03:30:54

Are you planning on uploading those to CPAN?

I know we don't necesarily encourage Alien:: modules (because they are a suboptimal solution that we should be using as a last resort) but if you have done the work anyway it would be a shame not to have it uploaded properly.

Second, I feel a bit funny about the capitalisation you used for the image libs.

Even though the general standard is for leading caps, it might be better to at least match their casing?

So Alien::giflib would be just fine, because the capitalisation in this case has some significance.

Re:CPANification and caseification

Corion on 2006-09-24T06:22:59

"Our" encouragement/discouragement hasn't stopped anyone from uploading anything to CPAN. And I don't find this solution suboptimal either, as external dependencies are always problematic and I prefer one central place of dependency management, which to me is CPAN.

In the long term, I plan to upload these onto CPAN, but that means making them work on more than one platform and drumming up support from the other module authors whose modules could rely on these modules, or coming up with a way to patch those other modules upon install time, so that Alien::XML::LibXML automagically downloads, patches and installs XML::LibXML, which likely is what the user intended anyway.

I haven't given the capitalization much thought, and now that I think more about it, Alien::XML::LibXML matches the capitalization of the CPAN module, whereas the graphics libraries are a hodge-podge as there were no CPAN modules to copy... Maybe matching the library would be a sane thing, maybe following the ::LibXML example (LibJPEG, GIFLib?) is another example...

Re:CPANification and caseification

Aristotle on 2006-09-25T03:30:21

Or maybe it should be Alien::libxml2

Excellent!

dagolden on 2006-09-24T11:48:50

I'm glad to see someone else looking into Alien:: packages

On the win32 site, I put up a proposal for a Portable Alien Library System, sparked by the challenges faced by Vanilla Perl. While you're taking a slightly different approach, I think the two could be merged in the future.

I'd greatly appreciate your feedback on it. (And that reminds me I should probably post it a bit more widely.)

Imager aliens

tonyc on 2006-09-24T23:45:39

This is something I've been playing with, in particular the libraries used by Imager. So far I have an Alien-giflib with the library detection code from Imager, and not much else.

I attempted to download your Alien-GifLib and Alien-Libjpeg dists, but they contained only an empty directory.

Re:Imager aliens

Corion on 2006-09-25T08:06:01

Whoops - I'll look into what borked these distros . Automating the installation of Imager is one motivation for me to package/produce the Alien:: modules for image libraries, hence I want them to work for you :).

Re:Imager aliens

Corion on 2006-09-27T11:33:57

Lesson for today - a distribution without MANIFEST will be empty. I've fixed Alien::Libjpeg, but Alien::Giflib still has some error and I've run out of time, so this will have to wait until later.