Subject: Re: libtool *.la files vs. pkg-config *.pc files
To: Greg Troxel <>
From: Greg A. Woods <>
List: tech-pkg
Date: 11/08/2004 12:50:48
[ On , November 5, 2004 at 19:37:41 (-0500), Greg Troxel wrote: ]
> Subject: Re: libtool *.la files vs. pkg-config *.pc files
> I think this is just a pango bug in generating its .pc file.  I've
> written files, and included all the libs that the library being
> built is linked against.
> This is all messy, but pkg-config done right seems sane.  Of course,
> that's not the question on the table for pkgsrc.   So fixing up the
> .pc file seems like the right thing.

Indeed if I include the following two new patches in the devel/pango
pkgsrc module then subsequent users of pango will build and run fine.

I suppose I should send-pr them....  (but I have so many other even more
critical pkgsrc fixes mixed up with my own local changes in pkgsrc! ;-)

> <don-asbestos>
> tiff obviously needs a .pc file, so users don't have to know about
> -lm.  really.
> </>

Yes, I suppose given the state of the art that's the best quick fix!

(but I would dread having to hack all the files that would
need to know to use pkg-config for libtiff!)

(i.e. the easier fix is just to add '-lm' in those far fewer places
where it's necessary)

> Perhaps, but pkg-config seems pretty based on reading .pc files, and
> no more, at runtime.  I can see how using .la files to link with at
> library build time can lead to this desire, however.

Well, as much as I hate libtool it seems to me that pkg-config would be
totally redunant (and in a very bad way since it requires duplication of
critical information) if libtool were just slightly enhanced.  :-)

>  I don't want to
> discourage you from fixing pkg-config in this direction, but that's
> out of scope for pkgsrc.

Indeed!  ;-)

						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <>
Planix, Inc. <>          Secrets of the Weird <>

12:42 [257] $ cat patches/patch-z*
---     Tue Feb 17 05:18:03 2004
+++  Fri Nov  5 17:48:28 2004
@@ -2,6 +2,6 @@
 Description: X Window System font support for Pango, Not Installed
 Version: @VERSION@
 Requires: pango
-Libs: ${pc_top_builddir}/${pcfiledir}/pango/ @XFT_LIBS@
+Libs: ${pc_top_builddir}/${pcfiledir}/pango/ ${pc_top_builddir}/${pcfiledir}/pango/ @XFT_LIBS@
 Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ @X_CFLAGS@ @FREETYPE_CFLAGS@
--- Fri Nov  5 17:22:06 2004
+++      Fri Nov  5 17:49:30 2004
@@ -7,5 +7,5 @@
 Description: Xft font support for Pango
 Version: @VERSION@
 Requires: pango
-Libs: -Wl,-R${libdir} -L${libdir} -lpangoxft-@PANGO_API_VERSION@ @PKGCONFIG_XFT_LIBS@
+Libs: -Wl,-R${libdir} -L${libdir} -lpangoxft-@PANGO_API_VERSION@ -lpangoft2-@PANGO_API_VERSION@ @PKGCONFIG_XFT_LIBS@
 Cflags: -I${includedir}/pango-1.0 @XFT_CFLAGS@