I'm extending the capabilities of flx_pkgconfig, so it can query pkgconfig 
(*.pc)
databases.

pkgconfig is a seriously bad program. It is very badly written,
it is full of bugs, and it has limited capabilities (which is why
flx_pkgconfig was written). Indeed, it has a very specialised application
and it can't even handle that properly.

I have extended flx_pkgconfig (next commit) to add;

        --help

well it should always have had that ..

        --extension=fpc

to set the extension to look for, if you set pc it will find pkgconfig files
instead of flx_pkgconfig files (will play with this to see if both can
be queried at once later).

I have added variables as used by pkgconfig:

        prefix = /usr/local
        lib = ${prefix}/lib

        Libs: -L${lib} -lmylib

Also blank lines are tolerated, and lines starting with # are skipped.
pkgconfig allows trailing # comments which are not handled yet.

Pkgconfig also doesn't allow comma separators: some options go
like this:

        -W1,linkeropt,-W1

and have embedded commas, so I'll have to remove that feature.
Some convenience flags such as --cflags can be added later.

A couple of stupid features not supported yet: splitting linker switches
into -L  and -l. Probably support that by filtering values based on
a regexp (although at this point, flx_pkgconfig is very carefully built
to avoid using any regexps).

One of the biggest problems is version control. In pkgconfig, a Version
field provides the version, and you can write:

        Requires: fred < 1.2.11
        Requires: joe = 2.3.4

This makes the "Requires" field special (since the version requirement isn't in 
the
correct form of a general field). Also breaks the dumb parsing I'm using for 
variables
(which would think the last line is an assignment of 2.3.4 to variable 
"Requires: joe" :)

However with enough hacks and tweaking, flx_pkgconfig can probably be made
a "drop in" replacement for pkgconfig.

--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to