summaryrefslogtreecommitdiff
path: root/extra/qt
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2012-02-04 23:46:19 +0100
committerMichał Masłowski <mtjm@mtjm.eu>2012-02-04 23:46:19 +0100
commite749dd6e64d74f4311b672936646a3b2664cecf5 (patch)
tree6477096b844e9b91188e3a492e6c94177d26ea6a /extra/qt
parenta88635c60af2b1f3bc2bf3be9d8004a1fb28408d (diff)
Fix QtDeclarative sigbus, reorganize WebKit fixes.
Diffstat (limited to 'extra/qt')
-rw-r--r--extra/qt/PKGBUILD13
-rw-r--r--extra/qt/declarative-fix-sigbus.patch33
2 files changed, 38 insertions, 8 deletions
diff --git a/extra/qt/PKGBUILD b/extra/qt/PKGBUILD
index 67a9d1fed..009520305 100644
--- a/extra/qt/PKGBUILD
+++ b/extra/qt/PKGBUILD
@@ -17,22 +17,19 @@ options=('!libtool')
_pkgfqn="${pkgbase}-everywhere-opensource-src-${pkgver}"
source=("http://get.qt.nokia.com/qt/source/${_pkgfqn}.tar.gz"
'assistant.desktop' 'designer.desktop' 'linguist.desktop'
- 'qtconfig.desktop')
+ 'qtconfig.desktop' 'declarative-fix-sigbus.patch')
md5sums=('e8a5fdbeba2927c948d9f477a6abe904'
'fc211414130ab2764132e7370f8e5caa'
'85179f5e0437514f8639957e1d8baf62'
'f11852b97583610f3dbb669ebc3e21bc'
- '6b771c8a81dd90b45e8a79afa0e5bbfd')
+ '6b771c8a81dd90b45e8a79afa0e5bbfd'
+ 'aac963d05a9d5733e2bfce9e26607f51')
build() {
cd "${srcdir}"/${_pkgfqn}
- # Qt's JavaScriptCore is too old or too stripped to support MIPS, so
- # use QtWebKit's one.
- export WEBDIRDIR="$(pwd)/src/3rdparty/webkit/Source"
- # Now fix its MIPS N32 support.
- sed -i 's/defined(_ABIO32)/(defined(_ABIO32) || defined(_ABIN32))/' \
- src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h
+ # MIPS N32-specific fix, shouldn't affect correctness on other platforms.
+ patch -Np1 -i "{$srcdir}/declarative-fix-sigbus.patch"
export QT4DIR="${srcdir}"/${_pkgfqn}
export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
diff --git a/extra/qt/declarative-fix-sigbus.patch b/extra/qt/declarative-fix-sigbus.patch
new file mode 100644
index 000000000..0d446fce5
--- /dev/null
+++ b/extra/qt/declarative-fix-sigbus.patch
@@ -0,0 +1,33 @@
+--- qt-everywhere-opensource-src-4.8.0.orig/src/declarative/qml/qdeclarativevmemetaobject.cpp 2012-02-04 21:23:56.573395948 +0100
++++ qt-everywhere-opensource-src-4.8.0/src/declarative/qml/qdeclarativevmemetaobject.cpp 2012-02-04 23:32:44.900073230 +0100
+@@ -39,6 +39,7 @@
+ **
+ ****************************************************************************/
+
++#include <cstring>
+ #include "private/qdeclarativevmemetaobject_p.h"
+
+ #include "qdeclarative.h"
+@@ -191,10 +192,12 @@
+
+ double QDeclarativeVMEVariant::asDouble()
+ {
++ double result;
+ if (type != QMetaType::Double)
+ setValue(double(0));
+
+- return *(double *)(dataPtr());
++ std::memcpy(&result, (double *)(dataPtr()), sizeof(result));
++ return result;
+ }
+
+ const QString &QDeclarativeVMEVariant::asQString()
+@@ -298,7 +301,7 @@
+ cleanup();
+ type = QMetaType::Double;
+ }
+- *(double *)(dataPtr()) = v;
++ std::memcpy((double *)(dataPtr()), &v, sizeof(v));
+ }
+
+ void QDeclarativeVMEVariant::setValue(const QString &v)