Are dbl quoted variables supported ?

John Tytgat John.Tytgat at aaug.net
Sat Sep 2 12:41:55 PDT 2006


Hi,

I've a question whether dbl quoted variables definitions are supported in
pkg-config.

The reason is that one of the Debian patches for the xft package
<URL:http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=349318>
is introducing the freetypelibs/freetypecflags and xrenderlibs variables
in the xft.pc file and those variables have their values quoted.

Patch:
--8<--
Index: xft/xft.pc.in
===================================================================
--- xft.orig/xft.pc.in	2006-02-04 17:59:59.000000000 -0500
+++ xft/xft.pc.in	2006-02-05 12:58:35.000000000 -0500
@@ -2,11 +2,14 @@
 exec_prefix=@exec_prefix@
 libdir=@libdir@
 includedir=@includedir@
+freetypelibs="@FREETYPE_LIBS@"
+freetypecflags="@FREETYPE_CFLAGS@"
+xrenderlibs="@XRENDER_LIBS@"
 
 Name: Xft
 Description: X FreeType library
 Version: @VERSION@
-Requires: xproto, xrender, fontconfig, freetype2
-Requires.private: xrender, fontconfig, freetype2
-Cflags: -I${includedir}
+Requires: xproto, fontconfig
+Cflags: -I${includedir} ${freetypecflags}
 Libs: -L${libdir} -lXft
+Libs.private: -lX11 ${xrenderlibs} ${freetypelibs}
--8<--

So you end up with an xft.pc file like e.g.:

--8<--
prefix=/home/john/gccsdk/riscos/env
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
freetypelibs="-L/home/john/gccsdk/riscos/env/lib -lfreetype  "
freetypecflags="-I/home/john/gccsdk/riscos/env/include/freetype2 -I/home/john/gccsdk/riscos/env/include  "
xrenderlibs="-L/home/john/gccsdk/riscos/env/lib -lXrender -lX11 -lXau -lXdmcp  "

Name: Xft
Description: X FreeType library
Version: 2.1.8.2
Requires: fontconfig
Cflags: -I${includedir} ${freetypecflags}
Libs: -L${libdir} -lXft
Libs.private: -lX11 ${xrenderlibs} ${freetypelibs}
--8<--

When using pkg-config v0.20/v0.21 I'm getting a result which I don't expect
because several libraries are missing:

$ pkg-config --static --libs xft
-L/home/john/gccsdk/riscos/env/lib -lXft -lX11 -lfontconfig

When I remove the dbl quotes from the xft.pc file for the freetypelibs,
freetypecflags and xrenderlibs variables:

--8<--
prefix=/home/john/gccsdk/riscos/env
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
freetypelibs=-L/home/john/gccsdk/riscos/env/lib -lfreetype  
freetypecflags=-I/home/john/gccsdk/riscos/env/include/freetype2 -I/home/john/gccsdk/riscos/env/include  
xrenderlibs=-L/home/john/gccsdk/riscos/env/lib -lXrender -lX11 -lXau -lXdmcp

Name: Xft
Description: X FreeType library
Version: 2.1.8.2
Requires: fontconfig
Cflags: -I${includedir} ${freetypecflags}
Libs: -L${libdir} -lXft
Libs.private: -lX11 ${xrenderlibs} ${freetypelibs}
--8<--

Then I guess the result which I expect:

$ pkg-config --static --libs xft
-L/home/john/gccsdk/riscos/env/lib -lXft -lXrender -lX11 -lXau -lXdmcp -lfreetype -lfontconfig  

So is this something which isn't supported in pkg-config or may the Debian
patch for xft.pc.in not use dbl quotes for their variable definitions ?

John.
-- 
John Tytgat, in his comfy chair at home                                 BASS
John.Tytgat at aaug.net                             ARM powered, RISC OS driven


More information about the pkg-config mailing list