<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 19 June 2016 at 10:52, Max Krummenacher <span dir="ltr"><<a href="mailto:max.oss.09@gmail.com" target="_blank">max.oss.09@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":2zu" class=""> PACKAGECONFIG ?= "gtk3"<br>
PACKAGECONFIG[gtk2] = ",,gtk+"<br>
PACKAGECONFIG[gtk3] = "--enable-gtk3,,gtk+3"</div></blockquote></div><br>PACKAGECONFIGs are meant to be explicit so "thing which is enabled when something else is disabled" is obvious unless you write log comments explaining the options.</div><div class="gmail_extra"><br></div><div class="gmail_extra">For example, what if PACKAGECONFIG was set to "" but gtk+ was already in the sysroot. By the logic you've described that would result in your recipe being built with gtk+ despite being told not to, or maybe if gtk3 is autodetected first and that's also in the sysroot then gtk3 gets used instead. You literally can't tell, and if bitbake can't tell then you'll have binary packages changing when they shouldn't be.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Idiomatically you'd have - or expect - something like</div><div class="gmail_extra"><br></div> PACKAGECONFIG ?= "gtk3"<br> PACKAGECONFIG[gtk2] = "--enable-gtk2,--disable-gtk2,gtk+"<br> PACKAGECONFIG[gtk3] = "--enable-gtk3,--disable-gtk3,gtk+3"<div><br></div><div>If the upstream doesn't support this then you're hoping that they don't change the default values, or the configure doesn't attempt to auto-detect, or various other ways that having options with no enable or disable values can break. At that point I'd actually fix upstream's configure and send a patch instead of attempting to work around it.</div><div><br></div><div>Ross</div></div>