diff options
Diffstat (limited to 'extra/qt5')
-rw-r--r-- | extra/qt5/PKGBUILD | 35 | ||||
-rw-r--r-- | extra/qt5/qatomic-before-mips32.patch | 34 |
2 files changed, 58 insertions, 11 deletions
diff --git a/extra/qt5/PKGBUILD b/extra/qt5/PKGBUILD index 293ac8cb5..46e220147 100644 --- a/extra/qt5/PKGBUILD +++ b/extra/qt5/PKGBUILD @@ -3,7 +3,6 @@ pkgbase=qt5 pkgname=('qt5-base' - 'qt5-connectivity' 'qt5-declarative' 'qt5-doc' 'qt5-graphicaleffects' @@ -18,31 +17,34 @@ pkgname=('qt5-base' 'qt5-svg' 'qt5-tools' 'qt5-translations' - 'qt5-webkit' 'qt5-x11extras' 'qt5-xmlpatterns') +[[ "$CARCH" != "mips64el" ]] && +pkgname+=('qt5-webkit' 'qt5-connectivity') pkgver=5.2.1 pkgrel=1 -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'mips64el') url='http://qt-project.org/' license=('GPL3' 'LGPL' 'FDL' 'custom') makedepends=('libxcb' 'xcb-proto' 'xcb-util' 'xcb-util-image' 'xcb-util-wm' 'xcb-util-keysyms' 'mesa' 'at-spi2-core' 'alsa-lib' 'gstreamer0.10-base-plugins' 'libmng' 'libjpeg-turbo' 'cups' 'libpulse' 'hicolor-icon-theme' 'desktop-file-utils' - 'postgresql-libs' 'libmariadbclient' 'sqlite' 'unixodbc' 'libfbclient' + 'postgresql-libs' 'libmariadbclient' 'sqlite' 'unixodbc' 'python2' 'ruby' 'gperf' 'libxslt' 'libxcomposite' 'fontconfig' 'openal' 'gtk2' 'libxkbcommon' 'python') +[ "$CARCH" != "mips64el" ] && makedepends+=('libfbclient') groups=('qt' 'qt5') _pkgfqn="qt-everywhere-opensource-src-${pkgver}" source=("http://download.qt-project.org/official_releases/qt/5.2/${pkgver}/single/${_pkgfqn}.tar.xz" 'assistant.desktop' 'designer.desktop' 'linguist.desktop' 'qdbusviewer.desktop' - 'use-python2.patch') + 'use-python2.patch' 'qatomic-before-mips32.patch') md5sums=('0c8d2aa45f38be9c3f7c9325eb059d9d' 'b2897dd6a2967bccf8f10e397aafee55' '9638a78e502719ef8fe5f8d10d0361a9' '188da8f4c87316e730ebf1c6217bf5a0' '322b419b16c75d4de0ee7ad0a246caa1' - 'a378deccf363bd6079da459c89aff7b9') + 'a378deccf363bd6079da459c89aff7b9' + '84d7fcc2b5f270f482d5522ae01c29e2') prepare() { cd ${_pkgfqn} @@ -56,6 +58,9 @@ prepare() { sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ $(find . -name '*.py') + + # Fix build without -march=mips32, mips64 or its superset. + patch -p1 -i "$srcdir/qatomic-before-mips32.patch" } build() { @@ -65,6 +70,9 @@ build() { export LD_LIBRARY_PATH="${QTDIR}"/qtbase/lib:"${QTDIR}"/qttools/lib:"${LD_LIBRARY_PATH}" export QT_PLUGIN_PATH="${QTDIR}"/qtbase/plugins +# disable firebird on mips64el + [ "$CARCH" != "mips64el" ] && extra="-plugin-sql-ibase" + PYTHON=/usr/bin/python2 ./configure -confirm-license -opensource \ -prefix /usr \ -bindir /usr/lib/qt/bin \ @@ -74,17 +82,21 @@ build() { -datadir /usr/share/qt \ -sysconfdir /etc/xdg \ -examplesdir /usr/share/doc/qt/examples \ - -plugin-sql-{psql,mysql,sqlite,odbc,ibase} \ + -plugin-sql-{psql,mysql,sqlite,odbc} \ -system-sqlite \ -openssl-linked \ -nomake examples \ -no-rpath \ -optimized-qmake \ -dbus-linked \ - -reduce-relocations + -reduce-relocations \ + $extra + + [ "$CARCH" = "mips64el" ] && modules="module-qtbase module-qtimageformats module-qtscript module-qtsvg module-qtxmlpatterns" - make + make $modules +if [ "$CARCH" != "mips64el" ]; then # Fix paths find "${QTDIR}" -name Makefile -exec sed -i "s|/usr/lib/qt/bin/qdoc|${QTDIR}/qtbase/bin/qdoc|g" {} + find "${QTDIR}" -name Makefile.qmake-docs -exec sed -i "s|/usr/lib/qt/bin/qdoc|${QTDIR}/qtbase/bin/qdoc|g" {} + @@ -93,6 +105,7 @@ build() { sed -i "s|/usr/lib/qt/bin/qhelpgenerator|${QTDIR}/qttools/bin/qhelpgenerator|g" qtwebkit/Source/Makefile.api make docs +fi } package_qt5-base() { @@ -102,8 +115,8 @@ package_qt5-base() { 'qtchooser' 'libxkbcommon') optdepends=('postgresql-libs: PostgreSQL driver' 'libmariadbclient: MariaDB driver' - 'unixodbc: ODBC driver' - 'libfbclient: Firebird/iBase driver') + 'unixodbc: ODBC driver') + [ "$CARCH" != "mips64el" ] && optdepends+=('libfbclient: Firebird/iBase driver') conflicts=('qt') options=('staticlibs') #libQt5PlatformSupport builds static only diff --git a/extra/qt5/qatomic-before-mips32.patch b/extra/qt5/qatomic-before-mips32.patch new file mode 100644 index 000000000..47d550f93 --- /dev/null +++ b/extra/qt5/qatomic-before-mips32.patch @@ -0,0 +1,34 @@ +ISAs before MIPS32 do not support the argument of sync, so build fails +with -march=mips3 (or -march=loongson2f). + +Since the default argument of 0 does all work of other values, not +specifying it should keep the code correct on older ISAs. + +A proper patch would detect if "sync 0x11" is accepted by the +assembler and choose the appropriate code. + +--- qt-everywhere-opensource-src-5.0.1.orig/qtbase/src/corelib/arch/qatomic_mips.h 2013-03-03 18:52:14.370775913 +0100 ++++ qt-everywhere-opensource-src-5.0.1/qtbase/src/corelib/arch/qatomic_mips.h 2013-03-03 19:30:16.209001188 +0100 +@@ -122,19 +122,19 @@ + template <int size> template <typename T> inline + void QBasicAtomicOps<size>::acquireMemoryFence(const T &) Q_DECL_NOTHROW + { +- asm volatile ("sync 0x11" ::: "memory"); ++ asm volatile ("sync" ::: "memory"); + } + + template <int size> template <typename T> inline + void QBasicAtomicOps<size>::releaseMemoryFence(const T &) Q_DECL_NOTHROW + { +- asm volatile ("sync 0x12" ::: "memory"); ++ asm volatile ("sync" ::: "memory"); + } + + template <int size> template <typename T> inline + void QBasicAtomicOps<size>::orderedMemoryFence(const T &) Q_DECL_NOTHROW + { +- asm volatile ("sync 0" ::: "memory"); ++ asm volatile ("sync" ::: "memory"); + } + + template<> template<typename T> inline |