From 4a0e705aef1bec1854ad7b2e422de16f963dc905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kim=20H=C3=B8jgaard-Hansen?= Date: Tue, 10 Feb 2015 10:48:10 +0100 Subject: [PATCH 1/4] qt5.inc: split examples into source-only and binary packages qt5.inc: change example-source packaging There are many different file types in the sources, and instead of either creating a FILES_ adding loop, which would mean you could not see FILES_ in 'oe show', or keep adding file types to FILES_ manually we instead duplicate the sources after unpack. This means that we still also install sources not just examples binaries on the target. qt5: only create dir when not present Add tests for examples directories Not all qt5 modules provide examples directories. Signed-off-by: Klaus Henning Sorensen --- recipes/qt5/qt5.inc | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/recipes/qt5/qt5.inc b/recipes/qt5/qt5.inc index 91aa2f1..b8e12fb 100644 --- a/recipes/qt5/qt5.inc +++ b/recipes/qt5/qt5.inc @@ -18,10 +18,32 @@ OE_QMAKE_PATH_SETTINGS = "${OE_QMAKE_PATH_QT_SETTINGS}" OE_QMAKE_PATH_EXAMPLES = "${OE_QMAKE_PATH_QT_EXAMPLES}" OE_QMAKE_PATH_TESTS = "${OE_QMAKE_PATH_QT_TESTS}" +# To avoid too much FILES hackery, since there are many +# file types in the sources, we duplicate them so they can +# both be built and included as source only. +do_configure[prefuncs] =+ "do_configure_examples_source" +do_configure_examples_source () { + if [ -d ${S}/examples ]; then + test -d ${S}/examples-sourceonly || mkdir ${S}/examples-sourceonly + cp -R ${S}/examples/* ${S}/examples-sourceonly/ + fi +} + +do_install[postfuncs] =+ "do_install_examples_source" +do_install_examples_source () { + if [ -d ${S}/examples-sourceonly ]; then + test -d ${D}/examples || mkdir ${D}/examples + cp -R ${S}/examples-sourceonly/* ${D}/examples/ + fi +} + #Examples are present in all Qt modules RECIPE_FLAGS += "qtexamples" DEFAULT_USE_qtexamples = "1" -PACKAGES: Date: Sun, 19 Apr 2015 16:15:44 +0200 Subject: [PATCH 2/4] Patching pkg-config problem with per recipe staging. --- .../qt5/qtbase-5.3.1/oe_lite_pkg_config.patch | 30 +++++++++++++++++++ recipes/qt5/qtbase_5.3.1.oe | 1 + 2 files changed, 31 insertions(+) create mode 100644 recipes/qt5/qtbase-5.3.1/oe_lite_pkg_config.patch diff --git a/recipes/qt5/qtbase-5.3.1/oe_lite_pkg_config.patch b/recipes/qt5/qtbase-5.3.1/oe_lite_pkg_config.patch new file mode 100644 index 0000000..33a2199 --- /dev/null +++ b/recipes/qt5/qtbase-5.3.1/oe_lite_pkg_config.patch @@ -0,0 +1,30 @@ +* Qt was made for machine staging, not recipe staging, this showed in: + + QtBase make a configuration fil qconfig.pri that hardcodes paths to + PKG_CONFIG_SYSROOT_DIR and PKD_CONFIG_LIBDIR to qtbase directories. + + When DEPENDS on qtbase other modules gets these paths and fails to + do a proper pkg-config. + + Patch removes the hardcoding and enables the use of environment + variables for pkg-configs in Qt under OE-lite. + +--- a/configure 2015-04-10 23:58:35.234014208 +0200 ++++ b/configure 2015-04-10 23:56:55.214012074 +0200 +@@ -6265,10 +6265,10 @@ + fi + +-if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then +- echo "# pkgconfig" >> "$QTCONFIG.tmp" +- echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR" >> "$QTCONFIG.tmp" +- echo "PKG_CONFIG_LIBDIR = $PKG_CONFIG_LIBDIR" >> "$QTCONFIG.tmp" +- echo >> "$QTCONFIG.tmp" +-fi ++#if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then ++# echo "# pkgconfig" >> "$QTCONFIG.tmp" ++# echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR" >> "$QTCONFIG.tmp" ++# echo "PKG_CONFIG_LIBDIR = $PKG_CONFIG_LIBDIR" >> "$QTCONFIG.tmp" ++# echo >> "$QTCONFIG.tmp" ++#fi + + if [ -n "$CFG_SYSROOT" ] && [ "$CFG_GCC_SYSROOT" = "yes" ]; then diff --git a/recipes/qt5/qtbase_5.3.1.oe b/recipes/qt5/qtbase_5.3.1.oe index 0371735..db849fc 100644 --- a/recipes/qt5/qtbase_5.3.1.oe +++ b/recipes/qt5/qtbase_5.3.1.oe @@ -13,6 +13,7 @@ SRC_URI += "\ file://0010-Revert-Use-the-gcc-feature-in-simd.prf.patch \ file://0011-QOpenGLPaintDevice-sub-area-support.patch \ file://0011-qmake-don-t-build-it-in-configure-but-allow-to-build.patch \ + file://oe_lite_pkg_config.patch \ " SRC_URI += "file://qeglfshooks_imx5.cpp" From 13df48558d5b2b71e718c0cdf9448ef22822d2d7 Mon Sep 17 00:00:00 2001 From: Klaus Henning Sorensen Date: Tue, 2 Jun 2015 09:55:56 +0200 Subject: [PATCH 3/4] Add recipe for qtwebkit Signed-off-by: Klaus Henning Sorensen --- classes/qt5module.oeclass | 11 +++++++++++ recipes/qt5/qtbase.inc | 8 ++++++-- recipes/qt5/qtwebkit_5.3.1.oe | 22 ++++++++++++++++++++++ recipes/qt5/qtwebkit_5.3.1.oe.sig | 1 + 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 recipes/qt5/qtwebkit_5.3.1.oe create mode 100644 recipes/qt5/qtwebkit_5.3.1.oe.sig diff --git a/classes/qt5module.oeclass b/classes/qt5module.oeclass index 1e30872..135993e 100644 --- a/classes/qt5module.oeclass +++ b/classes/qt5module.oeclass @@ -4,6 +4,17 @@ inherit c++ make qmake5 pkgconfig +# Necessary exports for qmake +export OE_QMAKE_COMPILER +export OE_QMAKE_CC +export OE_QMAKE_CFLAGS +export OE_QMAKE_CXX +export OE_QMAKE_CXXFLAGS +export OE_QMAKE_LINK +export OE_QMAKE_LDFLAGS +export OE_QMAKE_AR +export OE_QMAKE_STRIP + OE_QMAKE_PATH_HOST_BINS = "${STAGE_DIR}/native/bin/" CLASS_DEPENDS += "\ qtbase-dev_${PV} zlib-dev libpthread \ diff --git a/recipes/qt5/qtbase.inc b/recipes/qt5/qtbase.inc index 3909038..8e50fc6 100644 --- a/recipes/qt5/qtbase.inc +++ b/recipes/qt5/qtbase.inc @@ -8,7 +8,6 @@ ## @useflag qttslib Enable tslib as touch input. Disabled by default. ## @useflag qtgstreamer Enable gstreamer. Disabled by default. ## @useflag qtwidgets Enable qtwidgets. Enabled by default. -## @useflag qtwebkit Enable webkit. Disabled by default. ## @useflag qtphonon Enable phonon. Disabled by default. ## @useflag qtdbus Enable dbus. Disabled by default. ## @useflag qtqmldebug Enable qtqmldebug. Disabled by default. @@ -36,13 +35,14 @@ LICENSE = "GFDL-1.3 & LGPL-2.1 & GPL-3.0" inherit c++ make pkgconfig RECIPE_FLAGS += "qtx11 qtdirectfb qttslib qtgstreamer \ - qtwidgets qtwebkit qtphonon qtdbus qtqmldebug \ + qtwidgets qtphonon qtdbus qtqmldebug \ qtopengl \ qtopengl_egl_flags qtopengl_flags \ qtopengl_qt_flags qtopengl_es1_flags \ qtopengl_es2_flags qtopengl_openvg_flags \ qtopengl_hooks_file \ qtmtdev \ + qticu \ " require qt5.inc @@ -60,6 +60,8 @@ DEPENDS += "native:qmake5_${PV} freetype jpeg libpng zlib openssl fontconfig \ glib libpthread libm libdl librt libgcc libgio libglib libgthread \ libstdc++" +DEPENDS:>USE_qticu += " libicudata-dev libicui18n-dev libicuuc-dev" + ################################## ### RDEPENDS ################################## @@ -68,6 +70,8 @@ RDEPENDS_${PN} += "freetype libjpeg libpng libz openssl glib fontconfig-utils \ libpthread libm libdl librt libgcc libgio libglib libgthread \ libstdc++" +RDEPENDS_${PN}:>USE_qticu += " libicudata libicui18n libicuuc" + RDEPENDS_${PN}-dev += "libxml2-dev" ################################## diff --git a/recipes/qt5/qtwebkit_5.3.1.oe b/recipes/qt5/qtwebkit_5.3.1.oe new file mode 100644 index 0000000..92cd178 --- /dev/null +++ b/recipes/qt5/qtwebkit_5.3.1.oe @@ -0,0 +1,22 @@ +## Recipe for building the Qt5 module QtWebkit +## +## Qt5 Module for building qtwebkit. + +LICENSE = "GFDL-1.3 & LGPL-2.1 & GPL-3.0" + +inherit qt5module +require qt5-${PV}.inc +require qt5.inc + +DEPENDS += " qtquick1-dev" +DEPENDS += " libsqlite3-dev" +DEPENDS += " libicudata-dev libicui18n-dev libicuuc-dev" +DEPENDS += " libjpeg-dev" +DEPENDS += " fontconfig" + +RDEPENDS += " qtquick1" +RDEPENDS += " sqlite3" +RDEPENDS += " libicudata libicui18n libicuuc" +RDEPENDS += " libjpeg" +RDEPENDS += " fontconfig" + diff --git a/recipes/qt5/qtwebkit_5.3.1.oe.sig b/recipes/qt5/qtwebkit_5.3.1.oe.sig new file mode 100644 index 0000000..b210f6a --- /dev/null +++ b/recipes/qt5/qtwebkit_5.3.1.oe.sig @@ -0,0 +1 @@ +70d42197b81a19980916f2175189dc626bdfa0eb qtwebkit-opensource-src-5.3.1.tar.xz From 0ac760fe4f377a43e33ba242ff7903ddb390355e Mon Sep 17 00:00:00 2001 From: Klaus Henning Sorensen Date: Mon, 5 Oct 2015 11:23:02 +0200 Subject: [PATCH 4/4] Add patch to make javascript work on 32 bit powerpc Taken from commit 0c58a486f551e7e7b63d438e3d32f21f876327d1 in trolltech qtwebkit repository. Fixed in qt-5.4. Signed-off-by: Klaus Henning Sorensen --- .../32bit_bigendian_offset_fix.patch | 117 ++++++++++++++++++ recipes/qt5/qtwebkit_5.3.1.oe | 4 + 2 files changed, 121 insertions(+) create mode 100644 recipes/qt5/qtwebkit-5.3.1/32bit_bigendian_offset_fix.patch diff --git a/recipes/qt5/qtwebkit-5.3.1/32bit_bigendian_offset_fix.patch b/recipes/qt5/qtwebkit-5.3.1/32bit_bigendian_offset_fix.patch new file mode 100644 index 0000000..9a51b6d --- /dev/null +++ b/recipes/qt5/qtwebkit-5.3.1/32bit_bigendian_offset_fix.patch @@ -0,0 +1,117 @@ +diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm +index 2b5a23c..c4d86ee 100644 +--- a/Source/JavaScriptCore/llint/LowLevelInterpreter.asm ++++ b/Source/JavaScriptCore/llint/LowLevelInterpreter.asm +@@ -87,6 +87,12 @@ else + const PayloadOffset = 0 + end + ++if JSVALUE64 ++ const JSCellPayloadOffset = 0 ++else ++ const JSCellPayloadOffset = PayloadOffset ++end ++ + # Constant for reasoning about butterflies. + const IsArray = 1 + const IndexingShapeMask = 30 +@@ -161,7 +167,6 @@ else + const VectorSizeOffset = 8 + end + +- + # Some common utilities. + macro crash() + if C_LOOP +@@ -267,13 +272,13 @@ macro assertNotConstant(index) + end + + macro functionForCallCodeBlockGetter(targetRegister) +- loadp Callee[cfr], targetRegister ++ loadp Callee + JSCellPayloadOffset[cfr], targetRegister + loadp JSFunction::m_executable[targetRegister], targetRegister + loadp FunctionExecutable::m_codeBlockForCall[targetRegister], targetRegister + end + + macro functionForConstructCodeBlockGetter(targetRegister) +- loadp Callee[cfr], targetRegister ++ loadp Callee + JSCellPayloadOffset[cfr], targetRegister + loadp JSFunction::m_executable[targetRegister], targetRegister + loadp FunctionExecutable::m_codeBlockForConstruct[targetRegister], targetRegister + end +@@ -671,7 +676,7 @@ _llint_op_resolve_global_var: + macro resolveScopedVarBody(resolveOperations) + # First ResolveOperation is to skip scope chain nodes + getScope(macro(dest) +- loadp ScopeChain + PayloadOffset[cfr], dest ++ loadp ScopeChain + JSCellPayloadOffset[cfr], dest + end, + ResolveOperation::m_scopesToSkip[resolveOperations], t1, t2) + loadp JSVariableObject::m_registers[t1], t1 # t1 now contains the activation registers +@@ -696,7 +701,7 @@ _llint_op_resolve_scoped_var_on_top_scope: + loadisFromInstruction(1, t3) + + # We know we want the top scope chain entry +- loadp ScopeChain + PayloadOffset[cfr], t1 ++ loadp ScopeChain + JSCellPayloadOffset[cfr], t1 + loadp JSVariableObject::m_registers[t1], t1 # t1 now contains the activation registers + + # Second ResolveOperation tells us what offset to use +@@ -718,7 +723,7 @@ _llint_op_resolve_scoped_var_with_top_scope_check: + loadp JSScope::m_next[t1], dest + jmp .done + .scopeChainNotCreated: +- loadp ScopeChain + PayloadOffset[cfr], dest ++ loadp ScopeChain + JSCellPayloadOffset[cfr], dest + .done: + end, + # Second ResolveOperation tells us how many more nodes to skip +@@ -773,7 +778,7 @@ _llint_op_resolve_base_to_scope: + getResolveOperation(4, t0) + # First ResolveOperation is to skip scope chain nodes + getScope(macro(dest) +- loadp ScopeChain + PayloadOffset[cfr], dest ++ loadp ScopeChain + JSCellPayloadOffset[cfr], dest + end, + ResolveOperation::m_scopesToSkip[t0], t1, t2) + loadisFromInstruction(1, t3) +@@ -798,7 +803,7 @@ _llint_op_resolve_base_to_scope_with_top_scope_check: + loadp JSScope::m_next[t1], dest + jmp .done + .scopeChainNotCreated: +- loadp ScopeChain + PayloadOffset[cfr], dest ++ loadp ScopeChain + JSCellPayloadOffset[cfr], dest + .done: + end, + # Second ResolveOperation tells us how many more nodes to skip +@@ -823,7 +828,7 @@ macro interpretResolveWithBase(opcodeLength, slowPath) + getResolveOperation(4, t0) + btpz t0, .slowPath + +- loadp ScopeChain[cfr], t3 ++ loadp ScopeChain + JSCellPayloadOffset[cfr], t3 + # Get the base + loadis ResolveOperation::m_operation[t0], t2 + +@@ -845,7 +850,7 @@ macro interpretResolveWithBase(opcodeLength, slowPath) + loadp JSScope::m_next[t1], dest + jmp .done + .scopeChainNotCreated: +- loadp ScopeChain + PayloadOffset[cfr], dest ++ loadp ScopeChain + JSCellPayloadOffset[cfr], dest + .done: + end, + sizeof ResolveOperation + ResolveOperation::m_scopesToSkip[t0], t1, t2) +diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm +index 89e40c7..87aa09e 100644 +--- a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm ++++ b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm +@@ -1692,7 +1692,7 @@ _llint_op_next_pname: + loadi 20[PC], t2 + loadi PayloadOffset[cfr, t2, 8], t2 + loadp JSPropertyNameIterator::m_jsStrings[t2], t3 +- loadi [t3, t0, 8], t3 ++ loadi PayloadOffset[t3, t0, 8], t3 + addi 1, t0 + storei t0, PayloadOffset[cfr, t1, 8] + loadi 4[PC], t1 diff --git a/recipes/qt5/qtwebkit_5.3.1.oe b/recipes/qt5/qtwebkit_5.3.1.oe index 92cd178..bbbe249 100644 --- a/recipes/qt5/qtwebkit_5.3.1.oe +++ b/recipes/qt5/qtwebkit_5.3.1.oe @@ -20,3 +20,7 @@ RDEPENDS += " libicudata libicui18n libicuuc" RDEPENDS += " libjpeg" RDEPENDS += " fontconfig" +SRC_URI += "\ + file://32bit_bigendian_offset_fix.patch \ +" +