summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2013-03-03 21:50:15 +0100
committerMichał Masłowski <mtjm@mtjm.eu>2013-03-03 21:50:15 +0100
commit8ba6ee51e836f2a5b78c7d6ca0096ddb5f847833 (patch)
treec4e6aff6a79b88e4964ba95f7c67b5481bee73c5
parentadcb4edd45ebe30c94df81fec16f1e4ae23493ff (diff)
Incomplete build fixes for qt5.
Now build will fail while running mkv8snapshop, it needs porting V8 to N32 first.
-rw-r--r--extra/qt5/PKGBUILD23
-rw-r--r--extra/qt5/qatomic-before-mips32.patch34
2 files changed, 50 insertions, 7 deletions
diff --git a/extra/qt5/PKGBUILD b/extra/qt5/PKGBUILD
index fc04378db..b744bfada 100644
--- a/extra/qt5/PKGBUILD
+++ b/extra/qt5/PKGBUILD
@@ -24,19 +24,22 @@ 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' 'libmysqlclient' 'sqlite' 'unixodbc' 'libfbclient'
+ 'postgresql-libs' 'libmysqlclient' 'sqlite' 'unixodbc'
'python2' 'ruby' 'gperf')
+[ "$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')
+ 'use-python2.patch'
+ 'qatomic-before-mips32.patch')
md5sums=('00a577bd88e682d1b4d01d41d1d699cf'
'f1837a03fd0ebbd2da58975845f278e3'
'480fea1ed076992b688373c8db274be0'
'5595c24d5bb942c21e3a4d299e6d0bf1'
- 'ec3133b093550f16a21bb91e5f0f2943')
+ 'ec3133b093550f16a21bb91e5f0f2943'
+ '84d7fcc2b5f270f482d5522ae01c29e2')
build() {
cd ${_pkgfqn}
@@ -54,6 +57,11 @@ 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"
+
./configure -confirm-license -opensource \
-prefix /usr \
-docdir /usr/share/doc/qt \
@@ -62,7 +70,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 \
@@ -71,7 +79,8 @@ build() {
-no-rpath \
-optimized-qmake \
-dbus-linked \
- -reduce-relocations
+ -reduce-relocations \
+ $extra
make
@@ -87,8 +96,8 @@ package_qt5-base() {
'hicolor-icon-theme' 'xdg-utils')
optdepends=('postgresql-libs: PostgreSQL driver'
'libmysqlclient: MySQL 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