[vlc-devel] [PATCH 2/5] contrib: qt: Update to Qt 5.11.0

Martin Storsjö martin at martin.st
Fri Jun 15 16:53:40 CEST 2018


This allows dropping most of the local patches.
---
 ...implement-calculation-of-window-frames_56.patch | 271 ---------------------
 ...-prefer-lower-value-when-rounding-fractio.patch |  26 ++
 ...s-QPA-Disable-systray-notification-sounds.patch |  27 ++
 ...e-new-EnableNonClientDpiScaling-for-Wi_56.patch | 135 ----------
 ...er-value-when-rounding-fractional-scaling.patch |  25 --
 ...-limit-command-line-length-when-not-actua.patch |  75 ------
 ...arfbuzz-Fix-building-for-win64-with-clang.patch |  35 ---
 ...ize-staticMetaObject-with-the-highest-use.patch | 103 --------
 .../0007-Only-define-QT_FASTCALL-on-x86_32.patch   |  36 ---
 ...xman-drawhelpers-on-windows-just-like-on-.patch |  39 ---
 ...-a-win32-clang-g-mkspec-for-clang-targeti.patch | 234 ------------------
 contrib/src/qt/SHA512SUMS                          |   2 +-
 contrib/src/qt/rules.mak                           |  28 +--
 contrib/src/qt/systray-no-sound.patch              |  13 -
 14 files changed, 64 insertions(+), 985 deletions(-)
 delete mode 100644 contrib/src/qt/0001-Windows-QPA-Reimplement-calculation-of-window-frames_56.patch
 create mode 100644 contrib/src/qt/0001-Windows-QPA-prefer-lower-value-when-rounding-fractio.patch
 create mode 100644 contrib/src/qt/0002-Windows-QPA-Disable-systray-notification-sounds.patch
 delete mode 100644 contrib/src/qt/0002-Windows-QPA-Use-new-EnableNonClientDpiScaling-for-Wi_56.patch
 delete mode 100644 contrib/src/qt/0003-QPA-prefer-lower-value-when-rounding-fractional-scaling.patch
 delete mode 100644 contrib/src/qt/0004-qmake-don-t-limit-command-line-length-when-not-actua.patch
 delete mode 100644 contrib/src/qt/0005-harfbuzz-Fix-building-for-win64-with-clang.patch
 delete mode 100644 contrib/src/qt/0006-moc-Initialize-staticMetaObject-with-the-highest-use.patch
 delete mode 100644 contrib/src/qt/0007-Only-define-QT_FASTCALL-on-x86_32.patch
 delete mode 100644 contrib/src/qt/0008-Skip-arm-pixman-drawhelpers-on-windows-just-like-on-.patch
 delete mode 100644 contrib/src/qt/0009-mkspecs-Add-a-win32-clang-g-mkspec-for-clang-targeti.patch
 delete mode 100644 contrib/src/qt/systray-no-sound.patch

