pkg-config mysticism regarding Requires.private
Jeremy Huddleston
jeremyhu at apple.com
Sat Oct 30 16:20:22 PDT 2010
$ PKG_CONFIG_PATH=/opt/local/lib/pkgconfig /opt/local/bin/pkg-config xft --libs
-L/opt/local/lib -lXft -lXrender -lfontconfig -lexpat -liconv -lfreetype -lz -lX11 -lxcb -lXau -lXdmcp
$ PKG_CONFIG_PATH=/opt/local/lib/pkgconfig /usr/local/bin/pkg-config xft --libs
-L/opt/local/lib -lXft
$ /opt/local/bin/pkg-config --version
0.25
$ /usr/local/bin/pkg-config --version
0.25
$ cat /opt/local/lib/pkgconfig/xft.pc
prefix=/opt/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: Xft
Description: X FreeType library
Version: 2.2.0
Requires: xproto
Requires.private: xrender, fontconfig, freetype2
Cflags: -I${includedir}
Libs: -L${libdir} -lXft
I Added --debug to both and compared the output... it seems that the one in /opt/local is including Requires.private entries and the one in /usr/local isn't. What is going on here?
--- opt.out 2010-10-30 16:12:14.000000000 -0700
+++ usr.out 2010-10-30 16:12:04.000000000 -0700
@@ -1906,262 +1906,14 @@ Package Xproto has -I/opt/local/include
Removing -I/opt/local/include from cflags for xproto
Adding 'xproto' to list of known packages, returning as package 'xproto'
line>Requires.private: xrender, fontconfig, freetype2
-Looking for package 'xrender'
-Looking for package 'xrender-uninstalled'
-Reading 'xrender' from file '/opt/local/lib/pkgconfig/xrender.pc'
-Parsing package file '/opt/local/lib/pkgconfig/xrender.pc'
- line>prefix=/opt/local
- Variable declaration, 'prefix' has value '/opt/local'
- line>exec_prefix=${prefix}
- Variable declaration, 'exec_prefix' has value '/opt/local'
- line>libdir=${exec_prefix}/lib
- Variable declaration, 'libdir' has value '/opt/local/lib'
- line>includedir=${prefix}/include
- Variable declaration, 'includedir' has value '/opt/local/include'
- line>
- line>Name: Xrender
- line>Description: X Render Library
- line>Version: 0.9.6
- line>Requires: xproto renderproto >= 0.9 x11
-Looking for package 'renderproto'
-Looking for package 'renderproto-uninstalled'
-Reading 'renderproto' from file '/opt/local/lib/pkgconfig/renderproto.pc'
-Parsing package file '/opt/local/lib/pkgconfig/renderproto.pc'
- line>prefix=/opt/local
- Variable declaration, 'prefix' has value '/opt/local'
- line>exec_prefix=${prefix}
- Variable declaration, 'exec_prefix' has value '/opt/local'
- line>libdir=${exec_prefix}/lib
- Variable declaration, 'libdir' has value '/opt/local/lib'
- line>includedir=${prefix}/include
- Variable declaration, 'includedir' has value '/opt/local/include'
- line>
- line>Name: RenderProto
- line>Description: Render extension headers
- line>Version: 0.11.1
- line>Cflags: -I${includedir}
-Path position of 'RenderProto' is 1
-Package RenderProto has -I/opt/local/include in Cflags
-Removing -I/opt/local/include from cflags for renderproto
-Adding 'renderproto' to list of known packages, returning as package 'renderproto'
-Looking for package 'x11'
-Looking for package 'x11-uninstalled'
-Reading 'x11' from file '/opt/local/lib/pkgconfig/x11.pc'
-Parsing package file '/opt/local/lib/pkgconfig/x11.pc'
- line>prefix=/opt/local
- Variable declaration, 'prefix' has value '/opt/local'
- line>exec_prefix=${prefix}
- Variable declaration, 'exec_prefix' has value '/opt/local'
- line>libdir=${exec_prefix}/lib
- Variable declaration, 'libdir' has value '/opt/local/lib'
- line>includedir=${prefix}/include
- Variable declaration, 'includedir' has value '/opt/local/include'
- line>
- line>xthreadlib=
- Variable declaration, 'xthreadlib' has value ''
- line>
- line>Name: X11
- line>Description: X Library
- line>Version: 1.3.6
- line>Requires: xproto kbproto
-Looking for package 'kbproto'
-Looking for package 'kbproto-uninstalled'
-Reading 'kbproto' from file '/opt/local/lib/pkgconfig/kbproto.pc'
-Parsing package file '/opt/local/lib/pkgconfig/kbproto.pc'
- line>prefix=/opt/local
- Variable declaration, 'prefix' has value '/opt/local'
- line>exec_prefix=${prefix}
- Variable declaration, 'exec_prefix' has value '/opt/local'
- line>libdir=${exec_prefix}/lib
- Variable declaration, 'libdir' has value '/opt/local/lib'
- line>includedir=${prefix}/include
- Variable declaration, 'includedir' has value '/opt/local/include'
- line>
- line>Name: KBProto
- line>Description: KB extension headers
- line>Version: 1.0.5
- line>Cflags: -I${includedir}
-Path position of 'KBProto' is 1
-Package KBProto has -I/opt/local/include in Cflags
-Removing -I/opt/local/include from cflags for kbproto
-Adding 'kbproto' to list of known packages, returning as package 'kbproto'
- line>Requires.private: xcb >= 1.1.92
-Looking for package 'xcb'
-Looking for package 'xcb-uninstalled'
-Reading 'xcb' from file '/opt/local/lib/pkgconfig/xcb.pc'
-Parsing package file '/opt/local/lib/pkgconfig/xcb.pc'
- line>prefix=/opt/local
- Variable declaration, 'prefix' has value '/opt/local'
- line>exec_prefix=${prefix}
- Variable declaration, 'exec_prefix' has value '/opt/local'
- line>libdir=${exec_prefix}/lib
- Variable declaration, 'libdir' has value '/opt/local/lib'
- line>includedir=${prefix}/include
- Variable declaration, 'includedir' has value '/opt/local/include'
- line>xcbproto_version=1.6
- Variable declaration, 'xcbproto_version' has value '1.6'
- line>
- line>Name: XCB
- line>Description: X-protocol C Binding
- line>Version: 1.7
- line>Requires.private: pthread-stubs xau >= 0.99.2 xdmcp
-Looking for package 'pthread-stubs'
-Looking for package 'pthread-stubs-uninstalled'
-Reading 'pthread-stubs' from file '/opt/local/lib/pkgconfig/pthread-stubs.pc'
-Parsing package file '/opt/local/lib/pkgconfig/pthread-stubs.pc'
- line>prefix=/opt/local
- Variable declaration, 'prefix' has value '/opt/local'
- line>exec_prefix=${prefix}
- Variable declaration, 'exec_prefix' has value '/opt/local'
- line>libdir=${exec_prefix}/lib
- Variable declaration, 'libdir' has value '/opt/local/lib'
- line>
- line>Name: pthread stubs
- line>Description: Stubs missing from libc for standard pthread functions
- line>Version: 0.3
- line>Libs:
-Path position of 'pthread stubs' is 1
-Adding 'pthread-stubs' to list of known packages, returning as package 'pthread-stubs'
-Looking for package 'xau'
-Looking for package 'xau-uninstalled'
-Reading 'xau' from file '/opt/local/lib/pkgconfig/xau.pc'
-Parsing package file '/opt/local/lib/pkgconfig/xau.pc'
- line>prefix=/opt/local
- Variable declaration, 'prefix' has value '/opt/local'
- line>exec_prefix=${prefix}
- Variable declaration, 'exec_prefix' has value '/opt/local'
- line>libdir=${exec_prefix}/lib
- Variable declaration, 'libdir' has value '/opt/local/lib'
- line>includedir=${prefix}/include
- Variable declaration, 'includedir' has value '/opt/local/include'
- line>
- line>Name: Xau
- line>Description: X authorization file management libary
- line>Version: 1.0.6
- line>Requires: xproto
- line>Cflags: -I${includedir}
- line>Libs: -L${libdir} -lXau
-Path position of 'Xau' is 1
-Package Xau has -I/opt/local/include in Cflags
-Removing -I/opt/local/include from cflags for xau
-Adding 'xau' to list of known packages, returning as package 'xau'
-Looking for package 'xdmcp'
-Looking for package 'xdmcp-uninstalled'
-Reading 'xdmcp' from file '/opt/local/lib/pkgconfig/xdmcp.pc'
-Parsing package file '/opt/local/lib/pkgconfig/xdmcp.pc'
- line>prefix=/opt/local
- Variable declaration, 'prefix' has value '/opt/local'
- line>exec_prefix=${prefix}
- Variable declaration, 'exec_prefix' has value '/opt/local'
- line>libdir=${exec_prefix}/lib
- Variable declaration, 'libdir' has value '/opt/local/lib'
- line>includedir=${prefix}/include
- Variable declaration, 'includedir' has value '/opt/local/include'
- line>
- line>Name: Xdmcp
- line>Description: X Display Manager Control Protocol library
- line>Version: 1.1.0
- line>Requires: xproto
- line>Cflags: -I${includedir}
- line>Libs: -L${libdir} -lXdmcp
-Path position of 'Xdmcp' is 1
-Package Xdmcp has -I/opt/local/include in Cflags
-Removing -I/opt/local/include from cflags for xdmcp
-Adding 'xdmcp' to list of known packages, returning as package 'xdmcp'
- line>Libs: -L${libdir} -lxcb
- line>Libs.private:
- line>Cflags: -I${includedir}
-Path position of 'XCB' is 1
-Package XCB has -I/opt/local/include in Cflags
-Removing -I/opt/local/include from cflags for xcb
-Adding 'xcb' to list of known packages, returning as package 'xcb'
- line>Cflags: -I${includedir}
- line>Libs: -L${libdir} -lX11
- line>Libs.private:
-Path position of 'X11' is 1
-Package X11 has -I/opt/local/include in Cflags
-Removing -I/opt/local/include from cflags for x11
-Adding 'x11' to list of known packages, returning as package 'x11'
- line>Requires.private: x11
- line>Cflags: -I${includedir}
- line>Libs: -L${libdir} -lXrender
-Path position of 'Xrender' is 1
-Package Xrender has -I/opt/local/include in Cflags
-Removing -I/opt/local/include from cflags for xrender
-Adding 'xrender' to list of known packages, returning as package 'xrender'
-Looking for package 'fontconfig'
-Looking for package 'fontconfig-uninstalled'
-Reading 'fontconfig' from file '/opt/local/lib/pkgconfig/fontconfig.pc'
-Parsing package file '/opt/local/lib/pkgconfig/fontconfig.pc'
- line>prefix=/opt/local
- Variable declaration, 'prefix' has value '/opt/local'
- line>exec_prefix=${prefix}
- Variable declaration, 'exec_prefix' has value '/opt/local'
- line>libdir=${exec_prefix}/lib
- Variable declaration, 'libdir' has value '/opt/local/lib'
- line>includedir=${prefix}/include
- Variable declaration, 'includedir' has value '/opt/local/include'
- line>
- line>Name: Fontconfig
- line>Description: Font configuration and customization library
- line>Version: 2.8.0
- line>Libs: -L${libdir} -lfontconfig
- line>Libs.private: -lexpat -L/opt/local/lib -lfreetype -lz -liconv
- line>Cflags: -I${includedir}
-Path position of 'Fontconfig' is 1
-Package Fontconfig has -I/opt/local/include in Cflags
-Removing -I/opt/local/include from cflags for fontconfig
-Adding 'fontconfig' to list of known packages, returning as package 'fontconfig'
-Looking for package 'freetype2'
-Looking for package 'freetype2-uninstalled'
-Reading 'freetype2' from file '/opt/local/lib/pkgconfig/freetype2.pc'
-Parsing package file '/opt/local/lib/pkgconfig/freetype2.pc'
- line>prefix=/opt/local
- Variable declaration, 'prefix' has value '/opt/local'
- line>exec_prefix=${prefix}
- Variable declaration, 'exec_prefix' has value '/opt/local'
- line>libdir=${exec_prefix}/lib
- Variable declaration, 'libdir' has value '/opt/local/lib'
- line>includedir=${prefix}/include
- Variable declaration, 'includedir' has value '/opt/local/include'
- line>
- line>Name: FreeType 2
- line>Description: A free, high-quality, and portable font engine.
- line>Version: 12.1.6
- line>Requires:
- line>Libs: -L${libdir} -lfreetype
- line>Libs.private: -lz
- line>Cflags: -I${includedir}/freetype2 -I${includedir}
-Path position of 'FreeType 2' is 1
-Package FreeType 2 has -I/opt/local/include in Cflags
-Removing -I/opt/local/include from cflags for freetype2
-Adding 'freetype2' to list of known packages, returning as package 'freetype2'
line>Cflags: -I${includedir}
line>Libs: -L${libdir} -lXft
Path position of 'Xft' is 1
Package Xft has -I/opt/local/include in Cflags
Removing -I/opt/local/include from cflags for xft
Adding 'xft' to list of known packages, returning as package 'xft'
- original: Xft Xrender Fontconfig FreeType 2 Xproto X11 Xproto RenderProto X11 XCB Xproto KBProto pthread stubs Xau Xdmcp Xproto Xproto XCB Xproto KBProto pthread stubs Xau Xdmcp Xproto Xproto
- sorted: Xft Xrender Fontconfig FreeType 2 Xproto X11 Xproto RenderProto X11 XCB Xproto KBProto pthread stubs Xau Xdmcp Xproto Xproto XCB Xproto KBProto pthread stubs Xau Xdmcp Xproto Xproto
- original: Xft Xrender Fontconfig FreeType 2 Xproto X11 Xproto RenderProto X11 XCB Xproto KBProto pthread stubs Xau Xdmcp Xproto Xproto XCB Xproto KBProto pthread stubs Xau Xdmcp Xproto Xproto
- sorted: Xft Xrender Fontconfig FreeType 2 Xproto X11 Xproto RenderProto X11 XCB Xproto KBProto pthread stubs Xau Xdmcp Xproto Xproto XCB Xproto KBProto pthread stubs Xau Xdmcp Xproto Xproto
- removing duplicate "-L/opt/local/lib"
- removing duplicate "-L/opt/local/lib"
- removing duplicate "-L/opt/local/lib"
- removing duplicate "-L/opt/local/lib"
- removing duplicate "-L/opt/local/lib"
- removing duplicate "-L/opt/local/lib"
- removing duplicate "-L/opt/local/lib"
- removing duplicate "-L/opt/local/lib"
- removing duplicate "-L/opt/local/lib"
- removing duplicate "-L/opt/local/lib"
- removing duplicate "-L/opt/local/lib"
- removing duplicate "-L/opt/local/lib"
- removing duplicate (from back) "-lXdmcp"
- removing duplicate (from back) "-lXau"
- removing duplicate (from back) "-lxcb"
- removing duplicate (from back) "-lX11"
- removing duplicate (from back) "-lz"
- removing duplicate (from back) "-lfreetype"
--L/opt/local/lib -lXft -lXrender -lfontconfig -lexpat -liconv -lfreetype -lz -lX11 -lxcb -lXau -lXdmcp
+ original: Xft Xproto
+ sorted: Xft Xproto
+ original: Xft Xproto
+ sorted: Xft Xproto
+-L/opt/local/lib -lXft
More information about the xorg-devel
mailing list