diff --git a/multimedia/bcmatroska2/Makefile b/multimedia/bcmatroska2/Makefile index c7a47c9ea818..e32a750ff207 100644 --- a/multimedia/bcmatroska2/Makefile +++ b/multimedia/bcmatroska2/Makefile @@ -1,22 +1,23 @@ PORTNAME= bcmatroska2 DISTVERSION= 5.4.72 +PORTREVISION= 1 CATEGORIES= multimedia MAINTAINER= bofh@FreeBSD.org COMMENT= Belledonne Communications Matroska media container support WWW= https://gitlab.linphone.org/BC/public/bcmatroska2 LICENSE= BSD3CLAUSE LIB_DEPENDS= libbctoolbox.so:net/bctoolbox \ libbcunit.so:devel/bcunit USES= cmake compiler:c++17-lang USE_GITLAB= yes GL_SITE= https://gitlab.linphone.org/BC GL_ACCOUNT= public USE_LDCONFIG= yes CMAKE_ON= BUILD_SHARED_LIBS .include 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 - #elif defined(TARGET_QNX) - #include 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,169 +1,11 @@ ---- 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_*. #include "file.h" -#if defined(TARGET_OSX) +#if defined(TARGET_OSX) || defined(__FreeBSD__) #include #elif defined(TARGET_QNX) #include -@@ -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 --} -- --