David Golden <xda...@gmail.com> wrote:
> On Thu, Oct 22, 2009 at 4:08 AM, Zbigniew Lukasiak <zzb...@gmail.com> wrote:
> > I've noticed two reactions to this proposal: it is great if it could
> > be done right and it is currently too difficult.  This leads me to
> > following: how about a lib_requires (or requires_lib) - with identical
> > semantics as Devel::CheckLib...
> I like this idea. (David Cantrell, are you on this list? Thoughts?).

I am now :-)

The relevant Devel::CheckLib parameters are:

  lib
  header   (this should probably be renamed to inc, with an alias for
            sdrawkcab compatibility)

Note that as well as having a library, you need to have the C header
file so you can build stuff against it.  Also, in things like Debian,
those tend to be in seperate packages.

  function (so far only in the latest dev version, which doesn't work on
            Windows; there's a patch in RT which I've not yet applied)

'function' is so that you can provide the body of a C function to check
things like "is the library a high enough version" or "does it contain
function foo()":

  function => 'foo();if(libversion() > 5) return 0; else return 1;'

For the purposes of META.yml you probably want to instead specify that
as something like:

  providesfunctions: [list of functions]
  libversion:
    version: > 5
    howtofind: libversion()

so that the information is available in a more easily parsed form, but
you could also build the relevant C snippet from the info.  This would
also mean that that info could go into META.yml independent of me
getting round to fixing my Windows bug.

There's also libpath and incpath, but I imagine those aren't relevant
here.

-- 
David Cantrell | Godless Liberal Elitist

It wouldn't hurt to think like a serial killer every so often.
Purely for purposes of prevention, of course.

Reply via email to