split pkgconf core into libpkg library #12
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: ariadne/pkgconf#12
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
so we can have other clients like gcc -framework patch
Please do not name it libpkg :) (that will interfer with libpkg from FreeBSD pkgng package manager :))
hmm, maybe libpcfile?
libpcfile looks good, why not libpkgconf :)
sounds good. this is kinda futureish anyway.
@bapt, i think we should do a 0.8.13 with the new pkg_list_t stuff, and then see about working on this. thoughts ?
I'm not @bapt but i think this is a good plan
I totally agree
What's the status of this, if any?
There is no status yet, there's a few issues I want to figure out first, such as a portable build system which supports libraries in a robust way (we basically have that), as well as some core changes needed to ensure the library can be used with the same ease of use as the pkgconf utility itself.
@kaniini we're looking into bundling pkgconf with a syntax extension for Rust, and obviously a library would be nicer than shelling out to an executable. That works for now, though 😄
@wycats yeah, the idea is to eventually make pkg-config(1) interface obsolete of course. if you guys are interested in working on that, i'd love to merge something. otherwise i might have time to look at it in august.
@wycats out of curiosity, would an API giving you a pre-formatted string be useful? or do you just want to iterate over the raw
pkg_fragment_t
's like pkgconf itself does?What would the preformatted string look like?
the pre-formatted string would be basically, the same result as
pkgconf --cflags
orpkgconf --libs
. the reason why i mentioned the lower-level option is because it may be more useful to you to get at the lower-level flags so that you can translate them as needed for Rust.I could see some benefit from both options. The preformatted string would be easier to migrate from, but the lower level option would give us more control in the long term.
Any reason not to do both?
There's no problem with providing both interfaces.
In that case, would an interface like:
work for you guys?
The only downside is that it would use a buffer, so really long cflags strings might be truncated.
A better interface would be in my opinion, one which delivers preformatted fragments back to a callback, and allows the callee to handle buffering them. But I'm not sure if you guys can do that easily.
Only a few things remaining here. Most likely this is being cut as of end of next week!
pc_sysrootdir
and other builtins (probably have a function to optionally install these)Is there any documentation (aside from
libpkgconf.h
) or examples (aside frommain.c
)? Something like this: https://github.com/libarchive/libarchive/wiki/Examples would be helpful for getting started?We are working on docs for it, but haven't really decided our plan there yet. We will probably go with Sphinx or similar and include some examples, but the cleanup isn't fully done yet so right now I'm concentrating on that.
This is probably complete enough to close out.