GNOME Bugzilla – Bug 652737
all gtk apps linked against libpng
Last modified: 2011-08-27 02:44:39 UTC
Created attachment 190046 [details] [review] Put GDK_PIXBUF_EXTRA_LIBS in Libs.private If the png loader is built into gdk-pixbuf, then the libs specified by gdk-pixbuf-2.0.pc include libpng (-lpng12), and the result is most gtk programs end up needlessly linking against libpng. A fix is to use Libs.private in gdk-pixbuf-2.0.pc, similar to what was already done for Requires.private. I've tested the patch for a while, it doesn't appear to cause any problems, although I found a couple more things that don't link against libm properly (the libpng libs drag in -lm as well).
I don't think it will make any difference in practice, but the patch looks reasonable.
No, it doesn't make a lot of difference - although I suppose -lpng12 shouldn't even be in Libs.private if libpng is in Requires.private.
Created attachment 192051 [details] [review] Keep png out of Libs.private if in Requires.private For this to make sense, I changed the order so that a version specific dep, such as libpng15 or libpng12, is found before just "libpng".
The following fix has been pushed: d430bc4 Clean up dependencies in the .pc file
Created attachment 194898 [details] [review] Clean up dependencies in the .pc file Add libpng to Requires.private instead of Requires. Patches by Edward Sheldrake,