diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-07-31 00:31:00 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-31 08:02:09 +0100 |
commit | 72730329c804bd474655d2f4ab5aed02345fd1e3 (patch) | |
tree | a6235d7c2f48c6e7d50b5d648b9c05f52eeef7d8 | |
parent | 581af953899bd0a64b14dfd1b4b009d9772c94b1 (diff) | |
download | poky-72730329c804bd474655d2f4ab5aed02345fd1e3.tar.gz |
qt4: allow recipes building commercial edition
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].
(From OE-Core rev: 2be0058fc4acddab611637656183accd052b40eb)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/qt4x11.bbclass | 2 | ||||
-rw-r--r-- | meta/recipes-qt/qt4/qt4-embedded.inc | 2 | ||||
-rw-r--r-- | meta/recipes-qt/qt4/qt4-x11-free.inc | 3 | ||||
-rw-r--r-- | meta/recipes-qt/qt4/qt4.inc | 7 |
4 files changed, 10 insertions, 4 deletions
diff --git a/meta/classes/qt4x11.bbclass b/meta/classes/qt4x11.bbclass index 610397d055..52190f45c1 100644 --- a/meta/classes/qt4x11.bbclass +++ b/meta/classes/qt4x11.bbclass | |||
@@ -1,4 +1,4 @@ | |||
1 | DEPENDS_prepend = "${@["qt4-x11-free ", ""][(d.getVar('BPN', True)[:12] == 'qt4-x11-free')]}" | 1 | DEPENDS_prepend = "${@base_contains("PROVIDES", "qt4-x11", "", "qt4-x11 ", d)}" |
2 | 2 | ||
3 | inherit qmake2 | 3 | inherit qmake2 |
4 | 4 | ||
diff --git a/meta/recipes-qt/qt4/qt4-embedded.inc b/meta/recipes-qt/qt4/qt4-embedded.inc index 9c5b4af93d..9e8bf3a0d7 100644 --- a/meta/recipes-qt/qt4/qt4-embedded.inc +++ b/meta/recipes-qt/qt4/qt4-embedded.inc | |||
@@ -2,7 +2,7 @@ DESCRIPTION = "Qt is a versatile cross-platform application framework -- this is | |||
2 | SECTION = "libs" | 2 | SECTION = "libs" |
3 | HOMEPAGE = "http://qt.nokia.com" | 3 | HOMEPAGE = "http://qt.nokia.com" |
4 | DEPENDS += "directfb tslib" | 4 | DEPENDS += "directfb tslib" |
5 | INC_PR = "r46" | 5 | INC_PR = "r47" |
6 | 6 | ||
7 | QT_BASE_LIB ?= "libqt-embedded" | 7 | QT_BASE_LIB ?= "libqt-embedded" |
8 | 8 | ||
diff --git a/meta/recipes-qt/qt4/qt4-x11-free.inc b/meta/recipes-qt/qt4/qt4-x11-free.inc index 29bbfc6be0..e229b85327 100644 --- a/meta/recipes-qt/qt4/qt4-x11-free.inc +++ b/meta/recipes-qt/qt4/qt4-x11-free.inc | |||
@@ -4,8 +4,9 @@ DESCRIPTION = "Qt is a versatile cross-platform application framework -- this is | |||
4 | HOMEPAGE = "http://qt.nokia.com" | 4 | HOMEPAGE = "http://qt.nokia.com" |
5 | SECTION = "x11/libs" | 5 | SECTION = "x11/libs" |
6 | DEPENDS += "virtual/libgl virtual/libx11 fontconfig libxft libxext libxrender libxrandr libxcursor" | 6 | DEPENDS += "virtual/libgl virtual/libx11 fontconfig libxft libxext libxrender libxrandr libxcursor" |
7 | PROVIDES += "qt4-x11" | ||
7 | 8 | ||
8 | INC_PR = "r44" | 9 | INC_PR = "r45" |
9 | 10 | ||
10 | QT_GLFLAGS ?= "${@base_contains('DISTRO_FEATURES', 'opengl', '-opengl', '-no-opengl', d)} " | 11 | QT_GLFLAGS ?= "${@base_contains('DISTRO_FEATURES', 'opengl', '-opengl', '-no-opengl', d)} " |
11 | QT_GLFLAGS_qemux86 = "-opengl" | 12 | QT_GLFLAGS_qemux86 = "-opengl" |
diff --git a/meta/recipes-qt/qt4/qt4.inc b/meta/recipes-qt/qt4/qt4.inc index df70e09918..9b42f69861 100644 --- a/meta/recipes-qt/qt4/qt4.inc +++ b/meta/recipes-qt/qt4/qt4.inc | |||
@@ -192,6 +192,10 @@ FILES_${QT_BASE_NAME}-xmlpatterns-dbg = "${bindir}/.debug/xmlpatterns*" | |||
192 | FILES_${QT_BASE_NAME}-qml-plugins = "${libdir}/${QT_DIR_NAME}/imports/* ${libdir}/${QT_DIR_NAME}/plugins/qmltooling/*" | 192 | FILES_${QT_BASE_NAME}-qml-plugins = "${libdir}/${QT_DIR_NAME}/imports/* ${libdir}/${QT_DIR_NAME}/plugins/qmltooling/*" |
193 | 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" | 193 | 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" |
194 | 194 | ||
195 | # License options, to be set by the recipe if different values are needed | ||
196 | QT_LICENSE_FILE ?= "" | ||
197 | QT_LICENSE_FLAGS ?= "-opensource" | ||
198 | |||
195 | do_configure() { | 199 | do_configure() { |
196 | unset QMAKESPEC | 200 | unset QMAKESPEC |
197 | unset QTDIR | 201 | unset QTDIR |
@@ -231,7 +235,7 @@ do_configure() { | |||
231 | 235 | ||
232 | ${EXTRA_QMAKE_MUNGE}|| true | 236 | ${EXTRA_QMAKE_MUNGE}|| true |
233 | 237 | ||
234 | (echo o; echo yes) | ./configure -v \ | 238 | echo yes | QT_LICENSE_FILE="${QT_LICENSE_FILE}" ./configure -v \ |
235 | -prefix ${prefix}/ \ | 239 | -prefix ${prefix}/ \ |
236 | -bindir ${bindir} \ | 240 | -bindir ${bindir} \ |
237 | -libdir ${libdir} \ | 241 | -libdir ${libdir} \ |
@@ -248,6 +252,7 @@ do_configure() { | |||
248 | -xplatform ${TARGET_OS}-oe-g++ \ | 252 | -xplatform ${TARGET_OS}-oe-g++ \ |
249 | ${QT_ENDIAN} \ | 253 | ${QT_ENDIAN} \ |
250 | -crossarch ${QT_ARCH} \ | 254 | -crossarch ${QT_ARCH} \ |
255 | ${QT_LICENSE_FLAGS} \ | ||
251 | ${QT_CONFIG_FLAGS} -no-fast \ | 256 | ${QT_CONFIG_FLAGS} -no-fast \ |
252 | -L${STAGING_LIBDIR} -I${STAGING_INCDIR} \ | 257 | -L${STAGING_LIBDIR} -I${STAGING_INCDIR} \ |
253 | -I${STAGING_INCDIR}/freetype2 | 258 | -I${STAGING_INCDIR}/freetype2 |