[vlc-commits] contrib: pthreads: use a mingw-w64 version from git

Steve Lhomme git at videolan.org
Wed Jun 3 14:36:19 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri May 29 13:32:32 2020 +0200| [b8731a6096b59404c6cd8f4c034c04532cee9977] | committer: Steve Lhomme

contrib: pthreads: use a mingw-w64 version from git

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b8731a6096b59404c6cd8f4c034c04532cee9977
---

 ...d-the-IApplicationData2-storage-interface.patch | 170 ---------------------
 contrib/src/pthreads/SHA512SUMS                    |   2 +-
 contrib/src/pthreads/rules.mak                     |  11 +-
 3 files changed, 9 insertions(+), 174 deletions(-)

diff --git a/contrib/src/pthreads/0001-Add-the-IApplicationData2-storage-interface.patch b/contrib/src/pthreads/0001-Add-the-IApplicationData2-storage-interface.patch
deleted file mode 100644
index 2ff0dfc611..0000000000
--- a/contrib/src/pthreads/0001-Add-the-IApplicationData2-storage-interface.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-From 0f7be38e79e27ce8fa0ba5db46fa21319eeea7e3 Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Mon, 6 Apr 2020 14:04:41 +0200
-Subject: [PATCH] Add the IApplicationData2 storage interface
-
-It allows getting the LocalCacheFolder
-https://docs.microsoft.com/en-us/uwp/api/windows.storage.applicationdata.localcachefolde
----
- mingw-w64-headers/include/windows.storage.h   | 114 ++++++++++++++++++
- mingw-w64-headers/include/windows.storage.idl |   5 +
- 2 files changed, 119 insertions(+)
-
-diff --git a/mingw-w64-headers/include/windows.storage.h b/mingw-w64-headers/include/windows.storage.h
-index c0c6c48e..7e4c429b 100644
---- a/mingw-w64-headers/include/windows.storage.h
-+++ b/mingw-w64-headers/include/windows.storage.h
-@@ -42,6 +42,11 @@ typedef interface IApplicationDataContainer IApplicationDataContainer;
- typedef interface IApplicationData IApplicationData;
- #endif
- 
-+#ifndef __IApplicationData2_FWD_DEFINED__
-+#define __IApplicationData2_FWD_DEFINED__
-+typedef interface IApplicationData2 IApplicationData2;
-+#endif
-+
- #ifndef __IApplicationDataStatics_FWD_DEFINED__
- #define __IApplicationDataStatics_FWD_DEFINED__
- typedef interface IApplicationDataStatics IApplicationDataStatics;
-@@ -107,6 +112,11 @@ typedef interface IStorageFolder IStorageFolder;
- typedef interface IApplicationData IApplicationData;
- #endif
- 
-+#ifndef __IApplicationData2_FWD_DEFINED__
-+#define __IApplicationData2_FWD_DEFINED__
-+typedef interface IApplicationData2 IApplicationData2;
-+#endif
-+
- #ifndef __IApplicationDataStatics_FWD_DEFINED__
- #define __IApplicationDataStatics_FWD_DEFINED__
- typedef interface IApplicationDataStatics IApplicationDataStatics;
-@@ -1562,6 +1572,110 @@ void __RPC_STUB IApplicationData_RoamingStorageQuota_Stub(
- 
- #endif  /* __IApplicationData_INTERFACE_DEFINED__ */
- 
-+/*****************************************************************************
-+ * IApplicationData2 interface
-+ */
-+#ifndef __IApplicationData2_INTERFACE_DEFINED__
-+#define __IApplicationData2_INTERFACE_DEFINED__
-+
-+DEFINE_GUID(IID_IApplicationData2, 0x9e65cd69, 0x0ba3, 0x4e32, 0xbe,0x29, 0xb0,0x2d,0xe6,0x60,0x76,0x38);
-+#if defined(__cplusplus) && !defined(CINTERFACE)
-+MIDL_INTERFACE("9e65cd69-0ba3-4e32-be29-b02de6607638")
-+IApplicationData2 : public IInspectable
-+{
-+    virtual HRESULT STDMETHODCALLTYPE get_LocalCacheFolder(
-+        IStorageFolder **value) = 0;
-+
-+};
-+#ifdef __CRT_UUID_DECL
-+__CRT_UUID_DECL(IApplicationData2, 0x9e65cd69, 0x0ba3, 0x4e32, 0xbe,0x29, 0xb0,0x2d,0xe6,0x60,0x76,0x38)
-+#endif
-+#else
-+typedef struct IApplicationData2Vtbl {
-+    BEGIN_INTERFACE
-+
-+    /*** IUnknown methods ***/
-+    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
-+        IApplicationData2 *This,
-+        REFIID riid,
-+        void **ppvObject);
-+
-+    ULONG (STDMETHODCALLTYPE *AddRef)(
-+        IApplicationData2 *This);
-+
-+    ULONG (STDMETHODCALLTYPE *Release)(
-+        IApplicationData2 *This);
-+
-+    /*** IInspectable methods ***/
-+    HRESULT (STDMETHODCALLTYPE *GetIids)(
-+        IApplicationData2 *This,
-+        ULONG *iidCount,
-+        IID **iids);
-+
-+    HRESULT (STDMETHODCALLTYPE *GetRuntimeClassName)(
-+        IApplicationData2 *This,
-+        HSTRING *className);
-+
-+    HRESULT (STDMETHODCALLTYPE *GetTrustLevel)(
-+        IApplicationData2 *This,
-+        TrustLevel *trustLevel);
-+
-+    /*** IApplicationData2 methods ***/
-+    HRESULT (STDMETHODCALLTYPE *get_LocalCacheFolder)(
-+        IApplicationData2 *This,
-+        IStorageFolder **value);
-+
-+    END_INTERFACE
-+} IApplicationData2Vtbl;
-+
-+interface IApplicationData2 {
-+    CONST_VTBL IApplicationData2Vtbl* lpVtbl;
-+};
-+
-+#ifdef COBJMACROS
-+#ifndef WIDL_C_INLINE_WRAPPERS
-+/*** IUnknown methods ***/
-+#define IApplicationData2_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-+#define IApplicationData2_AddRef(This) (This)->lpVtbl->AddRef(This)
-+#define IApplicationData2_Release(This) (This)->lpVtbl->Release(This)
-+/*** IInspectable methods ***/
-+#define IApplicationData2_GetIids(This,iidCount,iids) (This)->lpVtbl->GetIids(This,iidCount,iids)
-+#define IApplicationData2_GetRuntimeClassName(This,className) (This)->lpVtbl->GetRuntimeClassName(This,className)
-+#define IApplicationData2_GetTrustLevel(This,trustLevel) (This)->lpVtbl->GetTrustLevel(This,trustLevel)
-+/*** IApplicationData2 methods ***/
-+#define IApplicationData2_get_LocalCacheFolder(This,value) (This)->lpVtbl->get_LocalCacheFolder(This,value)
-+#else
-+/*** IUnknown methods ***/
-+static FORCEINLINE HRESULT IApplicationData2_QueryInterface(IApplicationData2* This,REFIID riid,void **ppvObject) {
-+    return This->lpVtbl->QueryInterface(This,riid,ppvObject);
-+}
-+static FORCEINLINE ULONG IApplicationData2_AddRef(IApplicationData2* This) {
-+    return This->lpVtbl->AddRef(This);
-+}
-+static FORCEINLINE ULONG IApplicationData2_Release(IApplicationData2* This) {
-+    return This->lpVtbl->Release(This);
-+}
-+/*** IInspectable methods ***/
-+static FORCEINLINE HRESULT IApplicationData2_GetIids(IApplicationData2* This,ULONG *iidCount,IID **iids) {
-+    return This->lpVtbl->GetIids(This,iidCount,iids);
-+}
-+static FORCEINLINE HRESULT IApplicationData2_GetRuntimeClassName(IApplicationData2* This,HSTRING *className) {
-+    return This->lpVtbl->GetRuntimeClassName(This,className);
-+}
-+static FORCEINLINE HRESULT IApplicationData2_GetTrustLevel(IApplicationData2* This,TrustLevel *trustLevel) {
-+    return This->lpVtbl->GetTrustLevel(This,trustLevel);
-+}
-+/*** IApplicationData2 methods ***/
-+static FORCEINLINE HRESULT IApplicationData2_get_LocalCacheFolder(IApplicationData2* This,IStorageFolder **value) {
-+    return This->lpVtbl->get_LocalCacheFolder(This,value);
-+}
-+#endif
-+#endif
-+
-+#endif
-+
-+#endif  /* __IApplicationData2_INTERFACE_DEFINED__ */
-+
- /*****************************************************************************
-  * IApplicationDataStatics interface
-  */
-diff --git a/mingw-w64-headers/include/windows.storage.idl b/mingw-w64-headers/include/windows.storage.idl
-index da41e66b..61ad0408 100644
---- a/mingw-w64-headers/include/windows.storage.idl
-+++ b/mingw-w64-headers/include/windows.storage.idl
-@@ -158,6 +158,11 @@ namespace Windows {
-       HRESULT RoamingStorageQuota(UINT64* value);
-     }
- 
-+    [uuid(9E65CD69-0BA3-4E32-BE29-B02DE6607638)]
-+    interface IApplicationData2 : IInspectable {
-+      [propget] HRESULT LocalCacheFolder(IStorageFolder** value);
-+    }
-+
-     [uuid(5612147B-E843-45E3-94D8-06169E3C8E17)]
-     interface IApplicationDataStatics : IInspectable {
-       [propget] HRESULT Current(IApplicationData** data);
--- 
-2.26.0.windows.1
-
diff --git a/contrib/src/pthreads/SHA512SUMS b/contrib/src/pthreads/SHA512SUMS
index 82f5956d1b..1c0bd8cfd3 100644
--- a/contrib/src/pthreads/SHA512SUMS
+++ b/contrib/src/pthreads/SHA512SUMS
@@ -1 +1 @@
-30e5b2824a24eeb99ab519e3fc134cc9a7f04ee8b853bc8d66a13d1ab74144bf78b93e162bfe6de2a5e61f63c0e620a933b260b02d019cd68cc4b78bd36c67fd  mingw-w64-v7.0.0.tar.bz2
+2ee60942e059c685b52b556bfc4859c308041d540db8c1e469b220c3dee9fc794e94127bb000cda634ac8fb9059028b1ade7de9c91b07319ca4a4056b9eec39a  mingw-w64-a32b622261b490ec4e4f675dfef010d1274c6c4d.tar.xz
diff --git a/contrib/src/pthreads/rules.mak b/contrib/src/pthreads/rules.mak
index 9ec9ffc3b4..8dc5f972f4 100644
--- a/contrib/src/pthreads/rules.mak
+++ b/contrib/src/pthreads/rules.mak
@@ -2,6 +2,8 @@
 
 WINPTHREADS_VERSION := 7.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
 
 ifdef HAVE_WIN32
 PKGS += pthreads
@@ -14,14 +16,17 @@ PKGS_ALL += winrt_headers
 endif
 endif
 
+$(TARBALLS)/mingw-w64-$(WINPTHREADS_HASH).tar.xz:
+	$(call download_git,$(WINPTHREADS_GITURL),,$(WINPTHREADS_HASH))
+
 $(TARBALLS)/mingw-w64-v$(WINPTHREADS_VERSION).tar.bz2:
 	$(call download_pkg,$(WINPTHREADS_URL),winpthreads)
 
-.sum-pthreads: mingw-w64-v$(WINPTHREADS_VERSION).tar.bz2
+# .sum-pthreads: mingw-w64-v$(WINPTHREADS_VERSION).tar.bz2
+.sum-pthreads: mingw-w64-$(WINPTHREADS_HASH).tar.xz
 
-pthreads: mingw-w64-v$(WINPTHREADS_VERSION).tar.bz2 .sum-pthreads
+pthreads: mingw-w64-$(WINPTHREADS_HASH).tar.xz .sum-pthreads
 	$(UNPACK)
-	$(APPLY) $(SRC)/pthreads/0001-Add-the-IApplicationData2-storage-interface.patch
 	$(MOVE)
 
 .pthreads: pthreads



More information about the vlc-commits mailing list