summaryrefslogtreecommitdiff
path: root/extra/qt5
diff options
context:
space:
mode:
Diffstat (limited to 'extra/qt5')
-rw-r--r--extra/qt5/PKGBUILD45
-rw-r--r--extra/qt5/qatomic-before-mips32.patch34
2 files changed, 64 insertions, 15 deletions
diff --git a/extra/qt5/PKGBUILD b/extra/qt5/PKGBUILD
index 658ae50e7..67e7f8647 100644
--- a/extra/qt5/PKGBUILD
+++ b/extra/qt5/PKGBUILD
@@ -3,42 +3,46 @@
pkgbase=qt5
pkgname=('qt5-base'
+ 'qt5-imageformats'
+ 'qt5-script'
+ 'qt5-svg'
+ 'qt5-xmlpatterns')
+# V8 is not ported yet to mips64el, don't build jsbackend and its reverse dependencies there.
+[ "$CARCH" != "mips64el" ] && pkgname+=(
'qt5-declarative'
'qt5-doc'
'qt5-graphicaleffects'
- 'qt5-imageformats'
'qt5-jsbackend'
'qt5-multimedia'
'qt5-quick1'
- 'qt5-script'
- 'qt5-svg'
'qt5-tools'
- 'qt5-translations'
- 'qt5-webkit'
- 'qt5-xmlpatterns')
+ 'qt5-translations')
pkgver=5.0.2
pkgrel=1
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
url='http://qt-project.org/'
license=('GPL3' 'LGPL')
makedepends=('libxcb' 'xcb-proto' 'xcb-util' 'xcb-util-image' 'xcb-util-wm' 'xcb-util-keysyms'
'mesa-libgl' 'at-spi2-core' 'alsa-lib' 'gstreamer0.10-base-plugins'
'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'
'libmng' 'openal' 'gtk2')
+[ "$CARCH" != "mips64el" ] && makedepends+=('libfbclient')
groups=('qt' 'qt5')
options=('!libtool')
_pkgfqn="qt-everywhere-opensource-src-${pkgver}"
source=("http://releases.qt-project.org/${pkgbase}/${pkgver}/single/${_pkgfqn}.tar.xz"
'assistant.desktop' 'designer.desktop' 'linguist.desktop'
- 'use-python2.patch' 'gcc48.patch')
+ 'use-python2.patch' 'gcc48.patch'
+ 'qatomic-before-mips32.patch')
md5sums=('2cab3518d86fe8f0638c7faea8b46397'
'f1837a03fd0ebbd2da58975845f278e3'
'480fea1ed076992b688373c8db274be0'
'5595c24d5bb942c21e3a4d299e6d0bf1'
'd6ab43fb371be494e3bfd9b210c40bf1'
- '7927028e2374321c78a76df858e723d6')
+ '7927028e2374321c78a76df858e723d6'
+ '84d7fcc2b5f270f482d5522ae01c29e2')
build() {
cd ${_pkgfqn}
@@ -56,11 +60,17 @@ build() {
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
$(find . -name '*.py')
+ [ "$CARCH" != "mips64el" ] && extra="-plugin-sql-ibase"
+
+ # Fix build without -march=mips32, mips64 or its superset.
+ patch -p1 -i "$srcdir/qatomic-before-mips32.patch"
+
# GCC 4.8 fixes
cd qtbase
patch -p1 -i "${srcdir}"/gcc48.patch
cd ../
+
./configure -confirm-license -opensource \
-prefix /usr \
-bindir /usr/lib/qt/bin \
@@ -70,7 +80,7 @@ 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 docs \
@@ -79,10 +89,14 @@ build() {
-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
# build docs
make docs
@@ -94,6 +108,7 @@ build() {
make
cd ../../
done
+fi
}
package_qt5-base() {
@@ -103,8 +118,8 @@ package_qt5-base() {
'hicolor-icon-theme' 'xdg-utils' 'icu' 'qtchooser')
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')
install='qt5-base.install'
conflicts=('qt')
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