From d9d3c5d1e34b69640aec0e85466cd372c9dcf27c Mon Sep 17 00:00:00 2001 From: Po-Chuan Hsieh Date: Wed, 21 Feb 2024 22:13:26 +0800 Subject: [PATCH] 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 +++ .../files/patch-pyproject.toml | 11 ++++++++++ textproc/py-language-data/pkg-descr | 7 ++++++ 5 files changed, 44 insertions(+) create mode 100644 textproc/py-language-data/Makefile create mode 100644 textproc/py-language-data/distinfo create mode 100644 textproc/py-language-data/files/patch-pyproject.toml create mode 100644 textproc/py-language-data/pkg-descr 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 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.