git: 8d864f526577 - main - chinese/py-OpenCC: New port: Conversion between Traditional and Simplified Chinese

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Fri, 19 Jun 2026 06:37:15 UTC
The branch main has been updated by yuri:

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

commit 8d864f52657746461e74048c8194df861846c93e
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-06-19 05:37:51 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-06-19 06:36:59 +0000

    chinese/py-OpenCC: New port: Conversion between Traditional and Simplified Chinese
---
 chinese/Makefile                             |  1 +
 chinese/py-OpenCC/Makefile                   | 22 ++++++++++++++++++++++
 chinese/py-OpenCC/distinfo                   |  3 +++
 chinese/py-OpenCC/files/patch-pyproject.toml |  9 +++++++++
 chinese/py-OpenCC/pkg-descr                  |  5 +++++
 5 files changed, 40 insertions(+)

diff --git a/chinese/Makefile b/chinese/Makefile
index e83d21c027db..541216c9d060 100644
--- a/chinese/Makefile
+++ b/chinese/Makefile
@@ -89,6 +89,7 @@
     SUBDIR += pcmanx
     SUBDIR += php-opencc
     SUBDIR += phpbb3-tw
+    SUBDIR += py-OpenCC
     SUBDIR += py-chinese-calendar
     SUBDIR += py-rjieba
     SUBDIR += pycangjie
diff --git a/chinese/py-OpenCC/Makefile b/chinese/py-OpenCC/Makefile
new file mode 100644
index 000000000000..38d598f4717f
--- /dev/null
+++ b/chinese/py-OpenCC/Makefile
@@ -0,0 +1,22 @@
+PORTNAME=	OpenCC
+PORTVERSION=	1.3.1
+CATEGORIES=	chinese python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DISTNAME=	opencc-${PORTVERSION}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Conversion between Traditional and Simplified Chinese
+WWW=		https://github.com/BYVoid/OpenCC
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	cmake-core>=0:devel/cmake-core \
+		${PYTHON_PKGNAMEPREFIX}setuptools>=63.1.0:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+
+USES=		compiler:c++17-lang python
+USE_PYTHON=	autoplist concurrent pep517
+
+.include <bsd.port.mk>
diff --git a/chinese/py-OpenCC/distinfo b/chinese/py-OpenCC/distinfo
new file mode 100644
index 000000000000..75c0c0fea884
--- /dev/null
+++ b/chinese/py-OpenCC/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1781842763
+SHA256 (opencc-1.3.1.tar.gz) = 6892ee3f8fcc5992f0e9f90dbf177c8da566620f83c3f2040257293f16141b33
+SIZE (opencc-1.3.1.tar.gz) = 11755312
diff --git a/chinese/py-OpenCC/files/patch-pyproject.toml b/chinese/py-OpenCC/files/patch-pyproject.toml
new file mode 100644
index 000000000000..0eacac4bc1e4
--- /dev/null
+++ b/chinese/py-OpenCC/files/patch-pyproject.toml
@@ -0,0 +1,9 @@
+-- Lower setuptools build requirement from >=78.1.1 to >=63.1.0
+-- to match the version available in the FreeBSD ports tree.
+--- pyproject.toml.orig	2026-06-19 01:48:24 UTC
++++ pyproject.toml
+@@ -1,3 +1,3 @@
+ [build-system]
+-requires = ["setuptools>=78.1.1", "wheel"]
++requires = ["setuptools>=63.1.0", "wheel"]
+ build-backend = "setuptools.build_meta"
diff --git a/chinese/py-OpenCC/pkg-descr b/chinese/py-OpenCC/pkg-descr
new file mode 100644
index 000000000000..4089be5f8f86
--- /dev/null
+++ b/chinese/py-OpenCC/pkg-descr
@@ -0,0 +1,5 @@
+Conversion between Traditional and Simplified Chinese.
+
+Open Chinese Convert (OpenCC) is an opensource project for conversions
+between Traditional Chinese, Simplified Chinese and Japanese Kanji
+(Shinjitai).