summaryrefslogtreecommitdiff
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
parenta88635c60af2b1f3bc2bf3be9d8004a1fb28408d (diff)
Fix QtDeclarative sigbus, reorganize WebKit fixes.
-rw-r--r--extra/libwebkit/PKGBUILD24
-rw-r--r--extra/libwebkit/fix-mips-n32.patch25
-rw-r--r--extra/qt/PKGBUILD13
-rw-r--r--extra/qt/declarative-fix-sigbus.patch33
-rw-r--r--extra/qtwebkit/PKGBUILD2
5 files changed, 44 insertions, 53 deletions
diff --git a/extra/libwebkit/PKGBUILD b/extra/libwebkit/PKGBUILD
index 40985ac43..6020e7002 100644
--- a/extra/libwebkit/PKGBUILD
+++ b/extra/libwebkit/PKGBUILD
@@ -14,24 +14,16 @@ checkdepends=('hspell')
makedepends=('gperf' 'gtk-doc' 'gobject-introspection' 'python2' 'gtk2' 'gtk3')
options=('!libtool' '!emptydirs')
install=libwebkit.install
-source=(http://webkitgtk.org/webkit-${pkgver}.tar.gz
- fix-mips-n32.patch)
-md5sums=('c11743694b1b71dad287b2e7a9e73b05'
- '1e1971b0214f6705ceb4f816c4b52af9')
+source=(http://webkitgtk.org/webkit-${pkgver}.tar.gz)
+md5sums=('c11743694b1b71dad287b2e7a9e73b05')
build() {
cd "${srcdir}/webkit-${pkgver}"
mkdir build-gtk{2,3}
- # WebKit knows only O32, not aligning memory on N32, also wants to
- # use nonavailable JIT for all MIPS.
- patch -Np1 -i "${srcdir}/fix-mips-n32.patch"
-
- # ld needs more virtual memory than is available on MIPS n32, these
- # options should reduce it.
- if [ "${CARCH}" == "mips64el" ] ; then
- export LDFLAGS="${LDFLAGS} -Wl,--reduce-memory-overhead -Wl,--no-keep-memory"
- fi
+ # Fix MIPS N32 support.
+ sed -i 's/defined(_ABIO32)/(defined(_ABIO32) || defined(_ABIN32))/' \
+ Source/JavaScriptCore/wtf/Platform.h
( cd build-gtk2 && _build --with-gtk=2.0 )
( cd build-gtk3 && _build --with-gtk=3.0 )
@@ -46,12 +38,6 @@ _build() {
make all stamp-po
}
-check() {
- cd "${srcdir}/webkit-${pkgver}"
- make -C build-gtk2 check
- make -C build-gtk3 check
-}
-
package_libwebkit() {
pkgdesc+=" (for GTK2)"
depends+=(gtk2)
diff --git a/extra/libwebkit/fix-mips-n32.patch b/extra/libwebkit/fix-mips-n32.patch
deleted file mode 100644
index 0acc0daf6..000000000
--- a/extra/libwebkit/fix-mips-n32.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- webkit-1.4.1.orig/Source/JavaScriptCore/wtf/Platform.h 2011-06-30 12:14:01.572119909 +0200
-+++ webkit-1.4.1/Source/JavaScriptCore/wtf/Platform.h 2011-06-30 12:17:00.352382262 +0200
-@@ -139,8 +139,9 @@
-
- /* CPU(MIPS) - MIPS 32-bit */
- /* Note: Only O32 ABI is tested, so we enable it for O32 ABI for now. */
-+/* N32 is also tested, without JIT. */
- #if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_)) \
-- && defined(_ABIO32)
-+ && (defined(_ABIO32) || defined(_ABIN32))
- #define WTF_CPU_MIPS 1
- #if defined(__MIPSEB__)
- #define WTF_CPU_BIG_ENDIAN 1
-@@ -1009,9 +1010,9 @@
- #define ENABLE_JIT 0
- #endif
-
--/* The JIT is enabled by default on all x86, x64-64, ARM & MIPS platforms. */
-+/* The JIT is enabled by default on all x86, x64-64, ARM & MIPS O32 platforms. */
- #if !defined(ENABLE_JIT) \
-- && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(MIPS)) \
-+ && (CPU(X86) || CPU(X86_64) || CPU(ARM) || (CPU(MIPS) && defined(_ABIO32))) \
- && (OS(DARWIN) || !COMPILER(GCC) || GCC_VERSION_AT_LEAST(4, 1, 0)) \
- && !OS(WINCE)
- #define ENABLE_JIT 1
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)
diff --git a/extra/qtwebkit/PKGBUILD b/extra/qtwebkit/PKGBUILD
index a53298973..49a3d790e 100644
--- a/extra/qtwebkit/PKGBUILD
+++ b/extra/qtwebkit/PKGBUILD
@@ -23,7 +23,7 @@ build() {
cd "${srcdir}"/QtWebKit-${pkgver}
# Fix MIPS N32 support.
- sed -i 's/defined(_ABIO32)/defined(_ABIO32) || defined(_ABIN32)/' \
+ sed -i 's/defined(_ABIO32)/(defined(_ABIO32) || defined(_ABIN32))/' \
Source/JavaScriptCore/wtf/Platform.h
patch -p1 -i "${srcdir}"/python2-path.patch