]> code.ossystems Code Review - openembedded-core.git/commitdiff
qt4: allow recipes building commercial edition
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Mon, 30 Jul 2012 23:31:00 +0000 (00:31 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 31 Jul 2012 06:55:55 +0000 (07:55 +0100)
To enable building the commercial edition of Qt (through additional
recipes that are *not* provided by OE-Core) we need to tweak a few
things:

* Don't make recipes that inherit qt4x11.bbclass depend on qt4-x11-free
  - instead add qt4-x11 to DEPENDS and then have qt4-x11-free include
  this in its PROVIDES. A commercial equivalent recipe should do the
  same.
* Add a QT_LICENSE_FILE variable that can be used to specify the license
  file required by the commercial edition.
* Add a QT_LICENSE_FLAGS variable which the recipe can set to select the
  license option being used. The default of "-opensource" retains the
  current behaviour; a commercial recipe should set it to "-commercial".

Fixes [YOCTO #2505].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/qt4x11.bbclass
meta/recipes-qt/qt4/qt4-embedded.inc
meta/recipes-qt/qt4/qt4-x11-free.inc
meta/recipes-qt/qt4/qt4.inc

index 610397d0558dffa7ea02200f5037a5709a7b0b95..52190f45c184bb1666b71e1d30a1201e9d580c20 100644 (file)
@@ -1,4 +1,4 @@
-DEPENDS_prepend = "${@["qt4-x11-free ", ""][(d.getVar('BPN', True)[:12] == 'qt4-x11-free')]}"
+DEPENDS_prepend = "${@base_contains("PROVIDES", "qt4-x11", "", "qt4-x11 ", d)}"
 
 inherit qmake2
 
index 9c5b4af93d1296de2bcbfe90de7df0913a5ce624..9e8bf3a0d749fbbc9e7a36fb7af263e45589a674 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION = "Qt is a versatile cross-platform application framework -- this is
 SECTION = "libs"
 HOMEPAGE = "http://qt.nokia.com"
 DEPENDS += "directfb tslib"
-INC_PR = "r46"
+INC_PR = "r47"
 
 QT_BASE_LIB  ?= "libqt-embedded"
 
index 29bbfc6be0c54d6d65d10aea19b9b9e73cf40c43..e229b853277431dda097f18429dd02e1b82fa81d 100644 (file)
@@ -4,8 +4,9 @@ DESCRIPTION = "Qt is a versatile cross-platform application framework -- this is
 HOMEPAGE = "http://qt.nokia.com"
 SECTION = "x11/libs"
 DEPENDS += "virtual/libgl virtual/libx11 fontconfig libxft libxext libxrender libxrandr libxcursor"
+PROVIDES += "qt4-x11"
 
-INC_PR = "r44"
+INC_PR = "r45"
 
 QT_GLFLAGS ?= "${@base_contains('DISTRO_FEATURES', 'opengl', '-opengl', '-no-opengl', d)} "
 QT_GLFLAGS_qemux86 = "-opengl"
index df70e0991882edc336342f554c99ce325376e86c..9b42f6986112114b1a98a5d51186c162bf000633 100644 (file)
@@ -192,6 +192,10 @@ FILES_${QT_BASE_NAME}-xmlpatterns-dbg      = "${bindir}/.debug/xmlpatterns*"
 FILES_${QT_BASE_NAME}-qml-plugins          = "${libdir}/${QT_DIR_NAME}/imports/* ${libdir}/${QT_DIR_NAME}/plugins/qmltooling/*"
 FILES_${QT_BASE_NAME}-qml-plugins-dbg      = "${libdir}/${QT_DIR_NAME}/imports/*/*/*/.debug/* ${libdir}/${QT_DIR_NAME}/imports/*/.debug ${libdir}/${QT_DIR_NAME}/plugins/qmltooling/.debug"
 
+# License options, to be set by the recipe if different values are needed
+QT_LICENSE_FILE ?= ""
+QT_LICENSE_FLAGS ?= "-opensource"
+
 do_configure() {
        unset QMAKESPEC
        unset QTDIR
@@ -231,7 +235,7 @@ do_configure() {
 
        ${EXTRA_QMAKE_MUNGE}|| true
 
-       (echo o; echo yes) | ./configure -v \
+       echo yes | QT_LICENSE_FILE="${QT_LICENSE_FILE}" ./configure -v \
                        -prefix ${prefix}/ \
                        -bindir ${bindir} \
                        -libdir ${libdir} \
@@ -248,6 +252,7 @@ do_configure() {
                        -xplatform ${TARGET_OS}-oe-g++ \
                        ${QT_ENDIAN} \
                        -crossarch ${QT_ARCH} \
+                       ${QT_LICENSE_FLAGS} \
                        ${QT_CONFIG_FLAGS} -no-fast \
                        -L${STAGING_LIBDIR} -I${STAGING_INCDIR} \
                        -I${STAGING_INCDIR}/freetype2