use of the Requires.private field

Andreas Metzler ametzler at downhill.at.eu.org
Sat Jun 19 09:02:11 PDT 2010


On 2010-06-19 Dan Nicholson <dbn.lists at gmail.com> wrote:
> On Sat, Jun 19, 2010 at 2:16 AM, Andreas Metzler
> <ametzler at downhill.at.eu.org> wrote:
>> Dan Nicholson <dbn.lists at gmail.com> wrote:
>>> On Thu, Jun 17, 2010 at 2:35 PM, Vincent Torri <vincent.torri at gmail.com> wrote:
>>>> Hey,

>>>> We have 2 libraries, named Eina and Evas. Eina is some kind of data types
>>>> lib. Evas depends on Eina. Hence, Eina is "public". Its types are used in
>>>> the API and we have, for example, in Evas.h (the public header)

>>>> #include <Eina.h>
[...]
>> Quote
>> "Requires.private: A list of private packages required by this package
>> but not exposed to applications."
>> Unquote
>> If Evas.h  includes <Eina.h> then evas *does* expose Eina's API to the
>> application.

> Sorry, the wording there isn't entirely accurate. In this case,
> "exposed to applications" refers to symbols. As in, Evas does not use
> Eina in such a way that it would require me to explicitly link my app
> to Eina. In fact, there's probably no reason to use Requires for a C
> library unless you just want to force people to link to your required
> libraries.

Hello,
Unless the author makes it a documented feature that includes <Eina.h>
makes Evas.h headers and functions available and useable.

> Please read the next section of the guide. It explains this pretty explicitly.

> http://people.freedesktop.org/~dbn/pkg-config-guide.html#writing

A thing to keep in mind is that if the Eina ABI is incompatibly
change and gets a soname bump (e.g. size of a public struct is
changed), Evas needs to get a soname bump too, since it also exported
the struct. But that is not a pkg-config thing.
See e.g.
http://news.gmane.org/find-root.php?message_id=%3c20071226041243.GA11727%40dario.dodds.net%3e and friends
cu andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'


More information about the pkg-config mailing list