summaryrefslogtreecommitdiff
path: root/extra/qt
diff options
context:
space:
mode:
Diffstat (limited to 'extra/qt')
-rw-r--r--extra/qt/PKGBUILD25
-rw-r--r--extra/qt/declarative-fix-sigbus.patch33
2 files changed, 51 insertions, 7 deletions
diff --git a/extra/qt/PKGBUILD b/extra/qt/PKGBUILD
index 789880899..47cd3a2c5 100644
--- a/extra/qt/PKGBUILD
+++ b/extra/qt/PKGBUILD
@@ -6,19 +6,21 @@ pkgbase=qt
pkgname=('qt' 'qt-private-headers')
pkgver=4.8.2
pkgrel=3
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
url='http://qt-project.org/'
license=('GPL3' 'LGPL')
makedepends=('libtiff' 'libpng' 'libmng' 'sqlite' 'ca-certificates' 'glib2' 'dbus'
'fontconfig' 'libgl' 'libsm' 'libxrandr' 'libxv' 'libxi' 'alsa-lib'
'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils' 'mesa' 'postgresql-libs'
- 'mysql' 'unixodbc' 'cups' 'gtk2' 'libfbclient')
+ 'mysql' 'unixodbc' 'cups' 'gtk2')
+[ "$CARCH" != "mips64el" ] && makedepends+=('libfbclient')
options=('!libtool')
_pkgfqn="${pkgbase}-everywhere-opensource-src-${pkgver}"
source=("http://releases.qt-project.org/qt4/source/${_pkgfqn}.tar.gz"
'assistant.desktop' 'designer.desktop' 'linguist.desktop'
'qtconfig.desktop'
'improve-cups-support.patch'
+ 'declarative-fix-sigbus.patch'
'fix-assistant-crash.patch')
md5sums=('3c1146ddf56247e16782f96910a8423b'
'fc211414130ab2764132e7370f8e5caa'
@@ -26,11 +28,15 @@ md5sums=('3c1146ddf56247e16782f96910a8423b'
'f11852b97583610f3dbb669ebc3e21bc'
'6b771c8a81dd90b45e8a79afa0e5bbfd'
'c439c7731c25387352d8453ca7574971'
+ 'aac963d05a9d5733e2bfce9e26607f51'
'e9c11e4606b7f55ae405e3e76f863dc1')
build() {
cd "${srcdir}"/${_pkgfqn}
+ # MIPS N32-specific fix, shouldn't affect correctness on other platforms.
+ patch -Np1 -i "${srcdir}/declarative-fix-sigbus.patch"
+
# (FS#28381) (KDEBUG#180051)
patch -p1 -i "${srcdir}"/improve-cups-support.patch
@@ -39,10 +45,14 @@ build() {
export QT4DIR="${srcdir}"/${_pkgfqn}
export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
+ [ "${CARCH}" = "mips64el" ] && export CXXFLAGS="${CXXFLAGS} -fpermissive"
+
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
+ [ "$CARCH" != "mips64el" ] && extra="-plugin-sql-ibase"
+
./configure -confirm-license -opensource \
-prefix /usr \
-docdir /usr/share/doc/qt \
@@ -53,7 +63,7 @@ build() {
-sysconfdir /etc/xdg \
-examplesdir /usr/share/doc/qt/examples \
-demosdir /usr/share/doc/qt/demos \
- -plugin-sql-{psql,mysql,sqlite,odbc,ibase} \
+ -plugin-sql-{psql,mysql,sqlite,odbc} \
-system-sqlite \
-no-phonon \
-no-phonon-backend \
@@ -68,7 +78,8 @@ build() {
-optimized-qmake \
-reduce-relocations \
-dbus-linked \
- -no-openvg
+ -no-openvg \
+ $extra
make
}
@@ -79,9 +90,9 @@ package_qt() {
'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils')
optdepends=('postgresql-libs: PostgreSQL driver'
'libmysqlclient: MySQL driver'
- 'unixodbc: ODBC driver'
- 'libfbclient: Firebird/iBase driver'
- 'libxinerama: Xinerama support'
+ 'unixodbc: ODBC driver')
+ [ "$CARCH" != "mips64el" ] && optdepends+=('libfbclient: Firebird/iBase driver')
+ optdepends+=('libxinerama: Xinerama support'
'libxcursor: Xcursor support'
'libxfixes: Xfixes support')
install='qt.install'
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)