git: 4e26a09cbb6c - main - archivers/py-zlib-ng: Add new port

From: Koichiro Iwao <meta_at_FreeBSD.org>
Date: Tue, 09 Jan 2024 00:47:51 UTC
The branch main has been updated by meta:

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

commit 4e26a09cbb6c06055f055fec19d70e2dbd0838e8
Author:     Oleg Sidorkin <osidorkin@gmail.com>
AuthorDate: 2023-12-11 15:57:18 +0000
Commit:     Koichiro Iwao <meta@FreeBSD.org>
CommitDate: 2024-01-09 00:45:44 +0000

    archivers/py-zlib-ng: Add new port
    
    PR:             275719
---
 archivers/Makefile                                 |  1 +
 archivers/py-zlib-ng/Makefile                      | 23 ++++++++++++++++++++++
 archivers/py-zlib-ng/distinfo                      |  3 +++
 .../patch-src_zlib__ng_zlib-ng_CMakeLists.txt      | 15 ++++++++++++++
 archivers/py-zlib-ng/pkg-descr                     |  2 ++
 5 files changed, 44 insertions(+)

diff --git a/archivers/Makefile b/archivers/Makefile
index 9d71854fe8c9..f46a370e2f26 100644
--- a/archivers/Makefile
+++ b/archivers/Makefile
@@ -207,6 +207,7 @@
     SUBDIR += py-warctools
     SUBDIR += py-xopen
     SUBDIR += py-zipstream-ng
+    SUBDIR += py-zlib-ng
     SUBDIR += py-zopfli
     SUBDIR += py-zstandard
     SUBDIR += py-zstd
diff --git a/archivers/py-zlib-ng/Makefile b/archivers/py-zlib-ng/Makefile
new file mode 100644
index 000000000000..7f1eb39f0ba9
--- /dev/null
+++ b/archivers/py-zlib-ng/Makefile
@@ -0,0 +1,23 @@
+PORTNAME=	zlib-ng
+DISTVERSION=	0.4.0
+CATEGORIES=	archivers python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	osidorkin@gmail.com
+COMMENT=	Python bindings for the zlib-ng library
+WWW=		https://github.com/pycompression/python-zlib-ng
+
+LICENSE=	PSFL
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=51:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \
+		cmake:devel/cmake-core
+
+USES=		python:3.7+
+USE_PYTHON=	autoplist pep517
+
+INSTALL_TARGET=install-strip
+
+.include <bsd.port.mk>
diff --git a/archivers/py-zlib-ng/distinfo b/archivers/py-zlib-ng/distinfo
new file mode 100644
index 000000000000..3721cf359a96
--- /dev/null
+++ b/archivers/py-zlib-ng/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1704480695
+SHA256 (zlib-ng-0.4.0.tar.gz) = 3b730881aaeb86f9a4995de5e22499406ccf92f8508b5c017c343d27570a8c0a
+SIZE (zlib-ng-0.4.0.tar.gz) = 2458999
diff --git a/archivers/py-zlib-ng/files/patch-src_zlib__ng_zlib-ng_CMakeLists.txt b/archivers/py-zlib-ng/files/patch-src_zlib__ng_zlib-ng_CMakeLists.txt
new file mode 100644
index 000000000000..9fea130f90fb
--- /dev/null
+++ b/archivers/py-zlib-ng/files/patch-src_zlib__ng_zlib-ng_CMakeLists.txt
@@ -0,0 +1,15 @@
+--- src/zlib_ng/zlib-ng/CMakeLists.txt.orig	2023-12-25 16:17:33 UTC
++++ src/zlib_ng/zlib-ng/CMakeLists.txt
+@@ -74,9 +74,9 @@ option(ZLIB_COMPAT "Compile with zlib compatible API" 
+ #
+ option(WITH_GZFILEOP "Compile with support for gzFile related functions" ON)
+ option(ZLIB_COMPAT "Compile with zlib compatible API" OFF)
+-option(ZLIB_ENABLE_TESTS "Build test binaries" ON)
+-option(ZLIBNG_ENABLE_TESTS "Test zlib-ng specific API" ON)
+-option(WITH_GTEST "Build gtest_zlib" ON)
++option(ZLIB_ENABLE_TESTS "Build test binaries" OFF)
++option(ZLIBNG_ENABLE_TESTS "Test zlib-ng specific API" OFF)
++option(WITH_GTEST "Build gtest_zlib" OFF)
+ option(WITH_FUZZERS "Build test/fuzz" OFF)
+ option(WITH_BENCHMARKS "Build test/benchmarks" OFF)
+ option(WITH_BENCHMARK_APPS "Build application benchmarks" OFF)
diff --git a/archivers/py-zlib-ng/pkg-descr b/archivers/py-zlib-ng/pkg-descr
new file mode 100644
index 000000000000..1b6e5a4b8d17
--- /dev/null
+++ b/archivers/py-zlib-ng/pkg-descr
@@ -0,0 +1,2 @@
+Faster zlib and gzip compatible compression and decompression by providing
+Python bindings for the zlib-ng library.