[vlc-commits] [Git][videolan/vlc][3.0.x] 13 commits: contrib: gnutls: fix build with Android NDK25
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Nov 19 10:34:17 UTC 2024
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
005b0849 by Thomas Guillem at 2024-11-19T09:13:25+00:00
contrib: gnutls: fix build with Android NDK25
It needs the same patch than appleos. Maybe we should check for
aarch64 instead.
(cherry picked from commit 03f8817fd8712d9a8b3ad2b7fd77f693831d3c44) (rebased)
rebased:
- 3.0 has different code around
- - - - -
02798996 by Steve Lhomme at 2024-11-19T09:13:25+00:00
contrib: flac: disable examples building
(cherry picked from commit a371bda5d761fc18044cb0c5bde1aa7b443a33b8) (rebased)
rebased:
- 3.0 already moved HOSTCONF
- - - - -
f33320d5 by Steve Lhomme at 2024-11-19T09:13:25+00:00
contrib: call sed directly on the files to change
(cherry picked from commit 637d00420fa1a3f4b71215ba869cb5d05bb7bead) (edited)
edited:
- 3.0 didn't have use sed on FLAC, libtasn1, qt, zlib
- - - - -
dbb0a077 by Steve Lhomme at 2024-11-19T09:13:25+00:00
contrib: factorize the GNUGPG/Gcrypt URLs
(cherry picked from commit ea7354d2e51e42d183923a6577e05bacb1d27782) (edited)
edited:
- 3.0 only had GITHUB
- 3.0 uses gcrypt 1.7.10
- - - - -
b30b7f66 by Steve Lhomme at 2024-11-19T09:13:25+00:00
contrib: gnutls: remove unneeded UWP modif
(cherry picked from commit 2c62bced70139e792e8b3bdb47a0acd8f1838b67)
- - - - -
de60a536 by Steve Lhomme at 2024-11-19T09:13:25+00:00
contrib: gnutls: fix UWP build
The gnulib rpl_stat() function uses CreateFileA which is forbidden.
We need to use CreateFile2 in UWP.
(cherry picked from commit 0a20220043aca2ea772b0bb434541c2e369f7b72)
- - - - -
29e4d3fd by Steve Lhomme at 2024-11-19T09:13:25+00:00
contrib: gnutls: avoid more forbidden UWP calls in gnulib
(cherry picked from commit c5447f8157afc10ab225dc8a67b586a72f5372a3)
- - - - -
7d45e431 by Steve Lhomme at 2024-11-19T09:13:25+00:00
contrib: remove patches to disable GetHandleInformation() calls in UWP
It's now allowed. The contribs involved already depend on alloweuwp.
(cherry picked from commit 313a3991ef7a9041cd6afec1f979332578815476) (edited)
edited:
- 3.0 didn't have patches for iconv, libtasn1
- - - - -
1829f817 by Steve Lhomme at 2024-11-19T09:13:25+00:00
contrib: gnutls: disable build if license is not matched
We need nettle and gmp and they can't be used with the LGPLv2 license.
(cherry picked from commit dc74c5d571db5b4ef7839aa30d551a93cef32516) (rebased)
- - - - -
2b0f6dc3 by Steve Lhomme at 2024-11-19T09:13:25+00:00
contrib: gnutls: allow SecureZeroMemory
This is possible now that RtlSecureZeroMemory is allowed.
Partial revert of a4841494fd974ec2c6208bc77f0f0c90dc5aebaf.
(cherry picked from commit e8af0221767591b35c81561b8308f5051e594055) (rebased)
rebased:
- the code around was different
- - - - -
3be9e3f6 by Steve Lhomme at 2024-11-19T09:13:25+00:00
contrib: gnutls: update to 3.8.3
There doesn't seem to be any API changes: https://www.gnutls.org/manual/html_node/Upgrading-from-previous-versions.html
Many of our patches have been upstreamed.
(cherry picked from commit 9ffc31dd5fe8224a5163e969bf9aabb872181287) (rebased)
rebased:
- 3.0 uses pkg_static in the UNPACK directory
- - - - -
ca1a2464 by Steve Lhomme at 2024-11-19T09:13:25+00:00
contrib: gnutls: replace HANDLE_FLAG_INHERIT which may not be available in older UWP
- - - - -
8d4b4950 by Steve Lhomme at 2024-11-19T09:13:25+00:00
contrib: gnutls: disable faccessat on macos
It was not used before and it's not usable on our minimum macOS version.
It was added in macOS 10.10.
See https://github.com/apple-oss-distributions/xnu/blob/8d741a5de7ff4191bf97d57b9f54c2f6d4a15585/bsd/sys/unistd.h#L210
- - - - -
20 changed files:
- contrib/src/flac/rules.mak
- contrib/src/gcrypt/rules.mak
- contrib/src/gmp/rules.mak
- − contrib/src/gnutls/0001-Don-t-assume-that-UNICODE-is-not-defined.patch
- + contrib/src/gnutls/0001-Use-CreateFile2-in-UWP-builds.patch
- − contrib/src/gnutls/0001-explicit_bzero-Do-not-call-SecureZeroMemory-on-UWP-b.patch
- − contrib/src/gnutls/0001-fcntl-do-not-call-GetHandleInformation-in-Winstore-a.patch
- − contrib/src/gnutls/0001-fix-mingw64-detection.patch
- − contrib/src/gnutls/0001-stat-fstat-Fix-when-compiling-for-versions-older-tha.patch
- − contrib/src/gnutls/0001-windows-Avoid-Wint-conversion-errors.patch
- contrib/src/gnutls/SHA512SUMS
- + contrib/src/gnutls/__faccessat-darwin.patch
- − contrib/src/gnutls/gnutls-fix-aarch64-compilation-appleos.patch
- − contrib/src/gnutls/gnutls-fix-mangling.patch
- contrib/src/gnutls/rules.mak
- contrib/src/gpg-error/rules.mak
- contrib/src/lame/rules.mak
- contrib/src/mad/rules.mak
- contrib/src/main.mak
- contrib/src/x262/rules.mak
Changes:
=====================================
contrib/src/flac/rules.mak
=====================================
@@ -36,6 +36,7 @@ endif
$(MOVE)
FLACCONF := \
+ --disable-examples \
--disable-thorough-tests \
--disable-doxygen-docs \
--disable-xmms-plugin \
=====================================
contrib/src/gcrypt/rules.mak
=====================================
@@ -1,6 +1,6 @@
# GCRYPT
GCRYPT_VERSION := 1.7.10
-GCRYPT_URL := http://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-$(GCRYPT_VERSION).tar.bz2
+GCRYPT_URL := $(GNUGPG)/libgcrypt/libgcrypt-$(GCRYPT_VERSION).tar.bz2
PKGS += gcrypt
ifeq ($(call need_pkg,"libgcrypt"),)
=====================================
contrib/src/gmp/rules.mak
=====================================
@@ -34,7 +34,7 @@ ifdef HAVE_DARWIN_OS
$(APPLY) $(SRC)/gmp/arm64-Change-adrp-add-relocations-to-darwin-style.patch
endif
# do not try the cross compiler to detect the build compiler
- cd $(UNPACK_DIR) && sed -i.orig 's/"$$CC" "$$CC $$CFLAGS $$CPPFLAGS" cc gcc c89 c99/cc gcc c89 c99/' acinclude.m4
+ sed -i.orig 's/"$$CC" "$$CC $$CFLAGS $$CPPFLAGS" cc gcc c89 c99/cc gcc c89 c99/' $(UNPACK_DIR)/acinclude.m4
$(MOVE)
# GMP requires either GPLv2 or LGPLv3
=====================================
contrib/src/gnutls/0001-Don-t-assume-that-UNICODE-is-not-defined.patch deleted
=====================================
@@ -1,111 +0,0 @@
-From 57f80070ccd8461a224cc84b255844539ab72a8d Mon Sep 17 00:00:00 2001
-From: Bruno Haible <bruno at clisp.org>
-Date: Sat, 30 May 2020 11:04:02 +0200
-Subject: [PATCH] Don't assume that UNICODE is not defined.
-
-Many Windows API functions are defined differently (redirecting to a
-function with suffix 'W') if the application defines the macro UNICODE
-than by default (redirecting to a function with suffix 'A').
-
-* gnutls/gl/clean-temp.c (OSVERSIONINFO, GetVersionEx): Redirect to the
-variant with suffix 'A'.
-* gnutls/gl/dirent-private.h (WIN32_FIND_DATA): Likewise.
-* gnutls/gl/gc-gnulib.c (CryptAcquireContext): Likewise.
-* gnutls/gl/getaddrinfo.c (GetModuleHandle): Likewise.
-* gnutls/gl/getlogin.c (GetUserName): Likewise.
-* gnutls/gl/getlogin_r.c (GetUserName): Likewise.
-* gnutls/gl/gettimeofday.c (LoadLibrary): Likewise.
-* gnutls/gl/isatty.c (LoadLibrary, QueryFullProcessImageName): Likewise.
-* gnutls/gl/link.c (GetModuleHandle, CreateHardLink): Likewise.
-* gnutls/gl/localename.c (GetLocaleInfo, EnumSystemLocales): Likewise.
-* gnutls/gl/mountlist.c (GetDriveType): Likewise.
-* gnutls/gl/nonblocking.c (GetNamedPipeHandleState): Likewise.
-* gnutls/gl/opendir.c (WIN32_FIND_DATA, GetFullPathName, FindFirstFile):
-Likewise.
-* gnutls/gl/physmem.c (GetModuleHandle): Likewise.
-* gnutls/gl/poll.c (GetModuleHandle, PeekConsoleInput, CreateEvent,
-PeekMessage, DispatchMessage): Likewise.
-* gnutls/gl/progreloc.c (GetModuleFileName): Likewise.
-* gnutls/gl/putenv.c (SetEnvironmentVariable): Likewise.
-* gnutls/gl/read.c (GetNamedPipeHandleState): Likewise.
-* gnutls/gl/readdir.c (FindNextFile): Likewise.
-* gnutls/gl/relocatable.c (GetModuleFileName): Likewise.
-* gnutls/gl/rename.c (MoveFileEx): Likewise.
-* gnutls/gl/rewinddir.c (FindFirstFile): Likewise.
-* gnutls/gl/select.c (GetModuleHandle, PeekConsoleInput, CreateEvent,
-PeekMessage, DispatchMessage): Likewise.
-* gnutls/gl/sethostname.c (GetComputerNameEx, SetComputerNameEx): Likewise.
-* gnutls/gl/socket.c (WSASocket): Likewise.
-* gnutls/gl/stat-w32.c (LoadLibrary, GetFinalPathNameByHandle): Likewise.
-* gnutls/gl/stat.c (WIN32_FIND_DATA, CreateFile, FindFirstFile): Likewise.
-* gnutls/gl/stdio-read.c (GetNamedPipeHandleState): Likewise.
-* gnutls/gl/stdio-write.c (GetNamedPipeHandleState): Likewise.
-* gnutls/gl/tmpdir.c (GetTempPath): Likewise.
-* gnutls/gl/tmpfile.c (OSVERSIONINFO, GetVersionEx, GetTempPath): Likewise.
-* gnutls/gl/uname.c (OSVERSIONINFO, GetVersionEx): Likewise.
-* gnutls/gl/utime.c (CreateFile, GetFileAttributes): Likewise.
-* gnutls/gl/windows-cond.c (CreateEvent): Likewise.
-* gnutls/gl/windows-rwlock.c (CreateEvent): Likewise.
-* gnutls/gl/windows-timedmutex.c (CreateEvent): Likewise.
-* gnutls/gl/windows-timedrecmutex.c (CreateEvent): Likewise.
-* gnutls/gl/windows-timedrwlock.c (CreateEvent): Likewise.
-* gnutls/gl/write.c (GetNamedPipeHandleState): Likewise.
----
- gnutls/gl/gettimeofday.c | 4 +++
- gnutls/gl/stat-w32.c | 6 +++++
- gnutls/gl/stat.c | 7 ++++++
- 40 files changed, 279 insertions(+), 27 deletions(-)
-
-diff --git gnutls/gl/gettimeofday.c gnutls/gl/gettimeofday.c
-index 93914ba92..305ab984e 100644
---- gnutls/gl/gettimeofday.c
-+++ gnutls/gl/gettimeofday.c
-@@ -33,6 +33,10 @@
-
- #ifdef WINDOWS_NATIVE
-
-+/* Don't assume that UNICODE is not defined. */
-+# undef LoadLibrary
-+# define LoadLibrary LoadLibraryA
-+
- # if !(_WIN32_WINNT >= _WIN32_WINNT_WIN8)
-
- /* Avoid warnings from gcc -Wcast-function-type. */
-diff --git gnutls/gl/stat-w32.c gnutls/gl/stat-w32.c
-index cca12dd9c..19bdfaa37 100644
---- gnutls/gl/stat-w32.c
-+++ gnutls/gl/stat-w32.c
-@@ -40,6 +40,12 @@
- #include "pathmax.h"
- #include "verify.h"
-
-+/* Don't assume that UNICODE is not defined. */
-+#undef LoadLibrary
-+#define LoadLibrary LoadLibraryA
-+#undef GetFinalPathNameByHandle
-+#define GetFinalPathNameByHandle GetFinalPathNameByHandleA
-+
- #if !(_WIN32_WINNT >= _WIN32_WINNT_VISTA)
-
- /* Avoid warnings from gcc -Wcast-function-type. */
-diff --git gnutls/gl/stat.c gnutls/gl/stat.c
-index e074e6a0a..9d3965d3c 100644
---- gnutls/gl/stat.c
-+++ gnutls/gl/stat.c
-@@ -65,6 +65,13 @@ orig_stat (const char *filename, struct stat *buf)
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
- # include "stat-w32.h"
-+/* Don't assume that UNICODE is not defined. */
-+# undef WIN32_FIND_DATA
-+# define WIN32_FIND_DATA WIN32_FIND_DATAA
-+# undef CreateFile
-+# define CreateFile CreateFileA
-+# undef FindFirstFile
-+# define FindFirstFile FindFirstFileA
- #endif
-
- #ifdef WINDOWS_NATIVE
---
-2.26.0.windows.1
-
=====================================
contrib/src/gnutls/0001-Use-CreateFile2-in-UWP-builds.patch
=====================================
@@ -0,0 +1,75 @@
+From a74b2ef0f17b300c7cdf2f0d45a2d78a6b4c52d8 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Tue, 16 May 2023 09:40:34 +0200
+Subject: [PATCH 1/3] Use CreateFile2 in UWP builds
+
+CreateFileA and CreateFileW are forbidden calls in UWP.
+CreateFile2 is close enough, some parameters are passed in a structure
+and it requires a WCHAR filename. Given the original stat uses the
+"multibyte code page currently in use" [1], the char should be converted
+using CP_ACP [2].
+
+[1] https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/stat-functions
+[2] https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar#parameters
+---
+ lib/spawni.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ lib/stat.c | 35 +++++++++++++++++++++++++++++++++++
+ lib/utime.c | 35 +++++++++++++++++++++++++++++++++++
+ 3 files changed, 120 insertions(+)
+
+diff --git a/gl/stat.c b/gl/stat.c
+index 7987e26583..d25f632967 100644
+--- a/gl/stat.c
++++ b/gl/stat.c
+@@ -197,6 +197,7 @@ rpl_stat (char const *name, struct stat *buf)
+ {
+ /* Approach based on the file. */
+
++# if !(_WIN32_WINNT >= _WIN32_WINNT_WIN8)
+ /* Open a handle to the file.
+ CreateFile
+ <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-createfilea>
+@@ -212,6 +213,40 @@ rpl_stat (char const *name, struct stat *buf)
+ filesystem operations. */
+ FILE_FLAG_BACKUP_SEMANTICS /* | FILE_FLAG_POSIX_SEMANTICS */,
+ NULL);
++# else /* _WIN32_WINNT_WIN8 */
++ /* Only CreateFile2 is available in UWP builds.
++ <https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfile2>
++ <https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-file-l1-2-1dll> */
++ HANDLE h = INVALID_HANDLE_VALUE;
++ int wlen = MultiByteToWideChar (CP_ACP, 0, rname, -1, NULL, 0);
++ if (wlen > 0)
++ {
++ WCHAR *wrname = malloca (wlen * sizeof (WCHAR));
++ if (wrname != NULL)
++ {
++ MultiByteToWideChar (CP_ACP, 0, rname, -1, wrname, wlen);
++
++ CREATEFILE2_EXTENDED_PARAMETERS createExParams;
++ createExParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS);
++ createExParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
++ /* FILE_FLAG_POSIX_SEMANTICS (treat file names that differ only
++ in case as different) makes sense only when applied to *all*
++ filesystem operations. */
++ createExParams.dwFileFlags = FILE_FLAG_BACKUP_SEMANTICS /* | FILE_FLAG_POSIX_SEMANTICS */;
++ createExParams.dwSecurityQosFlags = 0;
++ createExParams.lpSecurityAttributes = NULL;
++ createExParams.hTemplateFile = NULL;
++
++ h =
++ CreateFile2 (wrname,
++ FILE_READ_ATTRIBUTES,
++ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
++ OPEN_EXISTING,
++ &createExParams);
++ freea(wrname);
++ }
++ }
++# endif /* _WIN32_WINNT_WIN8 */
+ if (h != INVALID_HANDLE_VALUE)
+ {
+ ret = _gl_fstat_by_handle (h, rname, buf);
+--
+2.37.3.windows.1
+
=====================================
contrib/src/gnutls/0001-explicit_bzero-Do-not-call-SecureZeroMemory-on-UWP-b.patch deleted
=====================================
@@ -1,43 +0,0 @@
-From 3c950e27a8d20603f100bf21d402f74355a495c1 Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Mon, 8 Jun 2020 16:07:59 +0200
-Subject: [PATCH] explicit_bzero: Do not call SecureZeroMemory on UWP builds
-
-The call is forbidden:
-https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/aa366877(v=vs.85)
-
-It's considered a legacy API and is implemented as an always inline function.
-
-There is no good replacement API that is available in UWP.
-
-Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
----
- gnutls/gl/explicit_bzero.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git gnutls/gl/explicit_bzero.c gnutls/gl/explicit_bzero.c
-index b1df418e5..3b8cc4ea4 100644
---- gnutls/gl/explicit_bzero.c
-+++ gnutls/gl/explicit_bzero.c
-@@ -35,6 +35,9 @@
- #if defined _WIN32 && !defined __CYGWIN__
- # define WIN32_LEAN_AND_MEAN
- # include <windows.h>
-+# if !defined WINAPI_FAMILY || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
-+# define USE_SECURE_ZERO_MEMORY
-+# endif
- #endif
-
- #if _LIBC
-@@ -48,7 +51,7 @@
- void
- explicit_bzero (void *s, size_t len)
- {
--#if defined _WIN32 && !defined __CYGWIN__
-+#if defined USE_SECURE_ZERO_MEMORY
- (void) SecureZeroMemory (s, len);
- #elif HAVE_EXPLICIT_MEMSET
- explicit_memset (s, '\0', len);
---
-2.26.0.windows.1
-
=====================================
contrib/src/gnutls/0001-fcntl-do-not-call-GetHandleInformation-in-Winstore-a.patch deleted
=====================================
@@ -1,41 +0,0 @@
-From 0c8ca1736ee07c7d7dbce05108120cf4f8937bd0 Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Thu, 4 Jun 2020 10:15:38 +0200
-Subject: [PATCH] fcntl: do not call GetHandleInformation() in Winstore apps
-
-The API is forbidden [1] and HANDLE_FLAG_INHERIT would never be set as exec()
-is not allowed either [2].
-
-[1] https://docs.microsoft.com/en-us/windows/win32/api/handleapi/nf-handleapi-gethandleinformation
-[2] https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps
----
- gl/fcntl.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/gl/fcntl.c b/gl/fcntl.c
-index 6b9927ec4..e316ca306 100644
---- a/gl/fcntl.c
-+++ b/gl/fcntl.c
-@@ -229,12 +229,19 @@ fcntl (int fd, int action, /* arg */...)
- {
- # if defined _WIN32 && ! defined __CYGWIN__
- HANDLE handle = (HANDLE) _get_osfhandle (fd);
-+# if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
- DWORD flags;
- if (handle == INVALID_HANDLE_VALUE
- || GetHandleInformation (handle, &flags) == 0)
- errno = EBADF;
- else
- result = (flags & HANDLE_FLAG_INHERIT) ? 0 : FD_CLOEXEC;
-+# else /* ! WINAPI_PARTITION_DESKTOP */
-+ if (handle == INVALID_HANDLE_VALUE)
-+ errno = EBADF;
-+ else
-+ result = 0;
-+# endif /* ! WINAPI_PARTITION_DESKTOP */
- # else /* !W32 */
- /* Use dup2 to reject invalid file descriptors. No way to
- access this information, so punt. */
---
-2.26.0.windows.1
-
=====================================
contrib/src/gnutls/0001-fix-mingw64-detection.patch deleted
=====================================
@@ -1,36 +0,0 @@
-From f42ec27a26433902c098cf82f7b38d93ca579869 Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Thu, 23 Sep 2021 09:03:50 +0200
-Subject: [PATCH] fix mingw64 detection
-
-__MINGW64__ is only defined for 64 bits builds of mingw64 [1].
-The intended test what to only use the CertEnumCRLsInStoreFunc via LoadLibrary
-for some ancient mingw32 build and never for mingw64.
-
-__MINGW64_VERSION_MAJOR is a proper define to identify mingw64 against mingw32.
-
-[1] https://sourceforge.net/p/predef/wiki/Compilers/
-
-Co-authored-by: Johannes Kauffmann <johanneskauffmann at hotmail.com>
-
-Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
----
- lib/system.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/system.h b/lib/system.h
-index 1e8ca7d07..e15c8cd33 100644
---- a/lib/system.h
-+++ b/lib/system.h
-@@ -29,7 +29,7 @@
- #include <sys/time.h>
-
- #ifdef _WIN32
--# if defined(__MINGW32__) && !defined(__MINGW64__) && __MINGW32_MAJOR_VERSION <= 3 && __MINGW32_MINOR_VERSION <= 20
-+# if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) && __MINGW32_MAJOR_VERSION <= 3 && __MINGW32_MINOR_VERSION <= 20
- # define NEED_CERT_ENUM_CRLS
- typedef PCCRL_CONTEXT WINAPI(*CertEnumCRLsInStoreFunc) (HCERTSTORE
- hCertStore,
---
-2.27.0.windows.1
-
=====================================
contrib/src/gnutls/0001-stat-fstat-Fix-when-compiling-for-versions-older-tha.patch deleted
=====================================
@@ -1,67 +0,0 @@
-From 1796cda9975bd459a87222676030b943869c686e Mon Sep 17 00:00:00 2001
-From: Bruno Haible <bruno at clisp.org>
-Date: Wed, 16 Sep 2020 23:51:52 +0200
-Subject: [PATCH] stat, fstat: Fix when compiling for versions older than
- Windows Vista.
-
-Reported by Eli Zaretskii <eliz at gnu.org> in
-<https://lists.gnu.org/archive/html/bug-gnulib/2020-09/msg00027.html>.
-
-* lib/stat-w32.c: Include <sdkddkver.h>. Test the value of _WIN32_WINNT
-that was originally set before we redefined it.
-* m4/stat.m4 (gl_PREREQ_STAT_W32): New macro.
-(gl_PREREQ_STAT): Require it.
-* m4/fstat.m4 (gl_PREREQ_FSTAT): Likewise.
----
- gnutls/gl/stat-w32.c | 24 ++++++++++++++++++------
- 4 files changed, 43 insertions(+), 8 deletions(-)
-
-diff --git gnutls/gl/lib/stat-w32.c gnutls/gl/lib/stat-w32.c
-index 19bdfaa37..72442e933 100644
---- gnutls/gl/stat-w32.c
-+++ gnutls/gl/stat-w32.c
-@@ -20,10 +20,22 @@
-
- #if defined _WIN32 && ! defined __CYGWIN__
-
--/* Ensure that <windows.h> defines FILE_ID_INFO. */
--#if !defined _WIN32_WINNT || (_WIN32_WINNT < _WIN32_WINNT_WIN8)
--# undef _WIN32_WINNT
--# define _WIN32_WINNT _WIN32_WINNT_WIN8
-+/* Attempt to make <windows.h> define FILE_ID_INFO.
-+ But ensure that the redefinition of _WIN32_WINNT does not make us assume
-+ Windows Vista or newer when building for an older version of Windows. */
-+#if HAVE_SDKDDKVER_H
-+# include <sdkddkver.h>
-+# if _WIN32_WINNT >= _WIN32_WINNT_VISTA
-+# define WIN32_ASSUME_VISTA 1
-+# else
-+# define WIN32_ASSUME_VISTA 0
-+# endif
-+# if !defined _WIN32_WINNT || (_WIN32_WINNT < _WIN32_WINNT_WIN8)
-+# undef _WIN32_WINNT
-+# define _WIN32_WINNT _WIN32_WINNT_WIN8
-+# endif
-+#else
-+# define WIN32_ASSUME_VISTA (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
- #endif
-
- #include <sys/types.h>
-@@ -46,7 +58,7 @@
- #undef GetFinalPathNameByHandle
- #define GetFinalPathNameByHandle GetFinalPathNameByHandleA
-
--#if !(_WIN32_WINNT >= _WIN32_WINNT_VISTA)
-+#if !WIN32_ASSUME_VISTA
-
- /* Avoid warnings from gcc -Wcast-function-type. */
- # define GetProcAddress \
-@@ -149,7 +161,7 @@ _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf)
- DWORD type = GetFileType (h);
- if (type == FILE_TYPE_DISK)
- {
--#if !(_WIN32_WINNT >= _WIN32_WINNT_VISTA)
-+#if !WIN32_ASSUME_VISTA
- if (!initialized)
- initialize ();
- #endif
=====================================
contrib/src/gnutls/0001-windows-Avoid-Wint-conversion-errors.patch deleted
=====================================
@@ -1,60 +0,0 @@
-From 88d79b964d88730e316919d6ccd17ca0fe9b3244 Mon Sep 17 00:00:00 2001
-From: Martin Storsjo <martin at martin.st>
-Date: Mon, 15 Aug 2022 23:50:16 +0300
-Subject: [PATCH] windows: Avoid -Wint-conversion errors
-
-Clang 15 made "incompatible pointer to integer conversion" an error
-instead of a plain warning. This fixes errors like these:
-
-system/keys-win.c:257:13: error: incompatible pointer to integer conversion initializing 'HCRYPTHASH' (aka 'unsigned long') with an expression of type 'void *' [-Wint-conversion]
- HCRYPTHASH hHash = NULL;
- ^ ~~~~
-
-Signed-off-by: Martin Storsjo <martin at martin.st>
----
- lib/system/keys-win.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/lib/system/keys-win.c b/lib/system/keys-win.c
-index 4463c3b2d7..a0fffe249e 100644
---- a/lib/system/keys-win.c
-+++ b/lib/system/keys-win.c
-@@ -254,7 +254,7 @@ int capi_sign(gnutls_privkey_t key, void *userdata,
- {
- priv_st *priv = (priv_st *) userdata;
- ALG_ID Algid;
-- HCRYPTHASH hHash = NULL;
-+ HCRYPTHASH hHash = 0;
- uint8_t digest[MAX_HASH_SIZE];
- unsigned int digest_size;
- gnutls_digest_algorithm_t algo;
-@@ -441,7 +441,7 @@ static
- int privkey_import_capi(gnutls_privkey_t pkey, const char *url,
- priv_st *priv, CRYPT_KEY_PROV_INFO *kpi)
- {
-- HCRYPTPROV hCryptProv = NULL;
-+ HCRYPTPROV hCryptProv = 0;
- int ret, enc_too = 0;
- DWORD i, dwErrCode = 0;
-
-@@ -702,7 +702,7 @@ int privkey_import_ncrypt(gnutls_privkey_t pkey, const char *url,
- priv_st *priv, CRYPT_KEY_PROV_INFO *kpi, NCRYPT_PROV_HANDLE *sctx)
- {
- SECURITY_STATUS r;
-- NCRYPT_KEY_HANDLE nc = NULL;
-+ NCRYPT_KEY_HANDLE nc = 0;
- int ret, enc_too = 0;
- WCHAR algo_str[64];
- DWORD algo_str_size = 0;
-@@ -786,7 +786,7 @@ int _gnutls_privkey_import_system_url(gnutls_privkey_t pkey, const char *url)
- const CERT_CONTEXT *cert = NULL;
- CRYPT_HASH_BLOB blob;
- CRYPT_KEY_PROV_INFO *kpi = NULL;
-- NCRYPT_PROV_HANDLE sctx = NULL;
-+ NCRYPT_PROV_HANDLE sctx = 0;
- DWORD kpi_size;
- SECURITY_STATUS r;
- int ret;
---
-2.25.1
-
=====================================
contrib/src/gnutls/SHA512SUMS
=====================================
@@ -1 +1 @@
-72c78d7fcb024393c1d15f2a1856608ae4460ba43cc5bbbb4c29b80508cae6cb822df4638029de2363437d110187e0a3cc19a7288c3b2f44b2f648399a028438 gnutls-3.6.16.tar.xz
+74eddba01ce4c2ffdca781c85db3bb52c85f1db3c09813ee2b8ceea0608f92ca3912fd9266f55deb36a8ba4d01802895ca5d5d219e7d9caec45e1a8534e45a84 gnutls-3.8.3.tar.xz
=====================================
contrib/src/gnutls/__faccessat-darwin.patch
=====================================
@@ -0,0 +1,17 @@
+--- gnutls/gl/canonicalize-lgpl.c.orig 2024-01-16 10:15:15.000000000 +0100
++++ gnutls/gl/canonicalize-lgpl.c 2024-11-18 09:49:49.355493000 +0100
+@@ -100,7 +100,13 @@
+ static bool
+ file_accessible (char const *file)
+ {
+-# if defined _LIBC || HAVE_FACCESSAT
++# if defined(__APPLE__)
++ if (__builtin_available(macOS 10.10, iOS 8.0, *)) {
++ return faccessat (AT_FDCWD, file, F_OK, AT_EACCESS) == 0;
++ }
++ struct stat st;
++ return stat (file, &st) == 0 || errno == EOVERFLOW;
++# elif defined _LIBC || HAVE_FACCESSAT
+ return __faccessat (AT_FDCWD, file, F_OK, AT_EACCESS) == 0;
+ # else
+ struct stat st;
=====================================
contrib/src/gnutls/gnutls-fix-aarch64-compilation-appleos.patch deleted
=====================================
@@ -1,12 +0,0 @@
-diff -ru gnutls/lib/accelerated/aarch64/Makefile.in gnutls/lib/accelerated/aarch64/Makefile.in
---- gnutls/lib/accelerated/aarch64/Makefile.in 2021-05-24 10:05:49.000000000 +0200
-+++ gnutls/lib/accelerated/aarch64/Makefile.in 2022-03-28 15:06:23.000000000 +0200
-@@ -1634,7 +1634,7 @@
- -I$(srcdir)/../../ -I$(srcdir)/../ $(am__append_1)
-
- #ensure that we have all aarch64 instruction sets enabled for the assembler
--AM_CCASFLAGS = -Wa,-march=all
-+AM_CCASFLAGS = -Wa
- EXTRA_DIST = README
- noinst_LTLIBRARIES = libaarch64.la
- libaarch64_la_SOURCES = aarch64-common.c aarch64-common.h \
=====================================
contrib/src/gnutls/gnutls-fix-mangling.patch deleted
=====================================
@@ -1,11 +0,0 @@
---- gnutls/lib/nettle/ecc/ecc-internal.h.ecc_random 2020-06-03 15:05:27.000000000 +0200
-+++ gnutls/lib/nettle/ecc/ecc-internal.h 2020-06-04 16:31:00.523456500 +0200
-@@ -71,6 +71,8 @@
- #define ecc_mul_g_eh _gnutls_nettle_ecc_ecc_mul_g_eh
- #define ecc_mul_a_eh _gnutls_nettle_ecc_ecc_mul_a_eh
- #define ecc_mul_m _gnutls_nettle_ecc_ecc_mul_m
-+#undef ecc_scalar_random
-+#define ecc_scalar_random _gnutls_nettle_ecc_scalar_random
- #define cnd_copy _gnutls_nettle_ecc_cnd_copy
- #define sec_add_1 _gnutls_nettle_ecc_sec_add_1
- #define sec_sub_1 _gnutls_nettle_ecc_sec_sub_1
=====================================
contrib/src/gnutls/rules.mak
=====================================
@@ -1,13 +1,25 @@
# GnuTLS
-GNUTLS_VERSION := 3.6.16
-GNUTLS_URL := https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-$(GNUTLS_VERSION).tar.xz
+GNUTLS_MAJVERSION := 3.8
+GNUTLS_VERSION := $(GNUTLS_MAJVERSION).3
+GNUTLS_URL := $(GNUGPG)/gnutls/v$(GNUTLS_MAJVERSION)/gnutls-$(GNUTLS_VERSION).tar.xz
+
+# nettle/gmp can't be used with the LGPLv2 license
+ifdef GPL
+GNUTLS_PKG=1
+else
+ifdef GNUV3
+GNUTLS_PKG=1
+endif
+endif
ifdef BUILD_NETWORK
ifndef HAVE_DARWIN_OS
+ifdef GNUTLS_PKG
PKGS += gnutls
endif
endif
+endif
ifeq ($(call need_pkg,"gnutls >= 3.3.6"),)
PKGS_FOUND += gnutls
endif
@@ -19,35 +31,19 @@ $(TARBALLS)/gnutls-$(GNUTLS_VERSION).tar.xz:
gnutls: gnutls-$(GNUTLS_VERSION).tar.xz .sum-gnutls
$(UNPACK)
- $(APPLY) $(SRC)/gnutls/gnutls-fix-mangling.patch
-
- # backport gnulib patch
- $(APPLY) $(SRC)/gnutls/0001-Don-t-assume-that-UNICODE-is-not-defined.patch
-
- # fix forbidden UWP call which can't be upstreamed as they won't
- # differentiate for winstore, only _WIN32_WINNT
- $(APPLY) $(SRC)/gnutls/0001-fcntl-do-not-call-GetHandleInformation-in-Winstore-a.patch
-
- # forbidden RtlSecureZeroMemory call in winstore builds
- $(APPLY) $(SRC)/gnutls/0001-explicit_bzero-Do-not-call-SecureZeroMemory-on-UWP-b.patch
-
- # Don't use functions available starting with windows vista
- $(APPLY) $(SRC)/gnutls/0001-stat-fstat-Fix-when-compiling-for-versions-older-tha.patch
-
# disable the dllimport in static linking (pkg-config --static doesn't handle Cflags.private)
- cd $(UNPACK_DIR) && sed -i.orig -e s/"_SYM_EXPORT __declspec(dllimport)"/"_SYM_EXPORT"/g lib/includes/gnutls/gnutls.h.in
+ sed -i.orig -e s/"_SYM_EXPORT __declspec(dllimport)"/"_SYM_EXPORT"/g $(UNPACK_DIR)/lib/includes/gnutls/gnutls.h.in
- # fix i686 UWP builds as they were using CertEnumCRLsInStore via invalid LoadLibrary
- $(APPLY) $(SRC)/gnutls/0001-fix-mingw64-detection.patch
+ # disable __faccessat usage on Darwin as it's not available on our minimum target
+ $(APPLY) $(SRC)/gnutls/__faccessat-darwin.patch
- $(call pkg_static,"lib/gnutls.pc.in")
+ # replace HANDLE_FLAG_INHERIT which may not be available in older UWP
+ sed -i.orig -e s/HANDLE_FLAG_INHERIT/0x1/g $(UNPACK_DIR)/gl/fcntl.c
- # fix AArch64 builds for Apple OS by removing unsupported compiler flag (gnutls#1347, gnutls#1317)
-ifdef HAVE_DARWIN_OS
- $(APPLY) $(SRC)/gnutls/gnutls-fix-aarch64-compilation-appleos.patch
-endif
+ $(call pkg_static,"lib/gnutls.pc.in")
- $(APPLY) $(SRC)/gnutls/0001-windows-Avoid-Wint-conversion-errors.patch
+ # use CreateFile2 in Win8 as CreateFileW is forbidden in UWP
+ $(APPLY) $(SRC)/gnutls/0001-Use-CreateFile2-in-UWP-builds.patch
$(UPDATE_AUTOCONFIG)
$(MOVE)
@@ -69,15 +65,14 @@ GNUTLS_CONF := \
--with-included-unistring
DEPS_gnutls = nettle $(DEPS_nettle)
+ifdef HAVE_WINSTORE
+# gnulib uses GetFileInformationByHandle / SecureZeroMemory
+DEPS_gnutls += alloweduwp $(DEPS_alloweduwp)
+endif
ifdef HAVE_ANDROID
GNUTLS_ENV := gl_cv_header_working_stdint_h=yes
endif
-ifdef HAVE_WINSTORE
-ifeq ($(ARCH),x86_64)
- GNUTLS_CONF += --disable-hardware-acceleration
-endif
-endif
ifdef HAVE_WIN32
GNUTLS_CONF += --without-idn
ifeq ($(ARCH),aarch64)
=====================================
contrib/src/gpg-error/rules.mak
=====================================
@@ -1,6 +1,6 @@
# GPGERROR
GPGERROR_VERSION := 1.27
-GPGERROR_URL := https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-$(GPGERROR_VERSION).tar.bz2
+GPGERROR_URL := $(GNUGPG)/libgpg-error/libgpg-error-$(GPGERROR_VERSION).tar.bz2
$(TARBALLS)/libgpg-error-$(GPGERROR_VERSION).tar.bz2:
$(call download_pkg,$(GPGERROR_URL),gpg-error)
=====================================
contrib/src/lame/rules.mak
=====================================
@@ -23,7 +23,7 @@ endif
$(APPLY) $(SRC)/lame/lame-fix-i386-on-aarch64.patch
# Avoid relying on iconv.m4 from gettext, when reconfiguring.
# This is only used by the frontend which we disable.
- cd $(UNPACK_DIR) && sed -i.orig 's/^AM_ICONV/#&/' configure.in
+ sed -i.orig 's/^AM_ICONV/#&/' $(UNPACK_DIR)/configure.in
$(UPDATE_AUTOCONFIG)
$(MOVE)
=====================================
contrib/src/mad/rules.mak
=====================================
@@ -29,10 +29,9 @@ endif
libmad: libmad-$(MAD_VERSION).tar.gz .sum-mad
$(UNPACK)
ifdef HAVE_DARWIN_OS
- cd $@-$(MAD_VERSION) && sed \
- -e 's%-march=i486%$(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)%' \
+ sed -e 's%-march=i486%$(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)%' \
-e 's%-dynamiclib%-dynamiclib -arch $(ARCH)%' \
- -i.orig configure
+ -i.orig $(UNPACK_DIR)/configure
endif
ifdef HAVE_IOS
$(APPLY) $(SRC)/mad/mad-ios-asm.patch
=====================================
contrib/src/main.mak
=====================================
@@ -23,6 +23,7 @@ SF := https://netcologne.dl.sourceforge.net/
VIDEOLAN := http://downloads.videolan.org/pub/videolan
CONTRIB_VIDEOLAN := http://downloads.videolan.org/pub/contrib
GITHUB := https://github.com/
+GNUGPG := https://www.gnupg.org/ftp/gcrypt
#
# Machine-dependent variables
=====================================
contrib/src/x262/rules.mak
=====================================
@@ -27,8 +27,8 @@ x262: $(TARBALLS)/x262-git.tar.xz .sum-x262
.x262: x262
$(REQUIRE_GPL)
- cd $< && sed -i -e 's/x264/x262/g' configure
- cd $< && sed -i -e 's/x264_config/x262_config/g' *.h Makefile *.c
+ sed -i -e 's/x264/x262/g' $</configure
+ sed -i -e 's/x264_config/x262_config/g' *.h Makefile $</*.c
cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(X264CONF)
cd $< && sed -i -e 's/x264.pc/x262.pc/g' Makefile
cd $< && sed -i -e 's/x264.h/x262.h/g' Makefile
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/536f90c4f503d43807f8de62f8e758be90323553...8d4b49503c8b40ced8cfbd372c185f9d73fbf5cd
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/536f90c4f503d43807f8de62f8e758be90323553...8d4b49503c8b40ced8cfbd372c185f9d73fbf5cd
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