summaryrefslogtreecommitdiff
path: root/extra/qt
diff options
context:
space:
mode:
Diffstat (limited to 'extra/qt')
-rw-r--r--extra/qt/PKGBUILD17
-rw-r--r--extra/qt/declarative-fix-sigbus.patch33
2 files changed, 47 insertions, 3 deletions
diff --git a/extra/qt/PKGBUILD b/extra/qt/PKGBUILD
index 97f3cac36..68fb9962e 100644
--- a/extra/qt/PKGBUILD
+++ b/extra/qt/PKGBUILD
@@ -6,7 +6,7 @@ pkgbase=qt
pkgname=('qt' 'qt-private-headers')
pkgver=4.8.0
pkgrel=4
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
url='http://qt-project.org/'
license=('GPL3' 'LGPL')
makedepends=('libtiff' 'libpng' 'libmng' 'sqlite3' 'ca-certificates' 'glib2' 'dbus'
@@ -17,24 +17,35 @@ 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'
'fix-qurl.patch')
md5sums=('e8a5fdbeba2927c948d9f477a6abe904'
'fc211414130ab2764132e7370f8e5caa'
'85179f5e0437514f8639957e1d8baf62'
'f11852b97583610f3dbb669ebc3e21bc'
'6b771c8a81dd90b45e8a79afa0e5bbfd'
+ 'aac963d05a9d5733e2bfce9e26607f51'
'7bc255a36733d0fbc80c1902ade4beca')
build() {
cd "${srcdir}"/${_pkgfqn}
+ # MIPS N32-specific fix, shouldn't affect correctness on other platforms.
+ patch -Np1 -i "${srcdir}/declarative-fix-sigbus.patch"
# (FS#27757)
patch -p1 -i "${srcdir}"/fix-qurl.patch
export QT4DIR="${srcdir}"/${_pkgfqn}
export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
+ if [ "${CARCH}" = "mips64el" ] ; then
+ export CXXFLAGS="${CXXFLAGS} -fpermissive"
+ # Raster renders incorrectly.
+ graphicssystem=""
+ else
+ graphicssystem="-graphicssystem raster"
+ fi
+
sed -i "s|-O2|${CXXFLAGS}|" mkspecs/common/{g++,gcc}-base.conf
sed -i "/^QMAKE_LFLAGS_RPATH/s| -Wl,-rpath,||g" mkspecs/common/gcc-base-unix.conf
sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS}|g" mkspecs/common/gcc-base.conf
@@ -54,7 +65,7 @@ build() {
-no-phonon \
-no-phonon-backend \
-no-webkit \
- -graphicssystem raster \
+ $graphicssystem \
-openssl-linked \
-nomake demos \
-nomake examples \
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)