Hi all, We used to install both shared and static libraries when both were available; this was good and working. Now we have the static-libs useflag to control when static libs are built and installed; this is better: we save time & space.
The problem I want to raise here is about indirect dependencies with that new approach; let's take a real life example: We have xz-utils and libarchive with the static-libs useflag. I want to build freebsd-rescue statically against libarchive. What should I do? So far we depend on libarchive[static-libs] because we cannot guess the deps of libarchive. Thanks to pkg-config --static this is a non issue, unless xz-utils is built without static-libs and we enabled lzma support in libarchive! In this case, libarchive's static libs are useless if I don't have xz-utils' ones because the former requires the latter. For me, the current way of adding static-libs to packages only for controlling whether static libraries are installed is broken. I'd like to see the following as a guideline/rule for the static-libs useflag: 1) if a package has a static-libs useflag then its deps must be cat/pkg[static-libs?] when applicable. 2) if one wants to add a static-libs useflag to a package then one must check the reverse deps and make them happy with 1). Needless to say I am volunteering to scan & fix the tree to see this implemented quickly. Another option would be to make the package manager automagically handling the propagation of the static-libs useflag but that sounds more a hack than anything else. Alexis.