Re: pkg-config: required as dep so often - How and where to report?
>> libsrtp2-dev needs pkg-config only when I compile it myself.
> The libsrtp2-dev package surely both depends and build-depends on
Yes, the package description (debian/control) does. The created files do
not. I can compile, link, and run with libsrtp2.so without pkg-config.
Actually for this package, the result of pkg-config is wrong (--cflags
is empty, --libs lists -lpcap unnecessarily). However, that is another
issue (although it might be the cause why it was declared as Depends).
> [For libgtk-3-dev y]ou cannot really expect anyone to get this right
> without pkg-config, and so libgtk-3-dev depends on pkg-config.
Yes, my assumption might not be right for every package in that list.
Therefore, I would love to see someone more experienced taking over this
issue. Your argument is a strong argument for at least Suggests.
However, even in this example, pkg-config is not required. In such a
case, one can argue for Recommends instead of Suggests. Nevertheless,
I would not go for Depends.
That is what I am about. Perhaps someone sees a pattern and comes up
with a general rule. For example: "Every package with a pkgconfig/*.pc
file has to Suggest pkg-config†. If the shared library does not declare
its dependencies itself, and additional libraries are required to run
the shared library, pkg-config has to be Recommends. pkg-config should
never be Depends because the developer might have other means to build."
Again, the last sentence could be wrong if there is a dedicated config
tool in the package itself, which actually relies on pkg-config.
Another example: libxml2-dev » libicu-dev » libicu-le-hb-dev »
libharfbuzz-dev » libglib2.0-dev » pkg-config
Only because of the dependency graph, pkg-config must be installed.
Again, pkg-config is not required to compile/link against libxml2.
Actually, the package itself declares pkg-config just as Suggests.
Perhaps this is a bad example as well, because there is a bug in the
dependency graph. Anyway from that 250 packages, I have just looked
in-depth into libxml2 and libsrtp2, yet.
† That part of "my" rule would affect another several hundred packages.