[vlc-commits] [Git][videolan/vlc][master] contrib: flac: update to 1.4.2

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Tue Nov 1 21:39:30 UTC 2022



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
90722ca1 by Steve Lhomme at 2022-11-01T20:56:57+00:00
contrib: flac: update to 1.4.2

- - - - -


5 changed files:

- contrib/src/flac/SHA512SUMS
- − contrib/src/flac/console_write.patch
- − contrib/src/flac/no-createfilew.patch
- − contrib/src/flac/remove_blocking_code_useless_flaclib.patch
- contrib/src/flac/rules.mak


Changes:

=====================================
contrib/src/flac/SHA512SUMS
=====================================
@@ -1 +1 @@
-b7310de7bcf49584c0a1fdc6d5ee7216a8ab3e2b1af85366fa0905752da13e1cbb9638e0d92f3b756568a69848abf4d5c2fe0d21a86c6fdb4840f2678daf0f8d  flac-1.4.0.tar.xz
+20bdf0990a7432ac765037764bc8733a0d5646866fe6cc6f4868152d2a051c89676e501012ae489c7f87b3aacb45a5b30265afaca164cf0cf53ac058644a74c5  flac-1.4.2.tar.xz


=====================================
contrib/src/flac/console_write.patch deleted
=====================================
@@ -1,63 +0,0 @@
-From 9d6fbddfd031852f7c6d1a10aff9fa5ef690858b Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Fri, 3 Apr 2020 13:33:26 +0200
-Subject: [PATCH 1/2] Don't call Console APIs on Winstore builds
-
-The API's are only available on desktop builds.
-https://docs.microsoft.com/en-us/windows/console/getstdhandle
-https://docs.microsoft.com/en-us/windows/console/getconsolescreenbufferinfo
-https://docs.microsoft.com/en-us/windows/console/writeconsole
-
-Instead send logs to the debug output
----
- src/share/win_utf8_io/win_utf8_io.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c
-index bbb6a74a..1e0c1e86 100644
---- a/src/share/win_utf8_io/win_utf8_io.c
-+++ b/src/share/win_utf8_io/win_utf8_io.c
-@@ -34,6 +34,7 @@
- #endif
- 
- #include <windows.h>
-+#include <winapifamily.h>
- #include "share/win_utf8_io.h"
- #include "share/windows_unicode_filenames.h"
- 
-@@ -182,11 +183,13 @@ size_t strlen_utf8(const char *str)
- int win_get_console_width(void)
- {
- 	int width = 80;
-+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
- 	CONSOLE_SCREEN_BUFFER_INFO csbi;
- 	HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
- 	if(hOut != INVALID_HANDLE_VALUE && hOut != NULL)
- 		if (GetConsoleScreenBufferInfo(hOut, &csbi) != 0)
- 			width = csbi.dwSize.X;
-+#endif
- 	return width;
- }
- 
-@@ -194,6 +197,10 @@ int win_get_console_width(void)
- 
- static int wprint_console(FILE *stream, const wchar_t *text, size_t len)
- {
-+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
-+	(void)stream;
-+	OutputDebugStringW(text);
-+#else
- 	DWORD out;
- 	int ret;
- 
-@@ -219,6 +226,7 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len)
- 	ret = fputws(text, stream);
- 	if (ret < 0)
- 		return ret;
-+#endif
- 	return len;
- }
- 
--- 
-2.26.0.windows.1
-


=====================================
contrib/src/flac/no-createfilew.patch deleted
=====================================
@@ -1,30 +0,0 @@
-From 161ac1267eb177f1a8a668eb978024e7f31ad926 Mon Sep 17 00:00:00 2001
-From: Tristan Matthews <tmatth at 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 at 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
-


=====================================
contrib/src/flac/remove_blocking_code_useless_flaclib.patch deleted
=====================================
@@ -1,38 +0,0 @@
---- flac-orig/src/share/grabbag/file.c	2019-08-26 11:13:17.600801754 -0400
-+++ flac/src/share/grabbag/file.c	2019-08-26 11:27:16.801546222 -0400
-@@ -118,34 +118,7 @@
- FLAC__bool grabbag__file_are_same(const char *f1, const char *f2)
- {
- #if defined _WIN32 && !defined __CYGWIN__
--	/* see
--	 *  http://www.hydrogenaudio.org/forums/index.php?showtopic=49439&pid=444300&st=0
--	 *  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/getfileinformationbyhandle.asp
--	 *  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/by_handle_file_information_str.asp
--	 *  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createfile.asp
--	 * apparently both the files have to be open at the same time for the comparison to work
--	 */
--	FLAC__bool same = false;
--	BY_HANDLE_FILE_INFORMATION info1, info2;
--	HANDLE h1, h2;
--	BOOL ok = 1;
--	h1 = CreateFile_utf8(f1, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
--	h2 = CreateFile_utf8(f2, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
--	if(h1 == INVALID_HANDLE_VALUE || h2 == INVALID_HANDLE_VALUE)
--		ok = 0;
--	ok &= GetFileInformationByHandle(h1, &info1);
--	ok &= GetFileInformationByHandle(h2, &info2);
--	if(ok)
--		same =
--			info1.dwVolumeSerialNumber == info2.dwVolumeSerialNumber &&
--			info1.nFileIndexHigh == info2.nFileIndexHigh &&
--			info1.nFileIndexLow == info2.nFileIndexLow
--		;
--	if(h1 != INVALID_HANDLE_VALUE)
--		CloseHandle(h1);
--	if(h2 != INVALID_HANDLE_VALUE)
--		CloseHandle(h2);
--	return same;
-+	return true;
- #else
- 	struct flac_stat_s s1, s2;
- 	return f1 && f2 && flac_stat(f1, &s1) == 0 && flac_stat(f2, &s2) == 0 && s1.st_ino == s2.st_ino && s1.st_dev == s2.st_dev;


=====================================
contrib/src/flac/rules.mak
=====================================
@@ -1,7 +1,7 @@
 # FLAC
 
-FLAC_VERSION := 1.4.0
-FLAC_URL := http://downloads.xiph.org/releases/flac/flac-$(FLAC_VERSION).tar.xz
+FLAC_VERSION := 1.4.2
+FLAC_URL := $(GITHUB)/xiph/flac/releases/download/$(FLAC_VERSION)/flac-$(FLAC_VERSION).tar.xz
 
 PKGS += flac
 ifeq ($(call need_pkg,"flac"),)
@@ -15,11 +15,6 @@ $(TARBALLS)/flac-$(FLAC_VERSION).tar.xz:
 
 flac: flac-$(FLAC_VERSION).tar.xz .sum-flac
 	$(UNPACK)
-ifdef HAVE_WINSTORE
-	$(APPLY) $(SRC)/flac/console_write.patch
-	$(APPLY) $(SRC)/flac/remove_blocking_code_useless_flaclib.patch
-	$(APPLY) $(SRC)/flac/no-createfilew.patch
-endif
 	# disable building a tool we don't use
 	sed -e 's,add_subdirectory("microbench"),#add_subdirectory("microbench"),' -i.orig $(UNPACK_DIR)/CMakeLists.txt
 	$(call pkg_static,"src/libFLAC/flac.pc.in")



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/90722ca1229d7fad6cdb1b5427c0bc0705b0fb1a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/90722ca1229d7fad6cdb1b5427c0bc0705b0fb1a
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