On Sun, 4 Aug 2013 11:29:41 -0400
Chris Marshall <devel.chm...@gmail.com> wrote:

> > The approach I take with Alien modules is to bundle the upstream
> > tarball in the dist, and build/install it directly into perl's
> > archlib directory:
> >
> >   https://metacpan.org/release/Alien-libtermkey
> >   https://metacpan.org/release/Alien-unibilium
> 
> For windows platforms which have no supported
> package manager, the only option is to either
> bundle the needed code or a web site to get the
> source or binaries.
> 
> I notice that the Alien::libtermkey and Alien::unibilium
> appear to be unix-ish only.  There were no PASSes
> reported for either mswin32 or cygwin platforms.  It
> appears that since the two libraries appear to be
> unix-only, maybe there is no way to support windows
> platforms (I'm not sure why cygwin didn't work).

Having a look more in detail at why, though, is revealing:

For example:

  http://www.cpantesters.org/cpan/report/754b7df1-6c93-1014-b350-ae488c0ce015

gives:


  # running Build.PL 
  'make' is not recognized as an internal or external command,
  operable program or batch file.
  'libtool' is not recognized as an internal or external command,
  operable program or batch file.
  'glibtool' is not recognized as an internal or external command,
  operable program or batch file.
  OS unsupported - unable to find GNU libtool

Similar things in unibilium.

The specifics in this case are that libtermkey itself won't do anything
useful on Windows, for lack of actual TTY devices, but there's no
reason unibilium won't work. Its build system simply requires GNU
libtool, and then it would build. Most Windows systems lack GNU
libtool, so it can't be built there.

> If so, that is exactly the critical information needed
> so windows users don't go down a dead end trying
> to use those modules or perl modules requiring
> them.  I haven't come up with a good way to do
> that for the general case.  If one knows a priori
> any such restrictions, at least the docs should
> indicate that and the Makefile.PL or Build.PL
> could return NA in testing.

But that is exactly what the "OS unsupported" string is for. Take a
look again - running it produces that exact output:

  OS unsupported - unable to find GNU libtool

It's far more useful to report this string, than simply telling people
in advance that "it won't work on Windows" - because it /will/ work on
any Windows box that has GNU libtool available; and also the same
failure tells people on otherwise-supported platforms that simply lack
a GNU libtool currently that they need to install it.

> Maybe it would be useful to carve out OS specific
> packages under the Alien:: moniker.  What about
> Alien::Unix::libtermkey ?

In this case I disagree - unibilium at least should work anywhere,
being as it is purely abstract C99 code, and libtermkey will work
anywhere with TTY devices.

-- 
Paul "LeoNerd" Evans

leon...@leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

Reply via email to