diff options
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/qtbase-fix-krita-deadlock.patch | 110 | ||||
-rw-r--r-- | gnu/packages/patches/sbc-fix-build-non-x86.patch | 17 | ||||
-rw-r--r-- | gnu/packages/patches/vlc-qt-5.15.patch | 56 |
3 files changed, 73 insertions, 110 deletions
diff --git a/gnu/packages/patches/qtbase-fix-krita-deadlock.patch b/gnu/packages/patches/qtbase-fix-krita-deadlock.patch deleted file mode 100644 index d3554be3c9..0000000000 --- a/gnu/packages/patches/qtbase-fix-krita-deadlock.patch +++ /dev/null @@ -1,110 +0,0 @@ -Fix a deadlock in Krita: - -https://bugreports.qt.io/browse/QTBUG-83207 - -Patch copied from Qt bug tracker: - -https://codereview.qt-project.org/c/qt/qtbase/+/296034 - -From 276fa8383a7535765be7182883ef4aade17ce013 Mon Sep 17 00:00:00 2001 -From: Thiago Macieira <thiago.macieira@intel.com> -Date: Thu, 02 Apr 2020 12:08:41 -0300 -Subject: [PATCH] QLibrary: fix deadlock caused by fix to QTBUG-39642 - -Commit ae6f73e8566fa76470937aca737141183929a5ec inserted a mutex around -the entire load_sys(). We had reasoed that deadlocks would only occur if -the object creation in instance() recursed into its own instance(), -which was already a bug. But we had forgotten that dlopen()/ -LoadLibrary() executes initialization code from the module being loaded, -which could cause a recursion back into the same QPluginLoader or -QLibrary object. This recursion is benign because the module *is* loaded -and dlopen()/LoadLibrary() returns the same handle. - -[ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that -would happen if the plugin or library being loaded has load-time -initialization code (C++ global variables) that recursed back into the -same QLibrary or QPluginLoader object. - -PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex -lock, so pluginState should be made an atomic variable. Once that is -done, we'll only need locking the mutex to update errorString (no -locking before loading). - -Fixes: QTBUG-83207 -Task-number: QTBUG-39642 -Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb -Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> -Reviewed-by: David Faure <david.faure@kdab.com> ---- - -diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp -index ddb053c..be9d92b 100644 ---- a/src/corelib/plugin/qlibrary.cpp -+++ b/src/corelib/plugin/qlibrary.cpp -@@ -576,9 +576,7 @@ - - Q_TRACE(QLibraryPrivate_load_entry, fileName); - -- mutex.lock(); - bool ret = load_sys(); -- mutex.unlock(); - if (qt_debug_component()) { - if (ret) { - qDebug() << "loaded library" << fileName; -diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp -index 017aa97..a5c72f8 100644 ---- a/src/corelib/plugin/qlibrary_unix.cpp -+++ b/src/corelib/plugin/qlibrary_unix.cpp -@@ -123,6 +123,7 @@ - - bool QLibraryPrivate::load_sys() - { -+ QMutexLocker locker(&mutex); - QString attempt; - QFileSystemEntry fsEntry(fileName); - -@@ -213,6 +214,7 @@ - } - #endif - -+ locker.unlock(); - bool retry = true; - Handle hnd = nullptr; - for (int prefix = 0; retry && !hnd && prefix < prefixes.size(); prefix++) { -@@ -273,6 +275,8 @@ - } - } - #endif -+ -+ locker.relock(); - if (!hnd) { - errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName, qdlerror()); - } -diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp -index 000bf76..ef58724 100644 ---- a/src/corelib/plugin/qlibrary_win.cpp -+++ b/src/corelib/plugin/qlibrary_win.cpp -@@ -78,6 +78,7 @@ - // fileName - // - // NB If it's a plugin we do not ever try the ".dll" extension -+ QMutexLocker locker(&mutex); - QStringList attempts; - - if (pluginState != IsAPlugin) -@@ -95,6 +96,7 @@ - attempts.prepend(QDir::rootPath() + fileName); - #endif - -+ locker.unlock(); - Handle hnd = nullptr; - for (const QString &attempt : qAsConst(attempts)) { - #ifndef Q_OS_WINRT -@@ -115,6 +117,7 @@ - #ifndef Q_OS_WINRT - SetErrorMode(oldmode); - #endif -+ locker.relock(); - if (!hnd) { - errorString = QLibrary::tr("Cannot load library %1: %2").arg( - QDir::toNativeSeparators(fileName), qt_error_string()); diff --git a/gnu/packages/patches/sbc-fix-build-non-x86.patch b/gnu/packages/patches/sbc-fix-build-non-x86.patch new file mode 100644 index 0000000000..56ea916d42 --- /dev/null +++ b/gnu/packages/patches/sbc-fix-build-non-x86.patch @@ -0,0 +1,17 @@ +Don't refer to x86-specific function on other architectures to avoid linker error. + +Submitted upstream at <https://marc.info/?l=linux-bluetooth&m=160857625608440&w=2> + +diff --git a/sbc/sbc_primitives.c b/sbc/sbc_primitives.c +--- a/sbc/sbc_primitives.c ++++ b/sbc/sbc_primitives.c +@@ -593,7 +593,9 @@ static int sbc_calc_scalefactors_j( + + static void sbc_init_primitives_x86(struct sbc_encoder_state *state) + { ++#if defined(__x86_64__) || defined(__i386__) + __builtin_cpu_init(); ++#endif + + #ifdef SBC_BUILD_WITH_MMX_SUPPORT + if (__builtin_cpu_supports("mmx")) diff --git a/gnu/packages/patches/vlc-qt-5.15.patch b/gnu/packages/patches/vlc-qt-5.15.patch new file mode 100644 index 0000000000..e986a99861 --- /dev/null +++ b/gnu/packages/patches/vlc-qt-5.15.patch @@ -0,0 +1,56 @@ +Fix build of VLC with Qt 5.15. Otherwise it fails like this: + +------ +In file included from gui/qt/util/timetooltip.moc.cpp:10:0: +gui/qt/util/timetooltip.hpp:49:18: error: field ‘mPainterPath’ has incomplete type ‘QPainterPath’ + QPainterPath mPainterPath; + ^~~~~~~~~~~~ +In file included from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtGui/qbrush.h:49:0, + from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtGui/qpalette.h:46, + from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtWidgets/qwidget.h:48, + from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtWidgets/QWidget:1, + from gui/qt/util/timetooltip.hpp:27, + from gui/qt/util/timetooltip.moc.cpp:10: +/gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtGui/qmatrix.h:54:7: note: forward declaration of ‘class QPainterPath’ + class QPainterPath; + ^~~~~~~~~~~~ +make[4]: *** [Makefile:25852: gui/qt/util/libqt_plugin_la-timetooltip.moc.lo] Error 1 +------ + +diff --git a/modules/gui/qt/components/playlist/views.cpp b/modules/gui/qt/components/playlist/views.cpp +index 24db9d9..73c1779 100644 +--- a/modules/gui/qt/components/playlist/views.cpp ++++ b/modules/gui/qt/components/playlist/views.cpp +@@ -27,6 +27,7 @@ + #include "input_manager.hpp" /* THEMIM */ + + #include <QPainter> ++#include <QPainterPath> + #include <QRect> + #include <QStyleOptionViewItem> + #include <QFontMetrics> +diff --git a/modules/gui/qt/dialogs/plugins.cpp b/modules/gui/qt/dialogs/plugins.cpp +index d233382..69728eb 100644 +--- a/modules/gui/qt/dialogs/plugins.cpp ++++ b/modules/gui/qt/dialogs/plugins.cpp +@@ -53,6 +53,7 @@ + #include <QListView> + #include <QListWidget> + #include <QPainter> ++#include <QPainterPath> + #include <QStyleOptionViewItem> + #include <QKeyEvent> + #include <QPushButton> +diff --git a/modules/gui/qt/util/timetooltip.hpp b/modules/gui/qt/util/timetooltip.hpp +index 6a1329e..9f50b18 100644 +--- a/modules/gui/qt/util/timetooltip.hpp ++++ b/modules/gui/qt/util/timetooltip.hpp +@@ -25,6 +25,7 @@ + #include "qt.hpp" + + #include <QWidget> ++#include <QPainterPath> + + class TimeTooltip : public QWidget + { + |