From 0cbba5f6f5c0dd2db39e62ce4c889743f858c4f8 Mon Sep 17 00:00:00 2001 From: kmos Date: Sat, 12 Sep 2020 20:38:14 +0000 Subject: [PATCH] python bindings for Brotli, a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling, with a compression ratio comparable to the best currently available general-purpose compression methods. It is similar in speed with deflate but offers more dense compression. Original version by thfr. Moved to current python port standards by me. Typo fix pointed out by sthen. ok sthen --- archivers/py-brotli/Makefile | 39 +++++++++++++++++++++++++++++++++++ archivers/py-brotli/distinfo | 2 ++ archivers/py-brotli/pkg/DESCR | 6 ++++++ archivers/py-brotli/pkg/PLIST | 9 ++++++++ 4 files changed, 56 insertions(+) create mode 100644 archivers/py-brotli/Makefile create mode 100644 archivers/py-brotli/distinfo create mode 100644 archivers/py-brotli/pkg/DESCR create mode 100644 archivers/py-brotli/pkg/PLIST diff --git a/archivers/py-brotli/Makefile b/archivers/py-brotli/Makefile new file mode 100644 index 00000000000..5577a0ce616 --- /dev/null +++ b/archivers/py-brotli/Makefile @@ -0,0 +1,39 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2020/09/12 20:38:14 kmos Exp $ + +COMMENT = Python bindings for the Brotli compression library + +MODPY_EGG_VERSION = 1.0.9 +DISTNAME = Brotli-${MODPY_EGG_VERSION} +PKGNAME = py-brotli-${MODPY_EGG_VERSION} + +CATEGORIES = archivers + +MAINTAINER = Thomas Frohwein + +HOMEPAGE = https://github.com/google/brotli + +# MIT +PERMIT_PACKAGE = Yes + +EXTRACT_SUFX = .zip + +# C++ +COMPILER = base-clang ports-gcc base-gcc + +WANTLIB += ${COMPILER_LIBCXX} m + +MODULES = lang/python + +MODPY_PI = Yes +MODPY_SETUPTOOLS = Yes +MODPY_PYTEST = Yes +MODPY_PYTEST_ARGS = python/ + +FLAVORS = python3 +FLAVOR = python3 + +# Tests aren't included in 1.0.9 tarball, but can be copied in +TESTLIBDIR = ${WRKSRC}/lib.openbsd-${OSREV}-${ARCH}-${MODPY_VERSION}/ +TEST_ENV += PYTHONPATH=${TESTLIBDIR} + +.include diff --git a/archivers/py-brotli/distinfo b/archivers/py-brotli/distinfo new file mode 100644 index 00000000000..85ff2ff49d6 --- /dev/null +++ b/archivers/py-brotli/distinfo @@ -0,0 +1,2 @@ +SHA256 (Brotli-1.0.9.zip) = TRuBCqDtdz+B3O2izHtAPQEFdFhzDjCYVjVtTvQYhDg= +SIZE (Brotli-1.0.9.zip) = 510202 diff --git a/archivers/py-brotli/pkg/DESCR b/archivers/py-brotli/pkg/DESCR new file mode 100644 index 00000000000..c03308a2d01 --- /dev/null +++ b/archivers/py-brotli/pkg/DESCR @@ -0,0 +1,6 @@ +python bindings for Brotli, a generic-purpose lossless compression +algorithm that compresses data using a combination of a modern +variant of the LZ77 algorithm, Huffman coding and 2nd order context +modeling, with a compression ratio comparable to the best currently +available general-purpose compression methods. It is similar in +speed with deflate but offers more dense compression. diff --git a/archivers/py-brotli/pkg/PLIST b/archivers/py-brotli/pkg/PLIST new file mode 100644 index 00000000000..f86c93ff3fd --- /dev/null +++ b/archivers/py-brotli/pkg/PLIST @@ -0,0 +1,9 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2020/09/12 20:38:14 kmos Exp $ +lib/python${MODPY_VERSION}/site-packages/Brotli-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/ +lib/python${MODPY_VERSION}/site-packages/Brotli-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/PKG-INFO +lib/python${MODPY_VERSION}/site-packages/Brotli-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/SOURCES.txt +lib/python${MODPY_VERSION}/site-packages/Brotli-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/dependency_links.txt +lib/python${MODPY_VERSION}/site-packages/Brotli-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt +lib/python${MODPY_VERSION}/site-packages/${MODPY_PYCACHE}brotli.${MODPY_PYC_MAGIC_TAG}pyc +@so lib/python${MODPY_VERSION}/site-packages/_brotli.so +lib/python${MODPY_VERSION}/site-packages/brotli.py