qt: remove

This commit is contained in:
q66 2021-01-31 18:09:25 +01:00
parent 9d2749905d
commit f1914c9145
40 changed files with 0 additions and 2548 deletions

View File

@ -1 +0,0 @@
qt

View File

@ -1 +0,0 @@
qt

View File

@ -1 +0,0 @@
qt

View File

@ -1 +0,0 @@
qt

View File

@ -1 +0,0 @@
qt

View File

@ -1 +0,0 @@
qt

View File

@ -1 +0,0 @@
qt

View File

@ -1 +0,0 @@
qt

View File

@ -1 +0,0 @@
qt

View File

@ -1 +0,0 @@
qt

View File

@ -1 +0,0 @@
qt

View File

@ -1 +0,0 @@
qt

View File

@ -1,8 +0,0 @@
[Desktop Entry]
Exec=assistant-qt4
Name=Qt Assistant
GenericName=Qt Document Browser
Icon=assistant
Terminal=false
Type=Application
Categories=Qt;Development;Documentation

View File

@ -1,9 +0,0 @@
[Desktop Entry]
Exec=designer-qt4
Name=Qt Designer
GenericName=Interface Designer
MimeType=application/x-designer
Icon=designer
Terminal=false
Type=Application
Categories=Qt;Development;GUIDesigner

View File

@ -1,9 +0,0 @@
[Desktop Entry]
Exec=linguist-qt4
Name=Qt Linguist
GenericName=Translation Tool
MimeType=application/x-linguist
Terminal=false
Type=Application
Icon=linguist
Categories=Qt;Development;Translation

View File

@ -1,8 +0,0 @@
[Desktop Entry]
Name=Qt Config
Comment=Configure Qt behavior, styles, fonts
Exec=qtconfig-qt4
Icon=qtlogo.png
Terminal=false
Type=Application
Categories=Qt;Settings;

View File

@ -1,34 +0,0 @@
From 2011bb8029480af1d1266f258e5a5f5cef7392d3 Mon Sep 17 00:00:00 2001
From: Pavel Heimlich <tropikhajma@gmail.com>
Date: Wed, 26 Sep 2012 20:31:10 +0200
Subject: [PATCH 07/21] dbus: Remove "const" usage that causes compile failure
building nativesdk-qt4-tools
Patch has apparently been rejected upstream, not because it is invalid
but because the submitter did not submit a merge request for it, so the
validity of the patch upstream is uncertain. For further details see:
https://bugreports.qt-project.org/browse/QTBUG-17962
Upstream-Status: Denied [possible retry]
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
src/dbus/qdbusintegrator.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 0f0b647..aa4cbab 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE
static bool isDebugging;
#define qDBusDebug if (!::isDebugging); else qDebug
-Q_GLOBAL_STATIC_WITH_ARGS(const QString, orgFreedesktopDBusString, (QLatin1String(DBUS_SERVICE_DBUS)))
+Q_GLOBAL_STATIC_WITH_ARGS(QString, orgFreedesktopDBusString, (QLatin1String(DBUS_SERVICE_DBUS)))
static inline QString dbusServiceString()
{ return *orgFreedesktopDBusString(); }
--
1.8.0

View File

@ -1,541 +0,0 @@
--- qt.orig/configure 2017-01-13 19:15:45.711744577 +0100
+++ qt/configure 2017-01-13 19:28:48.368861990 +0100
@@ -2812,6 +2812,9 @@
*86_64)
PLATFORM=qws/linux-x86_64-g++
;;
+ aarch64)
+ PLATFORM=qws/linux-aarch64-g++
+ ;;
*)
PLATFORM=qws/linux-generic-g++
;;
@@ -3257,6 +3260,12 @@
fi
CFG_HOST_ARCH=arm
;;
+ *:*:aarch64*)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " AArch64 (aarch64)"
+ fi
+ CFG_HOST_ARCH=aarch64
+ ;;
Linux:*:sparc*)
if [ "$OPT_VERBOSE" = "yes" ]; then
echo " Linux on SPARC"
--- /dev/null
+++ qt/mkspecs/linux-aarch64-g++/qplatformdefs.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../linux-g++/qplatformdefs.h"
--- /dev/null
+++ qt/mkspecs/linux-aarch64-g++/qmake.conf
@@ -0,0 +1,28 @@
+#
+# qmake configuration for linux-g++
+#
+# Written for GNU/Linux platforms that have both lib and lib64 directories,
+# like the AMD Opteron.
+#
+
+MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = unix
+TEMPLATE = app
+CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
+QT += core gui
+QMAKE_INCREMENTAL_STYLE = sublib
+
+QMAKE_CFLAGS = -fpermissive
+QMAKE_LFLAGS =
+
+QMAKE_CFLAGS_RELEASE += -O2
+
+include(../common/linux.conf)
+include(../common/gcc-base-unix.conf)
+include(../common/g++-unix.conf)
+
+
+QMAKE_LIBDIR_X11 = /usr/X11R6/lib
+QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
+
+load(qt_config)
--- /dev/null
+++ qt/src/corelib/arch/aarch64/qatomic_aarch64.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2012, 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qglobal.h>
+
+#include <unistd.h>
+#ifdef _POSIX_PRIORITY_SCHEDULING
+# include <sched.h>
+#endif
+#include <time.h>
+
+QT_BEGIN_NAMESPACE
+
+QT_USE_NAMESPACE
+
+Q_CORE_EXPORT void qt_atomic_yield(int *count)
+{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+ if((*count)++ < 50) {
+ sched_yield();
+ } else
+#endif
+ {
+ struct timespec tm;
+ tm.tv_sec = 0;
+ tm.tv_nsec = 2000001;
+ nanosleep(&tm, NULL);
+ *count = 0;
+ }
+}
+
+QT_END_NAMESPACE
--- qt.orig/src/corelib/arch/arch.pri
+++ qt/src/corelib/arch/arch.pri
@@ -31,7 +31,9 @@ integrity:HEADERS += arch/qatomic_integr
arch/qatomic_s390.h \
arch/qatomic_x86_64.h \
arch/qatomic_sh.h \
- arch/qatomic_sh4a.h
+ arch/qatomic_sh4a.h \
+ arch/qatomic_aarch64.h \
+
QT_ARCH_CPP = $$QT_SOURCE_TREE/src/corelib/arch/$$QT_ARCH
DEPENDPATH += $$QT_ARCH_CPP
--- /dev/null
+++ qt/include/QtCore/qatomic_aarch64.h
@@ -0,0 +1 @@
+#include "../../src/corelib/arch/qatomic_aarch64.h"
--- /dev/null
+++ qt/src/corelib/arch/qatomic_aarch64.h
@@ -0,0 +1,335 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QATOMIC_AARCH64_H
+#define QATOMIC_AARCH64_H
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_ALWAYS_NATIVE
+
+inline bool QBasicAtomicInt::isReferenceCountingNative()
+{ return true; }
+inline bool QBasicAtomicInt::isReferenceCountingWaitFree()
+{ return false; }
+
+#define Q_ATOMIC_INT_TEST_AND_SET_IS_ALWAYS_NATIVE
+
+inline bool QBasicAtomicInt::isTestAndSetNative()
+{ return true; }
+inline bool QBasicAtomicInt::isTestAndSetWaitFree()
+{ return false; }
+
+#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_ALWAYS_NATIVE
+
+inline bool QBasicAtomicInt::isFetchAndStoreNative()
+{ return true; }
+inline bool QBasicAtomicInt::isFetchAndStoreWaitFree()
+{ return false; }
+
+#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_ALWAYS_NATIVE
+
+inline bool QBasicAtomicInt::isFetchAndAddNative()
+{ return true; }
+inline bool QBasicAtomicInt::isFetchAndAddWaitFree()
+{ return false; }
+
+#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_ALWAYS_NATIVE
+
+template <typename T>
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetNative()
+{ return true; }
+template <typename T>
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetWaitFree()
+{ return false; }
+
+#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_ALWAYS_NATIVE
+
+template <typename T>
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreNative()
+{ return true; }
+template <typename T>
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreWaitFree()
+{ return false; }
+
+#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_ALWAYS_NATIVE
+
+template <typename T>
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddNative()
+{ return true; }
+template <typename T>
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
+{ return false; }
+
+#ifndef Q_DATA_MEMORY_BARRIER
+# define Q_DATA_MEMORY_BARRIER asm volatile("dmb sy\n":::"memory")
+#endif
+#ifndef Q_COMPILER_MEMORY_BARRIER
+# define Q_COMPILER_MEMORY_BARRIER asm volatile("":::"memory")
+#endif
+
+inline bool QBasicAtomicInt::ref()
+{
+ int newValue;
+
+ Q_COMPILER_MEMORY_BARRIER;
+ newValue = __atomic_add_fetch(&_q_value, 1, __ATOMIC_ACQ_REL);
+ Q_COMPILER_MEMORY_BARRIER;
+
+ return newValue != 0;
+}
+
+inline bool QBasicAtomicInt::deref()
+{
+ int newValue;
+
+ Q_COMPILER_MEMORY_BARRIER;
+ newValue = __atomic_sub_fetch(&_q_value, 1, __ATOMIC_ACQ_REL);
+ Q_COMPILER_MEMORY_BARRIER;
+
+ return newValue != 0;
+}
+
+inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
+{
+ bool val;
+
+ Q_COMPILER_MEMORY_BARRIER;
+ val = __atomic_compare_exchange_n (&_q_value, &expectedValue, newValue,
+ false, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
+ Q_COMPILER_MEMORY_BARRIER;
+ return val;
+}
+
+inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
+{
+ int val;
+ Q_COMPILER_MEMORY_BARRIER;
+ val = __atomic_exchange_n(&_q_value, newValue, __ATOMIC_RELAXED);
+ Q_COMPILER_MEMORY_BARRIER;
+ return val;
+}
+
+inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
+{
+ int val;
+ Q_COMPILER_MEMORY_BARRIER;
+ val = __atomic_fetch_add(&_q_value, valueToAdd, __ATOMIC_RELAXED);
+ Q_COMPILER_MEMORY_BARRIER;
+ return val;
+}
+
+template <typename T>
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
+{
+ bool val;
+ Q_COMPILER_MEMORY_BARRIER;
+ val = __atomic_compare_exchange_n (&_q_value, &expectedValue, newValue,
+ false, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
+ Q_COMPILER_MEMORY_BARRIER;
+ return val;
+}
+
+template <typename T>
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
+{
+ T *val;
+ Q_COMPILER_MEMORY_BARRIER;
+ val = __atomic_exchange_n(&_q_value, newValue, __ATOMIC_RELAXED);
+ Q_COMPILER_MEMORY_BARRIER;
+ return val;
+}
+
+template <typename T>
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
+{
+ T *val;
+ Q_COMPILER_MEMORY_BARRIER;
+ val = __atomic_fetch_add(&_q_value, valueToAdd, __ATOMIC_RELAXED);
+ Q_COMPILER_MEMORY_BARRIER;
+ return val;
+}
+
+inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
+{
+ bool returnValue = testAndSetRelaxed(expectedValue, newValue);
+ Q_DATA_MEMORY_BARRIER;
+ return returnValue;
+}
+
+inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
+{
+ Q_DATA_MEMORY_BARRIER;
+ return testAndSetRelaxed(expectedValue, newValue);
+}
+
+inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue)
+{
+ Q_DATA_MEMORY_BARRIER;
+ bool returnValue = testAndSetRelaxed(expectedValue, newValue);
+ Q_COMPILER_MEMORY_BARRIER;
+ return returnValue;
+}
+
+inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
+{
+ int returnValue = fetchAndStoreRelaxed(newValue);
+ Q_DATA_MEMORY_BARRIER;
+ return returnValue;
+}
+
+inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
+{
+ Q_DATA_MEMORY_BARRIER;
+ return fetchAndStoreRelaxed(newValue);
+}
+
+inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
+{
+ Q_DATA_MEMORY_BARRIER;
+ int returnValue = fetchAndStoreRelaxed(newValue);
+ Q_COMPILER_MEMORY_BARRIER;
+ return returnValue;
+}
+
+inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
+{
+ int returnValue = fetchAndAddRelaxed(valueToAdd);
+ Q_DATA_MEMORY_BARRIER;
+ return returnValue;
+}
+
+inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
+{
+ Q_DATA_MEMORY_BARRIER;
+ return fetchAndAddRelaxed(valueToAdd);
+}
+
+inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd)
+{
+ Q_DATA_MEMORY_BARRIER;
+ int returnValue = fetchAndAddRelaxed(valueToAdd);
+ Q_COMPILER_MEMORY_BARRIER;
+ return returnValue;
+}
+
+template <typename T>
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
+{
+ bool returnValue = testAndSetRelaxed(expectedValue, newValue);
+ Q_DATA_MEMORY_BARRIER;
+ return returnValue;
+}
+
+template <typename T>
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
+{
+ Q_DATA_MEMORY_BARRIER;
+ return testAndSetRelaxed(expectedValue, newValue);
+}
+
+template <typename T>
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue)
+{
+ Q_DATA_MEMORY_BARRIER;
+ bool returnValue = testAndSetAcquire(expectedValue, newValue);
+ Q_COMPILER_MEMORY_BARRIER;
+ return returnValue;
+}
+
+template <typename T>
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
+{
+ T *returnValue = fetchAndStoreRelaxed(newValue);
+ Q_DATA_MEMORY_BARRIER;
+ return returnValue;
+}
+
+template <typename T>
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
+{
+ Q_DATA_MEMORY_BARRIER;
+ return fetchAndStoreRelaxed(newValue);
+}
+
+template <typename T>
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue)
+{
+ Q_DATA_MEMORY_BARRIER;
+ T *returnValue = fetchAndStoreRelaxed(newValue);
+ Q_COMPILER_MEMORY_BARRIER;
+ return returnValue;
+}
+
+template <typename T>
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
+{
+ T *returnValue = fetchAndAddRelaxed(valueToAdd);
+ Q_DATA_MEMORY_BARRIER;
+ return returnValue;
+}
+
+template <typename T>
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
+{
+ Q_DATA_MEMORY_BARRIER;
+ return fetchAndAddRelaxed(valueToAdd);
+}
+
+template <typename T>
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd)
+{
+ Q_DATA_MEMORY_BARRIER;
+ T *returnValue = fetchAndAddRelaxed(valueToAdd);
+ Q_COMPILER_MEMORY_BARRIER;
+ return returnValue;
+}
+
+#undef Q_DATA_MEMORY_BARRIER
+#undef Q_COMPILER_MEMORY_BARRIER
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QATOMIC_AARCH64_H
--- qt.orig/src/corelib/arch/qatomic_arch.h
+++ qt/src/corelib/arch/qatomic_arch.h
@@ -94,6 +94,8 @@ QT_BEGIN_HEADER
# include "QtCore/qatomic_sh4a.h"
#elif defined(QT_ARCH_NACL)
# include "QtCore/qatomic_generic.h"
+#elif defined(QT_ARCH_AARCH64)
+# include "QtCore/qatomic_aarch64.h"
#else
# error "Qt has not been ported to this architecture"
#endif

