pkg-config-lite

Tollef Fog Heen tfheen at err.no
Mon Apr 2 12:00:10 PDT 2012


]] Dan Nicholson 

> I think the things that are used from glib and/or popt are:
> 
> * GSting - I'd really rather not go back to managing strings manually.

https://github.com/varnish/Varnish-Cache/blob/master/lib/libvarnish/vsb.c
is, iirc, more or less from FreeBSD and gives us string buffers.

> * GHashTable - We can obviously roll our own hash table, but it's a
> lot nicer to lean on someone else for the dirty work.

hcreate, hdestroy, hsearch, hcreate_r, hdestroy_r, hsearch_r - hash table management

The non-_r versions are SVr4, so should be ok.

They are not as nice as the glib versions, that I can agree with.

> * GSList - Same as GHashTable.

linked lists are trivial, or we can use something like
https://github.com/varnish/Varnish-Cache/blob/master/include/vqueue.h

> * poptParseArgvString/g_shell_parse_argv - Converts the Cflags/Libs
> command lines into argument vectors with all the quoting/escaping
> magic. I'd rather not rewrite that code.

Yes, this is the major pain point.

> * poptOption/GOption - We could convert to getopt eventually, although
> these guys do have some nice sugar.
> 
> So, it's doable, but it could be in for some bumpy waters while corner
> cases come to light.

Yes, hence why I'm pondering this and talking about it, rather than just
committing the code. :-)

> > So, feel free to commit.
> 
> OK, I'll get something in later this week that uses the latest glib
> stable release and ping people to test it out. How do you feel about
> the no-popt patchset?

I've only read through it, I haven't even compile tested it, but if it
compiles and the test suite is happy, I'm fine with you committing that
too.

We should probably get a new release out soonish too, it's about time.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are


More information about the pkg-config mailing list