commit 93e8bb2a is wrong
commit 93e8bb2a is wrong according to pkg-config documentation:
you can (and in case of libxml2 , must) have Libs and Libs.private as well as Requires and Requires.private (note that pkgconf also supports a Cflags.private)
the *.private variables are for use during static linking.
This allow libxml to manage with a single .pc file both invocation of pkg-confg
with and without -static
that is may be relared to the error in #649 (closed)
for example this foo.pc:
Name: libXML
Version: 2
Description: libXML library version 2.
Requires: zlib
Requires.private: liblzma
Libs: -L${libdir} -lxml
Libs.private: -liconv
pkg-config --libs foo
returns
-L@libdir@ -lxml -LC:/Documents/msys2/mingw64/lib -lz
and pkg-config -static --libs foo
returns
-L@libdir@ -lxml -liconv -LC:/Documents/msys2/mingw64/lib -lz -LC:/Documents/msys2/mingw64/lib -llzma