View File

@ -1,13 +0,0 @@
Currently alsa-lib is at 1.1.2, thus accept SND_LIB_MINOR > 0 anyway.
--- a/config.tests/unix/alsa/alsatest.cpp 2015-05-07 16:14:42.000000000 +0200
+++ b/config.tests/unix/alsa/alsatest.cpp 2016-09-11 22:51:18.647973737 +0200
@@ -40,7 +40,7 @@
****************************************************************************/
#include <alsa/asoundlib.h>
-#if(!(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 10))
+#if(!(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || (SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 10))))
#error "Alsa version found too old, require >= 1.0.10"
#endif

View File

@ -1,22 +0,0 @@
Fix gcc6 -Wnarrowing errors by casting to uint32_t
--- a/src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.h 2015-05-07 16:14:47.000000000 +0200
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.h 2016-09-11 22:26:00.614829051 +0200
@@ -176,7 +176,7 @@
// Node::emitCode assumes that dst, if provided, is either a local or a referenced temporary.
ASSERT(!dst || dst == ignoredResult() || !dst->isTemporary() || dst->refCount());
if (!m_codeBlock->numberOfLineInfos() || m_codeBlock->lastLineInfo().lineNumber != n->lineNo()) {
- LineInfo info = { instructions().size(), n->lineNo() };
+ LineInfo info = { (uint32_t)instructions().size(), n->lineNo() };
m_codeBlock->addLineInfo(info);
}
if (m_emitNodeDepth >= s_maxEmitNodeDepth)
@@ -195,7 +195,7 @@
void emitNodeInConditionContext(ExpressionNode* n, Label* trueTarget, Label* falseTarget, bool fallThroughMeansTrue)
{
if (!m_codeBlock->numberOfLineInfos() || m_codeBlock->lastLineInfo().lineNumber != n->lineNo()) {
- LineInfo info = { instructions().size(), n->lineNo() };
+ LineInfo info = { (uint32_t)instructions().size(), n->lineNo() };
m_codeBlock->addLineInfo(info);
}
if (m_emitNodeDepth >= s_maxEmitNodeDepth)

View File

@ -1,14 +0,0 @@
This & seems wrong, but the static_cast to QItemSelectionModel::SelectionFlags
is required anyway to make gcc6 happy.
--- a/src/plugins/accessible/widgets/itemviews.cpp 2015-05-07 16:14:48.000000000 +0200
+++ b/src/plugins/accessible/widgets/itemviews.cpp 2016-09-11 23:17:33.960195447 +0200
@@ -393,7 +393,7 @@
QModelIndex index = view()->model()->index(0, column, view()->rootIndex());
if (!index.isValid() || view()->selectionMode() & QAbstractItemView::NoSelection)
return false;
- view()->selectionModel()->select(index, QItemSelectionModel::Columns & QItemSelectionModel::Deselect);
+ view()->selectionModel()->select(index, static_cast<QItemSelectionModel::SelectionFlags>(QItemSelectionModel::Columns & QItemSelectionModel::Deselect));
return true;
}

View File

@ -1,13 +0,0 @@
--- a/src/xmlpatterns/api/qcoloroutput_p.h 2015-05-07 16:14:48.000000000 +0200
+++ b/src/xmlpatterns/api/qcoloroutput_p.h 2016-09-11 22:21:15.868628553 +0200
@@ -70,8 +70,8 @@
ForegroundShift = 10,
BackgroundShift = 20,
SpecialShift = 20,
- ForegroundMask = ((1 << ForegroundShift) - 1) << ForegroundShift,
- BackgroundMask = ((1 << BackgroundShift) - 1) << BackgroundShift
+ ForegroundMask = ((1 << ForegroundShift) - 1),
+ BackgroundMask = ((1 << BackgroundShift) - 1)
};
public:

View File

@ -1,25 +0,0 @@
Fix type_traits for newer compilers (both, gcc-4.9.4 and gcc-6.2.0)
There is no std::tr1::has_trivial_constructor etc. anymore.
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h 2016-09-12 01:09:46.592885353 +0200
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h 2016-09-12 01:20:07.594161571 +0200
@@ -166,7 +166,7 @@
typedef T Type;
};
-#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
+#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && (__GLIBCXX__ < 20160726) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
// GCC's libstdc++ 20070724 and later supports C++ TR1 type_traits in the std namespace.
// VC10 (VS2010) and later support C++ TR1 type_traits in the std::tr1 namespace.
--- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/TypeTraits.h 2015-05-07 16:14:45.000000000 +0200
+++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/TypeTraits.h 2016-09-12 01:36:22.347445737 +0200
@@ -179,7 +179,7 @@
typedef T Type;
};
-#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
+#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && (__GLIBCXX__ < 20160726) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
// GCC's libstdc++ 20070724 and later supports C++ TR1 type_traits in the std namespace.
// VC10 (VS2010) and later support C++ TR1 type_traits in the std::tr1 namespace.

View File

