aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuukka Pasanen <tuukka.pasanen@ilmi.fi>2025-05-12 14:59:38 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2025-07-16 14:53:21 +0000
commit08f8a8dc55c09bcb6511de52e6dd8daf5732ad2b (patch)
tree310dda26009f7848b317d3282dace4e836e0256b
parent6bbcddb3cde6c9513acfc112cc49a8931f5dc5a7 (diff)
devel/py-typecode: New port
Comprehensive filetype and mimetype detection using libmagic and Pygments. WWW: https://github.com/nexB/plugincode PR: 287495 Sponsored by: The FreeBSD Foundation
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-typecode/Makefile27
-rw-r--r--devel/py-typecode/distinfo3
-rw-r--r--devel/py-typecode/pkg-descr3
4 files changed, 34 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 0d9a05b801ed..94c64e5e9be4 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -6077,6 +6077,7 @@
SUBDIR += py-txi2p-tahoe
SUBDIR += py-ty
SUBDIR += py-typechecks
+ SUBDIR += py-typecode
SUBDIR += py-typeguard
SUBDIR += py-typer
SUBDIR += py-types-Flask
diff --git a/devel/py-typecode/Makefile b/devel/py-typecode/Makefile
new file mode 100644
index 000000000000..7239c3d9b521
--- /dev/null
+++ b/devel/py-typecode/Makefile
@@ -0,0 +1,27 @@
+PORTNAME= typecode
+DISTVERSION= 30.0.2
+CATEGORIES= devel python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= tuukka.pasanen@ilmi.fi
+COMMENT= Comprehensive filetype and mimetype detection using libmagic and Pygments.
+WWW= https://github.com/nexB/plugincode
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/apache-2.0.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}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}commoncode>=30.2.0:devel/py-commoncode@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pdfminer.six>=20200101:textproc/py-pdfminer.six@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pygments>=2.19:textproc/py-pygments@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist concurrent pep517 pytest
+PYTEST_BROKEN_TESTS= test_skeleton_codestyle
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-typecode/distinfo b/devel/py-typecode/distinfo
new file mode 100644
index 000000000000..2a1415825290
--- /dev/null
+++ b/devel/py-typecode/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1747722646
+SHA256 (typecode-30.0.2.tar.gz) = 17689d20af0ae6116e797ef2c5de65f0ce809128cf0e68479b34bd6ba4bc3898
+SIZE (typecode-30.0.2.tar.gz) = 3863273
diff --git a/devel/py-typecode/pkg-descr b/devel/py-typecode/pkg-descr
new file mode 100644
index 000000000000..eb11898a6357
--- /dev/null
+++ b/devel/py-typecode/pkg-descr
@@ -0,0 +1,3 @@
+TypeCode provides comprehensive filetype and mimetype detection using multiple
+detectors including libmagic (included as a dependency for Linux, Windows and macOS)
+and Pygments. It started as library in scancode-toolkit.