git: 6b3008a4084b - main - graphics/libdicom: New port: C library for reading DICOM files

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 21 Dec 2023 08:24:18 UTC
The branch main has been updated by yuri:

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

commit 6b3008a4084be8684314447d48d9e49059498d2d
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-12-21 08:11:13 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-12-21 08:24:07 +0000

    graphics/libdicom: New port: C library for reading DICOM files
---
 graphics/Makefile           |  1 +
 graphics/libdicom/Makefile  | 29 +++++++++++++++++++++++++++++
 graphics/libdicom/distinfo  |  3 +++
 graphics/libdicom/pkg-descr |  2 ++
 graphics/libdicom/pkg-plist | 10 ++++++++++
 5 files changed, 45 insertions(+)

diff --git a/graphics/Makefile b/graphics/Makefile
index 7070b4b48b83..557aeb3500e7 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -449,6 +449,7 @@
     SUBDIR += libcaca
     SUBDIR += libcdr01
     SUBDIR += libchamplain
+    SUBDIR += libdicom
     SUBDIR += libdmtx
     SUBDIR += libdrm
     SUBDIR += libecwj2
diff --git a/graphics/libdicom/Makefile b/graphics/libdicom/Makefile
new file mode 100644
index 000000000000..8cfdb29ea3cb
--- /dev/null
+++ b/graphics/libdicom/Makefile
@@ -0,0 +1,29 @@
+PORTNAME=	libdicom
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1.0.5
+CATEGORIES=	graphics
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	C library for reading DICOM files
+WWW=		https://libdicom.readthedocs.io/en/latest/
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${LOCALBASE}/include/utarray.h:devel/uthash
+TEST_DEPENDS=	check>0:devel/check
+
+USES=		localbase meson pkgconfig
+USE_LDCONFIG=	yes
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	ImagingDataCommons
+
+MESON_ARGS=	-Dtests=false
+
+do-test:
+	@cd ${WRKSRC} && \
+		${SETENV} ${CONFIGURE_ENV} ${CONFIGURE_CMD} --reconfigure ${CONFIGURE_ARGS} -Dtests=true && \
+		${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} test
+
+.include <bsd.port.mk>
diff --git a/graphics/libdicom/distinfo b/graphics/libdicom/distinfo
new file mode 100644
index 000000000000..96af694ebbf0
--- /dev/null
+++ b/graphics/libdicom/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1703144908
+SHA256 (ImagingDataCommons-libdicom-v1.0.5_GH0.tar.gz) = ebf5f7c0d1a0f802c1801f2f762537f014f2a431be3e063142f6ed3c96878abb
+SIZE (ImagingDataCommons-libdicom-v1.0.5_GH0.tar.gz) = 351519
diff --git a/graphics/libdicom/pkg-descr b/graphics/libdicom/pkg-descr
new file mode 100644
index 000000000000..dd20a5915dab
--- /dev/null
+++ b/graphics/libdicom/pkg-descr
@@ -0,0 +1,2 @@
+libdicom is a C library and a set of command-line tools
+for reading DICOM WSI files.
diff --git a/graphics/libdicom/pkg-plist b/graphics/libdicom/pkg-plist
new file mode 100644
index 000000000000..5e10a27d009c
--- /dev/null
+++ b/graphics/libdicom/pkg-plist
@@ -0,0 +1,10 @@
+bin/dcm-dump
+bin/dcm-getframe
+include/dicom/dicom.h
+include/dicom/version.h
+lib/libdicom.so
+lib/libdicom.so.1
+lib/libdicom.so.1.0.0
+libdata/pkgconfig/libdicom.pc
+man/man1/dcm-dump.1.gz
+man/man1/dcm-getframe.1.gz