From nobody Sat Aug 17 20:44:55 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WmW7r0Xcwz5TgD0; Sat, 17 Aug 2024 20:44:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WmW7q6Jzrz4LvH; Sat, 17 Aug 2024 20:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723927495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GeV64NAqXuEgpWaPwvJReYf8kMQencJHZFhWnx6PinY=; b=C+cVguftP9TYAzS6k86fUQiprbyT9Cde6DdhSkD+cRRc/UmEu7QaKo+X4fIUgV39nc+syv EvqjxE3F99MXBWp8GYeblPoQZv5EXBe2ZkHMSFBVeTLAoUFin5wvn2UyO2Q8KrSEMOae1n XSRzHFGRPPx4k3/6b6pI2TOoQRF+p5MVZ6JsHXy1u0TYJbjBOjBwGyMNTRP/dRYWUMivLI FnqSWsoqaFX0lgPpnUHI1vqCAWliq6EySwxq84rBterI7KqXQt1L3gNGyUDUXJgJWukX9P h6oMyU610B4lk1L3bagP/gMkV5EafbQhkzkRXbcE/gHf7JGUYztm2Rzlg0eXjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723927495; a=rsa-sha256; cv=none; b=ogbgQ3aNknaylGDvLhl5yafcwwzeuojkZiStQLVbzI+6InGrjozr6gkzmRGipf3cPn0kkJ EsJQPRMGZTpSVTcXEJzbBFv3AKjNZmrLDTmGz4wVwSwZmJWGbe/LgKjNYow2ZC4r2VzKL2 VvfhyxXZU8SWt3l660wcJ4wQEr03FFS2kmdq4IESedYkJC2s25CrYR6Smo2r/eOQSN441n uSAjqkXp/F+/AWZQVYIc2zI5hEwVmuuInS+DCzhIv3FwAn6JcBpy19VFdisSlTCBFfPy6M GOjT1Xd2HIajW01mzNxz9a3gHbHVpF9aga4AHopSwXa8f0qGAOOL9C1qnfOtUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723927495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GeV64NAqXuEgpWaPwvJReYf8kMQencJHZFhWnx6PinY=; b=Qw4CUBGllKtAMWcGzb9t0ko3tWJUMV8WUky658D7qyg1903xeeScTL6jRvJM1CAWLA6kh8 Fc/EqxXfZoH5KZGKmhGnoNiJXJQP6vzqQpUs8pk5G48aVa/loLa/JirBFn2JP9zIzUgISx 03HWahRcZo4vY9PwQkqLcgNIVqQ0zY7Zw7DkDz0DJYfjnKgiLZedsfpUywFH+t/v8woJR0 lb4svPUHs69Mri/lAWEU3hMySl1hRAGFQ58Q/U+SQXgVBYQs/FceZ7LjXv/m+LnXWB63P1 t7StLD1mucA5/JnkdEjtIDUdI+8wt2tfhPd1imwKoc/7H1tzp/hcnJxnE1YkWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WmW7q5jHBz14Zh; Sat, 17 Aug 2024 20:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47HKitVr043169; Sat, 17 Aug 2024 20:44:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47HKitgV043166; Sat, 17 Aug 2024 20:44:55 GMT (envelope-from git) Date: Sat, 17 Aug 2024 20:44:55 GMT Message-Id: <202408172044.47HKitgV043166@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: eb313671a311 - main - comms/py-libusbsio: Python wrapper for the NXP libusbsio library List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb313671a3113039c30597dbced32b78887e3f9a Auto-Submitted: auto-generated The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=eb313671a3113039c30597dbced32b78887e3f9a commit eb313671a3113039c30597dbced32b78887e3f9a Author: Shapovalov Alexey AuthorDate: 2024-07-03 07:47:07 +0000 Commit: Gleb Popov CommitDate: 2024-08-17 20:44:39 +0000 comms/py-libusbsio: Python wrapper for the NXP libusbsio library Sponsored by: Serenity Cybersecurity, LLC Co-authored-by: Gleb Popov --- comms/Makefile | 1 + comms/py-libusbsio/Makefile | 29 ++++++++++++++++++++++ comms/py-libusbsio/distinfo | 3 +++ .../files/patch-libusbsio_libusbsio.py | 21 ++++++++++++++++ comms/py-libusbsio/pkg-descr | 8 ++++++ 5 files changed, 62 insertions(+) diff --git a/comms/Makefile b/comms/Makefile index 77a058606f96..52aeced5971d 100644 --- a/comms/Makefile +++ b/comms/Makefile @@ -136,6 +136,7 @@ SUBDIR += py-hidapi SUBDIR += py-libimobiledevice SUBDIR += py-libscrc + SUBDIR += py-libusbsio SUBDIR += py-pymodbus SUBDIR += py-pyserial SUBDIR += py-pyserial-asyncio diff --git a/comms/py-libusbsio/Makefile b/comms/py-libusbsio/Makefile new file mode 100644 index 000000000000..77ab7e3cda71 --- /dev/null +++ b/comms/py-libusbsio/Makefile @@ -0,0 +1,29 @@ +PORTNAME= libusbsio +PORTVERSION= 2.1.11 +CATEGORIES= comms python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= awoonyaa@gmail.com +COMMENT= Python wrapper for NXP libusbsio binary library +WWW= https://pypi.org/project/libusbsio/ + +LICENSE= BSD3CLAUSE + +BUILD_DEPENDS= ${PY_SETUPTOOLS} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} + +LIB_DEPENDS= libhidapi.so:comms/hidapi \ + libudev.so:devel/libudev-devd \ + libusbsio.so:comms/libusbsio + +USES= dos2unix python +USE_PYTHON= autoplist concurrent pep517 + +DOS2UNIX_FILES= libusbsio/*.py + +post-extract: + ${MKDIR} ${WRKSRC}/libusbsio/bin/${OPSYS:tl}_${ARCH} + ${LN} -s ${LOCALBASE}/lib/${PORTNAME}.so ${WRKSRC}/libusbsio/bin/${OPSYS:tl}_${ARCH}/libusbsio.so + +.include diff --git a/comms/py-libusbsio/distinfo b/comms/py-libusbsio/distinfo new file mode 100755 index 000000000000..723af044bfb2 --- /dev/null +++ b/comms/py-libusbsio/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1703160417 +SHA256 (libusbsio-2.1.11.tar.gz) = 7d2e81f4aedccbe8a3c327b002c7750dd374abdf1ef6d54780728e653af9124d +SIZE (libusbsio-2.1.11.tar.gz) = 259491 diff --git a/comms/py-libusbsio/files/patch-libusbsio_libusbsio.py b/comms/py-libusbsio/files/patch-libusbsio_libusbsio.py new file mode 100644 index 000000000000..6f02053c3179 --- /dev/null +++ b/comms/py-libusbsio/files/patch-libusbsio_libusbsio.py @@ -0,0 +1,21 @@ +https://github.com/monwarez/libusbsio/commit/6da5bec9ab40f1ea17bfb1812cacd6ffbd854d0c + +--- libusbsio/libusbsio.py.orig 2022-02-07 13:26:21 UTC ++++ libusbsio/libusbsio.py +@@ -261,6 +261,16 @@ class LIBUSBSIO(object): + else: + platf = LIBUSBSIO.P_LINUX32 + packing = 4 ++ elif platform.system().lower().startswith('fre'): ++ dllname = "libusbsio.so" ++ is_64bits = sys.maxsize > 2**32 ++ dfltdir = "freebsd_" + platform.machine() ++ if is_64bits: ++ platf = LIBUSBSIO.P_LINUX64 ++ packing = 8 ++ else: ++ platf = LIBUSBSIO.P_LINUX32 ++ packing = 4 + elif platform.system().lower().startswith('dar'): + dfltdir = "osx_" + platform.machine() + if platform.machine() == "arm64": diff --git a/comms/py-libusbsio/pkg-descr b/comms/py-libusbsio/pkg-descr new file mode 100755 index 000000000000..5915e65ddfdd --- /dev/null +++ b/comms/py-libusbsio/pkg-descr @@ -0,0 +1,8 @@ +Python wrapper for NXP libusbsio binary library + +The NXP libusbsio is a binary library for Win/Linux/MacOS systems +used to exercise SPI, I2C bus and GPIO pins over USBSIO interface of +NXP LPCLink2 and MCUlink Pro devices. + +This Python component provides a wrapper object which encapsulates the +binary library and exposes its API to Python applications.