dev-qt/qtwebkit: Fix js build error
authorAndreas Sturmlechner <asturm@gentoo.org>
Thu, 2 May 2019 21:18:29 +0000 (23:18 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Wed, 8 May 2019 16:59:34 +0000 (18:59 +0200)
Closes: https://bugs.gentoo.org/680912
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20180120-js-build-error.patch [new file with mode: 0644]
dev-qt/qtwebkit/qtwebkit-5.212.0_pre20180120.ebuild

diff --git a/dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20180120-js-build-error.patch b/dev-qt/qtwebkit/files/qtwebkit-5.212.0_pre20180120-js-build-error.patch
new file mode 100644 (file)
index 0000000..904957c
--- /dev/null
@@ -0,0 +1,34 @@
+From e9a78eafc172a69d48ee48d971b3e430613ab513 Mon Sep 17 00:00:00 2001
+From: bernhardu <bernhardu@mailbox.org>
+Date: Mon, 25 Mar 2019 01:57:26 +0100
+Subject: [PATCH] Add attribute fastcall to derived class member
+ JSImageConstructor::construct (#803)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Otherwise the Debian build on i386 fails with this error:
+In file included from ../Source/WebCore/bindings/js/JSImageConstructor.cpp:24,
+                 from ../Source/WebCore/bindings/js/JSBindingsAllInOne.cpp:101:
+../Source/WebCore/bindings/js/JSDOMConstructor.h: In instantiation of ‘static JSC::ConstructType WebCore::JSDOMNamedConstructor<JSClass>::getConstructData(JSC::JSCell*, JSC::ConstructData&) [with JSClass = WebCore::JSHTMLImageElement]’:
+../Source/WebCore/bindings/js/JSImageConstructor.cpp:75:97:   required from here
+../Source/WebCore/bindings/js/JSDOMConstructor.h:195:35: error: invalid conversion from ‘JSC::EncodedJSValue (*)(JSC::ExecState*)’ {aka ‘long long int (*)(JSC::ExecState*)’} to ‘JSC::NativeFunction’ {aka ‘long long int (__attribute__((fastcall)) *)(JSC::ExecState*)’} [-fpermissive]
+     constructData.native.function = construct;
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
+---
+ Source/WebCore/bindings/js/JSImageConstructor.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Source/WebCore/bindings/js/JSImageConstructor.cpp b/Source/WebCore/bindings/js/JSImageConstructor.cpp
+index 923690600ab1..de553f5fa899 100644
+--- a/Source/WebCore/bindings/js/JSImageConstructor.cpp
++++ b/Source/WebCore/bindings/js/JSImageConstructor.cpp
+@@ -44,7 +44,7 @@ template<> JSValue JSImageConstructor::prototypeForStructure(VM& vm, const JSDOM
+     return JSHTMLElement::getConstructor(vm, &globalObject);
+ }
+-template<> EncodedJSValue JSImageConstructor::construct(ExecState* state)
++template<> EncodedJSValue JSC_HOST_CALL JSImageConstructor::construct(ExecState* state)
+ {
+     JSImageConstructor* jsConstructor = jsCast<JSImageConstructor*>(state->callee());
+     Document* document = jsConstructor->document();
\ No newline at end of file
index 09a58197a9979534dae64367af462a21d16f3672..f288314ce8723e9e030ef66507794cf7e2244a93 100644 (file)
@@ -80,6 +80,7 @@ PATCHES=(
        "${FILESDIR}/${P}-functional.patch"
        "${FILESDIR}/${P}-fix-pkgconfig.patch"
        "${FILESDIR}/${P}-cmake-fix-pkgconfig_deps-spelling.patch"
+       "${FILESDIR}/${P}-js-build-error.patch"
 )
 
 CHECKREQS_DISK_BUILD="16G" # bug 417307