Fix mingw-w64-qt5-multimedia

* Remove old patch to link again `-lamstrmid`; that is already fixed in Qt itself
* Add new patch to avoid linker errors via `-Wl,--allow-multiple-definition`
    * The conflicting symbols are likely supposed to be defined via `__declspec(selectany)`
      which somehow doesn't work
This commit is contained in:
Martchus 2020-05-23 18:18:39 +02:00
parent 6dff25f8ff
commit 030f60adc5
6 changed files with 44 additions and 46 deletions

View File

@ -1,4 +1,4 @@
From 2163191d8a0828e158a1798a8b3cce698154c19e Mon Sep 17 00:00:00 2001
From 3c1bae456ff01a5265982b45a15206adc9845655 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 25 Sep 2016 21:36:56 +0200
Subject: [PATCH 1/4] Recorder includes to prevent conflict with vsnprintf
@ -37,5 +37,5 @@ index 12693e4f..f759a8f2 100644
QT_BEGIN_NAMESPACE
--
2.26.0
2.26.2

View File

@ -1,4 +1,4 @@
From a63f4fc62c062f24ccb542c4955551d435364a7a Mon Sep 17 00:00:00 2001
From 5ec9ce627f5c18775ea118c53108e931d33dfc52 Mon Sep 17 00:00:00 2001
From: Jose Santiago <jsantiago@haivision.com>
Date: Thu, 3 Nov 2016 14:36:10 -0500
Subject: [PATCH 2/4] Fix build with ANGLE
@ -25,5 +25,5 @@ index d8e2da6d..41ef4d96 100644
#endif
--
2.26.0
2.26.2

View File

@ -1,7 +1,7 @@
From 67df270176cc41e18c8ce38df4dc7d756d8ac6e6 Mon Sep 17 00:00:00 2001
From b793997df8f734cb93d906b6f2ff194f70c38de1 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 29 Dec 2019 00:39:46 +0100
Subject: [PATCH 4/4] Fix case of header file includes for building with
Subject: [PATCH 3/4] Fix case of header file includes for building with
mingw-w64
Change-Id: Ie0e6599234c38c5e5a75b681a911f3728871861e
@ -54,7 +54,7 @@ index ede3f6b0..98dd7c2f 100644
#include <wrl.h>
#include <windows.devices.enumeration.h>
diff --git a/src/plugins/wmf/player/mfplayersession.cpp b/src/plugins/wmf/player/mfplayersession.cpp
index 10ba2599..a4e37129 100644
index 24bfda83..e91b842d 100644
--- a/src/plugins/wmf/player/mfplayersession.cpp
+++ b/src/plugins/wmf/player/mfplayersession.cpp
@@ -56,7 +56,7 @@
@ -93,5 +93,5 @@ index c6f4e856..15ef6f0a 100644
#include <QtCore/qfile.h>
#include <QtCore/qdebug.h>
--
2.26.0
2.26.2

View File

@ -1,32 +0,0 @@
From 4ce906f280106ae0554a7dda7c3afdee43cda662 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Mon, 24 Sep 2018 20:10:19 +0200
Subject: [PATCH 3/4] Link directshow plugin against libamstrmid
Fixes errors about undefined references to IID_IMFVideoDeviceID,
IID_IMFVideoPresenter, IID_IMFTopologyServiceLookupClient and
IID_IMFTopologyServiceLookupClient when building dsengine.dll.
---
src/plugins/directshow/directshow.pro | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/plugins/directshow/directshow.pro b/src/plugins/directshow/directshow.pro
index 27bb3abb..5aa207dd 100644
--- a/src/plugins/directshow/directshow.pro
+++ b/src/plugins/directshow/directshow.pro
@@ -5,6 +5,12 @@ win32:!qtHaveModule(opengl)|qtConfig(dynamicgl) {
LIBS_PRIVATE += -lgdi32 -luser32
}
+# add library containing IID_IMFVideoDeviceID, IID_IMFVideoPresenter, IID_IMFTopologyServiceLookupClient
+# and IID_IMFTopologyServiceLookupClient
+mingw {
+ LIBS_PRIVATE += -lamstrmid
+}
+
HEADERS += dsserviceplugin.h
SOURCES += dsserviceplugin.cpp
--
2.26.0

View File

@ -0,0 +1,30 @@
From cefa00dbb94efcbc8be4d28d4a2fafb837dc9146 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sat, 23 May 2020 15:43:20 +0200
Subject: [PATCH 4/4] Workaround "multiple definition" errors with
amstrmid/strmiids
---
src/plugins/directshow/directshow.pro | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/plugins/directshow/directshow.pro b/src/plugins/directshow/directshow.pro
index 27bb3abb..0cce6f20 100644
--- a/src/plugins/directshow/directshow.pro
+++ b/src/plugins/directshow/directshow.pro
@@ -16,8 +16,11 @@ mingw {
DEFINES += NO_DSHOW_STRSAFE
}
+# Link against amstrmid for IID_IMFVideoDeviceID, IID_IMFVideoPresenter, IID_IMFTopologyServiceLookupClient
+# and IID_IMFTopologyServiceLookupClient; add -Wl,--allow-multiple-definition to workaround conflicts with
+# strmiids which contains symbols also required but not provided by amstrmid
mingw {
- LIBS_PRIVATE += -lamstrmid
+ LIBS_PRIVATE += -Wl,--allow-multiple-definition -lamstrmid
}
include(common/common.pri)
--
2.26.2

View File

@ -29,13 +29,13 @@ _pkgfqn="${_qt_module}-everywhere-src-${pkgver}"
source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${_pkgfqn}.tar.xz"
'0001-Recorder-includes-to-prevent-conflict-with-vsnprintf.patch'
'0002-Fix-build-with-ANGLE.patch'
'0003-Link-directshow-plugin-against-libamstrmid.patch'
'0004-Fix-case-of-header-file-includes-for-building-with-m.patch')
'0003-Fix-case-of-header-file-includes-for-building-with-m.patch'
'0004-Workaround-multiple-definition-errors-with-amstrmid-.patch')
sha256sums=('7acd8ede6835314206e407b35b668f0add67544577fb51fe67afb03137fb9fe9'
'99ef1ba681ad5db2e5f3ae3f83de7e25a63e6885befd236b0381f1940a464dab'
'72da977e5489d04fc5396cb25f3d56b0dd8bfd5b6ea543d06ba18bc1bb5bfdcb'
'9222eec2ae3f4d3e007c99ed6dfe5852cc98e797e1c7c78583ed1b2f9eab3919'
'ab81776ff0f05f45c8c265af92ef167aebd3e1ae3ee41a715163838e0f18523b')
'2afce1c070f69014ccabf205b1cabeee0e98ddee4dc97e05af987c56f007332f'
'c95c6f16e26ea658164ca0954b4dd047f81be8e1cab4f837d5ae0af893aa6902'
'141f3b3dfb96bb0f5762804730c3442b8c8de03ffb76220914c7ae6adbd4ebd1'
'6c43a5eb331b72497dd43e462fe99a61d44b5109ef0c44c52f8216f1b8cca94c')
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'