git: d9d3c5d1e34b - main - textproc/py-language-data: Add py-language-data 1.1

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Wed, 21 Feb 2024 15:17:23 UTC
The branch main has been updated by sunpoet:

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

commit d9d3c5d1e34b69640aec0e85466cd372c9dcf27c
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-02-21 14:13:26 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-02-21 15:06:09 +0000

    textproc/py-language-data: Add py-language-data 1.1
    
    language_data is a supplement to the langcodes module, for working with
    standardized codes for human languages. It stores the more bulky and
    hard-to-index data about languages, particularly what they are named in various
    languages.
    
    The functions and test cases for working with this data are in langcodes,
    because working with the data correctly requires parsing language codes.
---
 textproc/Makefile                                  |  1 +
 textproc/py-language-data/Makefile                 | 22 ++++++++++++++++++++++
 textproc/py-language-data/distinfo                 |  3 +++
 .../py-language-data/files/patch-pyproject.toml    | 11 +++++++++++
 textproc/py-language-data/pkg-descr                |  7 +++++++
 5 files changed, 44 insertions(+)

diff --git a/textproc/Makefile b/textproc/Makefile
index bc1e67f61263..d96dde273ada 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -1406,6 +1406,7 @@
     SUBDIR += py-langcodes
     SUBDIR += py-langdetect
     SUBDIR += py-langid
+    SUBDIR += py-language-data
     SUBDIR += py-laserhammer
     SUBDIR += py-latexcodec
     SUBDIR += py-libxml2
diff --git a/textproc/py-language-data/Makefile b/textproc/py-language-data/Makefile
new file mode 100644
index 000000000000..6f7b637f255a
--- /dev/null
+++ b/textproc/py-language-data/Makefile
@@ -0,0 +1,22 @@
+PORTNAME=	language-data
+PORTVERSION=	1.1
+CATEGORIES=	textproc python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DISTNAME=	language_data-${PORTVERSION}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Supplementary data about languages used by the langcodes module
+WWW=		https://github.com/rspeer/language_data
+
+LICENSE=	MIT
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}poetry-core>=1.0.0:devel/py-poetry-core@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}marisa-trie>=0.7.7:devel/py-marisa-trie@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist concurrent pep517
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/textproc/py-language-data/distinfo b/textproc/py-language-data/distinfo
new file mode 100644
index 000000000000..88a46e6db8f1
--- /dev/null
+++ b/textproc/py-language-data/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1708448848
+SHA256 (language_data-1.1.tar.gz) = c1f5283c46bba68befa37505857a3f672497aba0c522b37d99367e911232455b
+SIZE (language_data-1.1.tar.gz) = 4668860
diff --git a/textproc/py-language-data/files/patch-pyproject.toml b/textproc/py-language-data/files/patch-pyproject.toml
new file mode 100644
index 000000000000..70ed6789da3f
--- /dev/null
+++ b/textproc/py-language-data/files/patch-pyproject.toml
@@ -0,0 +1,11 @@
+--- pyproject.toml.orig	2021-11-11 17:27:05 UTC
++++ pyproject.toml
+@@ -11,7 +11,7 @@ exclude = ["language_data/data/cldr", "language_data/d
+ 
+ [tool.poetry.dependencies]
+ python = ">= 3.6"
+-marisa-trie = "^0.7.7"
++marisa-trie = ">= 0.7.7"
+ 
+ [tool.poetry.dev-dependencies]
+ 
diff --git a/textproc/py-language-data/pkg-descr b/textproc/py-language-data/pkg-descr
new file mode 100644
index 000000000000..cd78712c5588
--- /dev/null
+++ b/textproc/py-language-data/pkg-descr
@@ -0,0 +1,7 @@
+language_data is a supplement to the langcodes module, for working with
+standardized codes for human languages. It stores the more bulky and
+hard-to-index data about languages, particularly what they are named in various
+languages.
+
+The functions and test cases for working with this data are in langcodes,
+because working with the data correctly requires parsing language codes.