git: a506f60587e0 - main - textproc/py-sacrebleu: New port: Compute shareable BLEU, chrF, and TER scores for machine translation
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 20 Sep 2026 08:01:55 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=a506f60587e00eb8648d0663bb2cf90549423c6a
commit a506f60587e00eb8648d0663bb2cf90549423c6a
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-09-20 04:44:42 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-09-20 08:01:52 +0000
textproc/py-sacrebleu: New port: Compute shareable BLEU, chrF, and TER scores for machine translation
required by misc/py-transformers
PR: 298607
Approved by: Baptiste Daroussin <bapt@FreeBSD.org> (on behalf of portmgr@)
---
textproc/Makefile | 1 +
textproc/py-sacrebleu/Makefile | 34 ++++++++++++++++++++++++++++++++++
textproc/py-sacrebleu/distinfo | 3 +++
textproc/py-sacrebleu/pkg-descr | 3 +++
4 files changed, 41 insertions(+)
diff --git a/textproc/Makefile b/textproc/Makefile
index 2364ff8fb8a3..a996b5c19f62 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -1691,6 +1691,7 @@
SUBDIR += py-rouge-score
SUBDIR += py-rst2ansi
SUBDIR += py-rst2html5
+ SUBDIR += py-sacrebleu
SUBDIR += py-sacremoses
SUBDIR += py-scour
SUBDIR += py-segments
diff --git a/textproc/py-sacrebleu/Makefile b/textproc/py-sacrebleu/Makefile
new file mode 100644
index 000000000000..5a31caaeb8c0
--- /dev/null
+++ b/textproc/py-sacrebleu/Makefile
@@ -0,0 +1,34 @@
+PORTNAME= sacrebleu
+DISTVERSION= 2.6.0
+CATEGORIES= textproc python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Compute shareable BLEU, chrF, and TER scores for machine translation
+WWW= https://github.com/mjpost/sacrebleu
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+BUILD_DEPENDS= ${PY_SETUPTOOLS} \
+ ${PYTHON_PKGNAMEPREFIX}setuptools-scm>0:devel/py-setuptools-scm@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}colorama>0:devel/py-colorama@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}lxml>0:devel/py-lxml@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}portalocker>0:devel/py-portalocker@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}tabulate>=0.8.9:devel/py-tabulate@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}numpy>=1.17:math/py-numpy@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}regex>0:textproc/py-regex@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist concurrent pep517
+
+post-patch:
+ @${REINPLACE_CMD} -e 's/^license = "Apache-2.0"$$/license = {text = "Apache-2.0"}/' \
+ -e 's/"setuptools>=77"/"setuptools>=63.1.0"/' \
+ ${WRKSRC}/pyproject.toml
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/textproc/py-sacrebleu/distinfo b/textproc/py-sacrebleu/distinfo
new file mode 100644
index 000000000000..9a2b21604d39
--- /dev/null
+++ b/textproc/py-sacrebleu/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1789598645
+SHA256 (sacrebleu-2.6.0.tar.gz) = 91499b6cd46138d95154fff1e863c2f9be57e82f0c719d8dd718d0006cf6c566
+SIZE (sacrebleu-2.6.0.tar.gz) = 1893419
diff --git a/textproc/py-sacrebleu/pkg-descr b/textproc/py-sacrebleu/pkg-descr
new file mode 100644
index 000000000000..d26ce64a8322
--- /dev/null
+++ b/textproc/py-sacrebleu/pkg-descr
@@ -0,0 +1,3 @@
+SACREBLEU provides hassle-free computation of shareable, comparable,
+and reproducible BLEU, chrF, and TER scores for machine translation
+evaluation.