[vlc-commits] [Git][videolan/vlc][master] 10 commits: contrib: win32: allow checking more versions of mingw-w64
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Wed Mar 2 13:52:41 UTC 2022
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
6d2a3115 by Steve Lhomme at 2022-03-02T12:24:13+00:00
contrib: win32: allow checking more versions of mingw-w64
- - - - -
8a191b4c by Steve Lhomme at 2022-03-02T12:24:13+00:00
contrib: win32: only preprocess _mingw.h once
- - - - -
50e71ad6 by Steve Lhomme at 2022-03-02T12:24:13+00:00
contrib: pthread: use a recent mingw-w64 to get proper dcomp.h
We can't detect it based on a version of mingw until v10 is released and in our
images.
- - - - -
2d353983 by Steve Lhomme at 2022-03-02T12:24:13+00:00
contrib: pthreads: stop pretending we download just winpthreads
- - - - -
13cef3f6 by Steve Lhomme at 2022-03-02T12:24:13+00:00
contrib: pthreads: don't count winrt_headers as found if we don't need it
- - - - -
5edcad34 by Steve Lhomme at 2022-03-02T12:24:13+00:00
contrib: pthreads: get the latest d3d9 headers from mingw
Since Mingw 8.0.0 they have recent enough API's.
Qt needs this dependency as Angle may be using D3D9.
- - - - -
7e4e0b1f by Steve Lhomme at 2022-03-02T12:24:13+00:00
contrib: pthreads: get the latest dxva header from mingw
In mingw 10 they are up to date with HEVC and AV1. Even in all the win32 images
we use.
If we ever need to patch it again we can do it on the mingw version
- - - - -
982a6adb by Steve Lhomme at 2022-03-02T12:24:13+00:00
contrib: wine-headers: don't pick win headers with mingw-w64 v8
All the headers have the parts we need in mingw 8 (checked individually).
- - - - -
698bac94 by Steve Lhomme at 2022-03-02T12:24:13+00:00
contrib: wine-headers: remove the code to get unpatched headers
We don't use any unpatched header anymore.
- - - - -
32ceab21 by Steve Lhomme at 2022-03-02T12:24:13+00:00
contrib: qt: add dcomp dependency when building for windows
Angle may be using it and it is a separate "contrib package" now.
We don't need the most recent dcomp as it's only using IDCompositionDevice.
So if we have mingw 8+ we don't add the dependency.
- - - - -
6 changed files:
- contrib/src/main.mak
- − contrib/src/pthreads/0001-dcomp.h-add-some-missing-interfaces.patch
- contrib/src/pthreads/SHA512SUMS
- contrib/src/pthreads/rules.mak
- contrib/src/qt/rules.mak
- contrib/src/wine-headers/rules.mak
Changes:
=====================================
contrib/src/main.mak
=====================================
@@ -127,10 +127,10 @@ endif
LN_S = ln -s
ifdef HAVE_WIN32
-ifneq ($(shell $(CC) $(CFLAGS) -E -dM -include _mingw.h - < /dev/null | grep -E __MINGW64_VERSION_MAJOR),)
+MINGW_W64_VERSION := $(shell $(CC) $(CFLAGS) -E -dM -include _mingw.h - < /dev/null | grep -E -m 1 __MINGW64_VERSION_MAJOR | sed -e 's/\#define\s__MINGW64_VERSION_MAJOR\s//')
+ifneq ($(MINGW_W64_VERSION),)
HAVE_MINGW_W64 := 1
-MINGW_W64_VERSION := $(shell $(CC) $(CFLAGS) -E -dM -include _mingw.h - < /dev/null | grep -E 'define\s__MINGW64_VERSION_MAJOR' | sed -e 's/\#define\s__MINGW64_VERSION_MAJOR\s//')
-HAVE_MINGW64_V8 := $(shell [ $(MINGW_W64_VERSION) -gt 7 ] && echo true)
+mingw_at_least = $(shell [ $(MINGW_W64_VERSION) -gt $(1) ] && echo true)
HAVE_WINPTHREAD := $(shell $(CC) $(CFLAGS) -E -dM -include pthread.h - < /dev/null >/dev/null 2>&1 || echo FAIL)
endif
ifndef HAVE_CROSS_COMPILE
=====================================
contrib/src/pthreads/0001-dcomp.h-add-some-missing-interfaces.patch deleted
=====================================
@@ -1,111 +0,0 @@
-From 9de58105bbe6fb870c746d3f5c4ed97d91ba1b7c Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Tue, 7 Sep 2021 14:36:16 +0200
-Subject: [PATCH] dcomp.h: add some missing interfaces
-
-* IDCompositionFilterEffect: https://docs.microsoft.com/en-us/windows/win32/api/dcomp/nn-dcomp-idcompositionfiltereffect
-* IDCompositionSaturationEffect: https://docs.microsoft.com/en-us/windows/win32/api/dcomp/nn-dcomp-idcompositionsaturationeffect
-* IDCompositionGaussianBlurEffect: https://docs.microsoft.com/en-us/windows/win32/api/dcomp/nn-dcomp-idcompositiongaussianblureffect
-* IDCompositionDevice3: https://docs.microsoft.com/en-us/windows/win32/api/dcomp/nn-dcomp-idcompositiondevice3
-
-The order of methods can be found from
-https://github.com/terrafx/terrafx.interop.windows/tree/main/sources/Interop/Windows/um/dcomp
-
-As for other IDCompositionEffect interfaces, some methods are inverted for MSVC
-compilation in C++ (which is odd).
-
-Co-authored-by: Prince Gupta <guptaprince8832 at gmail.com>
----
- mingw-w64-headers/include/dcomp.h | 74 +++++++++++++++++++++++++++++++
- 1 file changed, 74 insertions(+)
-
-diff --git a/mingw-w64-headers/include/dcomp.h b/mingw-w64-headers/include/dcomp.h
-index 58f4b8466..7f124ca99 100644
---- a/mingw-w64-headers/include/dcomp.h
-+++ b/mingw-w64-headers/include/dcomp.h
-@@ -524,8 +524,82 @@ __CRT_UUID_DECL(IDCompositionVisualDebug,0xfed2b808,0x5eb4,0x43a0,0xae,0xa3,0x35
- #endif
-
-
-+#undef INTERFACE
-+#define INTERFACE IDCompositionFilterEffect
-+DECLARE_INTERFACE_IID_(IDCompositionFilterEffect, IDCompositionEffect, "30C421D5-8CB2-4E9F-B133-37BE270D4AC2")
-+{
-+ STDMETHOD(SetInput)(THIS_ UINT index, IUnknown *input, UINT flags) PURE;
-+};
-+
-+#ifdef __CRT_UUID_DECL
-+__CRT_UUID_DECL(IDCompositionFilterEffect,0x30c421d5,0x8cb2,0x4e9f,0xb1,0x33,0x37,0xbe,0x27,0x0d,0x4a,0xc2);
- #endif
-
-+
-+#undef INTERFACE
-+#define INTERFACE IDCompositionSaturationEffect
-+DECLARE_INTERFACE_IID_(IDCompositionSaturationEffect, IDCompositionFilterEffect, "A08DEBDA-3258-4FA4-9F16-9174D3FE93B1")
-+{
-+#if defined(_MSC_VER) && defined(__cplusplus)
-+ STDMETHOD(SetSaturation)(THIS_ float ratio) PURE;
-+ STDMETHOD(SetSaturation)(THIS_ IDCompositionAnimation* animation) PURE;
-+#else
-+ STDMETHOD(SetSaturation)(THIS_ IDCompositionAnimation* animation) PURE;
-+ STDMETHOD(SetSaturation)(THIS_ float ratio ) PURE;
-+#endif
-+};
-+
-+#ifdef __CRT_UUID_DECL
-+__CRT_UUID_DECL(IDCompositionSaturationEffect,0xa08debda,0x3258,0x4fa4,0x9f,0x16,0x91,0x74,0xd3,0xfe,0x93,0xb1);
-+#endif
-+
-+
-+#undef INTERFACE
-+#define INTERFACE IDCompositionGaussianBlurEffect
-+DECLARE_INTERFACE_IID_(IDCompositionGaussianBlurEffect, IDCompositionFilterEffect, "45D4D0B7-1BD4-454E-8894-2BFA68443033")
-+{
-+
-+#if defined(_MSC_VER) && defined(__cplusplus)
-+ STDMETHOD(SetStandardDeviation)(THIS_ float amount) PURE;
-+ STDMETHOD(SetStandardDeviation)(THIS_ IDCompositionAnimation* animation) PURE;
-+#else
-+ STDMETHOD(SetStandardDeviation)(THIS_ IDCompositionAnimation* animation) PURE;
-+ STDMETHOD(SetStandardDeviation)(THIS_ float amount) PURE;
-+#endif
-+ STDMETHOD(SetBorderMode)(THIS_ D2D1_BORDER_MODE mode) PURE;
-+};
-+
-+#ifdef __CRT_UUID_DECL
-+__CRT_UUID_DECL(IDCompositionGaussianBlurEffect,0x45d4d0b7,0x1bd4,0x454e,0x88,0x94,0x2b,0xfa,0x68,0x44,0x30,0x33);
-+#endif
-+
-+
-+// WARNING: some of the arguments are replaced with void*, only what's used has been kept
-+#undef INTERFACE
-+#define INTERFACE IDCompositionDevice3
-+DECLARE_INTERFACE_IID_(IDCompositionDevice3, IDCompositionDevice2, "0987CB06-F916-48BF-8D35-CE7641781BD9")
-+{
-+ STDMETHOD(CreateGaussianBlurEffect)(THIS_ IDCompositionGaussianBlurEffect **gaussianBlurEffect) PURE;
-+ STDMETHOD(CreateBrightnessEffect)(THIS_ void **brightnessEffect) PURE;
-+ STDMETHOD(CreateColorMatrixEffect)(THIS_ void **colorMatrixEffect) PURE;
-+ STDMETHOD(CreateShadowEffect)(THIS_ void **shadowEffect) PURE;
-+ STDMETHOD(CreateHueRotationEffect)(THIS_ void **hueRotationEffect) PURE;
-+ STDMETHOD(CreateSaturationEffect)(THIS_ IDCompositionSaturationEffect **saturationEffect) PURE;
-+ STDMETHOD(CreateTurbulenceEffect)(THIS_ void **turbulenceEffect) PURE;
-+ STDMETHOD(CreateLinearTransferEffect)(THIS_ void **linearTransferEffect) PURE;
-+ STDMETHOD(CreateTableTransferEffect)(THIS_ void **tableTransferEffect) PURE;
-+ STDMETHOD(CreateCompositeEffect)(THIS_ void **compositeEffect) PURE;
-+ STDMETHOD(CreateBlendEffect)(THIS_ void **blendEffect) PURE;
-+ STDMETHOD(CreateArithmeticCompositeEffect)(THIS_ void **arithmeticCompositeEffect) PURE;
-+ STDMETHOD(CreateAffineTransform2DEffect)(THIS_ void **affineTransform2dEffect) PURE;
-+};
-+
-+#ifdef __CRT_UUID_DECL
-+__CRT_UUID_DECL(IDCompositionDevice3,0x0987cb06,0xf916,0x48bf,0x8d,0x35,0xce,0x76,0x41,0x78,0x1b,0xd9);
-+#endif
-+
-+#endif // WINAPI_PARTITION_DESKTOP
-+
- #if (_WIN32_WINNT >= 0x0A00)
-
- STDAPI DCompositionCreateDevice3(IUnknown *renderingDevice, REFIID iid, void **dcompositionDevice);
---
-2.27.0.windows.1
-
=====================================
contrib/src/pthreads/SHA512SUMS
=====================================
@@ -1 +1 @@
-6691331a2ab521d22c1d32bebe0ed049bd62a7a7722cff38e7792b4e42c6b8df4356084afff6c916b487b3ebddc4372b398ab7cd0c7f4ff6991a70fe64177386 mingw-w64-v9.0.0.tar.bz2
+4e2ffbb6cbe59c65f60d3f0035d1c2065b14ad16a63ae7a297f5c61d83b8e1b6847e3579996b91b2b9d807e3b9c1de2c60ee01a3349c9dd5f6e13d36f25221ea mingw-w64-2c35e8ff0d33916bd490e8932cba2049cd1af3d0.tar.xz
=====================================
contrib/src/pthreads/rules.mak
=====================================
@@ -1,9 +1,9 @@
-# winpthreads
+# winpthreads, dxvahd, winrt_headers, dcomp
-WINPTHREADS_VERSION := 9.0.0
-WINPTHREADS_URL := https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/mingw-w64-v$(WINPTHREADS_VERSION).tar.bz2/download
-WINPTHREADS_HASH=a32b622261b490ec4e4f675dfef010d1274c6c4d
-WINPTHREADS_GITURL := https://git.code.sf.net/p/mingw-w64/mingw-w64
+MINGW64_VERSION := 9.0.0
+MINGW64_URL := https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/mingw-w64-v$(MINGW64_VERSION).tar.bz2/download
+MINGW64_HASH=2c35e8ff0d33916bd490e8932cba2049cd1af3d0
+MINGW64_GITURL := https://git.code.sf.net/p/mingw-w64/mingw-w64
ifdef HAVE_WIN32
PKGS += pthreads
@@ -12,31 +12,39 @@ ifndef HAVE_VISUALSTUDIO
ifdef HAVE_WINSTORE
PKGS += winrt_headers
PKGS_ALL += winrt_headers
-endif
-PKGS += dxvahd dcomp
-PKGS_ALL += dxvahd dcomp
-ifeq ($(HAVE_MINGW64_V8),true)
-PKGS_FOUND += winrt_headers dxvahd
-endif
+endif # HAVE_WINSTORE
+PKGS += d3d9 dxva dxvahd dcomp
+PKGS_ALL += d3d9 dxva dxvahd dcomp
+ifeq ($(call mingw_at_least, 8), true)
+PKGS_FOUND += d3d9 dxvahd
+ifdef HAVE_WINSTORE
+PKGS_FOUND += winrt_headers
+endif # HAVE_WINSTORE
+endif # MINGW 8
+ifeq ($(call mingw_at_least, 10), true)
+PKGS_FOUND += dxva
+endif # MINGW 10
ifeq ($(HAVE_WINPTHREAD),)
PKGS_FOUND += pthreads
endif
+ifneq ($(shell $(CC) $(CFLAGS) -E -dM -include dcomp.h - < /dev/null | grep -m 1 IDCompositionDevice3),)
+PKGS_FOUND += dcomp
endif
-endif
+endif # !HAVE_VISUALSTUDIO
+endif # HAVE_WIN32
-$(TARBALLS)/mingw-w64-$(WINPTHREADS_HASH).tar.xz:
- $(call download_git,$(WINPTHREADS_GITURL),,$(WINPTHREADS_HASH))
+$(TARBALLS)/mingw-w64-$(MINGW64_HASH).tar.xz:
+ $(call download_git,$(MINGW64_GITURL),,$(MINGW64_HASH))
-$(TARBALLS)/mingw-w64-v$(WINPTHREADS_VERSION).tar.bz2:
- $(call download_pkg,$(WINPTHREADS_URL),winpthreads)
+$(TARBALLS)/mingw-w64-v$(MINGW64_VERSION).tar.bz2:
+ $(call download_pkg,$(MINGW64_URL),winpthreads)
-.sum-pthreads: mingw-w64-v$(WINPTHREADS_VERSION).tar.bz2
-#.sum-pthreads: mingw-w64-$(WINPTHREADS_HASH).tar.xz
+# .sum-pthreads: mingw-w64-v$(MINGW64_VERSION).tar.bz2
+.sum-pthreads: mingw-w64-$(MINGW64_HASH).tar.xz
-pthreads: mingw-w64-v$(WINPTHREADS_VERSION).tar.bz2 .sum-pthreads
-#pthreads: mingw-w64-$(WINPTHREADS_HASH).tar.xz .sum-pthreads
+# pthreads: mingw-w64-v$(MINGW64_VERSION).tar.bz2 .sum-pthreads
+pthreads: mingw-w64-$(MINGW64_HASH).tar.xz .sum-pthreads
$(UNPACK)
- $(APPLY) $(SRC)/pthreads/0001-dcomp.h-add-some-missing-interfaces.patch
$(MOVE)
.pthreads: pthreads
@@ -67,3 +75,21 @@ pthreads: mingw-w64-v$(WINPTHREADS_VERSION).tar.bz2 .sum-pthreads
mkdir -p -- "$(PREFIX)/include"
cd $< && cp mingw-w64-headers/include/dcomp.h "$(PREFIX)/include"
touch $@
+
+.sum-d3d9: .sum-pthreads
+ touch $@
+
+.d3d9: pthreads
+ mkdir -p -- "$(PREFIX)/include"
+ cd $< && cp mingw-w64-headers/include/d3d9.h "$(PREFIX)/include"
+ cd $< && cp mingw-w64-headers/include/d3d9caps.h "$(PREFIX)/include"
+ touch $@
+
+.sum-dxva: .sum-pthreads
+ touch $@
+
+.dxva: pthreads
+ mkdir -p -- "$(PREFIX)/include"
+ cd $< && cp mingw-w64-headers/include/dxva.h "$(PREFIX)/include"
+ touch $@
+
=====================================
contrib/src/qt/rules.mak
=====================================
@@ -11,7 +11,10 @@ ifdef HAVE_MACOSX
endif
ifdef HAVE_WIN32
PKGS += qt
-DEPS_qt = fxc2 $(DEPS_fxc2)
+DEPS_qt = fxc2 $(DEPS_fxc2) d3d9 $(DEPS_d3d9)
+ifneq ($(call mingw_at_least, 8), true)
+DEPS_qt += dcomp $(DEPS_dcomp)
+endif # MINGW 8
ifdef HAVE_CROSS_COMPILE
DEPS_qt += wine-headers
endif
=====================================
contrib/src/wine-headers/rules.mak
=====================================
@@ -5,9 +5,11 @@ WINE_URL := https://dl.winehq.org/wine/source/6.x/wine-$(WINE_VERSION).tar.xz
ifdef HAVE_WIN32
PKGS += wine-headers
endif
+ifeq ($(call mingw_at_least, 8), true)
+PKGS_FOUND += wine-headers
+endif
# Order is important since *_(n).idl will depends on *_(n-1).idl
-WINE_EXTRA_HEADERS = dxva.h
WINE_IDL_HEADERS = \
d3d11.idl \
d3d11_1.idl d3d11_2.idl d3d11_3.idl d3d11_4.idl \
@@ -16,10 +18,6 @@ WINE_IDL_HEADERS = \
dxgi.idl dxgi1_2.idl dxgi1_3.idl dxgi1_4.idl dxgi1_5.idl dxgi1_6.idl \
dxva2api.idl
-ifndef HAVE_VISUALSTUDIO
-WINE_EXTRA_HEADERS += d3d9caps.h d3d9.h
-endif
-
$(TARBALLS)/wine-$(WINE_VERSION).tar.xz:
$(call download_pkg,$(WINE_URL),wine)
@@ -42,8 +40,4 @@ wine_widl = echo "GEN $(1)" && \
@for header in $(WINE_IDL_HEADERS); do \
$(call wine_widl,"`basename $$header idl`h",$$header,); \
done
- @for header in $(WINE_EXTRA_HEADERS); do \
- echo "CP $$header"; \
- cp "wine-headers/include/$$header" "$(PREFIX)/include"; \
- done
touch $@
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4b0c3d581076b48d4f212794e45b4a8e71a578aa...32ceab21cbbb8d0021cb4342541736aef8ee0652
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/4b0c3d581076b48d4f212794e45b4a8e71a578aa...32ceab21cbbb8d0021cb4342541736aef8ee0652
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list