aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Zarychta <zarychtam@plan-b.pwste.edu.pl>2022-02-08 03:19:33 +0000
committerLi-Wen Hsu <lwhsu@FreeBSD.org>2022-02-08 03:19:33 +0000
commitc8bfb772c274a6044c7d5620776921364a46824e (patch)
tree2d73c0aedce259288368261de6f840c2014b2588
parent49ad7fa8bcb9890f3ce6a24466950f7e5bde18cf (diff)
downloadports-c8bfb772c274a6044c7d5620776921364a46824e.tar.gz
ports-c8bfb772c274a6044c7d5620776921364a46824e.zip
Add comms/py-libscrc: Python library for calculating various types of CRC
PR: 261571
-rw-r--r--comms/Makefile1
-rw-r--r--comms/py-libscrc/Makefile34
-rw-r--r--comms/py-libscrc/distinfo3
-rw-r--r--comms/py-libscrc/pkg-descr4
4 files changed, 42 insertions, 0 deletions
diff --git a/comms/Makefile b/comms/Makefile
index 1676e470b3c8..03a3fc2d390f 100644
--- a/comms/Makefile
+++ b/comms/Makefile
@@ -136,6 +136,7 @@
SUBDIR += py-hid
SUBDIR += py-hidapi
SUBDIR += py-libimobiledevice
+ SUBDIR += py-libscrc
SUBDIR += py-pyserial
SUBDIR += py-xmodem
SUBDIR += pyla
diff --git a/comms/py-libscrc/Makefile b/comms/py-libscrc/Makefile
new file mode 100644
index 000000000000..bd14e21f2d35
--- /dev/null
+++ b/comms/py-libscrc/Makefile
@@ -0,0 +1,34 @@
+PORTNAME= libscrc
+DISTVERSIONPREFIX= v
+DISTVERSION= 1.7
+CATEGORIES= comms python
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= zarychtam@plan-b.pwste.edu.pl
+COMMENT= Python library for calculating various types of CRC
+
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= python
+USE_PYTHON= autoplist distutils
+
+USE_GITHUB= yes
+GH_ACCOUNT= hex-in
+
+TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+
+do-test:
+ @cd ${TEST_WRKSRC} && for test in \
+ libscrc/test/canx.py \
+ libscrc/test/crc8.py \
+ libscrc/test/crc16.py \
+ libscrc/test/crc24.py \
+ libscrc/test/crc32.py \
+ libscrc/test/crc64.py \
+ libscrc/test/crcx.py \
+ libscrc/test/hacker.py \
+ libscrc/test/modbus.py; \
+ do ${SETENV} ${TEST_ENV} ${PYTHON_CMD} $${test}; done
+
+.include <bsd.port.mk>
diff --git a/comms/py-libscrc/distinfo b/comms/py-libscrc/distinfo
new file mode 100644
index 000000000000..8e31f0d6858a
--- /dev/null
+++ b/comms/py-libscrc/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1643544324
+SHA256 (hex-in-libscrc-v1.7_GH0.tar.gz) = cd4dc6555cb320705218e308b4c4e43b1ae299999084b5ac534c79f94fa2f9d7
+SIZE (hex-in-libscrc-v1.7_GH0.tar.gz) = 52893
diff --git a/comms/py-libscrc/pkg-descr b/comms/py-libscrc/pkg-descr
new file mode 100644
index 000000000000..b370803f8041
--- /dev/null
+++ b/comms/py-libscrc/pkg-descr
@@ -0,0 +1,4 @@
+Python library for calculating:
+CRC3/CRC4/CRC5/CRC6/CRC7/CRC8/CRC16/CRC24/CRC32/CRC64/CRC82.
+
+WWW: https://github.com/hex-in/libscrc