From 2340ce8714f2a50e459c80a6aab51dad37378303 Mon Sep 17 00:00:00 2001 From: Bhooshan Supe Date: Fri, 26 Jul 2013 19:59:09 -0700 Subject: [PATCH] qttools-native: Add module to build lrelease+lupdate+lconvert :Release Notes: Add optional Qt-Tools module. :Detailed Notes: Qt provide optional Qt-Tools like "lrelease", etc. In absence of these tools one can not have i18n and l10n changes automated in build. Adding "qttools-native" to "meta-qt5" Open Embedded layer provides those tools. Using Qt-Tools i18n and l10n changes can be auomated. :Testing Performed: :QA Notes: :Issues Addressed: [GF-11028] Enable build of Qt localization tools in the Qt component Change-Id: Ieb679249a05501a6ccb25108903a0fd48d4014f0 --- classes/qmake5.bbclass | 9 -- conf/distro/include/qt5-versions.inc | 1 + ...build-only-lrelease-lupdate-lconvert.patch | 127 ++++++++++++++++ ...build-only-lrelease-lupdate-lconvert.patch | 136 +++++++++++++++++ ...build-only-lrelease-lupdate-lconvert.patch | 138 ++++++++++++++++++ recipes-qt/qt5/qttools-native.inc | 22 +++ recipes-qt/qt5/qttools-native_5.0.2.bb | 5 + recipes-qt/qt5/qttools-native_5.1.0.bb | 10 ++ recipes-qt/qt5/qttools-native_git.bb | 4 + 9 files changed, 443 insertions(+), 9 deletions(-) create mode 100644 recipes-qt/qt5/qttools-5.0.2/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch create mode 100644 recipes-qt/qt5/qttools-5.1.0/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch create mode 100644 recipes-qt/qt5/qttools-git/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch create mode 100644 recipes-qt/qt5/qttools-native.inc create mode 100644 recipes-qt/qt5/qttools-native_5.0.2.bb create mode 100644 recipes-qt/qt5/qttools-native_5.1.0.bb create mode 100644 recipes-qt/qt5/qttools-native_git.bb diff --git a/classes/qmake5.bbclass b/classes/qmake5.bbclass index e1dda0d687..b056ea755d 100644 --- a/classes/qmake5.bbclass +++ b/classes/qmake5.bbclass @@ -6,15 +6,6 @@ inherit qmake5_base QT5TOOLSDEPENDS ?= "qtbase-native" DEPENDS_prepend = "${QT5TOOLSDEPENDS} " -# do we still need to export these? -#OE_QMAKE_INCDIR_QT = "${STAGING_INCDIR}/qt5" -#OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}" -#OE_QMAKE_LIBS_QT = "qt" -#OE_QMAKE_LIBS_X11 = "-lXext -lX11 -lm" -#OE_QMAKE_LIBS_X11SM = "-lSM -lICE" -#OE_QMAKE_LRELEASE = "${STAGING_BINDIR_NATIVE}/lrelease5" -#OE_QMAKE_LUPDATE = "${STAGING_BINDIR_NATIVE}/lupdate5" - do_configure() { qmake5_base_do_configure } diff --git a/conf/distro/include/qt5-versions.inc b/conf/distro/include/qt5-versions.inc index b9959ac4c7..ea159700cd 100644 --- a/conf/distro/include/qt5-versions.inc +++ b/conf/distro/include/qt5-versions.inc @@ -15,6 +15,7 @@ PREFERRED_VERSION_qtquick1 = "${QT5_VERSION}" PREFERRED_VERSION_qtsensors = "${QT5_VERSION}" PREFERRED_VERSION_qtscript = "${QT5_VERSION}" PREFERRED_VERSION_qtsvg = "${QT5_VERSION}" +PREFERRED_VERSION_qttools-native = "${QT5_VERSION}" PREFERRED_VERSION_qtwebkit = "${QT5_VERSION}" PREFERRED_VERSION_qtwebkit-examples = "${QT5_VERSION}" PREFERRED_VERSION_qtxmlpatterns = "${QT5_VERSION}" diff --git a/recipes-qt/qt5/qttools-5.0.2/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch b/recipes-qt/qt5/qttools-5.0.2/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch new file mode 100644 index 0000000000..c5abceee03 --- /dev/null +++ b/recipes-qt/qt5/qttools-5.0.2/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch @@ -0,0 +1,127 @@ +From f5d7b5cd073eb6b5a60658b9622c59a682fd828d Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Wed, 11 Sep 2013 18:30:08 +0200 +Subject: [PATCH] Allow to build only lrelease + lupdate + lconvert + +This is useful e.g. when cross compiling with OpenEmbedded where qtbase-native +is built without GUI support (no-png is set) and we still want to build +native lrelease + lupdate + lconvert tools. + +Upstream-Status: Pending + +Signed-off-by: Martin Jansa +--- + examples/examples.pro | 4 ++-- + src/designer/src/src.pro | 14 ++++++++------ + src/linguist/linguist.pro | 2 +- + src/src.pro | 10 ++++++---- + tests/auto/auto.pro | 20 +++++++++++--------- + 5 files changed, 28 insertions(+), 22 deletions(-) + +diff --git a/examples/examples.pro b/examples/examples.pro +index 4955969..8e86419 100644 +--- a/examples/examples.pro ++++ b/examples/examples.pro +@@ -1,3 +1,3 @@ + TEMPLATE = subdirs +-qtHaveModule(widgets): SUBDIRS += help designer linguist uitools assistant +- ++!linguistonly:qtHaveModule(widgets): SUBDIRS += help designer assistant ++qtHaveModule(widgets): SUBDIRS += linguist uitools +diff --git a/src/designer/src/src.pro b/src/designer/src/src.pro +index 64d1c37..6e6912d 100644 +--- a/src/designer/src/src.pro ++++ b/src/designer/src/src.pro +@@ -1,10 +1,12 @@ + TEMPLATE = subdirs + CONFIG += ordered + +-SUBDIRS = \ +- uitools \ +- lib \ +- components \ +- designer ++!linguistonly { ++ SUBDIRS = \ ++ lib \ ++ components \ ++ designer ++} ++SUBDIRS += uitools + +-contains(QT_CONFIG, shared): SUBDIRS += plugins ++!linguistonly:contains(QT_CONFIG, shared): SUBDIRS += plugins +diff --git a/src/linguist/linguist.pro b/src/linguist/linguist.pro +index 04b0ab6..8c63bb4 100644 +--- a/src/linguist/linguist.pro ++++ b/src/linguist/linguist.pro +@@ -3,7 +3,7 @@ SUBDIRS = \ + lrelease \ + lupdate \ + lconvert +-!no-png:qtHaveModule(widgets): SUBDIRS += linguist ++!linguistonly:!no-png:qtHaveModule(widgets): SUBDIRS += linguist + + win32:CMAKE_BIN_SUFFIX = ".exe" + +diff --git a/src/src.pro b/src/src.pro +index 3799567..7deb785 100644 +--- a/src/src.pro ++++ b/src/src.pro +@@ -5,10 +5,12 @@ qtHaveModule(widgets) { + no-png { + message("Some graphics-related tools are unavailable without PNG support") + } else { +- SUBDIRS = assistant \ ++ !linguistonly { ++ SUBDIRS = assistant \ + pixeltool \ +- qtestlib \ +- designer ++ qtestlib ++ } ++ SUBDIRS += designer + # unix:!mac:!embedded:!qpa:SUBDIRS += qtconfig + } + } +@@ -21,7 +23,7 @@ mac { + + embedded:SUBDIRS += kmap2qmap + +-qtHaveModule(dbus): SUBDIRS += qdbus ++!linguistonly:qtHaveModule(dbus): SUBDIRS += qdbus + # We don't need these command line utilities on embedded platforms. + embedded: SUBDIRS += makeqpf + +diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro +index 074aa34..d38e05d 100644 +--- a/tests/auto/auto.pro ++++ b/tests/auto/auto.pro +@@ -1,13 +1,15 @@ + TEMPLATE=subdirs +-SUBDIRS=\ +- linguist \ +- host.pro \ +- qhelpcontentmodel \ +- qhelpenginecore \ +- qhelpgenerator \ +- qhelpindexmodel \ +- qhelpprojectdata \ +- cmake ++!linguistonly { ++ SUBDIRS=\ ++ linguist \ ++ host.pro \ ++ qhelpcontentmodel \ ++ qhelpenginecore \ ++ qhelpgenerator \ ++ qhelpindexmodel \ ++ qhelpprojectdata \ ++ cmake ++} + + # These tests don't make sense for cross-compiled builds + cross_compile:SUBDIRS -= host.pro +-- +1.7.10.4 + diff --git a/recipes-qt/qt5/qttools-5.1.0/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch b/recipes-qt/qt5/qttools-5.1.0/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch new file mode 100644 index 0000000000..f1b8783507 --- /dev/null +++ b/recipes-qt/qt5/qttools-5.1.0/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch @@ -0,0 +1,136 @@ +From 4df58d96ea516358d2762a219c0b196e56c8e89b Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Wed, 11 Sep 2013 18:30:08 +0200 +Subject: [PATCH] Allow to build only lrelease + lupdate + lconvert + +This is useful e.g. when cross compiling with OpenEmbedded where qtbase-native +is built without GUI support (no-png is set) and we still want to build +native lrelease + lupdate + lconvert tools. + +Upstream-Status: Pending + +Signed-off-by: Martin Jansa +--- + examples/examples.pro | 4 ++-- + src/designer/src/src.pro | 16 +++++++++------- + src/linguist/linguist.pro | 2 +- + src/src.pro | 10 ++++++---- + tests/auto/auto.pro | 20 +++++++++++--------- + 5 files changed, 29 insertions(+), 23 deletions(-) + +diff --git a/examples/examples.pro b/examples/examples.pro +index 4955969..8e86419 100644 +--- a/examples/examples.pro ++++ b/examples/examples.pro +@@ -1,3 +1,3 @@ + TEMPLATE = subdirs +-qtHaveModule(widgets): SUBDIRS += help designer linguist uitools assistant +- ++!linguistonly:qtHaveModule(widgets): SUBDIRS += help designer assistant ++qtHaveModule(widgets): SUBDIRS += linguist uitools +diff --git a/src/designer/src/src.pro b/src/designer/src/src.pro +index e02ca8e..49527c5 100644 +--- a/src/designer/src/src.pro ++++ b/src/designer/src/src.pro +@@ -1,18 +1,20 @@ + TEMPLATE = subdirs + +-SUBDIRS = \ +- uitools \ +- lib \ +- components \ +- designer ++!linguistonly { ++ SUBDIRS = \ ++ lib \ ++ components \ ++ designer ++} ++SUBDIRS += uitools + +-contains(QT_CONFIG, shared): SUBDIRS += plugins ++!linguistonly:contains(QT_CONFIG, shared): SUBDIRS += plugins + + components.depends = lib + designer.depends = components + plugins.depends = lib + +-qtNomakeTools( \ ++!linguistonly:qtNomakeTools( \ + lib \ + components \ + designer \ +diff --git a/src/linguist/linguist.pro b/src/linguist/linguist.pro +index df3c0c7..75bdf26 100644 +--- a/src/linguist/linguist.pro ++++ b/src/linguist/linguist.pro +@@ -3,7 +3,7 @@ SUBDIRS = \ + lrelease \ + lupdate \ + lconvert +-!no-png:qtHaveModule(widgets): SUBDIRS += linguist ++!linguistonly:!no-png:qtHaveModule(widgets): SUBDIRS += linguist + + qtNomakeTools( \ + linguist \ +diff --git a/src/src.pro b/src/src.pro +index c8756db..d71c4a0 100644 +--- a/src/src.pro ++++ b/src/src.pro +@@ -4,10 +4,12 @@ qtHaveModule(widgets) { + no-png { + message("Some graphics-related tools are unavailable without PNG support") + } else { +- SUBDIRS = assistant \ ++ !linguistonly { ++ SUBDIRS = assistant \ + pixeltool \ +- qtestlib \ +- designer ++ qtestlib ++ } ++ SUBDIRS += designer + # unix:!mac:!embedded:!qpa:SUBDIRS += qtconfig + + linguist.depends = designer +@@ -20,7 +22,7 @@ mac { + SUBDIRS += macdeployqt + } + +-qtHaveModule(dbus): SUBDIRS += qdbus ++!linguistonly:qtHaveModule(dbus): SUBDIRS += qdbus + + qtNomakeTools( \ + pixeltool \ +diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro +index 074aa34..a744d46 100644 +--- a/tests/auto/auto.pro ++++ b/tests/auto/auto.pro +@@ -1,13 +1,15 @@ + TEMPLATE=subdirs +-SUBDIRS=\ +- linguist \ +- host.pro \ +- qhelpcontentmodel \ +- qhelpenginecore \ +- qhelpgenerator \ +- qhelpindexmodel \ +- qhelpprojectdata \ +- cmake ++!linguistonly { ++ SUBDIRS=\ ++ linguist \ ++ host.pro \ ++ qhelpcontentmodel \ ++ qhelpenginecore \ ++ qhelpgenerator \ ++ qhelpindexmodel \ ++ qhelpprojectdata \ ++ cmake ++} + + # These tests don't make sense for cross-compiled builds + cross_compile:SUBDIRS -= host.pro +-- +1.8.3.2 + diff --git a/recipes-qt/qt5/qttools-git/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch b/recipes-qt/qt5/qttools-git/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch new file mode 100644 index 0000000000..b1145be14a --- /dev/null +++ b/recipes-qt/qt5/qttools-git/0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch @@ -0,0 +1,138 @@ +From 3a1d11f3391d7745a01a68629d04f8b5b3c40ffb Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Wed, 11 Sep 2013 18:30:08 +0200 +Subject: [PATCH] Allow to build only lrelease + lupdate + lconvert + +This is useful e.g. when cross compiling with OpenEmbedded where qtbase-native +is built without GUI support (no-png is set) and we still want to build +native lrelease + lupdate + lconvert tools. + +Upstream-Status: Pending + +Signed-off-by: Martin Jansa +--- + examples/examples.pro | 4 ++-- + src/designer/src/src.pro | 16 +++++++++------- + src/linguist/linguist.pro | 2 +- + src/src.pro | 10 ++++++---- + tests/auto/auto.pro | 22 ++++++++++++---------- + 5 files changed, 30 insertions(+), 24 deletions(-) + +diff --git a/examples/examples.pro b/examples/examples.pro +index 4955969..8e86419 100644 +--- a/examples/examples.pro ++++ b/examples/examples.pro +@@ -1,3 +1,3 @@ + TEMPLATE = subdirs +-qtHaveModule(widgets): SUBDIRS += help designer linguist uitools assistant +- ++!linguistonly:qtHaveModule(widgets): SUBDIRS += help designer assistant ++qtHaveModule(widgets): SUBDIRS += linguist uitools +diff --git a/src/designer/src/src.pro b/src/designer/src/src.pro +index e02ca8e..49527c5 100644 +--- a/src/designer/src/src.pro ++++ b/src/designer/src/src.pro +@@ -1,18 +1,20 @@ + TEMPLATE = subdirs + +-SUBDIRS = \ +- uitools \ +- lib \ +- components \ +- designer ++!linguistonly { ++ SUBDIRS = \ ++ lib \ ++ components \ ++ designer ++} ++SUBDIRS += uitools + +-contains(QT_CONFIG, shared): SUBDIRS += plugins ++!linguistonly:contains(QT_CONFIG, shared): SUBDIRS += plugins + + components.depends = lib + designer.depends = components + plugins.depends = lib + +-qtNomakeTools( \ ++!linguistonly:qtNomakeTools( \ + lib \ + components \ + designer \ +diff --git a/src/linguist/linguist.pro b/src/linguist/linguist.pro +index df3c0c7..75bdf26 100644 +--- a/src/linguist/linguist.pro ++++ b/src/linguist/linguist.pro +@@ -3,7 +3,7 @@ SUBDIRS = \ + lrelease \ + lupdate \ + lconvert +-!no-png:qtHaveModule(widgets): SUBDIRS += linguist ++!linguistonly:!no-png:qtHaveModule(widgets): SUBDIRS += linguist + + qtNomakeTools( \ + linguist \ +diff --git a/src/src.pro b/src/src.pro +index c8756db..d71c4a0 100644 +--- a/src/src.pro ++++ b/src/src.pro +@@ -4,10 +4,12 @@ qtHaveModule(widgets) { + no-png { + message("Some graphics-related tools are unavailable without PNG support") + } else { +- SUBDIRS = assistant \ ++ !linguistonly { ++ SUBDIRS = assistant \ + pixeltool \ +- qtestlib \ +- designer ++ qtestlib ++ } ++ SUBDIRS += designer + # unix:!mac:!embedded:!qpa:SUBDIRS += qtconfig + + linguist.depends = designer +@@ -20,7 +22,7 @@ mac { + SUBDIRS += macdeployqt + } + +-qtHaveModule(dbus): SUBDIRS += qdbus ++!linguistonly:qtHaveModule(dbus): SUBDIRS += qdbus + + qtNomakeTools( \ + pixeltool \ +diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro +index eaf440b..1778ad1 100644 +--- a/tests/auto/auto.pro ++++ b/tests/auto/auto.pro +@@ -1,14 +1,16 @@ + TEMPLATE=subdirs +-SUBDIRS=\ +- linguist \ +- host.pro \ +- qhelpcontentmodel \ +- qhelpenginecore \ +- qhelpgenerator \ +- qhelpindexmodel \ +- qhelpprojectdata \ +- cmake \ +- installed_cmake ++!linguistonly { ++ SUBDIRS=\ ++ linguist \ ++ host.pro \ ++ qhelpcontentmodel \ ++ qhelpenginecore \ ++ qhelpgenerator \ ++ qhelpindexmodel \ ++ qhelpprojectdata \ ++ cmake \ ++ installed_cmake ++} + + installed_cmake.depends = cmake + +-- +1.8.3.2 + diff --git a/recipes-qt/qt5/qttools-native.inc b/recipes-qt/qt5/qttools-native.inc new file mode 100644 index 0000000000..cc1e05666f --- /dev/null +++ b/recipes-qt/qt5/qttools-native.inc @@ -0,0 +1,22 @@ +# doesn't have GFDL-1.3 like qtbase, LICENSE files are missing in 5.0.0 and 5.0.1, this is for 5.0.2 and git +LICENSE = "LGPL-2.1 | GPL-3.0" +LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=4193e7f1d47a858f6b7c0f1ee66161de \ + file://LICENSE.GPL;md5=d32239bcb673463ab874e80d47fae504 \ + file://LGPL_EXCEPTION.txt;md5=0145c4d1b6f96a661c2c139dfb268fb6 \ +" + +DEPENDS = "qtbase-native" + +QT_MODULE = "qttools" + +require qt5-native.inc + +SRC_URI += "file://0001-Allow-to-build-only-lrelease-lupdate-lconvert.patch" + +do_configure() { + ${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} -r ${S} CONFIG+=linguistonly +} + +do_install() { + oe_runmake install INSTALL_ROOT=${D} +} diff --git a/recipes-qt/qt5/qttools-native_5.0.2.bb b/recipes-qt/qt5/qttools-native_5.0.2.bb new file mode 100644 index 0000000000..2ce7167946 --- /dev/null +++ b/recipes-qt/qt5/qttools-native_5.0.2.bb @@ -0,0 +1,5 @@ +require qt5-${PV}.inc +require ${PN}.inc + +SRC_URI[md5sum] = "93ddcfdb87c6a784b0a921d09eafbdad" +SRC_URI[sha256sum] = "bb9bcf38dbb429cf884d688793681257876f97a2c0fba08528393a39eec7755b" diff --git a/recipes-qt/qt5/qttools-native_5.1.0.bb b/recipes-qt/qt5/qttools-native_5.1.0.bb new file mode 100644 index 0000000000..1da72a4ac9 --- /dev/null +++ b/recipes-qt/qt5/qttools-native_5.1.0.bb @@ -0,0 +1,10 @@ +require qt5-${PV}.inc +require ${PN}.inc + +# LICENSE files are missing in 5.0.0 and 5.0.1 +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780 \ + file://${COMMON_LICENSE_DIR}/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891 \ +" + +SRC_URI[md5sum] = "f3cc602d4b720a847f4ab0953a82d8ef" +SRC_URI[sha256sum] = "9b9aa948e01bf9d0fc7fa4584ededf9b5b280ee74c334c5790dbc6f9015b3738" diff --git a/recipes-qt/qt5/qttools-native_git.bb b/recipes-qt/qt5/qttools-native_git.bb new file mode 100644 index 0000000000..bc1ec2a13d --- /dev/null +++ b/recipes-qt/qt5/qttools-native_git.bb @@ -0,0 +1,4 @@ +require qt5-git.inc +require ${PN}.inc + +SRCREV = "441f3d964301942e417b238b6e71b2ad13b976f0"