git: 72089cecb0f0 - main - multimedia/bcmatroska2: Fix regression in linphone

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Fri, 30 Jan 2026 09:57:32 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=72089cecb0f09a43a43b23f93b3435d8f7acb0da

commit 72089cecb0f09a43a43b23f93b3435d8f7acb0da
Author:     Hiroo Ono <hiroo.ono+freebsd@gmail.com>
AuthorDate: 2026-01-30 09:31:10 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2026-01-30 09:57:17 +0000

    multimedia/bcmatroska2: Fix regression in linphone
    
    bcmatroska2 port commented out some part of the code by the patch. But when
    net/mediastreamer was built, it turned out that that part was needed.
    
    PR:             291967
---
 multimedia/bcmatroska2/Makefile                    |   1 +
 .../patch-corec-corec-helpers-file-file_libc.c     |  11 --
 .../patch-corec_corec_helpers_file_file__bctbx.c   | 160 +--------------------
 3 files changed, 2 insertions(+), 170 deletions(-)

diff --git a/multimedia/bcmatroska2/Makefile b/multimedia/bcmatroska2/Makefile
index c7a47c9ea818..e32a750ff207 100644
--- a/multimedia/bcmatroska2/Makefile
+++ b/multimedia/bcmatroska2/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	bcmatroska2
 DISTVERSION=	5.4.72
+PORTREVISION=	1
 CATEGORIES=	multimedia
 
 MAINTAINER=	bofh@FreeBSD.org
diff --git a/multimedia/bcmatroska2/files/patch-corec-corec-helpers-file-file_libc.c b/multimedia/bcmatroska2/files/patch-corec-corec-helpers-file-file_libc.c
deleted file mode 100644
index bb204815456a..000000000000
--- a/multimedia/bcmatroska2/files/patch-corec-corec-helpers-file-file_libc.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- corec/corec/helpers/file/file_libc.c.orig	2022-11-29 10:25:07 UTC
-+++ corec/corec/helpers/file/file_libc.c
-@@ -44,7 +44,7 @@
- // Do not move. Define TARGET_*.
- #include "file.h"
- 
--#if defined(TARGET_OSX)
-+#if defined(TARGET_OSX) || defined(__FreeBSD__)
- #include <sys/mount.h>
- #elif defined(TARGET_QNX)
- #include <sys/statvfs.h>
diff --git a/multimedia/bcmatroska2/files/patch-corec_corec_helpers_file_file__bctbx.c b/multimedia/bcmatroska2/files/patch-corec_corec_helpers_file_file__bctbx.c
index 5c35768e7f1c..b9e485bf7faa 100644
--- a/multimedia/bcmatroska2/files/patch-corec_corec_helpers_file_file__bctbx.c
+++ b/multimedia/bcmatroska2/files/patch-corec_corec_helpers_file_file__bctbx.c
@@ -1,4 +1,4 @@
---- corec/corec/helpers/file/file_bctbx.c.orig	2022-11-29 10:25:07 UTC
+--- corec/corec/helpers/file/file_bctbx.c.orig	2025-12-27 04:38:52 UTC
 +++ corec/corec/helpers/file/file_bctbx.c
 @@ -48,7 +48,7 @@
  // Do not move. Define TARGET_*.
@@ -9,161 +9,3 @@
  #include <sys/mount.h>
  #elif defined(TARGET_QNX)
  #include <sys/statvfs.h>
