documentation: poky-ref--manual - Updated PACKAGECONFIG

Fixes [YOCTO #3327]

Re-write of the glossary description for the
PACKAGECONFIG variable.  This went through a couple of
iterations.  Paul Eggleton reviewed and provided
technical information.

(From yocto-docs rev: 7edf3d03bc4a448516f24caea4b49423a026885f)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark 2012-11-29 17:19:10 -06:00 committed by Richard Purdie
parent dbab91af5e
commit 951efacceb
1 changed files with 48 additions and 21 deletions

View File

@ -2034,32 +2034,59 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
<glossentry id='var-PACKAGECONFIG'><glossterm>PACKAGECONFIG</glossterm> <glossentry id='var-PACKAGECONFIG'><glossterm>PACKAGECONFIG</glossterm>
<glossdef> <glossdef>
<para> <para>
This variable provides a means of enabling or disabling features of a recipe This variable provides a means of enabling or disabling
on a per-recipe basis. features of a recipe on a per-recipe basis.
The <filename>PACKAGECONFIG</filename> The <filename>PACKAGECONFIG</filename>
variable itself specifies a space-separated list of the features variable itself specifies a space-separated list of the
to enable, while the named flags set on the variable specify features to enable or disable.
for each feature the additional build dependencies The features themselves are specified as flags on the
(<filename><link linkend='var-DEPENDS'>DEPENDS</link></filename>) <filename>PACKAGECONFIG</filename> variable.
that should be added if the feature is enabled, and any extra arguments You can provide up to four arguments, which are separated by
that should be added to the configure script argument list commas, to determine the behavior of each feature
(<filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></filename>) when it is enabled or disabled.
if the feature is enabled or disabled. You can omit any argument you like but must retain the
separating commas (see the examples further down).
The arguments specify the following:
<orderedlist>
<listitem><para>Extra arguments
(<link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>)
that should be added to the configure script argument list
if the feature is enabled.</para></listitem>
<listitem><para>Extra arguments (<filename>EXTRA_OECONF</filename>)
that should be added if the feature is disabled.
</para></listitem>
<listitem><para>Additional build dependencies
(<link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>)
that should be added if the feature is enabled.
</para></listitem>
<listitem><para>Additional runtime dependencies
(<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
that should be added if the feature is enabled.
</para></listitem>
</orderedlist>
</para> </para>
<para> <para>
For example, the following taken from the <filename>librsvg</filename> Consider the following example taken from the
recipe will add <filename>--with-croco</filename> to the <filename>librsvg</filename> recipe.
configure script arguments and <filename>libcroco</filename> to In this example the feature is <filename>croco</filename>, which
<filename><link linkend='var-DEPENDS'>DEPENDS</link></filename> has three arguments that determine the feature's' behavior.
by default. <literallayout class='monospaced'>
However, if "croco" is removed from <filename>PACKAGECONFIG</filename>
(for example, by using a <filename>.bbappend</filename> file in another layer), then
<filename>--without-croco</filename> will be added to the configure
script arguments instead:
<literallayout class='monospaced'>
PACKAGECONFIG ??= "croco" PACKAGECONFIG ??= "croco"
PACKAGECONFIG[croco] = "--with-croco,--without-croco,libcroco" PACKAGECONFIG[croco] = "--with-croco,--without-croco,libcroco"
</literallayout> </literallayout>
The <filename>--with-croco</filename> and
<filename>libcroco</filename> arguments apply only if
the feature is enabled.
In this case, <filename>--with-croco</filename> is
added to the configure script argument list and
<filename>libcroco</filename> is added to
<filename><link linkend='var-DEPENDS'>DEPENDS</link></filename>.
On the other hand, if the feature is disabled say through
a <filename>.bbappend</filename> file in another layer, then
the second argument <filename>--without-croco</filename> is
added to the configure script rather than
<filename>--with-croco</filename>.
</para> </para>
</glossdef> </glossdef>
</glossentry> </glossentry>