docs: import usermanual from org.openembedded.documentation.
[openembedded.git] / docs / usermanual / reference / class_pkgconfig.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <section id="pkgconfig_class" xreflabel="pkgconfig class">
3   <title>pkgconfig class</title>
4
5   <para>The pkgconfig class is for packages that install
6   <command>&lt;pkg&gt;.pc</command> files. These files provide information
7   about the build settings for the package vwhich are then made available by
8   the <command>pkg-config</command> command.</para>
9
10   <para>Since the contents of the <command>.pc</command> files are used at
11   build time they need to be installed into the staging area. All the actions
12   performed by this class are appended to the <emphasis>stage</emphasis>
13   task.</para>
14
15   <para>The actions performed by the pkgconfig class are:</para>
16
17   <orderedlist>
18     <listitem>
19       <para>Copies the <command>&lt;x&gt;.pc</command> files into the
20       <command>${PKG_CONFIG_PATH}</command> directory;</para>
21     </listitem>
22
23     <listitem>
24       <para>If the package is not native then it modifies the contents of the
25       <command>&lt;x&gt;.pc</command> file in the
26       <command>${PKG_CONFIG_PATH}</command> area to ensure that all the paths
27       in the script refer to the staging area;</para>
28     </listitem>
29   </orderedlist>
30
31   <para>A package is considered to be native if it also inherits the native
32   class.</para>
33
34   <para>The class will search the source directory, <command>${S}</command>,
35   and all it's subdirectories, for files that end in <command>.pc</command>
36   (it will ignore those that end in <command>-uninstalled.pc)</command> and
37   process them as described above. All that is required to use the class is
38   the addition of pkgconfig in an inherit statement:<screen>inherit autotools pkgconfig</screen></para>
39 </section>