Skip to contentSkip to conversation

qt5webkit: restore package

PATCH New Gary Bisson 3 participants 6 messages Mar 29, 2016 – Mar 30, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qt5webkit: restore package

Although this package has been removed from the official release packages since Qt5.6.0, it is still available for users to build it from source. This is useful for platforms without GPU since its successor (QtWebEngine) requires OpenGL support.

The package now matches the community-based meta-qt5 Yocto layer, using the exact same revision of the qtwebkit source from github:
https://github.com/meta-qt5/meta-qt5/commit/e434995a

Here is the project source tree:
https://github.com/qtproject/qtwebkit

All the patches have been pulled from Yocto as well.

Since we are now using the source from the git repository, we need to create an empty .git/ folder to force the headers re-generation.
https://github.com/meta-qt5/meta-qt5/blob/jethro/recipes-qt/qt5/qt5.inc#L33

Note that GPLv3 license option has been added with this release.

---
Hi all,

Since I've had to pull this package back for Qt5.6 I thought I'd share although I'm not sure you want it since you just removed it.

Julien, I've used the github repo instead of the code.qt.io repo that you suggested in order to match exactly the meta-qt5 layer.
http://lists.busybox.net/pipermail/buildroot/2016-March/156824.html

At first the build failed because of the headers generation which requires to add a .git/ folder as explained in the log.

Tested on i.MX6Q Nitrogen6x platform.

Regards,
Gary

---
 Config.in.legacy                                   |  7 --
 package/qt5/Config.in                              |  1 +
 .../0001-qtwebkit-fix-QA-issue-bad-RPATH.patch     | 30 ++++++++
 .../qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch | 79 ++++++++++++++++++++++
 ...ude-backtrace-API-for-non-glibc-libraries.patch | 38 +++++++++++
 .../0004-Fix-linking-with-libpthread.patch         | 33 +++++++++
 package/qt5/qt5webkit/Config.in                    | 24 +++++++
 package/qt5/qt5webkit/qt5webkit.hash               |  2 +
 package/qt5/qt5webkit/qt5webkit.mk                 | 58 ++++++++++++++++
 9 files changed, 265 insertions(+), 7 deletions(-)
 create mode 100644 package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch
 create mode 100644 package/qt5/qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch
 create mode 100644 package/qt5/qt5webkit/0003-Exclude-backtrace-API-for-non-glibc-libraries.patch
 create mode 100644 package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch
 create mode 100644 package/qt5/qt5webkit/Config.in
 create mode 100644 package/qt5/qt5webkit/qt5webkit.hash
 create mode 100644 package/qt5/qt5webkit/qt5webkit.mk
Config.in.legacy +0 -7
index 60702ce..6691c50 100644
@@ -152,13 +152,6 @@ config BR2_PACKAGE_QT5WEBKIT_EXAMPLES
 	  The qt5webkit-examples package has been removed, since it
 	  was removed from upstream starting from Qt 5.6.
 
-config BR2_PACKAGE_QT5WEBKIT
-	bool "qt5webkit package removed"
-	select BR2_LEGACY
-	help
-	  The qt5webkit package has been removed, since it was removed
-	  from upstream starting from Qt 5.6.
-
 config BR2_PACKAGE_QT5QUICK1
 	bool "qt5quick1 package removed"
 	select BR2_LEGACY
package/qt5/Config.in +1 -0
index f673daa..0c0e971 100644
@@ -49,4 +49,5 @@ source "package/qt5/qt5x11extras/Config.in"
 source "package/qt5/qt5xmlpatterns/Config.in"
 comment "legacy compatibility"
 source "package/qt5/qt5script/Config.in"
+source "package/qt5/qt5webkit/Config.in"
 endif
