Skip to content
Snippets Groups Projects
Commit 329cfb15 authored by Tristan Matthews's avatar Tristan Matthews Committed by Steve Lhomme
Browse files

contrib: flac: update to 1.4.0

parent 5372eef6
No related branches found
No related tags found
No related merge requests found
4a626e8a1bd126e234c0e5061e3b46f3a27c2065fdfa228fd8cf00d3c7fa2c05fafb5cec36acce7bfce4914bfd7db0b2a27ee15decf2d8c4caad630f62d44ec9 flac-1.3.4.tar.xz
b7310de7bcf49584c0a1fdc6d5ee7216a8ab3e2b1af85366fa0905752da13e1cbb9638e0d92f3b756568a69848abf4d5c2fe0d21a86c6fdb4840f2678daf0f8d flac-1.4.0.tar.xz
From 11390430fbad4a0d5a70671f922bd374defc715b Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Fri, 3 Apr 2020 13:25:14 +0200
Subject: [PATCH 2/2] Don't call CreateFileA on Winstore builds
The API is only available on desktop builds.
https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea
---
src/share/win_utf8_io/win_utf8_io.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c
index 1e0c1e86..e634efd9 100644
--- a/src/share/win_utf8_io/win_utf8_io.c
+++ b/src/share/win_utf8_io/win_utf8_io.c
@@ -154,7 +154,11 @@ int get_utf8_argv(int *argc, char ***argv)
HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
{
if (!flac_internal_get_utf8_filenames()) {
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
return CreateFileA(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
+#else
+ return INVALID_HANDLE_VALUE;
+#endif
} else {
wchar_t *wname;
HANDLE handle = INVALID_HANDLE_VALUE;
--
2.26.0.windows.1
From 161ac1267eb177f1a8a668eb978024e7f31ad926 Mon Sep 17 00:00:00 2001
From: Tristan Matthews <tmatth@videolan.org>
Date: Wed, 14 Sep 2022 17:43:52 -0400
Subject: [PATCH 1/1] Don't call CreateFileW on Winstore builds
The API is only available on desktop builds.
https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew
Co-authored-by: Steve Lhomme <robux4@ycbcr.xyz>
---
src/share/win_utf8_io/win_utf8_io.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c
index 41923c35..180e1466 100644
--- a/src/share/win_utf8_io/win_utf8_io.c
+++ b/src/share/win_utf8_io/win_utf8_io.c
@@ -155,7 +155,9 @@ HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWO
HANDLE handle = INVALID_HANDLE_VALUE;
if ((wname = wchar_from_utf8(lpFileName)) != NULL) {
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
handle = CreateFileW(wname, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile);
+#endif
free(wname);
}
--
2.34.1
# FLAC
FLAC_VERSION := 1.3.4
FLAC_VERSION := 1.4.0
FLAC_URL := http://downloads.xiph.org/releases/flac/flac-$(FLAC_VERSION).tar.xz
PKGS += flac
......@@ -18,7 +18,7 @@ flac: flac-$(FLAC_VERSION).tar.xz .sum-flac
ifdef HAVE_WINSTORE
$(APPLY) $(SRC)/flac/console_write.patch
$(APPLY) $(SRC)/flac/remove_blocking_code_useless_flaclib.patch
$(APPLY) $(SRC)/flac/no-createfilea.patch
$(APPLY) $(SRC)/flac/no-createfilew.patch
endif
ifdef HAVE_DARWIN_OS
cd $(UNPACK_DIR) && sed -e 's,-dynamiclib,-dynamiclib -arch $(ARCH),' -i.orig configure
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment