Summary: | Use "Requires.private" in cairo.pc | ||
---|---|---|---|
Product: | cairo | Reporter: | James Henstridge <james> |
Component: | general | Assignee: | Keith Packard <keithp> |
Status: | RESOLVED NOTABUG | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | minor | ||
Priority: | high | ||
Version: | 0.9.3 | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
James Henstridge
2005-06-30 00:00:22 UTC
I just noticed that cairo had been updated to optionally use Requires.private if pkg-config >= 0.18 was being used. Unfortunately, the change does not quite look correct: if a dependent package's API is exposed through your API, then it should be listed under "Requires" rather than "Requires.private". Otherwise you might not be able to #include the Cairo headers because the required includes are not given. In the patch I gave with the first comment, the only libraries I moved were libpixman and libpng. This is because both of those libraries are completely encapsulated by the Cairo API. This is not the case for the other dependencies. That sounds like a valid bug to me. Keith did this rework, so I'm sending this his direction. I placed these in Requires.private as any application using these functions will have to link in those libraries in any case, and will hence need an explicit dependency to build. I wanted to make it possible to build an Xlib-based application against an Xlib+Glitz cairo and then run it against a pure Xlib-based cairo, in this case the spurious glitz dependency would be annoying (and wrong). This should work, right? Putting all the libraries in Requires.private will stop pkg-config from adding glitz, etc to the link line. However, I think mainline libtool will still add the missing libraries to the link line (because they are listed in the libtool .la file). If you want to make absolutely certain that cairo users don't explicitly link to glitz, you'll need a script to modify the .la files post build like Owen wrote for Pango: http://cvs.gnome.org/viewcvs/*checkout*/pango/sanitize-la.sh?view=markup See pango/Makefile.am for how it is used (through the install-exec-hook target). Yes, libtool remains a problem with broken .la files. I've actually created a local version which does not install those at all and have saved myself quite a bit of grief in the process. At this point, I'm uncertain whether to stop using libtool or not; with pkg-config solving the dependency problem, it doesn't seem like libtool is really helping enough to make up for the endless troubles it causes. Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.