The PACKAGECONFIG variable available in recipes is complicated, non-obvious, and super useful. It should be documented!
Ross, It'll be great if you can provide the technical content for Scott. Thanks, Jessica
Sure. For future reference I'll paste the log of how I (badly) explained to Mihai Prica yesterday: ross@otcchat.org: i'll give you a link to an example, but you need to understand the theory ross@otcchat.org: basically it selectively adds to EXTRA_OECONF, DEPENDS and RDEPENDS ross@otcchat.org: you have a set of packageconfig "options" ross@otcchat.org: PACKAGCONFIG[foo] = "--enable-foo,--disable-foo,libfoo" ross@otcchat.org: which says when foo is on, ad --enable-foo to EXTRA_OECONF ross@otcchat.org: if its off, pass --disable-foo ross@otcchat.org: (for deterministic builds) ross@otcchat.org: and libfoo is added to DEPENDS ross@otcchat.org: (you can add another section to add runtime depends) ross@otcchat.org: you have one of those for each option ross@otcchat.org: then you set PACKAGECONFIG itself ross@otcchat.org: using ??= so it's easily overridden ross@otcchat.org: to the value of the options which you want on by default ross@otcchat.org: mesa-common.inc is a complex example ross@otcchat.org: the set of options changes depending on distro features and machine ross@otcchat.org: it's split between mesa-common.inc and mesa-dri.inc
Scott has added this to the variable reference already for 1.3: http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#var-PACKAGECONFIG
There is a fourth option in the PACKAGECONFIG[foo] lines: RDEPENDS to add if the option is enabled.
Ross, What do you mean in Comment 4? Please look at http://www.yoctoproject.org/docs/1.4/poky-ref-manual/poky-ref-manual.html#var-PACKAGECONFIG and tell me where the description is lacking. That would be the most helpful for me. Thanks, Scott
Ross, I still don't get this. I will need some more hand-holding from you to understand how this works. If you get a chance, maybe you can provide more explanation for me. Thanks, Scott
Seems I missed the fourth parameter since it is not often used. I would modify the PACKAGECONFIG entry as follows: ...while the named flags set on the variable specify for each feature, separated by commas, in order: 1) extra arguments that should be added to the configure script argument list (EXTRA_OECONF) if the feature is enabled 2) extra arguments that should be added to EXTRA_OECONF if the feature is disabled 3) additional build dependencies (DEPENDS) that should be added if the feature is enabled 4) additional runtime dependencies (RDEPENDS) that should be added if the feature is enabled. Any of these values can be left blank if not needed. ...
This description has been re-written and reviewed by Paul Eggleton. I am marking RESOLVED. You can see the new version at http://www.yoctoproject.org/docs/1.4/poky-ref-manual/poky-ref-manual.html#var-PACKAGECONFIG. Scott
I updated the glossary description for PACKAGECONFIG based on Paul Eggletons review comments. You can see the final at http://www.yoctoproject.org/docs/1.4/poky-ref-manual/poky-ref-manual.html#var-PACKAGECONFIG. Scott
Verified as per last comment