Bug 2505

Summary: qt4x11.bbclass forces to add qt4-x11-free dependency
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Felipe Ferreri Tonello <ftonello>
Component: graphicsAssignee: Paul Eggleton <bluelightning>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: corneliux.stoicescu, meta.mr.watcher, meta.watcher
Version: 1.2   
Target Milestone: 1.3 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
Patch to fix that dependency none

Description Felipe Ferreri Tonello 2012-05-25 23:54:01 UTC
qt4x11.bbclass forces to add qt4-x11-free dependency to any recipe that inherits it. I think this is ugly and unnecessasry. If any recipe needs that depedency, the recipe needs to contain that. This will, also, cause to compile Qt4 free with Qt4 commercial, which was my case. And that makes difficult to debug.

The patches removes that line and add the qt4-x11-free dependency to recipes that needed.
Comment 1 Felipe Ferreri Tonello 2012-05-25 23:55:52 UTC
Created attachment 539 [details]
Patch to fix that dependency
Comment 2 Felipe Ferreri Tonello 2012-05-26 00:01:49 UTC
*** Bug 2504 has been marked as a duplicate of this bug. ***
Comment 3 Paul Eggleton 2012-06-12 10:40:49 UTC
Rather than forcing every recipe to be changed I'd prefer to do something like this in the qt4-x11-free recipe:

PROVIDES += "qt4-x11"

You can do the same in your qt4-commercial recipe; then qt4x11.bbclass can add a DEPENDS on qt4-x11 rather than qt4-x11-free. You'd also want to set PREFERRED_PROVIDER_qt4-x11 = "qt4-commercial" in your local or distro configuration.

Does that sound reasonable?
Comment 4 Felipe Ferreri Tonello 2012-06-14 17:54:18 UTC
Yes, it's better approach than changing every recipe.

But qt4.inc still configuring Qt for opensource license. Perhaps we could add a QT_LICENSE variable, if it exists, then do something like this:

echo yes | QT_LICENSE_FILE=${QT_LICENSE} ./configure -v \ ...

What do you think?
Comment 5 Paul Eggleton 2012-07-30 12:26:37 UTC
I've finally got a chance to look into this today, sorry for the delay. I'm happy to add the above; I've also added a way to specify the license option (-opensource / -commercial). Patch will be sent out soon.
Comment 6 Paul Eggleton 2012-07-30 23:32:24 UTC
I've just sent the following patch to OE-Core:

http://patchwork.openembedded.org/patch/33323/

Note that with this change applied, a commercial Qt4 (for X11) recipe should do the following:

PROVIDES += "qt4-x11"
QT_LICENSE_FILE = "license_filename"
QT_LICENSE_FLAGS = "-commercial"
Comment 7 Paul Eggleton 2012-07-31 13:59:25 UTC
Fix merged in revision 72730329c804bd474655d2f4ab5aed02345fd1e3.
Comment 8 Stoicescu Cornel 2012-11-06 15:18:08 UTC
I sent an email to the bug owner in order to set this to verified. Waiting for feedback.
Comment 9 Felipe Ferreri Tonello 2012-11-06 22:01:34 UTC
I didn't test but I checked the commit and it seems it's fixed.

Thank you
Comment 10 Stoicescu Cornel 2012-11-07 08:50:50 UTC
As per the above comment I am setting this to Verified. Please feel free to reopen if necessary.