git: e5985f145067 - main - archovers/libszip: New port: Implementation of the extended-Rice lossless compression algorithm

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Thu, 10 Oct 2024 21:21:58 UTC
The branch main has been updated by yuri:

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

commit e5985f1450673f41cbeca66656c13bb79ede5ffa
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-10-10 14:48:30 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-10-10 21:20:23 +0000

    archovers/libszip: New port: Implementation of the extended-Rice lossless compression algorithm
---
 archivers/Makefile                           |  1 +
 archivers/libszip/Makefile                   | 20 ++++++++++++++++++++
 archivers/libszip/distinfo                   |  3 +++
 archivers/libszip/files/patch-CMakeLists.txt | 20 ++++++++++++++++++++
 archivers/libszip/pkg-descr                  |  5 +++++
 archivers/libszip/pkg-plist                  | 11 +++++++++++
 6 files changed, 60 insertions(+)

diff --git a/archivers/Makefile b/archivers/Makefile
index cb2e68aab92a..000b8f6a69b0 100644
--- a/archivers/Makefile
+++ b/archivers/Makefile
@@ -68,6 +68,7 @@
     SUBDIR += liblzxcomp
     SUBDIR += libmspack
     SUBDIR += libpar2
+    SUBDIR += libszip
     SUBDIR += libunrar
     SUBDIR += libzip
     SUBDIR += libzippp
diff --git a/archivers/libszip/Makefile b/archivers/libszip/Makefile
new file mode 100644
index 000000000000..332908347060
--- /dev/null
+++ b/archivers/libszip/Makefile
@@ -0,0 +1,20 @@
+PORTNAME=	libszip
+DISTVERSION=	2.1.1
+CATEGORIES=	archivers
+MASTER_SITES=	https://support.hdfgroup.org/ftp/lib-external/szip/${DISTVERSION}/src/
+DISTNAME=	szip-${DISTVERSION}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Implementation of the extended-Rice lossless compression algorithm
+WWW=		https://support.hdfgroup.org/
+
+LICENSE=	SZIP
+LICENSE_NAME=	SZIP Copyright and License Notice
+LICENSE_FILE=	${WRKSRC}/COPYING
+LICENSE_PERMS=	auto-accept dist-mirror pkg-mirror # scientific use only is allowed [...] in conjunction with HDF data storage and retrieval file format and software library products (HDF5)
+
+USES=		cmake:testing
+
+CONFLICTS_INSTALL=	libaec
+
+.include <bsd.port.mk>
diff --git a/archivers/libszip/distinfo b/archivers/libszip/distinfo
new file mode 100644
index 000000000000..545cf425b57c
--- /dev/null
+++ b/archivers/libszip/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1728588196
+SHA256 (szip-2.1.1.tar.gz) = 21ee958b4f2d4be2c9cabfa5e1a94877043609ce86fde5f286f105f7ff84d412
+SIZE (szip-2.1.1.tar.gz) = 415774
diff --git a/archivers/libszip/files/patch-CMakeLists.txt b/archivers/libszip/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..42f82a58ef5f
--- /dev/null
+++ b/archivers/libszip/files/patch-CMakeLists.txt
@@ -0,0 +1,20 @@
+--- CMakeLists.txt.orig	2017-02-03 19:42:43 UTC
++++ CMakeLists.txt
+@@ -45,7 +45,7 @@ if (NOT SZIP_INSTALL_DATA_DIR)
+       set (SZIP_INSTALL_FWRK_DIR ${CMAKE_INSTALL_FRAMEWORK_PREFIX})
+     endif ()
+     set (SZIP_INSTALL_DATA_DIR share)
+-    set (SZIP_INSTALL_CMAKE_DIR share/cmake)
++    set (SZIP_INSTALL_CMAKE_DIR lib/cmake/szip)
+   else ()
+     set (SZIP_INSTALL_DATA_DIR ".")
+     set (SZIP_INSTALL_CMAKE_DIR cmake)
+@@ -326,7 +326,7 @@ endif ()
+ #-----------------------------------------------------------------------------
+ # Add Document File(s) to CMake Install
+ #-----------------------------------------------------------------------------
+-if (NOT SZIP_EXTERNALLY_CONFIGURED)
++if (FALSE AND NOT SZIP_EXTERNALLY_CONFIGURED)
+   install (
+       FILES
+           ${SZIP_SOURCE_DIR}/COPYING
diff --git a/archivers/libszip/pkg-descr b/archivers/libszip/pkg-descr
new file mode 100644
index 000000000000..24f71d99fa1e
--- /dev/null
+++ b/archivers/libszip/pkg-descr
@@ -0,0 +1,5 @@
+Szip is an implementation of the extended-Rice lossless
+compression algorithm.
+
+It provides lossless compression of scientific data, and is
+provided with HDF software products.
diff --git a/archivers/libszip/pkg-plist b/archivers/libszip/pkg-plist
new file mode 100644
index 000000000000..0654c583de05
--- /dev/null
+++ b/archivers/libszip/pkg-plist
@@ -0,0 +1,11 @@
+include/SZconfig.h
+include/ricehdf.h
+include/szip_adpt.h
+include/szlib.h
+lib/cmake/szip/szip-config-version.cmake
+lib/cmake/szip/szip-config.cmake
+lib/cmake/szip/szip-targets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/szip/szip-targets.cmake
+lib/libszip.a
+lib/libszip.so
+lib/libszip.so.2.1