aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-03-19 01:43:19 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2023-03-19 16:01:20 +0000
commit1285536d2278724b5907973346a1f2ab5e961133 (patch)
treea16051c7f2c13a01779456ae44fc818de795f157
parent38c448ada8667887ba13a27ecd2396cd496ca1c9 (diff)
downloadports-1285536d2278724b5907973346a1f2ab5e961133.tar.gz
ports-1285536d2278724b5907973346a1f2ab5e961133.zip
multimedia/bcmatroska2: Update version 0.23=>5.2.1
- Adopt port - Add LICENSE BSD3CLAUSE - Change MASTERSITES to https://gitlab.linphone.org/BC GITLAB Changelog: https://gitlab.linphone.org/BC/public/bcmatroska2/-/tags/5.2.1
-rw-r--r--multimedia/bcmatroska2/Makefile18
-rw-r--r--multimedia/bcmatroska2/distinfo6
-rw-r--r--multimedia/bcmatroska2/files/patch-corec-corec-helpers-file-file_libc.c10
-rw-r--r--multimedia/bcmatroska2/files/patch-corec_corec_helpers_file_file__bctbx.c169
4 files changed, 190 insertions, 13 deletions
diff --git a/multimedia/bcmatroska2/Makefile b/multimedia/bcmatroska2/Makefile
index 25312c1f5b68..da1e0815c4a2 100644
--- a/multimedia/bcmatroska2/Makefile
+++ b/multimedia/bcmatroska2/Makefile
@@ -1,15 +1,23 @@
PORTNAME= bcmatroska2
-PORTVERSION= 0.23
+PORTVERSION= 5.2.1
CATEGORIES= multimedia
-MASTER_SITES= https://www.linphone.org/releases/sources/bcmatroska2/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= bofh@FreeBSD.org
COMMENT= Belledonne Communications Matroska media container support
WWW= https://www.linphone.org/
-USES= cmake
+LICENSE= BSD3CLAUSE
+
+LIB_DEPENDS= libbctoolbox.so:net/bctoolbox
+
+USES= cmake compiler:c++17-lang
+USE_GITLAB= yes
+GL_SITE= https://gitlab.linphone.org/BC
+GL_ACCOUNT= public
+GL_COMMIT= 4d125bf2788915325c5ab93b9a97835f96d566d3
USE_LDCONFIG= yes
-CMAKE_ARGS= -DENABLE_STATIC=NO
+CMAKE_ARGS= -DCMAKE_PREFIX_PATH=${LOCALBASE} \
+ -DENABLE_STATIC=NO
.include <bsd.port.mk>
diff --git a/multimedia/bcmatroska2/distinfo b/multimedia/bcmatroska2/distinfo
index 1591e626483d..2511ae5dfa6e 100644
--- a/multimedia/bcmatroska2/distinfo
+++ b/multimedia/bcmatroska2/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1529855371
-SHA256 (bcmatroska2-0.23.tar.gz) = 2540e2d39785004060688218df2d33ddefc2561f6cf1fcdd4d2840e8c8a41ba8
-SIZE (bcmatroska2-0.23.tar.gz) = 959058
+TIMESTAMP = 1679160380
+SHA256 (public-bcmatroska2-4d125bf2788915325c5ab93b9a97835f96d566d3_GL0.tar.gz) = 1ba2f46074b68a2fb52a37d29c4a2137f2ca161f995238f80aa3f7898c8b8dcc
+SIZE (public-bcmatroska2-4d125bf2788915325c5ab93b9a97835f96d566d3_GL0.tar.gz) = 935237
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
index 8b2c85260201..bb204815456a 100644
--- a/multimedia/bcmatroska2/files/patch-corec-corec-helpers-file-file_libc.c
+++ b/multimedia/bcmatroska2/files/patch-corec-corec-helpers-file-file_libc.c
@@ -1,9 +1,9 @@
---- corec/corec/helpers/file/file_libc.c.orig 2017-07-20 13:52:29 UTC
+--- corec/corec/helpers/file/file_libc.c.orig 2022-11-29 10:25:07 UTC
+++ corec/corec/helpers/file/file_libc.c
-@@ -40,7 +40,7 @@
- #include <unistd.h>
- #include <dirent.h>
- #include <errno.h>
+@@ -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>
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
new file mode 100644
index 000000000000..5c35768e7f1c
--- /dev/null
+++ b/multimedia/bcmatroska2/files/patch-corec_corec_helpers_file_file__bctbx.c
@@ -0,0 +1,169 @@
+--- corec/corec/helpers/file/file_bctbx.c.orig 2022-11-29 10:25:07 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 <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
+-}
+-
+-