package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file +30 -0
new file mode 100644
index 0000000..e8b0e43
@@ -0,0 +1,30 @@
+From 1735a8484ef9ae336f8d607b56bda64c8af10c79 Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <[email protected]>
+Date: Fri, 7 Feb 2014 04:07:17 +0100
+Subject: [PATCH 1/3] qtwebkit: fix QA issue (bad RPATH)
+
+Building qtwebkit causes a QA issue such that QtWebPluginProcess and
+QtWebProcess contain bad RPATHs which point into the build location. This fix
+adds a patch to not include the rpath.prf which causes this problem.
+
+Signed-off-by: Trevor Woerner <[email protected]>
+Signed-off-by: Martin Jansa <[email protected]>
+---
+ Tools/qmake/mkspecs/features/unix/default_post.prf | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Tools/qmake/mkspecs/features/unix/default_post.prf b/Tools/qmake/mkspecs/features/unix/default_post.prf
+index fd66af6..ef754c3 100644
+--- a/Tools/qmake/mkspecs/features/unix/default_post.prf
++++ b/Tools/qmake/mkspecs/features/unix/default_post.prf
+@@ -61,7 +61,6 @@ linux-*g++* {
+     }
+ }
+ 
+-contains(TEMPLATE, app): CONFIG += rpath
+ 
+ CONFIG(debug, debug|release)|force_debug_info {
+     # Make ld not cache the symbol tables of input files in memory to avoid memory exhaustion during the linking phase.
+-- 
+2.7.0
+
package/qt5/qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch new file +79 -0

79 lines not on this page · raw message

package/qt5/qt5webkit/0003-Exclude-backtrace-API-for-non-glibc-libraries.patch new file +38 -0
new file mode 100644
index 0000000..4379866
@@ -0,0 +1,38 @@
+From 6c36f0ff8c1f5852c33d2b23714f9f187cc6ff26 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 5 Jun 2015 19:55:05 -0700
+Subject: [PATCH 3/3] Exclude backtrace() API for non-glibc libraries
+
+It was excluding musl with current checks, so lets make it such that it
+considers only glibc when using backtrace API
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ Source/WTF/wtf/Assertions.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp
+index 1b2091f..ba03a28 100644
+--- a/Source/WTF/wtf/Assertions.cpp
++++ b/Source/WTF/wtf/Assertions.cpp
+@@ -61,7 +61,7 @@
+ #include <windows.h>
+ #endif
+ 
+-#if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID)
++#if (OS(DARWIN) || (OS(LINUX) && defined (__GLIBC__) && !defined(__UCLIBC__))) && !OS(ANDROID)
+ #include <cxxabi.h>
+ #include <dlfcn.h>
+ #include <execinfo.h>
+@@ -245,7 +245,7 @@ void WTFReportArgumentAssertionFailure(const char* file, int line, const char* f
+ 
+ void WTFGetBacktrace(void** stack, int* size)
+ {
+-#if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID)
++#if (OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))) && !OS(ANDROID)
+     *size = backtrace(stack, *size);
+ #elif OS(WINDOWS) && !OS(WINCE)
+     // The CaptureStackBackTrace function is available in XP, but it is not defined
+-- 
+2.7.0
+
package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch new file +33 -0
new file mode 100644
index 0000000..c5e6ac5
@@ -0,0 +1,33 @@
+From 5dd4bb67cfce812fd7686e43616e2069f354a7df Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <[email protected]>
+Date: Mon, 22 Feb 2016 10:57:32 +0100
+Subject: [PATCH] Fix linking with libpthread
+
+WebKit use libpthread directly but is depending on other qt modules
+causing it to be linked against, which might break unless -lpthread
+is last. Instead just add it explicitly after the static libraries.
+
+Upstream-Status: Backport from 5.7 branch
+
+Change-Id: I2b95cff2c96373f8dce6f95052c4fccbe1982b33
+Reviewed-by: Simon Hausmann <[email protected]>
+Signed-off-by: Jonathan Liu <[email protected]>
+---
+ Tools/qmake/mkspecs/features/default_post.prf | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Tools/qmake/mkspecs/features/default_post.prf b/Tools/qmake/mkspecs/features/default_post.prf
+index 67276b7..39bb3f7 100644
+--- a/Tools/qmake/mkspecs/features/default_post.prf
++++ b/Tools/qmake/mkspecs/features/default_post.prf
+@@ -201,6 +201,7 @@ needToLink() {
+         linkAgainstLibrary($$library, $$eval(WEBKIT.$${library_identifier}.root_source_dir))
+         LIBS += $$eval(WEBKIT.$${library_identifier}.dependent_libs)
+     }
++    posix:!darwin: LIBS += -lpthread
+ }
+ 
+ creating_module {
+-- 
+2.7.1
+
package/qt5/qt5webkit/Config.in new file +24 -0
new file mode 100644
index 0000000..fb84b1e
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_QT5WEBKIT
+	bool "qt5webkit"
+	select BR2_PACKAGE_QT5BASE
+	select BR2_PACKAGE_QT5BASE_ICU
+	select BR2_PACKAGE_QT5BASE_GUI
+	select BR2_PACKAGE_SQLITE
+	select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_QT5BASE_XCB
+	select BR2_PACKAGE_XLIB_LIBXRENDER if BR2_PACKAGE_QT5BASE_XCB
+	# This module does not support static linking
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
+	depends on !BR2_BINFMT_FLAT # icu
+	help
+	  Qt is a cross-platform application and UI framework for
+	  developers using C++.
+
+	  This package corresponds to the qt5webkit module.
+
+	  This package has been removed from the official release packages
+	  since Qt5.6.0, but it is still available for users to build it
+	  from source. This is useful for platforms without GPU since the
+	  successor (QtWebEngine) requires OpenGL support.
+
+	  http://qt.io
package/qt5/qt5webkit/qt5webkit.hash new file +2 -0
new file mode 100644
index 0000000..d2ac7bb
@@ -0,0 +1,2 @@
+# locally computed
+sha256 1c79843ef32313312290d4fe0b87256a9129dc44d62b01789a692981edf4d8ab  qt5webkit-d2ff5a085572b1ee24dcb42ae107063f3142d14e.tar.gz
package/qt5/qt5webkit/qt5webkit.mk new file +58 -0

58 lines not on this page · raw message

Signature · 1 line
2.7.0
#1 lore raw

PATCH 1/1 qt5webkit: restore package

Hi Gary, All,

I was also working on that one but with a different strategy (i've just revert my previous commit and fix version of QtWebkit to 5.5.1). Since you already do the job to backport yocto integration I will stop mine ;)

Le 29/03/2016 14:48, Gary Bisson a ?crit :

Quoted 4 lines

Although this package has been removed from the official release packages since Qt5.6.0, it is still available for users to build it from source. This is useful for platforms without GPU since its successor (QtWebEngine) requires OpenGL support.

I'm agree with that. I did not realize that platform without GPU cannot do web-browsing anymore when i bumped Qt in 5.6.0 version.

Quoted 20 lines

The package now matches the community-based meta-qt5 Yocto layer, using the exact same revision of the qtwebkit source from github:
https://github.com/meta-qt5/meta-qt5/commit/e434995a

Here is the project source tree:
https://github.com/qtproject/qtwebkit

All the patches have been pulled from Yocto as well.

Since we are now using the source from the git repository, we need to create an empty .git/ folder to force the headers re-generation.
https://github.com/meta-qt5/meta-qt5/blob/jethro/recipes-qt/qt5/qt5.inc#L33

Note that GPLv3 license option has been added with this release.

---
Hi all,

Quoted 6 lines

Since I've had to pull this package back for Qt5.6 I thought I'd share although I'm not sure you want it since you just removed it.

Julien, I've used the github repo instead of the code.qt.io repo that you suggested in order to match exactly the meta-qt5 layer.
http://lists.busybox.net/pipermail/buildroot/2016-March/156824.html

You can use the exact same commit from official repository
http://code.qt.io/cgit/qt/qtwebkit.git/commit/?id=d2ff5a085572b1ee24dcb42ae107063f3142d14e
but I understand that code.qt.io do not have the sames Buildroot helper than github.

Quoted 50 lines

At first the build failed because of the headers generation which requires to add a .git/ folder as explained in the log.

Tested on i.MX6Q Nitrogen6x platform.

Regards,
Gary

---
  Config.in.legacy                                   |  7 --
  package/qt5/Config.in                              |  1 +
  .../0001-qtwebkit-fix-QA-issue-bad-RPATH.patch     | 30 ++++++++
  .../qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch | 79 ++++++++++++++++++++++
  ...ude-backtrace-API-for-non-glibc-libraries.patch | 38 +++++++++++
  .../0004-Fix-linking-with-libpthread.patch         | 33 +++++++++
  package/qt5/qt5webkit/Config.in                    | 24 +++++++
  package/qt5/qt5webkit/qt5webkit.hash               |  2 +
  package/qt5/qt5webkit/qt5webkit.mk                 | 58 ++++++++++++++++
  9 files changed, 265 insertions(+), 7 deletions(-)

create mode 100644 package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch create mode 100644 package/qt5/qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch create mode 100644 package/qt5/qt5webkit/0003-Exclude-backtrace-API-for-non-glibc-libraries.patch create mode 100644 package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch create mode 100644 package/qt5/qt5webkit/Config.in
create mode 100644 package/qt5/qt5webkit/qt5webkit.hash
create mode 100644 package/qt5/qt5webkit/qt5webkit.mk

Config.in.legacy +0 -7
index 60702ce..6691c50 100644
@@ -152,13 +152,6 @@ config BR2_PACKAGE_QT5WEBKIT_EXAMPLES
  	  The qt5webkit-examples package has been removed, since it
  	  was removed from upstream starting from Qt 5.6.
 
-config BR2_PACKAGE_QT5WEBKIT
-	bool "qt5webkit package removed"
-	select BR2_LEGACY
-	help
-	  The qt5webkit package has been removed, since it was removed
-	  from upstream starting from Qt 5.6.
-
  config BR2_PACKAGE_QT5QUICK1
  	bool "qt5quick1 package removed"
  	select BR2_LEGACY
package/qt5/Config.in +0 -0
index f673daa..0c0e971 100644

package/qt5/Config.in source "package/qt5/qt5x11extras/Config.in" · line 51

Quoted 3 lines
package/qt5/Config.in +0 -0
@@ -49,4 +49,5 @@ source "package/qt5/qt5x11extras/Config.in"
  source "package/qt5/qt5xmlpatterns/Config.in"
  comment "legacy compatibility"
  source "package/qt5/qt5script/Config.in"

You should probably add an "unsupported version" comment to differ from "legacy compatibility" which is still support by Qt community but tagged as deprecated.

Quoted 9 lines
package/qt5/Config.in +1 -0
+source "package/qt5/qt5webkit/Config.in"
  endif
package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file +1 -0
new file mode 100644
index 0000000..e8b0e43
@@ -0,0 +1,30 @@
+From 1735a8484ef9ae336f8d607b56bda64c8af10c79 Mon Sep 17 00:00:00 2001

package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch line 11

Quoted 10 lines
package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file +10 -0
+From: Trevor Woerner <[email protected]>
+Date: Fri, 7 Feb 2014 04:07:17 +0100
+Subject: [PATCH 1/3] qtwebkit: fix QA issue (bad RPATH)
+
+Building qtwebkit causes a QA issue such that QtWebPluginProcess and
+QtWebProcess contain bad RPATHs which point into the build location. This fix
+adds a patch to not include the rpath.prf which causes this problem.
+
+Signed-off-by: Trevor Woerner <[email protected]>
+Signed-off-by: Martin Jansa <[email protected]>

You should add your signed-off-by and maybe a Upstream-status if you find the information.

Quoted 38 lines
package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file +19 -0
+---
+ Tools/qmake/mkspecs/features/unix/default_post.prf | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Tools/qmake/mkspecs/features/unix/default_post.prf b/Tools/qmake/mkspecs/features/unix/default_post.prf
+index fd66af6..ef754c3 100644
+--- a/Tools/qmake/mkspecs/features/unix/default_post.prf
++++ b/Tools/qmake/mkspecs/features/unix/default_post.prf
+@@ -61,7 +61,6 @@ linux-*g++* {
+     }
+ }
+
+-contains(TEMPLATE, app): CONFIG += rpath
+
+ CONFIG(debug, debug|release)|force_debug_info {
+     # Make ld not cache the symbol tables of input files in memory to avoid memory exhaustion during the linking phase.
+--
+2.7.0
+
package/qt5/qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch new file +13 -0
new file mode 100644
index 0000000..b3a8615
@@ -0,0 +1,79 @@
+From ae16ce17cc7060274a0b0c165b953fc32540f977 Mon Sep 17 00:00:00 2001
+From: Magnus Granberg <[email protected]>
+Date: Fri, 27 Feb 2015 11:55:09 +0100
+Subject: [PATCH 2/3] Remove TEXTREL tag in x86
+
+Fix textrel QA warnings when building qtwebkit for x86:
+
+  WARNING: QA Issue: ELF binary '/home/andre/rdk/rdk-master/build-vbox32/tmp/work/core2-32-rdk-linux/qtwebkit/5.4.0-r0/packages-split/qtwebkit/usr/lib/libQt5WebKit.so.5.4.0' has relocations in .text [textrel]
+
+Patch from upstream webkit:
+
+  https://bugs.webkit.org/show_bug.cgi?id=70610
+

package/qt5/qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch line 23

Quoted 10 lines
package/qt5/qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch new file +10 -0
+Minor refresh required to apply cleanly to the older webkit sources used
+by qtwebkit. Specifically, the patch needed to be modified to account
+for PLATFORM(MAC) -> OS(DARWIN) renaming in recent webkit which is not
+part of qtwebkit yet ( https://bugs.webkit.org/show_bug.cgi?id=99683 ).
+
+Upstream status [webkit] : backport
+Upstream status [qtwebkit] : unclear
+
+Bug: https://bugs.webkit.org/show_bug.cgi?id=70610
+Signed-off-by: Martin Jansa <[email protected]>

You should add your signed-off-by

Quoted 62 lines
package/qt5/qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch new file +56 -0
+---
+ Source/JavaScriptCore/jit/ThunkGenerators.cpp | 24 ++++++++++++++++++++++++
+ Source/WTF/wtf/InlineASM.h                    |  2 ++
+ 2 files changed, 26 insertions(+)
+
+diff --git a/Source/JavaScriptCore/jit/ThunkGenerators.cpp b/Source/JavaScriptCore/jit/ThunkGenerators.cpp
+index 9684df2..8af82d8 100644
+--- a/Source/JavaScriptCore/jit/ThunkGenerators.cpp
++++ b/Source/JavaScriptCore/jit/ThunkGenerators.cpp
+@@ -524,6 +524,30 @@ double jsRound(double d)
+     } \
+     static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk;
+
++#elif CPU(X86) && COMPILER(GCC) && OS(LINUX) && defined(__PIC__)
++#define defineUnaryDoubleOpWrapper(function) \
++    asm( \
++        ".text\n" \
++        ".globl " SYMBOL_STRING(function##Thunk) "\n" \
++        HIDE_SYMBOL(function##Thunk) "\n" \
++        SYMBOL_STRING(function##Thunk) ":" "\n" \
++        "pushl %ebx\n" \
++        "subl $20, %esp\n" \
++        "movsd %xmm0, (%esp) \n" \
++        "call __x86.get_pc_thunk.bx\n" \
++        "addl $_GLOBAL_OFFSET_TABLE_, %ebx\n" \
++        "call " GLOBAL_REFERENCE(function) "\n" \
++        "fstpl (%esp) \n" \
++        "movsd (%esp), %xmm0 \n" \
++        "addl $20, %esp\n" \
++        "popl %ebx\n" \
++        "ret\n" \
++    );\
++    extern "C" { \
++        MathThunkCallingConvention function##Thunk(MathThunkCallingConvention); \
++    } \
++    static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk;
++
+ #elif CPU(X86) && COMPILER(GCC) && (PLATFORM(MAC) || OS(LINUX))
+ #define defineUnaryDoubleOpWrapper(function) \
+     asm( \
+diff --git a/Source/WTF/wtf/InlineASM.h b/Source/WTF/wtf/InlineASM.h
+index 0a2fe78..2dc40ef 100644
+--- a/Source/WTF/wtf/InlineASM.h
++++ b/Source/WTF/wtf/InlineASM.h
+@@ -46,6 +46,8 @@
+ #define GLOBAL_REFERENCE(name) #name "@plt"
+ #elif CPU(X86) && COMPILER(MINGW)
+ #define GLOBAL_REFERENCE(name) "@" #name "@4"
++#elif OS(LINUX) && CPU(X86) && defined(__PIC__)
++#define GLOBAL_REFERENCE(name) SYMBOL_STRING(name) "@plt"
+ #else
+ #define GLOBAL_REFERENCE(name) SYMBOL_STRING(name)
+ #endif
+--
+2.7.0
+
package/qt5/qt5webkit/0003-Exclude-backtrace-API-for-non-glibc-libraries.patch new file +0 -0
new file mode 100644
index 0000000..4379866

package/qt5/qt5webkit/0003-Exclude-backtrace-API-for-non-glibc-libraries.patch line 9

Quoted 9 lines
package/qt5/qt5webkit/0003-Exclude-backtrace-API-for-non-glibc-libraries.patch new file +9 -0
@@ -0,0 +1,38 @@
+From 6c36f0ff8c1f5852c33d2b23714f9f187cc6ff26 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Fri, 5 Jun 2015 19:55:05 -0700
+Subject: [PATCH 3/3] Exclude backtrace() API for non-glibc libraries
+
+It was excluding musl with current checks, so lets make it such that it
+considers only glibc when using backtrace API
+
+Signed-off-by: Khem Raj <[email protected]>

You should add your signed-off-by and maybe a Upstream-status if you find the information.

Quoted 39 lines
package/qt5/qt5webkit/0003-Exclude-backtrace-API-for-non-glibc-libraries.patch new file +29 -0
+---
+ Source/WTF/wtf/Assertions.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp
+index 1b2091f..ba03a28 100644
+--- a/Source/WTF/wtf/Assertions.cpp
++++ b/Source/WTF/wtf/Assertions.cpp
+@@ -61,7 +61,7 @@
+ #include <windows.h>
+ #endif
+
+-#if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID)
++#if (OS(DARWIN) || (OS(LINUX) && defined (__GLIBC__) && !defined(__UCLIBC__))) && !OS(ANDROID)
+ #include <cxxabi.h>
+ #include <dlfcn.h>
+ #include <execinfo.h>
+@@ -245,7 +245,7 @@ void WTFReportArgumentAssertionFailure(const char* file, int line, const char* f
+
+ void WTFGetBacktrace(void** stack, int* size)
+ {
+-#if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID)
++#if (OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))) && !OS(ANDROID)
+     *size = backtrace(stack, *size);
+ #elif OS(WINDOWS) && !OS(WINCE)
+     // The CaptureStackBackTrace function is available in XP, but it is not defined
+--
+2.7.0
+
package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch new file +4 -0
new file mode 100644
index 0000000..c5e6ac5
@@ -0,0 +1,33 @@
+From 5dd4bb67cfce812fd7686e43616e2069f354a7df Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <[email protected]>
+Date: Mon, 22 Feb 2016 10:57:32 +0100
+Subject: [PATCH] Fix linking with libpthread

package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch line 14

Quoted 10 lines
package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch new file +10 -0
+
+WebKit use libpthread directly but is depending on other qt modules
+causing it to be linked against, which might break unless -lpthread
+is last. Instead just add it explicitly after the static libraries.
+
+Upstream-Status: Backport from 5.7 branch
+
+Change-Id: I2b95cff2c96373f8dce6f95052c4fccbe1982b33
+Reviewed-by: Simon Hausmann <[email protected]>
+Signed-off-by: Jonathan Liu <[email protected]>

You should add your signed-off-by

Quoted 85 lines
package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch new file +19 -0
+---
+ Tools/qmake/mkspecs/features/default_post.prf | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Tools/qmake/mkspecs/features/default_post.prf b/Tools/qmake/mkspecs/features/default_post.prf
+index 67276b7..39bb3f7 100644
+--- a/Tools/qmake/mkspecs/features/default_post.prf
++++ b/Tools/qmake/mkspecs/features/default_post.prf
+@@ -201,6 +201,7 @@ needToLink() {
+         linkAgainstLibrary($$library, $$eval(WEBKIT.$${library_identifier}.root_source_dir))
+         LIBS += $$eval(WEBKIT.$${library_identifier}.dependent_libs)
+     }
++    posix:!darwin: LIBS += -lpthread
+ }
+
+ creating_module {
+--
+2.7.1
+
package/qt5/qt5webkit/Config.in new file +24 -0
new file mode 100644
index 0000000..fb84b1e
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_QT5WEBKIT
+	bool "qt5webkit"
+	select BR2_PACKAGE_QT5BASE
+	select BR2_PACKAGE_QT5BASE_ICU
+	select BR2_PACKAGE_QT5BASE_GUI
+	select BR2_PACKAGE_SQLITE
+	select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_QT5BASE_XCB
+	select BR2_PACKAGE_XLIB_LIBXRENDER if BR2_PACKAGE_QT5BASE_XCB
+	# This module does not support static linking
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
+	depends on !BR2_BINFMT_FLAT # icu
+	help
+	  Qt is a cross-platform application and UI framework for
+	  developers using C++.
+
+	  This package corresponds to the qt5webkit module.
+
+	  This package has been removed from the official release packages
+	  since Qt5.6.0, but it is still available for users to build it
+	  from source. This is useful for platforms without GPU since the
+	  successor (QtWebEngine) requires OpenGL support.
+
+	  http://qt.io
package/qt5/qt5webkit/qt5webkit.hash new file +2 -0
new file mode 100644
index 0000000..d2ac7bb
@@ -0,0 +1,2 @@
+# locally computed
+sha256 1c79843ef32313312290d4fe0b87256a9129dc44d62b01789a692981edf4d8ab  qt5webkit-d2ff5a085572b1ee24dcb42ae107063f3142d14e.tar.gz
package/qt5/qt5webkit/qt5webkit.mk new file +22 -0
new file mode 100644
index 0000000..7bcad91
@@ -0,0 +1,58 @@
+################################################################################
+#
+# qt5webkit
+#
+################################################################################
+
+QT5WEBKIT_VERSION = d2ff5a085572b1ee24dcb42ae107063f3142d14e
+QT5WEBKIT_SITE = $(call github,qtproject,qtwebkit,$(QT5WEBKIT_VERSION))
+QT5WEBKIT_DEPENDENCIES = qt5base sqlite host-ruby host-gperf host-bison host-flex
+QT5WEBKIT_INSTALL_STAGING = YES
+
+QT5WEBKIT_LICENSE_FILES = Source/WebCore/LICENSE-LGPL-2 Source/WebCore/LICENSE-LGPL-2.1
+
+ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y)
+QT5WEBKIT_LICENSE = LGPLv2+ (WebCore), LGPLv2.1 with exception or LGPLv3 or GPLv2 or GPLv3
+# Source files contain references to LGPL_EXCEPTION.txt but it is not included
+# in the archive.
+QT5WEBKIT_LICENSE_FILES += LICENSE.LGPLv21 LICENSE.LGPLv3 LICENSE.GPLv2 LICENSE.GPLv3
+else
+QT5WEBKIT_LICENSE = LGPLv2+ (WebCore), Commercial license
+QT5WEBKIT_REDISTRIBUTE = NO
+endif

package/qt5/qt5webkit/qt5webkit.mk line 32

Quoted 10 lines
package/qt5/qt5webkit/qt5webkit.mk new file +10 -0
+
+ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
+QT5WEBKIT_DEPENDENCIES += xlib_libXext xlib_libXrender
+endif
+
+ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
+QT5WEBKIT_DEPENDENCIES += qt5declarative
+endif
+
+define QT5WEBKIT_CONFIGURE_CMDS

You should add a comment to describe the reason to create .git folder.

package/qt5/qt5webkit/qt5webkit.mk line 33

Quoted 1 line
package/qt5/qt5webkit/qt5webkit.mk new file +1 -0
+	mkdir -p $(@D)/.git || true

is || true really needed?

Quoted 16 lines
package/qt5/qt5webkit/qt5webkit.mk new file +15 -0
+	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake)
+endef
+
+define QT5WEBKIT_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define QT5WEBKIT_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
+	$(QT5_LA_PRL_FILES_FIXUP)
+endef
+
+ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
+define QT5WEBKIT_INSTALL_TARGET_QMLS
+	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebKit $(TARGET_DIR)/usr/qml/

package/qt5/qt5webkit/qt5webkit.mk line 58

Quoted 10 lines
package/qt5/qt5webkit/qt5webkit.mk new file +10 -0
+endef
+endif
+
+define QT5WEBKIT_INSTALL_TARGET_CMDS
+	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebKit*.so.* $(TARGET_DIR)/usr/lib
+	cp -dpf $(@D)/bin/* $(TARGET_DIR)/usr/bin/
+	$(QT5WEBKIT_INSTALL_TARGET_QMLS)
+endef
+
+$(eval $(generic-package))

Regards,

Julien Corjon

#2 lore raw

PATCH 1/1 qt5webkit: restore package

Julien, All,

Quoted 6 lines · Julien CORJON

Hi Gary, All,

I was also working on that one but with a different strategy (i've just revert my previous commit and fix version of QtWebkit to 5.5.1). Since you already do the job to backport yocto integration I will stop mine ;)

I didn't know you were working on it. I just really need this package for several projects which explains why I did it fast.

Quoted 8 lines

Le 29/03/2016 14:48, Gary Bisson a ?crit :

Quoted 4 lines

Although this package has been removed from the official release packages since Qt5.6.0, it is still available for users to build it from source. This is useful for platforms without GPU since its successor (QtWebEngine) requires OpenGL support.

I'm agree with that. I did not realize that platform without GPU cannot do web-browsing anymore when i bumped Qt in 5.6.0 version.

Plus the fact that QtWebEngine isn't part of Buildroot yet.

Quoted 22 lines
Quoted 22 lines

The package now matches the community-based meta-qt5 Yocto layer, using the exact same revision of the qtwebkit source from github:
https://github.com/meta-qt5/meta-qt5/commit/e434995a

Here is the project source tree:
https://github.com/qtproject/qtwebkit

All the patches have been pulled from Yocto as well.

Since we are now using the source from the git repository, we need to create an empty .git/ folder to force the headers re-generation.
https://github.com/meta-qt5/meta-qt5/blob/jethro/recipes-qt/qt5/qt5.inc#L33

Note that GPLv3 license option has been added with this release.

---
Hi all,

Since I've had to pull this package back for Qt5.6 I thought I'd share although I'm not sure you want it since you just removed it.

Quoted 8 lines
Quoted 3 lines

Julien, I've used the github repo instead of the code.qt.io repo that you suggested in order to match exactly the meta-qt5 layer.
http://lists.busybox.net/pipermail/buildroot/2016-March/156824.html

You can use the exact same commit from official repository
http://code.qt.io/cgit/qt/qtwebkit.git/commit/?id=d2ff5a085572b1ee24dcb42ae107063f3142d14e
but I understand that code.qt.io do not have the sames Buildroot helper than github.

Yes but I really wanted to do the same as Yocto, since they are using the github repo, so do I.
https://github.com/meta-qt5/meta-qt5/blob/master/conf/layer.conf#L30

Quoted 48 lines
Quoted 48 lines

At first the build failed because of the headers generation which requires to add a .git/ folder as explained in the log.

Tested on i.MX6Q Nitrogen6x platform.

Regards,
Gary

---
  Config.in.legacy                                   |  7 --
  package/qt5/Config.in                              |  1 +
  .../0001-qtwebkit-fix-QA-issue-bad-RPATH.patch     | 30 ++++++++
  .../qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch | 79 ++++++++++++++++++++++
  ...ude-backtrace-API-for-non-glibc-libraries.patch | 38 +++++++++++
  .../0004-Fix-linking-with-libpthread.patch         | 33 +++++++++
  package/qt5/qt5webkit/Config.in                    | 24 +++++++
  package/qt5/qt5webkit/qt5webkit.hash               |  2 +
  package/qt5/qt5webkit/qt5webkit.mk                 | 58 ++++++++++++++++
  9 files changed, 265 insertions(+), 7 deletions(-)

create mode 100644 package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch create mode 100644 package/qt5/qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch create mode 100644 package/qt5/qt5webkit/0003-Exclude-backtrace-API-for-non-glibc-libraries.patch create mode 100644 package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch create mode 100644 package/qt5/qt5webkit/Config.in
create mode 100644 package/qt5/qt5webkit/qt5webkit.hash
create mode 100644 package/qt5/qt5webkit/qt5webkit.mk

Config.in.legacy +0 -7
index 60702ce..6691c50 100644
@@ -152,13 +152,6 @@ config BR2_PACKAGE_QT5WEBKIT_EXAMPLES
        The qt5webkit-examples package has been removed, since it
        was removed from upstream starting from Qt 5.6.
 
-config BR2_PACKAGE_QT5WEBKIT
-     bool "qt5webkit package removed"
-     select BR2_LEGACY
-     help
-       The qt5webkit package has been removed, since it was removed
-       from upstream starting from Qt 5.6.
-
  config BR2_PACKAGE_QT5QUICK1
      bool "qt5quick1 package removed"
      select BR2_LEGACY
package/qt5/Config.in +0 -0
index f673daa..0c0e971 100644
Quoted 8 lines

package/qt5/Config.in source "package/qt5/qt5x11extras/Config.in" · line 51

Quoted 4 lines
package/qt5/Config.in +0 -0
@@ -49,4 +49,5 @@ source "package/qt5/qt5x11extras/Config.in"
  source "package/qt5/qt5xmlpatterns/Config.in"
  comment "legacy compatibility"
  source "package/qt5/qt5script/Config.in"

You should probably add an "unsupported version" comment to differ from "legacy compatibility" which is still support by Qt community but tagged as deprecated.

Yes I wasn't sure about that actually, "unsupported packages" might be better. Anyone else has a suggestions on the comment name? I've let legacy for now since it is still true.

Quoted 14 lines
Quoted 14 lines
package/qt5/Config.in +1 -0
+source "package/qt5/qt5webkit/Config.in"
  endif
package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file +6 -0
new file mode 100644
index 0000000..e8b0e43
@@ -0,0 +1,30 @@
+From 1735a8484ef9ae336f8d607b56bda64c8af10c79 Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <[email protected]>
+Date: Fri, 7 Feb 2014 04:07:17 +0100
+Subject: [PATCH 1/3] qtwebkit: fix QA issue (bad RPATH)
+
+Building qtwebkit causes a QA issue such that QtWebPluginProcess and
Quoted 8 lines

package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch line 11

Quoted 5 lines
package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file +5 -0
+QtWebProcess contain bad RPATHs which point into the build location. This fix
+adds a patch to not include the rpath.prf which causes this problem.
+
+Signed-off-by: Trevor Woerner <[email protected]>
+Signed-off-by: Martin Jansa <[email protected]>

You should add your signed-off-by and maybe a Upstream-status if you find the information.

Not sure I should, I've done absolutely nothing in regard to that patch apart from a 'cp' command from the Yocto layer to Buildroot.

As for the upstream status I can try to find out.

Quoted 8 lines

package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch

Quoted 6 lines

<snip>

package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file +5 -0
+ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
+QT5WEBKIT_DEPENDENCIES += qt5declarative
+endif
+
+define QT5WEBKIT_CONFIGURE_CMDS

You should add a comment to describe the reason to create .git folder.

Yes you are right, I will, especially since I hated wasting time building the packages x number of times because of a missing folder.

Quoted 3 lines
Quoted 1 line

+ mkdir -p $(@D)/.git || true

is || true really needed?

No you're right it is useless. In the case of Yocto, this is the last do_configure_prepend command so I guess they just want to make sure to return a good value even if the folder already exists.

I'll submit a V2 once we've decided the comment name for this package.

Thanks for you review.

Regards,
Gary

#3 lore raw

PATCH 1/1 qt5webkit: restore package

Gary,

Le 29/03/2016 16:18, Gary Bisson a ?crit :

Quoted 4 lines

Julien, All,

Quoted 1 line · Julien CORJON
Quoted 8 lines
Quoted 5 lines

Hi Gary, All,

I was also working on that one but with a different strategy (i've just revert my previous commit and fix version of QtWebkit to 5.5.1). Since you already do the job to backport yocto integration I will stop mine ;)

I didn't know you were working on it. I just really need this package for several projects which explains why I did it fast.

And your job is better than mine so at the end that's good for Buildroot ;)

Quoted 11 lines
Quoted 9 lines

Le 29/03/2016 14:48, Gary Bisson a ?crit :

Quoted 4 lines

Although this package has been removed from the official release packages since Qt5.6.0, it is still available for users to build it from source. This is useful for platforms without GPU since its successor (QtWebEngine) requires OpenGL support.

I'm agree with that. I did not realize that platform without GPU cannot do web-browsing anymore when i bumped Qt in 5.6.0 version.

Plus the fact that QtWebEngine isn't part of Buildroot yet.

Currently working (also) on QtWebEngine but it is not a tricky one with a lot of "depends on" and take almost an hour to be built...

Quoted 93 lines
Quoted 23 lines
Quoted 23 lines

The package now matches the community-based meta-qt5 Yocto layer, using the exact same revision of the qtwebkit source from github:
https://github.com/meta-qt5/meta-qt5/commit/e434995a

Here is the project source tree:
https://github.com/qtproject/qtwebkit

All the patches have been pulled from Yocto as well.

Since we are now using the source from the git repository, we need to create an empty .git/ folder to force the headers re-generation.
https://github.com/meta-qt5/meta-qt5/blob/jethro/recipes-qt/qt5/qt5.inc#L33

Note that GPLv3 license option has been added with this release.

---
Hi all,

Since I've had to pull this package back for Qt5.6 I thought I'd share although I'm not sure you want it since you just removed it.

Quoted 8 lines
Quoted 3 lines

Julien, I've used the github repo instead of the code.qt.io repo that you suggested in order to match exactly the meta-qt5 layer.
http://lists.busybox.net/pipermail/buildroot/2016-March/156824.html

You can use the exact same commit from official repository
http://code.qt.io/cgit/qt/qtwebkit.git/commit/?id=d2ff5a085572b1ee24dcb42ae107063f3142d14e
but I understand that code.qt.io do not have the sames Buildroot helper than github.

Yes but I really wanted to do the same as Yocto, since they are using the github repo, so do I.
https://github.com/meta-qt5/meta-qt5/blob/master/conf/layer.conf#L30

Quoted 48 lines
Quoted 48 lines

At first the build failed because of the headers generation which requires to add a .git/ folder as explained in the log.

Tested on i.MX6Q Nitrogen6x platform.

Regards,
Gary

---
   Config.in.legacy                                   |  7 --
   package/qt5/Config.in                              |  1 +
   .../0001-qtwebkit-fix-QA-issue-bad-RPATH.patch     | 30 ++++++++
   .../qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch | 79 ++++++++++++++++++++++
   ...ude-backtrace-API-for-non-glibc-libraries.patch | 38 +++++++++++
   .../0004-Fix-linking-with-libpthread.patch         | 33 +++++++++
   package/qt5/qt5webkit/Config.in                    | 24 +++++++
   package/qt5/qt5webkit/qt5webkit.hash               |  2 +
   package/qt5/qt5webkit/qt5webkit.mk                 | 58 ++++++++++++++++
   9 files changed, 265 insertions(+), 7 deletions(-)

create mode 100644 package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch create mode 100644 package/qt5/qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch create mode 100644 package/qt5/qt5webkit/0003-Exclude-backtrace-API-for-non-glibc-libraries.patch create mode 100644 package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch create mode 100644 package/qt5/qt5webkit/Config.in
create mode 100644 package/qt5/qt5webkit/qt5webkit.hash
create mode 100644 package/qt5/qt5webkit/qt5webkit.mk

Config.in.legacy +0 -7
index 60702ce..6691c50 100644
@@ -152,13 +152,6 @@ config BR2_PACKAGE_QT5WEBKIT_EXAMPLES
         The qt5webkit-examples package has been removed, since it
         was removed from upstream starting from Qt 5.6.
 
-config BR2_PACKAGE_QT5WEBKIT
-     bool "qt5webkit package removed"
-     select BR2_LEGACY
-     help
-       The qt5webkit package has been removed, since it was removed
-       from upstream starting from Qt 5.6.
-
   config BR2_PACKAGE_QT5QUICK1
       bool "qt5quick1 package removed"
       select BR2_LEGACY
package/qt5/Config.in +0 -0
index f673daa..0c0e971 100644
Quoted 8 lines

package/qt5/Config.in source "package/qt5/qt5x11extras/Config.in" · line 51

Quoted 4 lines
package/qt5/Config.in +0 -0
@@ -49,4 +49,5 @@ source "package/qt5/qt5x11extras/Config.in"
   source "package/qt5/qt5xmlpatterns/Config.in"
   comment "legacy compatibility"
   source "package/qt5/qt5script/Config.in"

You should probably add an "unsupported version" comment to differ from "legacy compatibility" which is still support by Qt community but tagged as deprecated.

Quoted 3 lines

Yes I wasn't sure about that actually, "unsupported packages" might be better. Anyone else has a suggestions on the comment name? I've let legacy for now since it is still true.

"unsupported packages" is fine for me.

Quoted 24 lines
Quoted 15 lines
Quoted 15 lines
package/qt5/Config.in +1 -0
+source "package/qt5/qt5webkit/Config.in"
   endif
package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file +6 -0
new file mode 100644
index 0000000..e8b0e43
@@ -0,0 +1,30 @@
+From 1735a8484ef9ae336f8d607b56bda64c8af10c79 Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <[email protected]>
+Date: Fri, 7 Feb 2014 04:07:17 +0100
+Subject: [PATCH 1/3] qtwebkit: fix QA issue (bad RPATH)
+
+Building qtwebkit causes a QA issue such that QtWebPluginProcess and
Quoted 8 lines

package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch line 11

Quoted 5 lines
package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file +5 -0
+QtWebProcess contain bad RPATHs which point into the build location. This fix
+adds a patch to not include the rpath.prf which causes this problem.
+
+Signed-off-by: Trevor Woerner <[email protected]>
+Signed-off-by: Martin Jansa <[email protected]>

You should add your signed-off-by and maybe a Upstream-status if you find the information.

Quoted 2 lines

Not sure I should, I've done absolutely nothing in regard to that patch apart from a 'cp' command from the Yocto layer to Buildroot.

According to buildroot manual : "You should add a Signed-off-by statement in the header of the each patch to help with keeping track of the changes and to certify that the patch is released under the same license as the software that is modified." even for a cp :) See
https://buildroot.org/downloads/manual/manual.html#_format_and_licensing_of_the_package_patches

Quoted 30 lines

As for the upstream status I can try to find out.

Quoted 8 lines

package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch

Quoted 6 lines

<snip>

package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file +5 -0
+ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
+QT5WEBKIT_DEPENDENCIES += qt5declarative
+endif
+
+define QT5WEBKIT_CONFIGURE_CMDS

You should add a comment to describe the reason to create .git folder.

Yes you are right, I will, especially since I hated wasting time building the packages x number of times because of a missing folder.

Quoted 3 lines
Quoted 1 line

+ mkdir -p $(@D)/.git || true

is || true really needed?

No you're right it is useless. In the case of Yocto, this is the last do_configure_prepend command so I guess they just want to make sure to return a good value even if the folder already exists.

I'll submit a V2 once we've decided the comment name for this package.

Thanks for you review.

Regards,
Gary

#4 lore raw

PATCH 1/1 qt5webkit: restore package

In reply to Gary Bisson
Quoted 21 lines · Gary Bisson

Although this package has been removed from the official release packages since Qt5.6.0, it is still available for users to build it from source. This is useful for platforms without GPU since its successor (QtWebEngine) requires OpenGL support.

The package now matches the community-based meta-qt5 Yocto layer, using the exact same revision of the qtwebkit source from github:
https://github.com/meta-qt5/meta-qt5/commit/e434995a

Here is the project source tree:
https://github.com/qtproject/qtwebkit

All the patches have been pulled from Yocto as well.

Since we are now using the source from the git repository, we need to create an empty .git/ folder to force the headers re-generation.
https://github.com/meta-qt5/meta-qt5/blob/jethro/recipes-qt/qt5/qt5.inc#L33

Note that GPLv3 license option has been added with this release.

[snip]

package/qt5/Config.in source "package/qt5/qt5x11extras/Config.in" · line 52

Quoted 9 lines
package/qt5/Config.in +1 -0
index f673daa..0c0e971 100644
@@ -49,4 +49,5 @@ source "package/qt5/qt5x11extras/Config.in"
  source "package/qt5/qt5xmlpatterns/Config.in"
  comment "legacy compatibility"
  source "package/qt5/qt5script/Config.in"
+source "package/qt5/qt5webkit/Config.in"

For me it's not needed to add an additional comment. I also don't think it's
necessary to distinguish between upstream-supported legacy packages and not-upstream-supported one in the menu - better do that (more verbosely) in the help text.

Maybe change the comment into "legacy modules", because the webkit thing is
not for compatibility.

package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch line 4

Quoted 11 lines
package/qt5/Config.in +0 -0
  endif
package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file +4 -0
new file mode 100644
index 0000000..e8b0e43
@@ -0,0 +1,30 @@
+From 1735a8484ef9ae336f8d607b56bda64c8af10c79 Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <[email protected]>
+Date: Fri, 7 Feb 2014 04:07:17 +0100
+Subject: [PATCH 1/3] qtwebkit: fix QA issue (bad RPATH)

Generate git patches with -N, so there is no [PATH 1/3] header (which in this
case is alrady incorrect because there are 4 patches, not 3).

package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch line 11

Quoted 7 lines
package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file +7 -0
+
+Building qtwebkit causes a QA issue such that QtWebPluginProcess and
+QtWebProcess contain bad RPATHs which point into the build location. This fix
+adds a patch to not include the rpath.prf which causes this problem.
+
+Signed-off-by: Trevor Woerner <[email protected]>
+Signed-off-by: Martin Jansa <[email protected]>

As Julien wrote, you have to add your Sob to indicate that the license is OK.

[snip]

Quoted 6 lines
package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch new file +0 -0
new file mode 100644
index 0000000..c5e6ac5

package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch line 10

Quoted 10 lines
package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch new file +10 -0
@@ -0,0 +1,33 @@
+From 5dd4bb67cfce812fd7686e43616e2069f354a7df Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <[email protected]>
+Date: Mon, 22 Feb 2016 10:57:32 +0100
+Subject: [PATCH] Fix linking with libpthread
+
+WebKit use libpthread directly but is depending on other qt modules
+causing it to be linked against, which might break unless -lpthread
+is last. Instead just add it explicitly after the static libraries.
+
+Upstream-Status: Backport from 5.7 branch

I thought qtwebkit was removed? So how can it be backported from the 5.7 branch?

Quoted 41 lines
package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch new file +23 -0
+
+Change-Id: I2b95cff2c96373f8dce6f95052c4fccbe1982b33
+Reviewed-by: Simon Hausmann <[email protected]>
+Signed-off-by: Jonathan Liu <[email protected]>
+---
+ Tools/qmake/mkspecs/features/default_post.prf | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Tools/qmake/mkspecs/features/default_post.prf b/Tools/qmake/mkspecs/features/default_post.prf
+index 67276b7..39bb3f7 100644
+--- a/Tools/qmake/mkspecs/features/default_post.prf
++++ b/Tools/qmake/mkspecs/features/default_post.prf
+@@ -201,6 +201,7 @@ needToLink() {
+         linkAgainstLibrary($$library, $$eval(WEBKIT.$${library_identifier}.root_source_dir))
+         LIBS += $$eval(WEBKIT.$${library_identifier}.dependent_libs)
+     }
++    posix:!darwin: LIBS += -lpthread
+ }
+
+ creating_module {
+--
+2.7.1
+
package/qt5/qt5webkit/Config.in new file +12 -0
new file mode 100644
index 0000000..fb84b1e
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_QT5WEBKIT
+	bool "qt5webkit"
+	select BR2_PACKAGE_QT5BASE
+	select BR2_PACKAGE_QT5BASE_ICU
+	select BR2_PACKAGE_QT5BASE_GUI
+	select BR2_PACKAGE_SQLITE
+	select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_QT5BASE_XCB
+	select BR2_PACKAGE_XLIB_LIBXRENDER if BR2_PACKAGE_QT5BASE_XCB
+	# This module does not support static linking
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
+	depends on !BR2_BINFMT_FLAT # icu

package/qt5/qt5webkit/Config.in line 22

Quoted 10 lines
package/qt5/qt5webkit/Config.in new file +10 -0
+	help
+	  Qt is a cross-platform application and UI framework for
+	  developers using C++.
+
+	  This package corresponds to the qt5webkit module.
+
+	  This package has been removed from the official release packages
+	  since Qt5.6.0, but it is still available for users to build it
+	  from source. This is useful for platforms without GPU since the
+	  successor (QtWebEngine) requires OpenGL support.

Yes, that's what I mean!

Quoted 16 lines
package/qt5/qt5webkit/Config.in new file +2 -0
+
+	  http://qt.io
package/qt5/qt5webkit/qt5webkit.hash new file +2 -0
new file mode 100644
index 0000000..d2ac7bb
@@ -0,0 +1,2 @@
+# locally computed
+sha256 1c79843ef32313312290d4fe0b87256a9129dc44d62b01789a692981edf4d8ab  qt5webkit-d2ff5a085572b1ee24dcb42ae107063f3142d14e.tar.gz
package/qt5/qt5webkit/qt5webkit.mk new file +0 -0
new file mode 100644
index 0000000..7bcad91

package/qt5/qt5webkit/qt5webkit.mk line 8

Quoted 8 lines
package/qt5/qt5webkit/qt5webkit.mk new file +8 -0
@@ -0,0 +1,58 @@
+################################################################################
+#
+# qt5webkit
+#
+################################################################################
+
+QT5WEBKIT_VERSION = d2ff5a085572b1ee24dcb42ae107063f3142d14e
+QT5WEBKIT_SITE = $(call github,qtproject,qtwebkit,$(QT5WEBKIT_VERSION))

In case anyone asks: the reason to use github is because it supports
downloading tarballs from random commits, while cgit doesn't. But I'd like to see a comment to explain this.

Quoted 15 lines
package/qt5/qt5webkit/qt5webkit.mk new file +15 -0
+QT5WEBKIT_DEPENDENCIES = qt5base sqlite host-ruby host-gperf host-bison host-flex
+QT5WEBKIT_INSTALL_STAGING = YES
+
+QT5WEBKIT_LICENSE_FILES = Source/WebCore/LICENSE-LGPL-2 Source/WebCore/LICENSE-LGPL-2.1
+
+ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y)
+QT5WEBKIT_LICENSE = LGPLv2+ (WebCore), LGPLv2.1 with exception or LGPLv3 or GPLv2 or GPLv3
+# Source files contain references to LGPL_EXCEPTION.txt but it is not included
+# in the archive.
+QT5WEBKIT_LICENSE_FILES += LICENSE.LGPLv21 LICENSE.LGPLv3 LICENSE.GPLv2 LICENSE.GPLv3
+else
+QT5WEBKIT_LICENSE = LGPLv2+ (WebCore), Commercial license
+QT5WEBKIT_REDISTRIBUTE = NO
+endif
+

package/qt5/qt5webkit/qt5webkit.mk line 33

Quoted 10 lines
package/qt5/qt5webkit/qt5webkit.mk new file +10 -0
+ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
+QT5WEBKIT_DEPENDENCIES += xlib_libXext xlib_libXrender
+endif
+
+ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
+QT5WEBKIT_DEPENDENCIES += qt5declarative
+endif
+
+define QT5WEBKIT_CONFIGURE_CMDS
+	mkdir -p $(@D)/.git || true

That this is needed is really really suspicious... A quick grep through the
source doesn't show anything relevant.

Regards,
Arnout

Quoted 26 lines
package/qt5/qt5webkit/qt5webkit.mk new file +25 -0
+	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake)
+endef
+
+define QT5WEBKIT_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define QT5WEBKIT_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install
+	$(QT5_LA_PRL_FILES_FIXUP)
+endef
+
+ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y)
+define QT5WEBKIT_INSTALL_TARGET_QMLS
+	cp -dpfr $(STAGING_DIR)/usr/qml/QtWebKit $(TARGET_DIR)/usr/qml/
+endef
+endif
+
+define QT5WEBKIT_INSTALL_TARGET_CMDS
+	cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebKit*.so.* $(TARGET_DIR)/usr/lib
+	cp -dpf $(@D)/bin/* $(TARGET_DIR)/usr/bin/
+	$(QT5WEBKIT_INSTALL_TARGET_QMLS)
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#5 lore raw

PATCH 1/1 qt5webkit: restore package

Arnout, All,

Quoted 40 lines · Arnout Vandecappelle
Quoted 22 lines · Gary Bisson

Although this package has been removed from the official release packages since Qt5.6.0, it is still available for users to build it from source. This is useful for platforms without GPU since its successor (QtWebEngine) requires OpenGL support.

The package now matches the community-based meta-qt5 Yocto layer, using the exact same revision of the qtwebkit source from github:
https://github.com/meta-qt5/meta-qt5/commit/e434995a

Here is the project source tree:
https://github.com/qtproject/qtwebkit

All the patches have been pulled from Yocto as well.

Since we are now using the source from the git repository, we need to create an empty .git/ folder to force the headers re-generation.
https://github.com/meta-qt5/meta-qt5/blob/jethro/recipes-qt/qt5/qt5.inc#L33

Note that GPLv3 license option has been added with this release.

[snip]

package/qt5/Config.in source "package/qt5/qt5x11extras/Config.in" · line 52

Quoted 10 lines
package/qt5/Config.in +1 -0
index f673daa..0c0e971 100644
@@ -49,4 +49,5 @@ source "package/qt5/qt5x11extras/Config.in"
  source "package/qt5/qt5xmlpatterns/Config.in"
  comment "legacy compatibility"
  source "package/qt5/qt5script/Config.in"
+source "package/qt5/qt5webkit/Config.in"

For me it's not needed to add an additional comment. I also don't think it's necessary to distinguish between upstream-supported legacy packages and not-upstream-supported one in the menu - better do that (more verbosely) in the help text.

Quoted 1 line

Maybe change the comment into "legacy modules", because the webkit thing is not for compatibility.

Ok that I'll leave it as-is for now and we could submit another patch to rename this later.

Quoted 5 lines
Quoted 5 lines
package/qt5/Config.in +0 -0
  endif
package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file +0 -1
new file mode 100644
index 0000000..e8b0e43
--- /dev/null
Quoted 8 lines

package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch line 4

Quoted 6 lines

+++ b/package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch

package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file +4 -0
@@ -0,0 +1,30 @@
+From 1735a8484ef9ae336f8d607b56bda64c8af10c79 Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <[email protected]>
+Date: Fri, 7 Feb 2014 04:07:17 +0100
+Subject: [PATCH 1/3] qtwebkit: fix QA issue (bad RPATH)

Generate git patches with -N, so there is no [PATH 1/3] header (which in this case is alrady incorrect because there are 4 patches, not 3).

I'll remove it manually, once again I just pulled the patches from Yocto without modification, I thought I'd better leave them untouched to it's easier to track.

Quoted 10 lines

package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch line 11

Quoted 7 lines
package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file +7 -0
+
+Building qtwebkit causes a QA issue such that QtWebPluginProcess and
+QtWebProcess contain bad RPATHs which point into the build location. This fix
+adds a patch to not include the rpath.prf which causes this problem.
+
+Signed-off-by: Trevor Woerner <[email protected]>
+Signed-off-by: Martin Jansa <[email protected]>

As Julien wrote, you have to add your Sob to indicate that the license is OK.

Ok, if you say so I will.

Quoted 11 lines
Quoted 11 lines
package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch new file +5 -0
new file mode 100644
index 0000000..c5e6ac5
@@ -0,0 +1,33 @@
+From 5dd4bb67cfce812fd7686e43616e2069f354a7df Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <[email protected]>
+Date: Mon, 22 Feb 2016 10:57:32 +0100
+Subject: [PATCH] Fix linking with libpthread
+
Quoted 8 lines

package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch line 10

Quoted 5 lines
package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch new file +5 -0
+WebKit use libpthread directly but is depending on other qt modules
+causing it to be linked against, which might break unless -lpthread
+is last. Instead just add it explicitly after the static libraries.
+
+Upstream-Status: Backport from 5.7 branch

I thought qtwebkit was removed? So how can it be backported from the 5.7 branch?

It is removed "from the package releases" but it's still under some development/maintenance, the 5.7 branch exists:
https://github.com/qtproject/qtwebkit/tree/5.7

Quoted 74 lines
Quoted 41 lines
package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch new file +23 -0
+
+Change-Id: I2b95cff2c96373f8dce6f95052c4fccbe1982b33
+Reviewed-by: Simon Hausmann <[email protected]>
+Signed-off-by: Jonathan Liu <[email protected]>
+---
+ Tools/qmake/mkspecs/features/default_post.prf | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Tools/qmake/mkspecs/features/default_post.prf b/Tools/qmake/mkspecs/features/default_post.prf
+index 67276b7..39bb3f7 100644
+--- a/Tools/qmake/mkspecs/features/default_post.prf
++++ b/Tools/qmake/mkspecs/features/default_post.prf
+@@ -201,6 +201,7 @@ needToLink() {
+         linkAgainstLibrary($$library, $$eval(WEBKIT.$${library_identifier}.root_source_dir))
+         LIBS += $$eval(WEBKIT.$${library_identifier}.dependent_libs)
+     }
++    posix:!darwin: LIBS += -lpthread
+ }
+
+ creating_module {
+--
+2.7.1
+
package/qt5/qt5webkit/Config.in new file +12 -0
new file mode 100644
index 0000000..fb84b1e
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_QT5WEBKIT
+       bool "qt5webkit"
+       select BR2_PACKAGE_QT5BASE
+       select BR2_PACKAGE_QT5BASE_ICU
+       select BR2_PACKAGE_QT5BASE_GUI
+       select BR2_PACKAGE_SQLITE
+       select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_QT5BASE_XCB
+       select BR2_PACKAGE_XLIB_LIBXRENDER if BR2_PACKAGE_QT5BASE_XCB
+       # This module does not support static linking
+       depends on !BR2_STATIC_LIBS
+       depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
+       depends on !BR2_BINFMT_FLAT # icu

package/qt5/qt5webkit/Config.in line 22

Quoted 10 lines
package/qt5/qt5webkit/Config.in new file +10 -0
+       help
+         Qt is a cross-platform application and UI framework for
+         developers using C++.
+
+         This package corresponds to the qt5webkit module.
+
+         This package has been removed from the official release packages
+         since Qt5.6.0, but it is still available for users to build it
+         from source. This is useful for platforms without GPU since the
+         successor (QtWebEngine) requires OpenGL support.

Yes, that's what I mean!

Quoted 19 lines
package/qt5/qt5webkit/Config.in new file +2 -0
+
+         http://qt.io
package/qt5/qt5webkit/qt5webkit.hash new file +2 -0
new file mode 100644
index 0000000..d2ac7bb
@@ -0,0 +1,2 @@
+# locally computed
+sha256 1c79843ef32313312290d4fe0b87256a9129dc44d62b01789a692981edf4d8ab  qt5webkit-d2ff5a085572b1ee24dcb42ae107063f3142d14e.tar.gz
package/qt5/qt5webkit/qt5webkit.mk new file +3 -0
new file mode 100644
index 0000000..7bcad91
@@ -0,0 +1,58 @@
+################################################################################
+#
+# qt5webkit
Quoted 8 lines

package/qt5/qt5webkit/qt5webkit.mk line 8

Quoted 5 lines
package/qt5/qt5webkit/qt5webkit.mk new file +5 -0
+#
+################################################################################
+
+QT5WEBKIT_VERSION = d2ff5a085572b1ee24dcb42ae107063f3142d14e
+QT5WEBKIT_SITE = $(call github,qtproject,qtwebkit,$(QT5WEBKIT_VERSION))

In case anyone asks: the reason to use github is because it supports downloading tarballs from random commits, while cgit doesn't. But I'd like to see a comment to explain this.

Ok I'll add it.

Quoted 20 lines
Quoted 20 lines
package/qt5/qt5webkit/qt5webkit.mk new file +20 -0
+QT5WEBKIT_DEPENDENCIES = qt5base sqlite host-ruby host-gperf host-bison host-flex
+QT5WEBKIT_INSTALL_STAGING = YES
+
+QT5WEBKIT_LICENSE_FILES = Source/WebCore/LICENSE-LGPL-2 Source/WebCore/LICENSE-LGPL-2.1
+
+ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y)
+QT5WEBKIT_LICENSE = LGPLv2+ (WebCore), LGPLv2.1 with exception or LGPLv3 or GPLv2 or GPLv3
+# Source files contain references to LGPL_EXCEPTION.txt but it is not included
+# in the archive.
+QT5WEBKIT_LICENSE_FILES += LICENSE.LGPLv21 LICENSE.LGPLv3 LICENSE.GPLv2 LICENSE.GPLv3
+else
+QT5WEBKIT_LICENSE = LGPLv2+ (WebCore), Commercial license
+QT5WEBKIT_REDISTRIBUTE = NO
+endif
+
+ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
+QT5WEBKIT_DEPENDENCIES += xlib_libXext xlib_libXrender
+endif
+
+ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
Quoted 8 lines

package/qt5/qt5webkit/qt5webkit.mk line 33

Quoted 5 lines
package/qt5/qt5webkit/qt5webkit.mk new file +5 -0
+QT5WEBKIT_DEPENDENCIES += qt5declarative
+endif
+
+define QT5WEBKIT_CONFIGURE_CMDS
+       mkdir -p $(@D)/.git || true

That this is needed is really really suspicious... A quick grep through the source doesn't show anything relevant.

Well I couldn't find where it makes a difference either but it definitely does. You can try building without it, here is a full description of the issue:
http://forum.qt.io/topic/65534/qt5-6-cross-compiling-qtwebkit-issue

I've answered my own question though, looking at Yocto recipe:
https://github.com/meta-qt5/meta-qt5/blob/master/recipes-qt/qt5/qt5.inc#L36

Regards,
Gary