git: bf413b3a6b05 - main - graphics/decord: New port: Efficient video loader for deep learning

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Wed, 17 Jul 2024 08:44:52 UTC
The branch main has been updated by yuri:

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

commit bf413b3a6b05c5bead0931b25d36c0f2d5373720
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-07-17 04:28:22 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-07-17 08:44:49 +0000

    graphics/decord: New port: Efficient video loader for deep learning
---
 multimedia/Makefile         |  1 +
 multimedia/decord/Makefile  | 31 +++++++++++++++++++++++++++++++
 multimedia/decord/distinfo  |  7 +++++++
 multimedia/decord/pkg-descr | 13 +++++++++++++
 multimedia/decord/pkg-plist | 16 ++++++++++++++++
 5 files changed, 68 insertions(+)

diff --git a/multimedia/Makefile b/multimedia/Makefile
index 9dc0e6157116..4212cc6af265 100644
--- a/multimedia/Makefile
+++ b/multimedia/Makefile
@@ -34,6 +34,7 @@
     SUBDIR += cmrtlib
     SUBDIR += cx88
     SUBDIR += dav1d
+    SUBDIR += decord
     SUBDIR += deforaos-player
     SUBDIR += dirac
     SUBDIR += dragon
diff --git a/multimedia/decord/Makefile b/multimedia/decord/Makefile
new file mode 100644
index 000000000000..5340dc1f42f7
--- /dev/null
+++ b/multimedia/decord/Makefile
@@ -0,0 +1,31 @@
+PORTNAME=	decord
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.6.0-7
+DISTVERSIONSUFFIX=	-gd2e5619
+CATEGORIES=	multimedia # machine-learning
+
+PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES=	e543d1cbd4d21dbac85b1e78e43f59495c8ce78b.patch:-p1 # https://github.com/dmlc/decord/pull/309
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Efficient video loader for deep learning
+WWW=		https://github.com/dmlc/decord
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg \
+		libdmlc.so:devel/dmlc-core
+
+USES=		cmake
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	dmlc
+GH_TUPLE=	dmlc:dlpack:5c792ce:dlpack/3rdparty/dlpack
+
+post-install:
+	# install headers
+	@cd ${WRKSRC} && \
+		${COPYTREE_SHARE} include ${STAGEDIR}${PREFIX}
+
+.include <bsd.port.mk>
diff --git a/multimedia/decord/distinfo b/multimedia/decord/distinfo
new file mode 100644
index 000000000000..e1079fee207f
--- /dev/null
+++ b/multimedia/decord/distinfo
@@ -0,0 +1,7 @@
+TIMESTAMP = 1721190094
+SHA256 (dmlc-decord-v0.6.0-7-gd2e5619_GH0.tar.gz) = a69c60a41075e5044f7d20484aaf04f1437948af3d1df136f6f8b8b7b8c02404
+SIZE (dmlc-decord-v0.6.0-7-gd2e5619_GH0.tar.gz) = 19223029
+SHA256 (dmlc-dlpack-5c792ce_GH0.tar.gz) = dbcbe1d5ddf8596e18d62906e5467ee2243bb3aff41623fac8dc1ef350cd7539
+SIZE (dmlc-dlpack-5c792ce_GH0.tar.gz) = 37929
+SHA256 (e543d1cbd4d21dbac85b1e78e43f59495c8ce78b.patch) = 924b59877d0f2890f216b8c5dce52e4fd165ae7fe6a3207231178a18e05fca48
+SIZE (e543d1cbd4d21dbac85b1e78e43f59495c8ce78b.patch) = 3846
diff --git a/multimedia/decord/pkg-descr b/multimedia/decord/pkg-descr
new file mode 100644
index 000000000000..df595fe969de
--- /dev/null
+++ b/multimedia/decord/pkg-descr
@@ -0,0 +1,13 @@
+Decord is a reverse procedure of Record. It provides convenient video slicing
+methods based on a thin wrapper on top of hardware accelerated video decoders,
+e.g.
+  FFMPEG/LibAV(Done)
+  Nvidia Codecs(Done)
+  Intel Codecs
+
+Decord was designed to handle awkward video shuffling experience in order to
+provide smooth experiences similar to random image loader for deep learning.
+
+Decord is also able to decode audio from both video and audio files. One can
+slice video and audio together to get a synchronized result; hence providing
+a one-stop solution for both video and audio decoding.
diff --git a/multimedia/decord/pkg-plist b/multimedia/decord/pkg-plist
new file mode 100644
index 000000000000..a74c1e15022d
--- /dev/null
+++ b/multimedia/decord/pkg-plist
@@ -0,0 +1,16 @@
+include/decord/audio_interface.h
+include/decord/av_interface.h
+include/decord/base.h
+include/decord/runtime/c_backend_api.h
+include/decord/runtime/c_runtime_api.h
+include/decord/runtime/device_api.h
+include/decord/runtime/module.h
+include/decord/runtime/ndarray.h
+include/decord/runtime/node_base.h
+include/decord/runtime/packed_func.h
+include/decord/runtime/registry.h
+include/decord/runtime/serializer.h
+include/decord/runtime/threading_backend.h
+include/decord/runtime/util.h
+include/decord/video_interface.h
+lib/libdecord.so