aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wener <matthew@wener.org>2024-11-21 20:25:51 +0000
committerDries Michiels <driesm@FreeBSD.org>2024-11-21 20:28:33 +0000
commit009bb63906111b8714b909836d13bbe7a36564ed (patch)
treec2857b61ebbb45cbb09702991d33fa9dcdc6d68a
parent14b478d238ecd887015652cc6df7e1dcbc63c8ee (diff)
archivers/py-pybcj: add new port
BCJ filter library PR: 282836
-rw-r--r--archivers/Makefile1
-rw-r--r--archivers/py-pybcj/Makefile29
-rw-r--r--archivers/py-pybcj/distinfo3
-rw-r--r--archivers/py-pybcj/pkg-descr5
4 files changed, 38 insertions, 0 deletions
diff --git a/archivers/Makefile b/archivers/Makefile
index 91b502e82364..a72451d8664c 100644
--- a/archivers/Makefile
+++ b/archivers/Makefile
@@ -202,6 +202,7 @@
SUBDIR += py-lzma
SUBDIR += py-lzstring
SUBDIR += py-patool
+ SUBDIR += py-pybcj
SUBDIR += py-pyminizip
SUBDIR += py-pyppmd
SUBDIR += py-python-lhafile
diff --git a/archivers/py-pybcj/Makefile b/archivers/py-pybcj/Makefile
new file mode 100644
index 000000000000..5ffe3e15b1d7
--- /dev/null
+++ b/archivers/py-pybcj/Makefile
@@ -0,0 +1,29 @@
+PORTNAME= pybcj
+PORTVERSION= 1.0.2
+CATEGORIES= archivers python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= matthew@wener.org
+COMMENT= BCJ filter library
+WWW= https://codeberg.org/miurahr/pybcj
+
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PY_SETUPTOOLS} \
+ ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=0:devel/py-setuptools-scm@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hypothesis>=0:devel/py-hypothesis@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-cov>=0:devel/py-pytest-cov@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist pep517 pytest
+
+TEST_ENV= ${MAKE_ENV} \
+ PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+
+do-test:
+ @cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v
+
+.include <bsd.port.mk>
diff --git a/archivers/py-pybcj/distinfo b/archivers/py-pybcj/distinfo
new file mode 100644
index 000000000000..ca5c772e5f13
--- /dev/null
+++ b/archivers/py-pybcj/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1724809518
+SHA256 (pybcj-1.0.2.tar.gz) = c7f5bef7f47723c53420e377bc64d2553843bee8bcac5f0ad076ab1524780018
+SIZE (pybcj-1.0.2.tar.gz) = 2111002
diff --git a/archivers/py-pybcj/pkg-descr b/archivers/py-pybcj/pkg-descr
new file mode 100644
index 000000000000..30da3e6867e0
--- /dev/null
+++ b/archivers/py-pybcj/pkg-descr
@@ -0,0 +1,5 @@
+In data compression, BCJ, short for Branch-Call-Jump, refers
+to a technique that improves the compression of machine code of
+executable binaries by replacing relative branch addresses with
+absolute ones. This allows a LZMA compressor to identify duplicate
+targets and archive higher compression rate.