Skip to content

pango.pc.in: Add fribidi to Requires.private

Simon McVittie requested to merge smcv/pango:requires-private-fribidi into master

In current versions of pkg-config, the most appropriate place for most library dependencies is Requires.private. When compared with Requires, this avoids "overlinking" when an executable is linked to the pango shared library: in modern OSs, a shared library's library dependencies are automatically loaded by the dynamic linker along with that shared library.

It would not be correct to omit fribidi from the .pc file either, because that would break static linking: when linking statically, it is necessary to list all dependencies explicitly, because static libraries (unlike shared libraries) do not carry their own dependency metadata.

Using Requires.private also has the effect of adding fribidi's CFLAGS to the output of pkg-config --cflags pango. That is in fact unnecessary here, because fribidi is only used internally, so https://bugs.freedesktop.org/show_bug.cgi?id=105572 proposes a new dependency type "Requires.internal" which would additionally omit fribidi from pkg-config --cflags pango. However, this is not yet supported in pkg-config, so it cannot be used yet.

For more details on Requires.private please see this article by the current Debian pkg-config maintainer and former upstream pkg-config maintainer: https://err.no/personal/blog/tech/2008-03-25-18-07_pkg-config,_sonames_and_Requires.private/ and this description of the various dependency types that can exist: https://bugs.freedesktop.org/show_bug.cgi?id=105572#c1

Fixes: #301 (closed)

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895235

Signed-off-by: Simon McVittie smcv@debian.org

Edited by Simon McVittie

Merge request reports