diff --git a/contrib/src/qt/0001-Windows-QPA-Reimplement-calculation-of-window-frames_56.patch b/contrib/src/qt/0001-Windows-QPA-Reimplement-calculation-of-window-frames_56.patch
deleted file mode 100644
index f958f2b..0000000
diff --git a/contrib/src/qt/0001-Windows-QPA-prefer-lower-value-when-rounding-fractio.patch b/contrib/src/qt/0001-Windows-QPA-prefer-lower-value-when-rounding-fractio.patch
new file mode 100644
index 0000000..100e803
--- /dev/null
+++ b/contrib/src/qt/0001-Windows-QPA-prefer-lower-value-when-rounding-fractio.patch
@@ -0,0 +1,26 @@
+From cf632f7a1a3a36b91d16ac9019620434ebda9e24 Mon Sep 17 00:00:00 2001
+From: VideoLAN Buildbot <buildbot at videolan.org>
+Date: Tue, 13 Feb 2018 09:31:44 +0000
+Subject: [PATCH 1/2] Windows QPA: prefer lower value when rounding fractional
+ scaling
+
+---
+ src/plugins/platforms/windows/qwindowsscreen.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp
+index d56dc870ea..51c321f867 100644
+--- a/src/plugins/platforms/windows/qwindowsscreen.cpp
++++ b/src/plugins/platforms/windows/qwindowsscreen.cpp
+@@ -260,7 +260,7 @@ qreal QWindowsScreen::pixelDensity() const
+     // the pixel density since it is reflects the Windows UI scaling.
+     // High DPI auto scaling should be disabled when the user chooses
+     // small fonts on a High DPI monitor, resulting in lower logical DPI.
+-    return qMax(1, qRound(logicalDpi().first / 96));
++    return qMax(1., ceil(logicalDpi().first / 96. - 0.5));
+ }
+ 
+ /*!
+-- 
+2.15.2 (Apple Git-101.1)
+
diff --git a/contrib/src/qt/0002-Windows-QPA-Disable-systray-notification-sounds.patch b/contrib/src/qt/0002-Windows-QPA-Disable-systray-notification-sounds.patch
new file mode 100644
index 0000000..f7d48681
--- /dev/null
+++ b/contrib/src/qt/0002-Windows-QPA-Disable-systray-notification-sounds.patch
@@ -0,0 +1,27 @@
+From f76248e9c67927d3a403b43ff941f72117e427f0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo at beauzee.fr>
+Date: Fri, 15 Jun 2018 09:59:42 +0300
+Subject: [PATCH 2/2] Windows QPA: Disable systray notification sounds
+
+---
+ src/plugins/platforms/windows/qwindowssystemtrayicon.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp
+index 901d132ea5..c30fa0e76d 100644
+--- a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp
++++ b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp
+@@ -279,6 +279,10 @@ void QWindowsSystemTrayIcon::showMessage(const QString &title, const QString &me
+         }
+         tnd.hBalloonIcon = qt_pixmapToWinHICON(pm);
+     }
++
++    // Never play audio on notifications.
++    tnd.dwInfoFlags |= NIIF_NOSOUND;
++
+     tnd.hWnd = m_hwnd;
+     tnd.uTimeout = msecsIn <= 0 ?  UINT(10000) : UINT(msecsIn); // 10s default
+     tnd.uFlags = NIF_INFO | NIF_SHOWTIP;
+-- 
+2.15.2 (Apple Git-101.1)
+
diff --git a/contrib/src/qt/0002-Windows-QPA-Use-new-EnableNonClientDpiScaling-for-Wi_56.patch b/contrib/src/qt/0002-Windows-QPA-Use-new-EnableNonClientDpiScaling-for-Wi_56.patch
deleted file mode 100644
index ff7986d..0000000
diff --git a/contrib/src/qt/0003-QPA-prefer-lower-value-when-rounding-fractional-scaling.patch b/contrib/src/qt/0003-QPA-prefer-lower-value-when-rounding-fractional-scaling.patch
deleted file mode 100644
index 6721e73..0000000
diff --git a/contrib/src/qt/0004-qmake-don-t-limit-command-line-length-when-not-actua.patch b/contrib/src/qt/0004-qmake-don-t-limit-command-line-length-when-not-actua.patch
deleted file mode 100644
index 5654d74..0000000
diff --git a/contrib/src/qt/0005-harfbuzz-Fix-building-for-win64-with-clang.patch b/contrib/src/qt/0005-harfbuzz-Fix-building-for-win64-with-clang.patch
deleted file mode 100644
index feade28..0000000
diff --git a/contrib/src/qt/0006-moc-Initialize-staticMetaObject-with-the-highest-use.patch b/contrib/src/qt/0006-moc-Initialize-staticMetaObject-with-the-highest-use.patch
deleted file mode 100644
index bb94b14..0000000
diff --git a/contrib/src/qt/0007-Only-define-QT_FASTCALL-on-x86_32.patch b/contrib/src/qt/0007-Only-define-QT_FASTCALL-on-x86_32.patch
deleted file mode 100644
index a300b35..0000000
diff --git a/contrib/src/qt/0008-Skip-arm-pixman-drawhelpers-on-windows-just-like-on-.patch b/contrib/src/qt/0008-Skip-arm-pixman-drawhelpers-on-windows-just-like-on-.patch
deleted file mode 100644
index 67f1b6a..0000000
diff --git a/contrib/src/qt/0009-mkspecs-Add-a-win32-clang-g-mkspec-for-clang-targeti.patch b/contrib/src/qt/0009-mkspecs-Add-a-win32-clang-g-mkspec-for-clang-targeti.patch
deleted file mode 100644
index 6ffcec7..0000000
diff --git a/contrib/src/qt/SHA512SUMS b/contrib/src/qt/SHA512SUMS
index 54d2961..4cd02df 100644
--- a/contrib/src/qt/SHA512SUMS
+++ b/contrib/src/qt/SHA512SUMS
@@ -1 +1 @@
-19b505b6afb394a85dd27decf892fb7dccef89d33a41df458a9905d32a6dde23e76c11db9214bfaa7d9bddf48959d1579fad217d96d85333fdac94608c46389c  qt-5.6.3.tar.xz
+9f68e00d432db6999f932da6ba759e465ea7d65461ef8db13765f16bd812f2ddd05beede1df3c6546165bc4924a6bd14cc0ff083defc43e2dce37ea20c561462  qt-5.11.0.tar.xz
diff --git a/contrib/src/qt/rules.mak b/contrib/src/qt/rules.mak
index e80fa0f..1ec0fcd 100644
--- a/contrib/src/qt/rules.mak
+++ b/contrib/src/qt/rules.mak
@@ -1,7 +1,7 @@
 # Qt
 
-QT_VERSION := 5.6.3
-QT_URL := https://download.qt.io/official_releases/qt/5.6/$(QT_VERSION)/submodules/qtbase-opensource-src-$(QT_VERSION).tar.xz
+QT_VERSION := 5.11.0
+QT_URL := https://download.qt.io/official_releases/qt/5.11/$(QT_VERSION)/submodules/qtbase-everywhere-src-$(QT_VERSION).tar.xz
 
 ifdef HAVE_MACOSX
 #PKGS += qt
@@ -21,17 +21,9 @@ $(TARBALLS)/qt-$(QT_VERSION).tar.xz:
 
 qt: qt-$(QT_VERSION).tar.xz .sum-qt
 	$(UNPACK)
-	mv qtbase-opensource-src-$(QT_VERSION) qt-$(QT_VERSION)
-	$(APPLY) $(SRC)/qt/0001-Windows-QPA-Reimplement-calculation-of-window-frames_56.patch
-	$(APPLY) $(SRC)/qt/0002-Windows-QPA-Use-new-EnableNonClientDpiScaling-for-Wi_56.patch
-	$(APPLY) $(SRC)/qt/0003-QPA-prefer-lower-value-when-rounding-fractional-scaling.patch
-	$(APPLY) $(SRC)/qt/0004-qmake-don-t-limit-command-line-length-when-not-actua.patch
-	$(APPLY) $(SRC)/qt/0005-harfbuzz-Fix-building-for-win64-with-clang.patch
-	$(APPLY) $(SRC)/qt/0006-moc-Initialize-staticMetaObject-with-the-highest-use.patch
-	$(APPLY) $(SRC)/qt/0007-Only-define-QT_FASTCALL-on-x86_32.patch
-	$(APPLY) $(SRC)/qt/0008-Skip-arm-pixman-drawhelpers-on-windows-just-like-on-.patch
-	$(APPLY) $(SRC)/qt/0009-mkspecs-Add-a-win32-clang-g-mkspec-for-clang-targeti.patch
-	$(APPLY) $(SRC)/qt/systray-no-sound.patch
+	mv qtbase-everywhere-src-$(QT_VERSION) qt-$(QT_VERSION)
+	$(APPLY) $(SRC)/qt/0001-Windows-QPA-prefer-lower-value-when-rounding-fractio.patch
+	$(APPLY) $(SRC)/qt/0002-Windows-QPA-Disable-systray-notification-sounds.patch
 	$(MOVE)
 
 ifdef HAVE_MACOSX
@@ -52,7 +44,7 @@ endif
 
 QT_CONFIG := -static -opensource -confirm-license -no-pkg-config \
 	-no-sql-sqlite -no-gif -qt-libjpeg -no-openssl -no-opengl -no-dbus \
-	-no-qml-debug -no-audio-backend -no-sql-odbc -no-pch \
+	-no-sql-odbc -no-pch \
 	-no-compile-examples -nomake examples -qt-zlib
 
 QT_CONFIG += -release
@@ -74,16 +66,16 @@ QT_CONFIG += -release
 	rm -rf $(PREFIX)/lib/libQt5Bootstrap* $</lib/libQt5Bootstrap*
 	# Fix .pc files to remove debug version (d)
 	cd $(PREFIX)/lib/pkgconfig; for i in Qt5Core.pc Qt5Gui.pc Qt5Widgets.pc; do sed -i.orig -e 's/d\.a/.a/g' -e 's/d $$/ /' $$i; done
-	# Fix Qt5Gui.pc file to include qwindows (QWindowsIntegrationPlugin) and Qt5Platform Support
-	cd $(PREFIX)/lib/pkgconfig; sed -i.orig -e 's/ -lQt5Gui/ -lqwindows -lQt5PlatformSupport -lQt5Gui/g' Qt5Gui.pc
+	# Fix Qt5Gui.pc file to include qwindows (QWindowsIntegrationPlugin) and platform support libraries
+	cd $(PREFIX)/lib/pkgconfig; sed -i.orig -e 's/ -lQt5Gui/ -lqwindows -lQt5ThemeSupport -lQt5FontDatabaseSupport -lQt5EventDispatcherSupport -lQt5WindowsUIAutomationSupport -lqtfreetype -lQt5Gui/g' Qt5Gui.pc
 ifdef HAVE_CROSS_COMPILE
 	# Building Qt build tools for Xcompilation
 	cd $</include/QtCore; ln -sf $(QT_VERSION)/QtCore/private
 	cd $<; $(MAKE) -C qmake
-	cd $<; $(MAKE) install_qmake install_mkspecs
+	cd $<; $(MAKE) sub-qmake-qmake-aux-pro-install_subtargets install_mkspecs
 	cd $</src/tools; \
 	for i in bootstrap uic rcc moc; \
-		do (cd $$i; echo $$i && ../../../bin/qmake -spec $(QT_SPEC) && $(MAKE) clean && $(MAKE) CC=$(HOST)-gcc CXX=$(HOST)-g++ LINKER=$(HOST)-g++ LIB="$(HOST)-ar -rc" && $(MAKE) install); \
+		do (cd $$i; echo $$i && ../../../bin/qmake -spec $(QT_SPEC) QMAKE_RC=$(HOST)-windres && $(MAKE) clean && $(MAKE) CC=$(HOST)-gcc CXX=$(HOST)-g++ LINKER=$(HOST)-g++ LIB="$(HOST)-ar -rc" && $(MAKE) install); \
 	done
 endif
 	touch $@
diff --git a/contrib/src/qt/systray-no-sound.patch b/contrib/src/qt/systray-no-sound.patch
deleted file mode 100644
index 0d80933..0000000
-- 
2.7.4



More information about the vlc-devel mailing list