diff options
Diffstat (limited to 'extra/qt4')
-rw-r--r-- | extra/qt4/PKGBUILD | 27 | ||||
-rw-r--r-- | extra/qt4/declarative-fix-sigbus.patch | 33 |
2 files changed, 53 insertions, 7 deletions
diff --git a/extra/qt4/PKGBUILD b/extra/qt4/PKGBUILD index a9a826ab4..55f2b86c8 100644 --- a/extra/qt4/PKGBUILD +++ b/extra/qt4/PKGBUILD @@ -5,23 +5,26 @@ pkgname=qt4 pkgver=4.8.4 pkgrel=17 -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'mips64el') url='http://qt-project.org/' license=('GPL3' 'LGPL') pkgdesc='A cross-platform application and UI framework' depends=('libtiff' 'libpng' 'libmng' 'sqlite' 'ca-certificates' 'dbus' 'fontconfig' 'libgl' 'libxrandr' 'libxv' 'libxi' 'alsa-lib' 'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils') -makedepends=('postgresql-libs' 'mariadb' 'unixodbc' 'cups' 'gtk2' 'libfbclient' +makedepends=('postgresql-libs' 'mariadb' 'unixodbc' 'cups' 'gtk2' 'mesa-libgl') optdepends=('postgresql-libs: PostgreSQL driver' 'libmariadbclient: MariaDB driver' 'unixodbc: ODBC driver' - 'libfbclient: Firebird/iBase driver' 'libxinerama: Xinerama support' 'libxcursor: Xcursor support' 'libxfixes: Xfixes support' 'icu: Unicode support') +if [ "$CARCH" != "mips64el" ]; then + makedepends+=('libfbclient') + optdepends+=('libfbclient: Firebird/iBase driver') +fi install="${pkgname}.install" options=('!libtool') replaces=('qt<=4.8.4') @@ -29,13 +32,15 @@ conflicts=('qt') _pkgfqn="qt-everywhere-opensource-src-${pkgver}" source=("http://releases.qt-project.org/${pkgname}/source/${_pkgfqn}.tar.gz" 'qtconfig-qt4.desktop' 'assistant-qt4.desktop' 'designer-qt4.desktop' 'linguist-qt4.desktop' - 'improve-cups-support.patch') + 'improve-cups-support.patch' + 'declarative-fix-sigbus.patch') md5sums=('89c5ecba180cae74c66260ac732dc5cb' 'a16638f4781e56e7887ff8212a322ecc' '4f0152ba6d645e81218b23ba8beeb42d' '283a00ff7f662dca481b70d6daa826e0' '027683880235708d4bc270a7ef961183' - 'c439c7731c25387352d8453ca7574971') + 'c439c7731c25387352d8453ca7574971' + 'aac963d05a9d5733e2bfce9e26607f51') build() { cd ${_pkgfqn} @@ -43,13 +48,20 @@ build() { # (FS#28381) (KDEBUG#180051) patch -p1 -i "${srcdir}"/improve-cups-support.patch + # 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} + [ "${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 \ -bindir /usr/lib/qt4/bin \ @@ -62,7 +74,7 @@ build() { -sysconfdir /etc/xdg \ -examplesdir /usr/share/doc/qt4/examples \ -demosdir /usr/share/doc/qt4/demos \ - -plugin-sql-{psql,mysql,sqlite,odbc,ibase} \ + -plugin-sql-{psql,mysql,sqlite,odbc} \ -system-sqlite \ -no-phonon \ -no-phonon-backend \ @@ -77,7 +89,8 @@ build() { -optimized-qmake \ -reduce-relocations \ -dbus-linked \ - -no-openvg + -no-openvg \ + $extra make } diff --git a/extra/qt4/declarative-fix-sigbus.patch b/extra/qt4/declarative-fix-sigbus.patch new file mode 100644 index 000000000..0d446fce5 --- /dev/null +++ b/extra/qt4/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) |