Bug 58803

Summary: Overly public Requires: in cairo-png.pc
Product: cairo Reporter: Daniel Macks <dmacks>
Component: generalAssignee: Chris Wilson <chris>
Status: RESOLVED MOVED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.12.8   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Daniel Macks 2012-12-27 12:16:53 UTC
cairo-1.12.8 built with png support installs cairo-png.pc that asserts:

> Requires: cairo libpng

However, libpng is not exposed in the public interface. The installed cairo-png.h does not #include any png headers and does not use any png types or re-export any functions from it. It's just part of the internal implementation and cairo links against it already, so there's no need to tell everyone using cairo that they need to link against libpng directly themselves. Worse, libpng has a history of changing its .pc naming, so this Requires entry requires that I have the *same* (or at least within a certain range) version available as when I built cairo itself, which creates a deadlock if I install a different version of a libpng-dev package on my system. Which again shouldn't matter because it's not exposed.

Instead, it should go in Requires.private, which is only used by pkg-config in static-lib or other special platform situations where the implementation details need to be exposed.

> Requires: cairo
> Requires.private:libpng

That's already where libpng is in cairo.pc itself.
Comment 1 GitLab Migration User 2018-08-25 13:29:13 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/27.

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.