-@@ -261,157 +261,3 @@ static void Delete(filestream* p)
- 	if (p->FindDir)
- 		closedir(p->FindDir);
- }
--
--META_START(File_Class,FILE_CLASS)
--META_CLASS(SIZE,sizeof(filestream))
--META_CLASS(PRIORITY,PRI_MINIMUM)
--META_CLASS(DELETE,Delete)
--META_VMT(TYPE_FUNC,stream_vmt,Open,Open)
--META_VMT(TYPE_FUNC,stream_vmt,Read,Read)
--META_VMT(TYPE_FUNC,stream_vmt,ReadBlock,ReadBlock)
--META_VMT(TYPE_FUNC,stream_vmt,Write,Write)
--META_VMT(TYPE_FUNC,stream_vmt,Seek,Seek)
--META_VMT(TYPE_FUNC,stream_vmt,OpenDir,OpenDir)
--META_VMT(TYPE_FUNC,stream_vmt,EnumDir,EnumDir)
--META_CONST(TYPE_INT,filestream,fp,NULL)
--META_DATA_RDONLY(TYPE_INT,STREAM_FLAGS,filestream,Flags)
--META_DATA_RDONLY(TYPE_STRING,STREAM_URL,filestream,URL)
--META_DATA_RDONLY(TYPE_STRING,STREAM_ENUM_BASE,filestream,DirPath)
--META_PARAM(SET,STREAM_LENGTH,SetLength)
--META_DATA(TYPE_FILEPOS,STREAM_LENGTH,filestream,Length)
--META_PARAM(STRING,NODE_PROTOCOL,T("file"))
--META_END(STREAM_CLASS)
--
--bool_t FileExists(nodecontext *p,const tchar_t* Path)
--{
--	struct stat file_stats;
--	return stat(Path, &file_stats) == 0;
--}
--
--bool_t FileErase(nodecontext *p,const tchar_t* Path, bool_t Force, bool_t Safe)
--{
--	if (Force)
--	{
--		struct stat file_stats;
--		if (stat(Path, &file_stats) == 0)
--		{
--			if ((file_stats.st_mode & S_IWUSR)==0)
--			{
--				file_stats.st_mode |= S_IWUSR;
--				chmod(Path,file_stats.st_mode);
--			}
--		}
--	}
--	return unlink(Path) == 0;
--}
--
--bool_t FolderErase(nodecontext *p,const tchar_t* Path, bool_t Force, bool_t Safe)
--{
--	if (Force)
--	{
--		struct stat file_stats;
--		if (stat(Path, &file_stats) == 0)
--		{
--			if ((file_stats.st_mode & S_IWUSR)==0)
--			{
--				file_stats.st_mode |= S_IWUSR;
--				chmod(Path,file_stats.st_mode);
--			}
--		}
--	}
--	return rmdir(Path) == 0;
--}
--
--bool_t PathIsFolder(nodecontext *p,const tchar_t* Path)
--{
--	struct stat file_stats;
--	if (stat(Path, &file_stats) == 0)
--	{
--		return (file_stats.st_mode & S_IFDIR) == S_IFDIR;
--	}
--	return 0;
--}
--
--datetime_t FileDateTime(nodecontext *p,const tchar_t* Path)
--{
--	datetime_t Date = INVALID_DATETIME_T;
--	struct stat file_stats;
--	if (stat(Path, &file_stats) == 0)
--		Date = LinuxToDateTime(file_stats.st_mtime);
--	return Date;
--}
--
--bool_t FileMove(nodecontext *p,const tchar_t* In,const tchar_t* Out)
--{
--	return rename(In,Out) == 0;
--}
--
--bool_t FolderCreate(nodecontext *p,const tchar_t* Path)
--{
--	return mkdir(Path,_RW_ACCESS_DIR) == 0;
--}
--
--void FindFiles(nodecontext *p,const tchar_t* Path, const tchar_t* Mask,void(*Process)(const tchar_t*,void*),void* Param)
--{
--	DIR* Directory;
--	struct dirent* DirectoryInfo;
--	tchar_t TPathToFile[MAXPATH];
--
--	Directory = opendir(Path);
--	if (Directory)
--	{
--		while ( (DirectoryInfo = readdir(Directory)) != NULL )
--		{
--			char* FileExtension = 0;
--			FileExtension = strrchr(DirectoryInfo->d_name, '.');
--			if(FileExtension)
--			{
--				if (strcmp(Mask, FileExtension ) == 0 )
--				{
--					tcscpy_s(TPathToFile, TSIZEOF(TPathToFile), Path);
--					tcscat_s(TPathToFile, TSIZEOF(TPathToFile), DirectoryInfo->d_name);
--					Process(TPathToFile, Param);
--				}
--			}
--		}
--
--		closedir(Directory);
--	}
--
--}
--
--stream *FileTemp(anynode *Any)
--{
--#ifndef TODO
--	assert(NULL); // not supported yet
--#endif
--	return NULL;
--}
--
--bool_t FileTempName(anynode *Any,tchar_t *Out, size_t OutLen)
--{
--#ifndef TODO
--	assert(NULL); // not supported yet
--#endif
--	return 0;
--}
--
--int64_t GetPathFreeSpace(nodecontext* UNUSED_PARAM(p), const tchar_t* Path)
--{
--#ifndef TODO
--	// need to an include (see at includes)
--#if defined(TARGET_QNX)
--	struct statvfs st;
--	if (statvfs(Path, &st) < 0)
--#else
--	struct statfs st;
--	if (statfs(Path, &st) < 0)
--#endif
--		return -1;
--	return (int64_t)st.f_bsize * (int64_t)st.f_bavail;
--#else
--	return -1;
--#endif
--}
--
--