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