@ -1,236 +0,0 @@
From 97ec1d1882a83c23c91f0f7daea48e05858d8c32 Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@intel.com>
Date: Mon, 28 Jan 2019 14:33:12 -0800
Subject: [PATCH] Fix build with GCC 8.3
Qualifiers in the asm statement are not allowed in the global scope. I
thought they were necessary for LTO, but I the commit to this file that
added them predates my work on setting up LTO for GCC.
Change-Id: Id98140e1c2f0426cabbefffd157e23e5ece67a49
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
---
.../JavaScriptCore/jit/JITStubs.cpp | 48 +++++++++----------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
index 1abdf8b..9f60761 100644
--- qtscript/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
+++ qtscript/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
@@ -116,7 +116,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, savedEBX) == 0x3c, JITStackFrame_s
COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x58, JITStackFrame_callFrame_offset_matches_ctiTrampoline);
COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x50, JITStackFrame_code_offset_matches_ctiTrampoline);
-asm volatile (
+asm (
".text\n"
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
HIDE_SYMBOL(ctiTrampoline) "\n"
@@ -138,7 +138,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
@@ -154,7 +154,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
HIDE_SYMBOL(ctiOpThrowNotCaught) "\n"
SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
@@ -179,7 +179,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, savedRBX) == 0x48, JITStackFrame_s
COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x90, JITStackFrame_callFrame_offset_matches_ctiTrampoline);
COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x80, JITStackFrame_code_offset_matches_ctiTrampoline);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
HIDE_SYMBOL(ctiTrampoline) "\n"
SYMBOL_STRING(ctiTrampoline) ":" "\n"
@@ -206,7 +206,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
@@ -222,7 +222,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
HIDE_SYMBOL(ctiOpThrowNotCaught) "\n"
SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
@@ -242,7 +242,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
#error "JIT_STUB_ARGUMENT_VA_LIST not supported on ARMv7."
#endif
-asm volatile (
+asm (
".text" "\n"
".align 2" "\n"
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
@@ -269,7 +269,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"bx lr" "\n"
);
-asm volatile (
+asm (
".text" "\n"
".align 2" "\n"
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
@@ -287,7 +287,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
"bx lr" "\n"
);
-asm volatile (
+asm (
".text" "\n"
".align 2" "\n"
".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
@@ -305,7 +305,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
#elif COMPILER(GCC) && CPU(ARM_TRADITIONAL)
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
HIDE_SYMBOL(ctiTrampoline) "\n"
SYMBOL_STRING(ctiTrampoline) ":" "\n"
@@ -323,7 +323,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"mov pc, lr" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
@@ -418,7 +418,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x38, JITStackFrame_
COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x30, JITStackFrame_code_offset_matches_ctiTrampoline);
COMPILE_ASSERT(offsetof(struct JITStackFrame, savedEBX) == 0x1c, JITStackFrame_stub_argument_space_matches_ctiTrampoline);
-asm volatile (
+asm (
".text\n"
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
HIDE_SYMBOL(ctiTrampoline) "\n"
@@ -440,7 +440,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
@@ -456,7 +456,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
HIDE_SYMBOL(ctiOpThrowNotCaught) "\n"
SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
@@ -480,7 +480,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x58, JITStackFrame_
COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x48, JITStackFrame_code_offset_matches_ctiTrampoline);
COMPILE_ASSERT(offsetof(struct JITStackFrame, savedRBX) == 0x78, JITStackFrame_stub_argument_space_matches_ctiTrampoline);
-asm volatile (
+asm (
".text\n"
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
HIDE_SYMBOL(ctiTrampoline) "\n"
@@ -515,7 +515,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
@@ -531,7 +531,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
"ret" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
HIDE_SYMBOL(ctiOpThrowNotCaught) "\n"
SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
@@ -551,7 +551,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
#error "JIT_STUB_ARGUMENT_VA_LIST not supported on ARMv7."
#endif
-asm volatile (
+asm (
".text" "\n"
".align 2" "\n"
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
@@ -578,7 +578,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"bx lr" "\n"
);
-asm volatile (
+asm (
".text" "\n"
".align 2" "\n"
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
@@ -596,7 +596,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
"bx lr" "\n"
);
-asm volatile (
+asm (
".text" "\n"
".align 2" "\n"
".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n"
@@ -614,7 +614,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n"
#elif COMPILER(GCC) && CPU(ARM_TRADITIONAL)
-asm volatile (
+asm (
".text\n"
".globl " SYMBOL_STRING(ctiTrampoline) "\n"
HIDE_SYMBOL(ctiTrampoline) "\n"
@@ -632,7 +632,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n"
"mov pc, lr" "\n"
);
-asm volatile (
+asm (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
HIDE_SYMBOL(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
@@ -1024,7 +1024,7 @@ static NEVER_INLINE void throwStackOverflowError(CallFrame* callFrame, JSGlobalD
extern "C" { \
rtype JITStubThunked_##op(STUB_ARGS_DECLARATION); \
}; \
- asm volatile ( \
+ asm ( \
".text" "\n" \
".align 2" "\n" \
".globl " SYMBOL_STRING(cti_##op) "\n" \
@@ -1053,7 +1053,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, thunkReturnAddress) == THUNK_RETUR
extern "C" { \
rtype JITStubThunked_##op(STUB_ARGS_DECLARATION); \
}; \
- asm volatile ( \
+ asm ( \
".globl " SYMBOL_STRING(cti_##op) "\n" \
HIDE_SYMBOL(cti_##op) "\n" \
SYMBOL_STRING(cti_##op) ":" "\n" \

View File

@ -1,67 +0,0 @@
# reason: FTBFS with gcc9
# src: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925811
From c35a3f519007af44c3b364b9af86f6a336f6411b Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@intel.com>
Date: Tue, 11 Feb 2014 16:17:46 -0800
Subject: [PATCH] Redo the Q_FOREACH loop control without GCC statement
expressions
It's possible to do without them, which probably makes the number of
supported compilers a lot bigger: they just need to support decltype()
or __typeof__.
That includes the Intel compiler. The old code was also apparently
working, but no one had realized the old workaround for some old version
was still in place.
The loop overhead is more or less the same. I have not done benchmarks,
but inspection of the generated assembly shows more or less the same
number of instructions.
Change-Id: I32d499c84a6ddd19d994b49f17a469acb5c3a3f1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Backported to Qt 4
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -2482,22 +2482,32 @@ typedef uint Flags;
#endif /* Q_NO_TYPESAFE_FLAGS */
-#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_RVCT)
+#if (defined(Q_CC_GNU) && !defined(Q_CC_RVCT))
/* make use of typeof-extension */
template <typename T>
class QForeachContainer {
public:
- inline QForeachContainer(const T& t) : c(t), brk(0), i(c.begin()), e(c.end()) { }
+ inline QForeachContainer(const T& t) : c(t), i(c.begin()), e(c.end()), control(1) { }
const T c;
int brk;
typename T::const_iterator i, e;
+ int control;
};
+// Explanation of the control word:
+// - it's initialized to 1
+// - that means both the inner and outer loops start
+// - if there were no breaks, at the end of the inner loop, it's set to 0, which
+// causes it to exit (the inner loop is run exactly once)
+// - at the end of the outer loop, it's inverted, so it becomes 1 again, allowing
+// the outer loop to continue executing
+// - if there was a break inside the inner loop, it will exit with control still
+// set to 1; in that case, the outer loop will invert it to 0 and will exit too
#define Q_FOREACH(variable, container) \
for (QForeachContainer<__typeof__(container)> _container_(container); \
- !_container_.brk && _container_.i != _container_.e; \
- __extension__ ({ ++_container_.brk; ++_container_.i; })) \
- for (variable = *_container_.i;; __extension__ ({--_container_.brk; break;}))
+ _container_.control && _container_.i != _container_.e; \
+ ++_container_.i, _container_.control ^= 1) \
+ for (variable = *_container_.i; _container_.control; _container_.control = 0)
#else

View File

@ -1,84 +0,0 @@
diff -ur qt-everywhere-opensource-src-4.6.2/src/gui/dialogs/qprintdialog_unix.cpp qt-everywhere-opensource-src-4.6.2-cups/src/gui/dialogs/qprintdialog_unix.cpp
--- qt-everywhere-opensource-src-4.6.2/src/gui/dialogs/qprintdialog_unix.cpp 2010-02-11 16:55:22.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2-cups/src/gui/dialogs/qprintdialog_unix.cpp 2010-02-28 04:34:16.000000000 +0100
@@ -569,6 +569,32 @@
void QPrintDialogPrivate::selectPrinter(QCUPSSupport *cups)
{
options.duplex->setEnabled(cups && cups->ppdOption("Duplex"));
+
+ if (cups) {
+ const ppd_option_t* duplex = cups->ppdOption("Duplex");
+ if (duplex) {
+ // copy default ppd duplex to qt dialog
+ if (qstrcmp(duplex->defchoice, "DuplexTumble") == 0)
+ options.duplexShort->setChecked(true);
+ else if (qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0)
+ options.duplexLong->setChecked(true);
+ else
+ options.noDuplex->setChecked(true);
+ }
+
+ if (cups->currentPPD()) {
+ // set default color
+ if (cups->currentPPD()->color_device)
+ options.color->setChecked(true);
+ else
+ options.grayscale->setChecked(true);
+ }
+
+ // set collation
+ const ppd_option_t *collate = cups->ppdOption("Collate");
+ if (collate)
+ options.collate->setChecked(qstrcmp(collate->defchoice, "True")==0);
+ }
}
#endif
diff -ur qt-everywhere-opensource-src-4.6.2/src/gui/painting/qprinter.cpp qt-everywhere-opensource-src-4.6.2-cups/src/gui/painting/qprinter.cpp
--- qt-everywhere-opensource-src-4.6.2/src/gui/painting/qprinter.cpp 2010-02-11 16:55:22.000000000 +0100
+++ qt-everywhere-opensource-src-4.6.2-cups/src/gui/painting/qprinter.cpp 2010-02-28 04:55:15.000000000 +0100
@@ -627,6 +627,44 @@
&& d_ptr->paintEngine->type() != QPaintEngine::MacPrinter) {
setOutputFormat(QPrinter::PdfFormat);
}
+
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+ // fill in defaults from ppd file
+ QCUPSSupport cups;
+
+ int printernum = -1;
+ for (int i = 0; i < cups.availablePrintersCount(); i++) {
+ if (printerName().toLocal8Bit() == cups.availablePrinters()[i].name)
+ printernum = i;
+ }
+ if (printernum >= 0) {
+ cups.setCurrentPrinter(printernum);
+
+ const ppd_option_t* duplex = cups.ppdOption("Duplex");
+ if (duplex) {
+ // copy default ppd duplex to qt dialog
+ if (qstrcmp(duplex->defchoice, "DuplexTumble") == 0)
+ setDuplex(DuplexShortSide);
+ else if (qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0)
+ setDuplex(DuplexLongSide);
+ else
+ setDuplex(DuplexNone);
+ }
+
+ if (cups.currentPPD()) {
+ // set default color
+ if (cups.currentPPD()->color_device)
+ setColorMode(Color);
+ else
+ setColorMode(GrayScale);
+ }
+
+ // set collation
+ const ppd_option_t *collate = cups.ppdOption("Collate");
+ if (collate)
+ setCollateCopies(qstrcmp(collate->defchoice, "True")==0);
+ }
+#endif
}
/*!

View File

@ -1,11 +0,0 @@
--- a/src/gui/kernel/qkde.cpp.orig 2015-05-27 11:42:02.507129332 +0200
+++ b/src/gui/kernel/qkde.cpp 2015-05-27 11:43:26.182875729 +0200
@@ -63,7 +63,7 @@
kdeHomePath = QString::fromLocal8Bit(qgetenv("KDEHOME"));
if (kdeHomePath.isEmpty()) {
QDir homeDir(QDir::homePath());
- QString kdeConfDir(QLatin1String("/.kde"));
+ QString kdeConfDir(QLatin1String("/.kde4"));
if (4 == X11->desktopVersion && homeDir.exists(QLatin1String(".kde4")))
kdeConfDir = QLatin1String("/.kde4");
kdeHomePath = QDir::homePath() + kdeConfDir;

View File

@ -1,31 +0,0 @@
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp 2018-10-28 11:09:30.259495644 +0100
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp 2018-10-28 11:10:29.941933269 +0100
@@ -111,10 +111,10 @@
DEFINEFUNC2(int, ASN1_STRING_to_UTF8, unsigned char **a, a, ASN1_STRING *b, b, return 0, return);
DEFINEFUNC4(long, BIO_ctrl, BIO *a, a, int b, b, long c, c, void *d, d, return -1, return)
DEFINEFUNC(int, BIO_free, BIO *a, a, return 0, return)
-DEFINEFUNC(BIO *, BIO_new, BIO_METHOD *a, a, return 0, return)
+DEFINEFUNC(BIO *, BIO_new, const BIO_METHOD *a, a, return 0, return)
DEFINEFUNC2(BIO *, BIO_new_mem_buf, void *a, a, int b, b, return 0, return)
DEFINEFUNC3(int, BIO_read, BIO *a, a, void *b, b, int c, c, return -1, return)
-DEFINEFUNC(BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return)
+DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return)
DEFINEFUNC3(int, BIO_write, BIO *a, a, const void *b, b, int c, c, return -1, return)
DEFINEFUNC(int, BN_num_bits, const BIGNUM *a, a, return 0, return)
DEFINEFUNC(int, CRYPTO_num_locks, DUMMYARG, DUMMYARG, return 0, return)
--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h 2018-10-28 11:20:59.516033387 +0100
+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h 2018-10-28 11:20:31.770292922 +0100
@@ -207,10 +207,10 @@
int q_ASN1_STRING_to_UTF8(unsigned char **a, ASN1_STRING *b);
long q_BIO_ctrl(BIO *a, int b, long c, void *d);
int q_BIO_free(BIO *a);
-BIO *q_BIO_new(BIO_METHOD *a);
+BIO *q_BIO_new(const BIO_METHOD *a);
BIO *q_BIO_new_mem_buf(void *a, int b);
int q_BIO_read(BIO *a, void *b, int c);
-BIO_METHOD *q_BIO_s_mem();
+const BIO_METHOD *q_BIO_s_mem();
int q_BIO_write(BIO *a, const void *b, int c);
int q_BN_num_bits(const BIGNUM *a);
int q_CRYPTO_num_locks();

View File

@ -1,11 +0,0 @@
--- qt.orig/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2015-05-07 16:14:48.000000000 +0200
+++ qt/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2017-01-14 19:34:43.375000207 +0100
@@ -336,7 +336,7 @@
/* CPU(MIPS) - MIPS, any version */
#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_))
#define WTF_CPU_MIPS 1
-#include <sgidefs.h>
+#include <asm/sgidefs.h>
#if defined(__MIPSEB__)
#define WTF_CPU_BIG_ENDIAN 1
#endif

View File

@ -1,12 +0,0 @@
diff -upr qt-everywhere-opensource-src-4.8.6.orig/src/tools/moc/main.cpp qt-everywhere-opensource-src-4.8.6/src/tools/moc/main.cpp
--- qt-everywhere-opensource-src-4.8.6.orig/src/tools/moc/main.cpp 2014-04-10 21:37:12.000000000 +0300
+++ qt-everywhere-opensource-src-4.8.6/src/tools/moc/main.cpp 2014-11-06 02:24:44.287305916 +0200
@@ -190,6 +190,8 @@ int runMoc(int _argc, char **_argv)
// Workaround a bug while parsing the boost/type_traits/has_operator.hpp header. See QTBUG-22829
pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"];
+ pp.macros["BOOST_LEXICAL_CAST_INCLUDED"];
+ pp.macros["BOOST_NEXT_PRIOR_HPP_INCLUDED"];
QByteArray filename;
QByteArray output;

View File

@ -1,11 +0,0 @@
--- qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp 2017-02-20 18:21:15.826212874 +0100
+++ qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp 2017-02-20 18:23:02.448342205 +0100
@@ -192,6 +192,8 @@
pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"];
pp.macros["BOOST_LEXICAL_CAST_INCLUDED"];
pp.macros["BOOST_NEXT_PRIOR_HPP_INCLUDED"];
+ // Workaround a bug where newer kernel-libc-headers sys/sysmacros.h define macros like major, minor
+ pp.macros["_SYS_SYSMACROS_H_OUTER"];
QByteArray filename;
QByteArray output;

View File

@ -1,34 +0,0 @@
$OpenBSD: patch-src_network_ssl_qsslsocket_openssl_cpp,v 1.4 2016/01/06 17:17:32 zhuk Exp $
1. Disable SSLv3 by default.
2. TLSv1_*_method() are TLSv1.0-only, so default to SSLv23_*_method(), which is
actually TLSv1.* nowadays.
2a. Make QSsl::TlsV1 also use SSLv23_*_method(), noone in good mind would
want to run TLSv1.0-only connections, and too many developers fail
same way due to bad naming.
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl.cpp.orig Thu May 7 17:14:44 2015
+++ qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl.cpp Wed Jan 6 20:10:23 2016
@@ -267,16 +267,18 @@ init_context:
#endif
break;
case QSsl::SslV3:
+#ifndef OPENSSL_NO_SSL3
ctx = q_SSL_CTX_new(client ? q_SSLv3_client_method() : q_SSLv3_server_method());
+#else
+ ctx = 0; // SSL 3 not supported by the system, but chosen deliberately -> error
+#endif
break;
- case QSsl::SecureProtocols: // SslV2 will be disabled below
- case QSsl::TlsV1SslV3: // SslV2 will be disabled below
case QSsl::AnyProtocol:
+ case QSsl::SecureProtocols:
+ case QSsl::TlsV1SslV3:
+ case QSsl::TlsV1: // this is TLSv1.0 only case, but misused as TLSv1.x too often
default:
ctx = q_SSL_CTX_new(client ? q_SSLv23_client_method() : q_SSLv23_server_method());
- break;
- case QSsl::TlsV1:
- ctx = q_SSL_CTX_new(client ? q_TLSv1_client_method() : q_TLSv1_server_method());
break;
}
if (!ctx) {

View File

@ -1,40 +0,0 @@
$OpenBSD: patch-src_network_ssl_qsslsocket_openssl_symbols_cpp,v 1.3 2015/09/17 12:24:42 dcoppa Exp $
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp.orig Wed Sep 16 13:27:39 2015
+++ qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp Wed Sep 16 13:33:06 2015
@@ -228,13 +228,17 @@ DEFINEFUNC(int, SSL_shutdown, SSL *a, a, return -1, re
#ifndef OPENSSL_NO_SSL2
DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
#endif
+#ifndef OPENSSL_NO_SSL3
DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
#ifndef OPENSSL_NO_SSL2
DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
#endif
+#ifndef OPENSSL_NO_SSL3
DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
#else
@@ -822,13 +826,17 @@ bool q_resolveOpenSslSymbols()
#ifndef OPENSSL_NO_SSL2
RESOLVEFUNC(SSLv2_client_method)
#endif
+#ifndef OPENSSL_NO_SSL3
RESOLVEFUNC(SSLv3_client_method)
+#endif
RESOLVEFUNC(SSLv23_client_method)
RESOLVEFUNC(TLSv1_client_method)
#ifndef OPENSSL_NO_SSL2
RESOLVEFUNC(SSLv2_server_method)
#endif
+#ifndef OPENSSL_NO_SSL3
RESOLVEFUNC(SSLv3_server_method)
+#endif
RESOLVEFUNC(SSLv23_server_method)
RESOLVEFUNC(TLSv1_server_method)
RESOLVEFUNC(X509_NAME_entry_count)

View File

@ -1,754 +0,0 @@
Source: @pullmoll
Upstream: no (Qt4 is dead)
Reason: Implement atomic operations like it was done for aarch64 using gcc builtins
diff -rub qt.orig/src/corelib/arch/powerpc/arch.pri qt/src/corelib/arch/powerpc/arch.pri
--- qt.orig/src/corelib/arch/powerpc/arch.pri 2015-05-07 16:14:48.000000000 +0200
+++ qt/src/corelib/arch/powerpc/arch.pri 2019-06-13 13:29:09.168289246 +0200
@@ -1,10 +1,4 @@
#
# PowerPC architecture
#
-!*-g++* {
- *-64 {
- SOURCES += $$QT_ARCH_CPP/qatomic64.s
- } else {
- SOURCES += $$QT_ARCH_CPP/qatomic32.s
- }
-}
+SOURCES += $$QT_ARCH_CPP/qatomic_powerpc.cpp
diff -rub qt.orig/src/corelib/arch/qatomic_powerpc.h qt/corelib/arch/qatomic_powerpc.h
--- qt.orig/src/corelib/arch/qatomic_powerpc.h 2015-05-07 16:14:48.000000000 +0200
+++ qt/src/corelib/arch/qatomic_powerpc.h 2019-06-13 13:30:55.499295070 +0200
@@ -101,546 +101,233 @@
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
{ return false; }
-#if defined(Q_CC_GNU)
-
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2) \
- || (!defined(__64BIT__) && !defined(__powerpc64__) && !defined(__ppc64__))
-# define _Q_VALUE "0, %[_q_value]"
-# define _Q_VALUE_MEMORY_OPERAND "+m" (_q_value)
-# define _Q_VALUE_REGISTER_OPERAND [_q_value] "r" (&_q_value),
-#else
-// On 64-bit with gcc >= 4.2
-# define _Q_VALUE "%y[_q_value]"
-# define _Q_VALUE_MEMORY_OPERAND [_q_value] "+Z" (_q_value)
-# define _Q_VALUE_REGISTER_OPERAND
+#ifndef Q_DATA_MEMORY_BARRIER
+# define Q_DATA_MEMORY_BARRIER asm volatile("sync\n":::"memory")
+#endif
+#ifndef Q_COMPILER_MEMORY_BARRIER
+# define Q_COMPILER_MEMORY_BARRIER asm volatile("":::"memory")
#endif
inline bool QBasicAtomicInt::ref()
{
- register int originalValue;
- register int newValue;
- asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
- "addi %[newValue], %[originalValue], %[one]\n"
- "stwcx. %[newValue]," _Q_VALUE "\n"
- "bne- $-12\n"
- : [originalValue] "=&b" (originalValue),
- [newValue] "=&r" (newValue),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [one] "i" (1)
- : "cc", "memory");
+ int newValue;
+
+ Q_COMPILER_MEMORY_BARRIER;
+ newValue = __atomic_add_fetch(&_q_value, 1, __ATOMIC_ACQ_REL);
+ Q_COMPILER_MEMORY_BARRIER;
+
return newValue != 0;
}
inline bool QBasicAtomicInt::deref()
{
- register int originalValue;
- register int newValue;
- asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
- "addi %[newValue], %[originalValue], %[minusOne]\n"
- "stwcx. %[newValue]," _Q_VALUE "\n"
- "bne- $-12\n"
- : [originalValue] "=&b" (originalValue),
- [newValue] "=&r" (newValue),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [minusOne] "i" (-1)
- : "cc", "memory");
+ int newValue;
+
+ Q_COMPILER_MEMORY_BARRIER;
+ newValue = __atomic_sub_fetch(&_q_value, 1, __ATOMIC_ACQ_REL);
+ Q_COMPILER_MEMORY_BARRIER;
+
return newValue != 0;
}
inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{
- register int result;
- asm volatile("lwarx %[result]," _Q_VALUE "\n"
- "xor. %[result], %[result], %[expectedValue]\n"
- "bne $+12\n"
- "stwcx. %[newValue]," _Q_VALUE "\n"
- "bne- $-16\n"
- : [result] "=&r" (result),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [expectedValue] "r" (expectedValue),
- [newValue] "r" (newValue)
- : "cc", "memory");
- return result == 0;
-}
+ bool val;
-inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
-{
- register int result;
- asm volatile("lwarx %[result]," _Q_VALUE "\n"
- "xor. %[result], %[result], %[expectedValue]\n"
- "bne $+16\n"
- "stwcx. %[newValue]," _Q_VALUE "\n"
- "bne- $-16\n"
- "isync\n"
- : [result] "=&r" (result),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [expectedValue] "r" (expectedValue),
- [newValue] "r" (newValue)
- : "cc", "memory");
- return result == 0;
-}
-
-inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
-{
- register int result;
- asm volatile("eieio\n"
- "lwarx %[result]," _Q_VALUE "\n"
- "xor. %[result], %[result], %[expectedValue]\n"
- "bne $+12\n"
- "stwcx. %[newValue]," _Q_VALUE "\n"
- "bne- $-16\n"
- : [result] "=&r" (result),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [expectedValue] "r" (expectedValue),
- [newValue] "r" (newValue)
- : "cc", "memory");
- return result == 0;
+ Q_COMPILER_MEMORY_BARRIER;
+ val = __atomic_compare_exchange_n (&_q_value, &expectedValue, newValue,
+ false, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
+ Q_COMPILER_MEMORY_BARRIER;
+ return val;
}
inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
{
- register int originalValue;
- asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
- "stwcx. %[newValue]," _Q_VALUE "\n"
- "bne- $-8\n"
- : [originalValue] "=&r" (originalValue),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [newValue] "r" (newValue)
- : "cc", "memory");
- return originalValue;
-}
-
-inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
-{
- register int originalValue;
- asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
- "stwcx. %[newValue]," _Q_VALUE "\n"
- "bne- $-8\n"
- "isync\n"
- : [originalValue] "=&r" (originalValue),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [newValue] "r" (newValue)
- : "cc", "memory");
- return originalValue;
-}
-
-inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
-{
- register int originalValue;
- asm volatile("eieio\n"
- "lwarx %[originalValue]," _Q_VALUE "\n"
- "stwcx. %[newValue]," _Q_VALUE "\n"
- "bne- $-8\n"
- : [originalValue] "=&r" (originalValue),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [newValue] "r" (newValue)
- : "cc", "memory");
- return originalValue;
+ int val;
+ Q_COMPILER_MEMORY_BARRIER;
+ val = __atomic_exchange_n(&_q_value, newValue, __ATOMIC_RELAXED);
+ Q_COMPILER_MEMORY_BARRIER;
+ return val;
}
inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
{
- register int originalValue;
- register int newValue;
- asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
- "add %[newValue], %[originalValue], %[valueToAdd]\n"
- "stwcx. %[newValue]," _Q_VALUE "\n"
- "bne- $-12\n"
- : [originalValue] "=&r" (originalValue),
- [newValue] "=&r" (newValue),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [valueToAdd] "r" (valueToAdd)
- : "cc", "memory");
- return originalValue;
+ int val;
+ Q_COMPILER_MEMORY_BARRIER;
+ val = __atomic_fetch_add(&_q_value, valueToAdd, __ATOMIC_RELAXED);
+ Q_COMPILER_MEMORY_BARRIER;
+ return val;
}
-inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
-{
- register int originalValue;
- register int newValue;
- asm volatile("lwarx %[originalValue]," _Q_VALUE "\n"
- "add %[newValue], %[originalValue], %[valueToAdd]\n"
- "stwcx. %[newValue]," _Q_VALUE "\n"
- "bne- $-12\n"
- "isync\n"
- : [originalValue] "=&r" (originalValue),
- [newValue] "=&r" (newValue),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [valueToAdd] "r" (valueToAdd)
- : "cc", "memory");
- return originalValue;
-}
-
-inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
-{
- register int originalValue;
- register int newValue;
- asm volatile("eieio\n"
- "lwarx %[originalValue]," _Q_VALUE "\n"
- "add %[newValue], %[originalValue], %[valueToAdd]\n"
- "stwcx. %[newValue]," _Q_VALUE "\n"
- "bne- $-12\n"
- : [originalValue] "=&r" (originalValue),
- [newValue] "=&r" (newValue),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [valueToAdd] "r" (valueToAdd)
- : "cc", "memory");
- return originalValue;
-}
-
-#if defined(__64BIT__) || defined(__powerpc64__) || defined(__ppc64__)
-# define LPARX "ldarx"
-# define STPCX "stdcx."
-#else
-# define LPARX "lwarx"
-# define STPCX "stwcx."
-#endif
-
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
{
- register void *result;
- asm volatile(LPARX" %[result]," _Q_VALUE "\n"
- "xor. %[result], %[result], %[expectedValue]\n"
- "bne $+12\n"
- STPCX" %[newValue]," _Q_VALUE "\n"
- "bne- $-16\n"
- : [result] "=&r" (result),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [expectedValue] "r" (expectedValue),
- [newValue] "r" (newValue)
- : "cc", "memory");
- return result == 0;
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
-{
- register void *result;
- asm volatile(LPARX" %[result]," _Q_VALUE "\n"
- "xor. %[result], %[result], %[expectedValue]\n"
- "bne $+16\n"
- STPCX" %[newValue]," _Q_VALUE "\n"
- "bne- $-16\n"
- "isync\n"
- : [result] "=&r" (result),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [expectedValue] "r" (expectedValue),
- [newValue] "r" (newValue)
- : "cc", "memory");
- return result == 0;
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
-{
- register void *result;
- asm volatile("eieio\n"
- LPARX" %[result]," _Q_VALUE "\n"
- "xor. %[result], %[result], %[expectedValue]\n"
- "bne $+12\n"
- STPCX" %[newValue]," _Q_VALUE "\n"
- "bne- $-16\n"
- : [result] "=&r" (result),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [expectedValue] "r" (expectedValue),
- [newValue] "r" (newValue)
- : "cc", "memory");
- return result == 0;
+ bool val;
+ Q_COMPILER_MEMORY_BARRIER;
+ val = __atomic_compare_exchange_n (&_q_value, &expectedValue, newValue,
+ false, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
+ Q_COMPILER_MEMORY_BARRIER;
+ return val;
}
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
{
- register T *originalValue;
- asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
- STPCX" %[newValue]," _Q_VALUE "\n"
- "bne- $-8\n"
- : [originalValue] "=&r" (originalValue),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [newValue] "r" (newValue)
- : "cc", "memory");
- return originalValue;
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
-{
- register T *originalValue;
- asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
- STPCX" %[newValue]," _Q_VALUE "\n"
- "bne- $-8\n"
- "isync\n"
- : [originalValue] "=&r" (originalValue),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [newValue] "r" (newValue)
- : "cc", "memory");
- return originalValue;
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
-{
- register T *originalValue;
- asm volatile("eieio\n"
- LPARX" %[originalValue]," _Q_VALUE "\n"
- STPCX" %[newValue]," _Q_VALUE "\n"
- "bne- $-8\n"
- : [originalValue] "=&r" (originalValue),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [newValue] "r" (newValue)
- : "cc", "memory");
- return originalValue;
+ T *val;
+ Q_COMPILER_MEMORY_BARRIER;
+ val = __atomic_exchange_n(&_q_value, newValue, __ATOMIC_RELAXED);
+ Q_COMPILER_MEMORY_BARRIER;
+ return val;
}
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
{
- register T *originalValue;
- register T *newValue;
- asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
- "add %[newValue], %[originalValue], %[valueToAdd]\n"
- STPCX" %[newValue]," _Q_VALUE "\n"
- "bne- $-12\n"
- : [originalValue] "=&r" (originalValue),
- [newValue] "=&r" (newValue),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [valueToAdd] "r" (valueToAdd * sizeof(T))
- : "cc", "memory");
- return originalValue;
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
-{
- register T *originalValue;
- register T *newValue;
- asm volatile(LPARX" %[originalValue]," _Q_VALUE "\n"
- "add %[newValue], %[originalValue], %[valueToAdd]\n"
- STPCX" %[newValue]," _Q_VALUE "\n"
- "bne- $-12\n"
- "isync\n"
- : [originalValue] "=&r" (originalValue),
- [newValue] "=&r" (newValue),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [valueToAdd] "r" (valueToAdd * sizeof(T))
- : "cc", "memory");
- return originalValue;
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
-{
- register T *originalValue;
- register T *newValue;
- asm volatile("eieio\n"
- LPARX" %[originalValue]," _Q_VALUE "\n"
- "add %[newValue], %[originalValue], %[valueToAdd]\n"
- STPCX" %[newValue]," _Q_VALUE "\n"
- "bne- $-12\n"
- : [originalValue] "=&r" (originalValue),
- [newValue] "=&r" (newValue),
- _Q_VALUE_MEMORY_OPERAND
- : _Q_VALUE_REGISTER_OPERAND
- [valueToAdd] "r" (valueToAdd * sizeof(T))
- : "cc", "memory");
- return originalValue;
-}
-
-#undef LPARX
-#undef STPCX
-#undef _Q_VALUE
-#undef _Q_VALUE_MEMORY_OPERAND
-#undef _Q_VALUE_REGISTER_OPERAND
-
-#else
-
-extern "C" {
- int q_atomic_test_and_set_int(volatile int *ptr, int expectedValue, int newValue);
- int q_atomic_test_and_set_acquire_int(volatile int *ptr, int expectedValue, int newValue);
- int q_atomic_test_and_set_release_int(volatile int *ptr, int expectedValue, int newValue);
- int q_atomic_test_and_set_ptr(volatile void *ptr, void *expectedValue, void *newValue);
- int q_atomic_test_and_set_acquire_ptr(volatile void *ptr, void *expectedValue, void *newValue);
- int q_atomic_test_and_set_release_ptr(volatile void *ptr, void *expectedValue, void *newValue);
- int q_atomic_increment(volatile int *);
- int q_atomic_decrement(volatile int *);
- int q_atomic_set_int(volatile int *, int);
- int q_atomic_fetch_and_store_acquire_int(volatile int *ptr, int newValue);
- int q_atomic_fetch_and_store_release_int(volatile int *ptr, int newValue);
- void *q_atomic_set_ptr(volatile void *, void *);
- int q_atomic_fetch_and_store_acquire_ptr(volatile void *ptr, void *newValue);
- int q_atomic_fetch_and_store_release_ptr(volatile void *ptr, void *newValue);
- int q_atomic_fetch_and_add_int(volatile int *ptr, int valueToAdd);
- int q_atomic_fetch_and_add_acquire_int(volatile int *ptr, int valueToAdd);
- int q_atomic_fetch_and_add_release_int(volatile int *ptr, int valueToAdd);
- void *q_atomic_fetch_and_add_ptr(volatile void *ptr, qptrdiff valueToAdd);
- void *q_atomic_fetch_and_add_acquire_ptr(volatile void *ptr, qptrdiff valueToAdd);
- void *q_atomic_fetch_and_add_release_ptr(volatile void *ptr, qptrdiff valueToAdd);
-} // extern "C"
-
-
-inline bool QBasicAtomicInt::ref()
-{
- return q_atomic_increment(&_q_value) != 0;
-}
-
-inline bool QBasicAtomicInt::deref()
-{
- return q_atomic_decrement(&_q_value) != 0;
-}
-
-inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
-{
- return q_atomic_test_and_set_int(&_q_value, expectedValue, newValue) != 0;
+ T *val;
+ Q_COMPILER_MEMORY_BARRIER;
+ val = __atomic_fetch_add(&_q_value, valueToAdd, __ATOMIC_RELAXED);
+ Q_COMPILER_MEMORY_BARRIER;
+ return val;
}
inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
{
- return q_atomic_test_and_set_acquire_int(&_q_value, expectedValue, newValue) != 0;
+ bool returnValue = testAndSetRelaxed(expectedValue, newValue);
+ Q_DATA_MEMORY_BARRIER;
+ return returnValue;
}
inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
{
- return q_atomic_test_and_set_release_int(&_q_value, expectedValue, newValue) != 0;
+ Q_DATA_MEMORY_BARRIER;
+ return testAndSetRelaxed(expectedValue, newValue);
}
-inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
+inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue)
{
- return q_atomic_set_int(&_q_value, newValue);
+ Q_DATA_MEMORY_BARRIER;
+ bool returnValue = testAndSetRelaxed(expectedValue, newValue);
+ Q_COMPILER_MEMORY_BARRIER;
+ return returnValue;
}
inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
{
- return q_atomic_fetch_and_store_acquire_int(&_q_value, newValue);
+ int returnValue = fetchAndStoreRelaxed(newValue);
+ Q_DATA_MEMORY_BARRIER;
+ return returnValue;
}
inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
{
- return q_atomic_fetch_and_store_release_int(&_q_value, newValue);
+ Q_DATA_MEMORY_BARRIER;
+ return fetchAndStoreRelaxed(newValue);
}
-inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
+inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
{
- return q_atomic_fetch_and_add_int(&_q_value, valueToAdd);
+ Q_DATA_MEMORY_BARRIER;
+ int returnValue = fetchAndStoreRelaxed(newValue);
+ Q_COMPILER_MEMORY_BARRIER;
+ return returnValue;
}
inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
{
- return q_atomic_fetch_and_add_acquire_int(&_q_value, valueToAdd);
+ int returnValue = fetchAndAddRelaxed(valueToAdd);
+ Q_DATA_MEMORY_BARRIER;
+ return returnValue;
}
inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
{
- return q_atomic_fetch_and_add_release_int(&_q_value, valueToAdd);
+ Q_DATA_MEMORY_BARRIER;
+ return fetchAndAddRelaxed(valueToAdd);
}
-template <typename T>
-Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
+inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd)
{
- return q_atomic_test_and_set_ptr(&_q_value, expectedValue, newValue) != 0;
+ Q_DATA_MEMORY_BARRIER;
+ int returnValue = fetchAndAddRelaxed(valueToAdd);
+ Q_COMPILER_MEMORY_BARRIER;
+ return returnValue;
}
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
{
- return q_atomic_test_and_set_acquire_ptr(&_q_value, expectedValue, newValue) != 0;
+ bool returnValue = testAndSetRelaxed(expectedValue, newValue);
+ Q_DATA_MEMORY_BARRIER;
+ return returnValue;
}
template <typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
{
- return q_atomic_test_and_set_release_ptr(&_q_value, expectedValue, newValue) != 0;
+ Q_DATA_MEMORY_BARRIER;
+ return testAndSetRelaxed(expectedValue, newValue);
}
template <typename T>
-Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue)
{
- return reinterpret_cast<T *>(q_atomic_set_ptr(&_q_value, newValue));
+ Q_DATA_MEMORY_BARRIER;
+ bool returnValue = testAndSetAcquire(expectedValue, newValue);
+ Q_COMPILER_MEMORY_BARRIER;
+ return returnValue;
}
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
{
- return reinterpret_cast<T *>(q_atomic_fetch_and_store_acquire_ptr(&_q_value, newValue));
+ T *returnValue = fetchAndStoreRelaxed(newValue);
+ Q_DATA_MEMORY_BARRIER;
+ return returnValue;
}
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
{
- return reinterpret_cast<T *>(q_atomic_fetch_and_store_release_ptr(&_q_value, newValue));
+ Q_DATA_MEMORY_BARRIER;
+ return fetchAndStoreRelaxed(newValue);
}
template <typename T>
-Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue)
{
- return reinterpret_cast<T *>(q_atomic_fetch_and_add_ptr(&_q_value, valueToAdd * sizeof(T)));
+ Q_DATA_MEMORY_BARRIER;
+ T *returnValue = fetchAndStoreRelaxed(newValue);
+ Q_COMPILER_MEMORY_BARRIER;
+ return returnValue;
}
+
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
{
- return reinterpret_cast<T *>(q_atomic_fetch_and_add_acquire_ptr(&_q_value, valueToAdd * sizeof(T)));
+ T *returnValue = fetchAndAddRelaxed(valueToAdd);
+ Q_DATA_MEMORY_BARRIER;
+ return returnValue;
}
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
{
- return reinterpret_cast<T *>(q_atomic_fetch_and_add_release_ptr(&_q_value, valueToAdd * sizeof(T)));
-}
-
-#endif
-
-inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue)
-{
- return testAndSetAcquire(expectedValue, newValue);
-}
-
-inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
-{
- return fetchAndStoreAcquire(newValue);
-}
-
-inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd)
-{
- return fetchAndAddAcquire(valueToAdd);
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue)
-{
- return testAndSetAcquire(expectedValue, newValue);
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue)
-{
- return fetchAndStoreAcquire(newValue);
+ Q_DATA_MEMORY_BARRIER;
+ return fetchAndAddRelaxed(valueToAdd);
}
template <typename T>
Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd)
{
- return fetchAndAddAcquire(valueToAdd);
+ Q_DATA_MEMORY_BARRIER;
+ T *returnValue = fetchAndAddRelaxed(valueToAdd);
+ Q_COMPILER_MEMORY_BARRIER;
+ return returnValue;
}
+#undef Q_DATA_MEMORY_BARRIER
+#undef Q_COMPILER_MEMORY_BARRIER
+
QT_END_NAMESPACE
QT_END_HEADER
--- /dev/null
+++ qt/src/corelib/arch/powerpc/qatomic_powerpc.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2012, 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qglobal.h>
+
+#include <unistd.h>
+#ifdef _POSIX_PRIORITY_SCHEDULING
+# include <sched.h>
+#endif
+#include <time.h>
+
+QT_BEGIN_NAMESPACE
+
+QT_USE_NAMESPACE
+
+Q_CORE_EXPORT void qt_atomic_yield(int *count)
+{
+#ifdef _POSIX_PRIORITY_SCHEDULING
+ if((*count)++ < 50) {
+ sched_yield();
+ } else
+#endif
+ {
+ struct timespec tm;
+ tm.tv_sec = 0;
+ tm.tv_nsec = 2000001;
+ nanosleep(&tm, NULL);
+ *count = 0;
+ }
+}
+
+QT_END_NAMESPACE

View File

@ -1,17 +0,0 @@
Calling qsettings before constructing qapplications causes a dead-lock.
http://sourceforge.net/tracker/?func=detail&aid=3168620&group_id=4932&atid=104932
http://developer.qt.nokia.com/forums/viewthread/10365
--- a/src/corelib/io/qsettings.cpp.orig
+++ b/src/corelib/io/qsettings.cpp
@@ -122,7 +122,7 @@
Q_GLOBAL_STATIC(ConfFileCache, unusedCacheFunc)
Q_GLOBAL_STATIC(PathHash, pathHashFunc)
Q_GLOBAL_STATIC(CustomFormatVector, customFormatVectorFunc)
-Q_GLOBAL_STATIC(QMutex, globalMutex)
+Q_GLOBAL_STATIC_WITH_ARGS(QMutex, globalMutex, (QMutex::Recursive))
static QSettings::Format globalDefaultFormat = QSettings::NativeFormat;
#ifndef Q_OS_WIN

View File

@ -1,17 +0,0 @@
--- a/src/3rdparty/clucene/src/CLucene/util/Misc.cpp.orig
+++ b/src/3rdparty/clucene/src/CLucene/util/Misc.cpp
@@ -20,11 +20,11 @@
# endif
#endif
-#ifdef _CL_HAVE_SYS_TIMEB_H
+#ifndef UNDER_CE
+#ifdef _defined(_CLCOMPILER_MSVC) || defined(__MINGW32__) || defined(__BORLANDC__)
# include <sys/timeb.h>
#endif
-
-#ifdef UNDER_CE
+#else
#include <QTime>
#endif

View File

@ -1,59 +0,0 @@
Author: Timo Teräs <timo.teras@iki.fi>
Fix QT GTK style to use GTK API to get the active theme name. This fixes
things for non-GNOME setups, as well as realtime theme change detection.
It still tries to detect if GTK-Qt is in use and refuse to run with that
as it would cause obvious recursion, however that might be not always
possible.
--- a/src/gui/styles/qgtkstyle_p.cpp 2013-06-07 05:16:59.000000000 +0000
+++ b/src/gui/styles/qgtkstyle_p.cpp 2013-09-25 16:37:34.703506640 +0000
@@ -505,7 +505,7 @@ void QGtkStylePrivate::initGtkWidgets()
static QString themeName;
if (!gtkWidgetMap()->contains("GtkWindow") && themeName.isEmpty()) {
- themeName = getThemeName();
+ themeName = getThemeNameGuess();
if (themeName == QLS("Qt") || themeName == QLS("Qt4")) {
// Due to namespace conflicts with Qt3 and obvious recursion with Qt4,
@@ -648,7 +648,7 @@ bool QGtkStylePrivate::getGConfBool(cons
return retVal;
}
-QString QGtkStylePrivate::getThemeName()
+QString QGtkStylePrivate::getThemeNameGuess()
{
QString themeName;
// We try to parse the gtkrc file first
@@ -685,6 +685,19 @@ QString QGtkStylePrivate::getThemeName()
return themeName;
}
+
+QString QGtkStylePrivate::getThemeName()
+{
+ QString themeName;
+ gchar *theme_name;
+
+ GtkSettings *settings = gtk_settings_get_default();
+ g_object_get(settings, "gtk-theme-name", &theme_name, NULL);
+ themeName = QString::fromUtf8(theme_name);
+ g_free(theme_name);
+
+ return themeName;
+}
// Get size of the arrow controls in a GtkSpinButton
int QGtkStylePrivate::getSpinboxArrowSize() const
--- a/src/gui/styles/qgtkstyle_p.h 2013-06-07 05:16:59.000000000 +0000
+++ b/src/gui/styles/qgtkstyle_p.h 2013-09-25 16:29:11.310167033 +0000
@@ -338,6 +338,7 @@ public:
static bool getGConfBool(const QString &key, bool fallback = 0);
static QString getGConfString(const QString &key, const QString &fallback = QString());
+ static QString getThemeNameGuess();
static QString getThemeName();
virtual int getSpinboxArrowSize() const;

View File

@ -1,11 +0,0 @@
--- qt-everywhere-opensource-src-4.8.5/src/corelib/codecs/qiconvcodec.cpp.orig
+++ qt-everywhere-opensource-src-4.8.5/src/corelib/codecs/qiconvcodec.cpp
@@ -62,7 +62,7 @@
#elif defined(Q_OS_AIX)
# define NO_BOM
# define UTF16 "UCS-2"
-#elif defined(Q_OS_FREEBSD) || defined(Q_OS_MAC)
+#elif defined(Q_OS_FREEBSD) || defined(Q_OS_MAC) || (defined(Q_OS_LINUX) && !defined(__GLIBC__))
# define NO_BOM
# if Q_BYTE_ORDER == Q_BIG_ENDIAN
# define UTF16 "UTF-16BE"

View File

@ -1,14 +0,0 @@
--- qt-everywhere-opensource-src-4.8.5/mkspecs/linux-g++/qplatformdefs.h.orig
+++ qt-everywhere-opensource-src-4.8.5/mkspecs/linux-g++/qplatformdefs.h
@@ -86,11 +86,7 @@
#undef QT_SOCKLEN_T
-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#define QT_SOCKLEN_T socklen_t
-#else
-#define QT_SOCKLEN_T int
-#endif
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
#define QT_SNPRINTF ::snprintf

View File

@ -1,431 +0,0 @@
# Template file for 'qt'
pkgname=qt
version=4.8.7
revision=29
_distname=qt-everywhere-opensource-src
patch_args="-Np1"
wrksrc=${_distname}-${version}
homepage="https://qt.io/"
short_desc="A cross-platform application and UI framework"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3, LGPL-2.1"
distfiles="https://download.qt.io/archive/qt/${version%.*}/${version}/${_distname}-${version}.tar.gz"
checksum=e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0
hostmakedepends="perl sqlite pkg-config"
makedepends="
MesaLib-devel libressl-devel unixodbc-devel libXv-devel libXinerama-devel
libXrandr-devel libXcursor-devel glib-devel cups-devel sqlite-devel
alsa-lib-devel libmng-devel libSM-devel gtk+-devel libnotify-devel
libmysqlclient-devel postgresql-libs-devel pulseaudio-devel tslib-devel"
depends="qtchooser hicolor-icon-theme"
replaces="qt-qtconfig>=0"
CXXFLAGS="-std=gnu++98 -Wno-deprecated -fno-delete-null-pointer-checks -fno-lifetime-dse -Wno-class-memaccess"
if [ -n "$CROSS_BUILD" ]; then
hostmakedepends+=" qt-qmake qt-host-tools"
LDFLAGS="-L${XBPS_CROSS_BASE}/usr/lib"
fi
case "$XBPS_TARGET_MACHINE" in
mips*) broken="Serveral Assembler messages: Error: branch out of range" ;;
esac
do_configure() {
local _opts _spec
echo "QMAKE_CXXFLAGS += -std=gnu++98" >> src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
echo "QMAKE_CXXFLAGS += -std=gnu++98" >> src/plugins/accessible/qaccessiblebase.pri
echo "QMAKE_LFLAGS += -Wl,-rpath-link,${wrksrc}/lib" >> mkspecs/features/help.prf
_opts+=" -confirm-license"
_opts+=" -opensource"
_opts+=" -prefix /usr"
_opts+=" -sysconfdir /etc"
_opts+=" -bindir /usr/lib/qt/bin"
_opts+=" -datadir /usr/share/qt"
_opts+=" -docdir /usr/share/doc/qt"
_opts+=" -plugindir /usr/lib/qt/plugins"
_opts+=" -importdir /usr/lib/qt/imports"
_opts+=" -translationdir /usr/share/qt/translations"
if [ -n "$CROSS_BUILD" ]; then
_opts+=" -force-pkg-config"
_opts+=" -continue"
_opts+=" -xplatform ${CXX}"
_opts+=" -exceptions"
_opts+=" -make libs"
_opts+=" -make tools"
_opts+=" -make docs"
_opts+=" -make translations"
_opts+=" -qt3support"
case "$XBPS_TARGET_MACHINE" in
armv5tel)
_opts+=" -arch arm"
_spec="arm-linux-gnueabi-c++"
;;
armv5tel-musl)
_opts+=" -arch arm"
_spec="arm-linux-musleabi-c++"
;;
armv6l)
_opts+=" -arch arm"
_spec="arm-linux-gnueabihf-c++"
;;
armv6l-musl)
_opts+=" -arch arm"
_spec="arm-linux-musleabihf-c++"
;;
armv7l)
_opts+=" -arch arm"
_spec="armv7l-linux-gnueabihf-c++"
;;
armv7l-musl)
_opts+=" -arch arm"
_spec="armv7l-linux-musleabihf-c++"
;;
aarch64)
_opts+=" -arch aarch64"
_spec="aarch64-linux-gnu-c++"
;;
aarch64-musl)
_opts+=" -arch aarch64"
_spec="aarch64-linux-musl-c++"
;;
mips-musl)
_opts+=" -arch mips"
_spec="mips-linux-musl-c++"
;;
mipshf-musl)
_opts+=" -arch mips"
_spec="mips-linux-muslhf-c++"
;;
mipsel-musl)
_opts+=" -arch mips"
_spec="mipsel-linux-musl-c++"
;;
mipselhf-musl)
_opts+=" -arch mips"
_spec="mipsel-linux-muslhf-c++"
;;
ppc64le)
_opts+=" -arch powerpc"
_spec="powerpc64le-linux-gnu-c++"
;;
ppc64le-musl)
_opts+=" -arch powerpc"
_spec="powerpc64le-linux-musl-c++"
;;
ppc64)
_opts+=" -arch powerpc"
_spec="powerpc64-linux-gnu-c++"
;;
ppc64-musl)
_opts+=" -arch powerpc"
_spec="powerpc64-linux-musl-c++"
;;
ppc)
_opts+=" -arch powerpc"
_spec="powerpc-linux-gnu-c++"
;;
ppc-musl)
_opts+=" -arch powerpc"
_spec="powerpc-linux-musl-c++"
;;
ppcle)
_opts+=" -arch powerpc"
_spec="powerpcle-linux-gnu-c++"
;;
ppcle-musl)
_opts+=" -arch powerpc"
_spec="powerpcle-linux-musl-c++"
;;
*-musl)
_opts+=" -arch arm"
_spec="${XBPS_TARGET_MACHINE}-linux-musl-c++"
;;
*)
_opts+=" -arch arm"
_spec="${XBPS_TARGET_MACHINE}-linux-gnu-c++"
;;
esac
mkdir -p mkspecs/${_spec}
cat > mkspecs/${_spec}/qmake.conf << _EOF
#
# qmake specification for ${_spec}
#
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
TEMPLATE = app
CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index
QT += core gui
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
QMAKE_CC = ${CC}
QMAKE_LINK_C = ${CC}
QMAKE_LINK_C_SHLIB = ${CC}
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g
QMAKE_CXX = ${CXX}
QMAKE_LINK = ${CXX}
QMAKE_LINK_SHLIB = ${CXX}
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g
QMAKE_PCH_OUTPUT_EXT = .gch
QMAKE_CFLAGS_PRECOMPILE = -x c-header -c \${QMAKE_PCH_INPUT} -o \${QMAKE_PCH_OUTPUT}
QMAKE_CFLAGS_USE_PRECOMPILE = -include \${QMAKE_PCH_OUTPUT_BASE}
QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c \${QMAKE_PCH_INPUT} -o \${QMAKE_PCH_OUTPUT}
QMAKE_CXXFLAGS_USE_PRECOMPILE = -include \${QMAKE_PCH_OUTPUT_BASE}
QMAKE_LFLAGS_RELEASE += -Wl,-O1 -Wl,-rpath,${wrksrc}/lib
QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined
load(qt_config)
_EOF
cat > mkspecs/${_spec}/qplatformdefs.h << _EOF
#include "../linux-g++/qplatformdefs.h"
_EOF
# Force enable qfilesystemwatcher_{i,d}notify
cat >> src/corelib/io/io.pri << _EOF
SOURCES += io/qfilesystemwatcher_inotify.cpp io/qfilesystemwatcher_dnotify.cpp
HEADERS += io/qfilesystemwatcher_inotify_p.h io/qfilesystemwatcher_dnotify_p.h
_EOF
# qmake CFLAGS/LDFLAGS
sed -i configure \
-e '/outpath\/qmake\".*\"\$MAKE\")/s/)/ CC=gcc CXX=g++ LINK=g++ QMAKE_CFLAGS="$XBPS_CFLAGS" QMAKE_CXXFLAGS="$XBPS_CXXFLAGS" QMAKE_LFLAGS="$XBPS_LDFLAGS" )/' \
-e 's/\(setBootstrapVariable\s\+\|EXTRA_C\(XX\)\?FLAGS=.*\)QMAKE_C\(XX\)\?FLAGS_\(DEBUG\|RELEASE\).*/:/' \
-e 's/5\*\|4\*\|3\.4\*)/8*|7*|6*|&/'
export PKG_CONFIG_PATH=${XBPS_CROSS_BASE}/usr/lib/pkgconfig:${XBPS_CROSS_BASE}/usr/share/pkgconfig
export PKG_CONFIG_LIBDIR=${XBPS_CROSS_BASE}/usr/lib/pkgconfig
export PKG_CONFIG_SYSROOT_DIR=${XBPS_CROSS_BASE}
else
# qmake CFLAGS/LDFLAGS
sed -i configure \
-e '/outpath\/qmake\".*\"\$MAKE\")/s/)/ QMAKE_CFLAGS="$CFLAGS" QMAKE_CXXFLAGS="$CXXFLAGS" QMAKE_LFLAGS="$LDFLAGS" )/' \
-e 's/\(setBootstrapVariable\s\+\|EXTRA_C\(XX\)\?FLAGS=.*\)QMAKE_C\(XX\)\?FLAGS_\(DEBUG\|RELEASE\).*/:/'
fi
_opts+=" -nomake demos"
_opts+=" -nomake examples"
_opts+=" -openssl-linked"
_opts+=" -xmlpatterns"
_opts+=" -no-webkit"
_opts+=" -gtkstyle"
_opts+=" -system-sqlite"
_opts+=" -shared"
_opts+=" -graphicssystem raster"
_opts+=" -no-icu"
_opts+=" -no-openvg"
_opts+=" -no-phonon"
_opts+=" -no-phonon-backend"
_opts+=" -no-pch"
_opts+=" -no-rpath"
_opts+=" -optimized-qmake"
_opts+=" -no-reduce-relocations"
_opts+=" -dbus-linked"
_opts+=" -silent"
# _opts+=" -v"
echo "=== ./configure ${_opts}"
export LD_LIBRARY_PATH="${wrksrc}/lib:${LD_LIBRARY_PATH}"
export LD="$CXX"
export QMAKE_CFLAGS="${CFLAGS}"
export QMAKE_CXXFLAGS="${CXXFLAGS}"
export QMAKE_LFLAGS="${LDFLAGS} -Wl,-rpath,${wrksrc}/lib"
./configure ${_opts}
}
do_build() {
local _f
if [ -n "$CROSS_BUILD" ]; then
# Replace binaries for host
find -name Makefile\* -exec sed -i "{}" -e"s;/builddir/.*/bin/;/usr/lib/qt/bin/;g" \;
# Build qmake for the target
echo "=== Building qmake for the target ${XBPS_TARGET_MACHINE}"
mv bin/qmake{,-host}
sed -i qmake/Makefile \
-e"s;^\(CC =\).*;\1 ${CC};" \
-e"s;^\(CXX =\).*;\1 ${CXX};" \
-e"s;^\(QMAKE_CFLAGS =\).*;\1 ${CFLAGS};" \
-e"s;^\(QMAKE_CXXFLAGS =\).*;\1 ${CXXFLAGS};" \
-e"s;^\(QMAKE_LFLAGS =\).*;\1 ${LDFLAGS};"
cd qmake
make clean
make ${makejobs}
cd ${wrksrc}
mv bin/qmake{,-target}
mv bin/qmake{-host,}
cd ${wrksrc}
fi
export LD_LIBRARY_PATH="${wrksrc}/lib:${LD_LIBRARY_PATH}"
export LD="$CXX"
make ${makejobs}
}
do_install() {
local hicolordir=${DESTDIR}/usr/share/icons/hicolor
make INSTALL_ROOT=${DESTDIR} install
# install missing qatomic_aarch64.h
# TODO: find better fix (add to install targets?)
install -D -m644 src/corelib/arch/qatomic_aarch64.h ${DESTDIR}/usr/include/QtCore/
install -D -m644 src/corelib/arch/qatomic_aarch64.h ${DESTDIR}/usr/include/Qt/
# delete tests
rm -rf ${DESTDIR}/usr/tests
# install missing icons and desktop files
for icon in tools/linguist/linguist/images/icons/linguist-*-32.png ; do
size=$(echo $(basename ${icon}) | cut -d- -f2)
install -D -m644 ${icon} \
${hicolordir}/${size}x${size}/apps/linguist.png
done
install -Dm644 src/gui/dialogs/images/qtlogo-64.png \
${hicolordir}/64x64/apps/qtlogo.png
install -Dm644 src/gui/dialogs/images/qtlogo-64.png \
${DESTDIR}/usr/share/pixmaps/qtlogo.png
install -Dm644 tools/assistant/tools/assistant/images/assistant.png \
${hicolordir}/32x32/apps/assistant.png
install -Dm644 tools/designer/src/designer/images/designer.png \
${hicolordir}/128x128/apps/designer.png
install -d ${DESTDIR}/usr/share/applications
install -m644 ${FILESDIR}/*.desktop \
${DESTDIR}/usr/share/applications
vlicense LGPL_EXCEPTION.txt
vmkdir usr/bin
for f in ${DESTDIR}/usr/lib/qt/bin/*; do
ln -s /usr/lib/qt/bin/$(basename $f) ${DESTDIR}/usr/bin/$(basename $f)-qt4
done
# Remove wrong stuff
rm -rf ${DESTDIR}/usr/{examples,demos}
# Clean generated qmake.conf reference to builddir
find -name qmake.conf -exec sed -i "{}" -e"s; -Wl,-rpath,/builddir.*;;" \;
# For a cross build replace qmake with the target binary
if [ -f ${wrksrc}/bin/qmake-target ]; then
mv ${wrksrc}/bin/qmake-target ${DESTDIR}/usr/lib/qt/bin/qmake
ln -s /usr/lib/qt/bin/qmake ${DESTDIR}/usr/bin/qmake-qt4
fi
}
qt-doc_package() {
depends="qt-devel-tools>=${version}_${revision}"
short_desc+=" - Documentation"
pkg_install() {
vmove usr/share/doc/qt
}
}
qt-designer_package() {
depends="hicolor-icon-theme qt-designer-libs>=${version}_${revision}"
short_desc+=" - GUI designer"
pkg_install() {
vmove usr/bin/designer-qt4
vmove usr/lib/qt/bin/designer
vmove usr/lib/qt/plugins/designer
vmove "usr/share/icons/hicolor/128x128/apps/designer.*"
vmove "usr/share/applications/designer.*"
vmove "usr/share/qt/translations/designer*"
}
}
qt-designer-libs_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - GUI designer libraries"
pkg_install() {
vmove usr/lib/libQtDesigner.so.*
vmove usr/lib/libQtDesignerComponents.so.*
}
}
qt-designer-devel_package() {
depends="qt-designer-libs>=${version}_${revision}"
short_desc+=" - GUI designer development"
pkg_install() {
vmove usr/lib/libQtDesigner.so
vmove usr/lib/libQtDesignerComponents.so
}
}
qt-host-tools_package() {
short_desc+=" - host tools"
pkg_install() {
for f in lrelease lupdate moc qdbuscpp2xml qdbusxml2cpp qt3to4 \
rcc uic uic3; do
if [ -f "${DESTDIR}/usr/lib/qt/bin/${f}" ]; then
vmove usr/lib/qt/bin/${f}
fi
done
}
}
qt-devel-tools_package() {
depends="hicolor-icon-theme"
short_desc+=" - development tools"
pkg_install() {
for f in assistant lconvert linguist pixeltool qcollectiongenerator \
qhelpgenerator qhelpconverter xmlpatterns xmlpatternsvalidator \
qttracereplay qdoc3 qmlviewer; do
if [ -f "${DESTDIR}/usr/lib/qt/bin/${f}" ]; then
vmove usr/bin/${f}-qt4
vmove usr/lib/qt/bin/${f}
fi
done
vmove usr/share/icons/hicolor
for f in linguist assistant; do
vmove usr/share/applications/${f}.desktop
[ ! -f ${DESTDIR}/usr/share/pixmaps/${f}.png ] && continue
vmove usr/share/pixmaps/${f}.png
done
vmove usr/share/qt/phrasebooks
}
}
qt-devel_package() {
depends="qt-qmake qt-devel-tools qt-host-tools libX11-devel qt>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
for f in lrelease lupdate moc qdbuscpp2xml qdbusxml2cpp qt3to4 \
rcc uic uic3; do
if [ -f "${DESTDIR}/usr/bin/${f}-qt4" ]; then
vmove usr/bin/${f}-qt4
fi
done
vmove usr/include
vmove "usr/lib/*.so"
vmove "usr/lib/*.a"
vmove "usr/lib/*.prl"
vmove usr/lib/pkgconfig
}
}
qt-plugin-odbc_package() {
short_desc+=" - ODBC plugin"
pkg_install() {
vmove usr/lib/qt/plugins/sqldrivers/libqsqlodbc.so
}
}
qt-plugin-pgsql_package() {
short_desc+=" - PostgreSQL plugin"
pkg_install() {
vmove usr/lib/qt/plugins/sqldrivers/libqsqlpsql.so
}
}
qt-plugin-mysql_package() {
short_desc+=" - MySQL plugin"
pkg_install() {
vmove usr/lib/qt/plugins/sqldrivers/libqsqlmysql.so
}
}
qt-plugin-sqlite_package() {
short_desc+=" - SQLite plugin"
pkg_install() {
vmove usr/lib/qt/plugins/sqldrivers/libqsqlite.so
}
}
qt-qmake_package() {
short_desc+=" - qmake Makefile generator tool"
pkg_install() {
vmove usr/bin/qmake-qt4
vmove usr/lib/qt/bin/qmake
vmove usr/share/qt/mkspecs
}
}