From nobody Sat Apr 20 22:16:07 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 4VMQp01Q8Zz5JYR9; Sat, 20 Apr 2024 22:16:08 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VMQp00nMzz4fkb; Sat, 20 Apr 2024 22:16:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713651368; 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=1fyXzKBIwpUUaUhD6SfgUBvo79IA/wTWc5pxfimjrfI=; b=qgahkQRL5BvIqmWSW78FSwg9ipx/zC4uurF0dAk2xaMswC0IgZbwkpxu8hg2VO740N8Hcv VyOgLXoA8qP/bCq4+G3037HtzvgjrkJ/WNDbC5zB2/PNqQc/1WzdcLJpWn7iautMebleg7 TNGjZHzk8WtaXykYrXyyNZIdjqXy4CCTgjtLtETz4SK5bG4ci4+/harm3iiGJRSGP1CTD6 Mt7wTpub36/lX65F8kveMwDzru8NZvFkO1CdHRFTlbDYwwAcc6xVUIV4OnX9JnNZqXq6/J nzoWCf0gZTuiDxTqJCQLStmaHbMavL14DKNK6Susip8mggyVjJL9HEqVjuxlWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713651368; a=rsa-sha256; cv=none; b=pAt7Q5iGUwKlLbRZ6xE7hQym8sDE9rZqwYr/EcOGVligmQuWVqDs3SL2s5gPhcj2qFTM2S 2PklbSeHKmeZmpeAzxAbXHiY1ySdosp/MDUw16pmcFdxdAZTi2cgNWv3cVQF2LNn0XoT3Q a9n/NpoqOauN4FOuf6ylWpORmj5UbQfEJmtDOqrHZq3rMpXp1kD94UvN3pjCTfNOSLwM1B jfoBMkoAy9exEtBXeNqSaVkc1fgXrogR80z7CyC+i2VRbPPeVjqjYEx3LSlHJgsOzyA/39 7KaNutA5wcoffp8Kwzxf1logCf44qJwO+Xfw/NKQDKH5zHKCggCc90KqPwIQCw== 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=1713651368; 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=1fyXzKBIwpUUaUhD6SfgUBvo79IA/wTWc5pxfimjrfI=; b=JQoicOGQWsOYHFa5RR6j1dSeNsAlhzDQQqPSwbFVNQPvBNy9zmLdN0B8EpLWQolQ5T8OEZ jj+uz2dZmoSRlw/wJ2NCU7yAHLZ80HpLu+q5G7TkP24otFssVveWmgAi6Iq8XIi6j2FdsH 5bYyL0F6Z8wb+87qwEj1YJgV34t3cn72TxcYFb6W3hG+eMvkzxEWVzoGfTUykgRh8QrgV1 AkzN7o8eTSRDpM2qzAEgWo2scA5gr2XYmGs8WuiJLcBYtoJF1/x0tazA+iNDAgF4Jr5Irv /pIL7KCFOC1sDWBTBlqtvpgT/UbVimnIFOOiBfoGlfMqNbTeT4SnyJ6pVyAGAw== 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 4VMQp00H7tzvFk; Sat, 20 Apr 2024 22:16:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43KMG78T009582; Sat, 20 Apr 2024 22:16:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43KMG7Vs009580; Sat, 20 Apr 2024 22:16:07 GMT (envelope-from git) Date: Sat, 20 Apr 2024 22:16:07 GMT Message-Id: <202404202216.43KMG7Vs009580@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Nuno Teixeira Subject: git: e8c02a572f87 - main - comms/py-streamdeck: New port: Python library to control the Elgato Stream Deck 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: eduardo X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8c02a572f87a9118c02819c75c81bf30ec49c95 Auto-Submitted: auto-generated The branch main has been updated by eduardo: URL: https://cgit.FreeBSD.org/ports/commit/?id=e8c02a572f87a9118c02819c75c81bf30ec49c95 commit e8c02a572f87a9118c02819c75c81bf30ec49c95 Author: gatekeeper AuthorDate: 2024-04-20 22:04:04 +0000 Commit: Nuno Teixeira CommitDate: 2024-04-20 22:07:19 +0000 comms/py-streamdeck: New port: Python library to control the Elgato Stream Deck - Submitter becomes maintainer This is an open source Python 3 library to control an Elgato Stream Deck directly, without the official software. This can allow you to create your own custom front-ends, such as a custom control front-end for home automation software. WWW: https://github.com/abcminiuser/python-elgato-streamdeck PR: 278266 --- comms/Makefile | 1 + comms/py-streamdeck/Makefile | 30 ++++++++++++++++++++++ comms/py-streamdeck/distinfo | 3 +++ .../patch-src_StreamDeck_Transport_LibUSBHIDAPI.py | 10 ++++++++ comms/py-streamdeck/files/patch-test_test.py | 19 ++++++++++++++ comms/py-streamdeck/pkg-descr | 4 +++ 6 files changed, 67 insertions(+) diff --git a/comms/Makefile b/comms/Makefile index 0943d7376ae3..9121e4c18575 100644 --- a/comms/Makefile +++ b/comms/Makefile @@ -137,6 +137,7 @@ SUBDIR += py-pymodbus SUBDIR += py-pyserial SUBDIR += py-pyserial-asyncio + SUBDIR += py-streamdeck SUBDIR += py-xmodem SUBDIR += pyla SUBDIR += qico diff --git a/comms/py-streamdeck/Makefile b/comms/py-streamdeck/Makefile new file mode 100644 index 000000000000..c869c4328ba5 --- /dev/null +++ b/comms/py-streamdeck/Makefile @@ -0,0 +1,30 @@ +PORTNAME= streamdeck +DISTVERSION= 0.9.5 +CATEGORIES= comms python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= tiago.gasiba@gmail.com +COMMENT= Python library to control the Elgato Stream Deck +WWW= https://github.com/abcminiuser/python-elgato-streamdeck + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} +LIB_DEPENDS= libhidapi.so:comms/hidapi +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>=8.1.1:graphics/py-pillow@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=3.2.1:devel/py-pytest@${PY_FLAVOR} + +USES= dos2unix python +USE_PYTHON= autoplist pep517 + +post-patch: + ${RM} ${WRKSRC}/src/StreamDeck/Transport/LibUSBHIDAPI.py.orig + +TEST_WRKSRC= ${WRKSRC}/test +DO_MAKE_TEST= ${SETENV} ${TEST_ENV} pytest-${PYTHON_VER} +TEST_TARGET= test.py + +.include diff --git a/comms/py-streamdeck/distinfo b/comms/py-streamdeck/distinfo new file mode 100644 index 000000000000..fc82767c5ddd --- /dev/null +++ b/comms/py-streamdeck/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1713635550 +SHA256 (streamdeck-0.9.5.tar.gz) = 04796266b44577ae03f940f5c5ca69d87007e03d19eed89b6b02686c030ceb91 +SIZE (streamdeck-0.9.5.tar.gz) = 2555109 diff --git a/comms/py-streamdeck/files/patch-src_StreamDeck_Transport_LibUSBHIDAPI.py b/comms/py-streamdeck/files/patch-src_StreamDeck_Transport_LibUSBHIDAPI.py new file mode 100644 index 000000000000..5a4548b481c0 --- /dev/null +++ b/comms/py-streamdeck/files/patch-src_StreamDeck_Transport_LibUSBHIDAPI.py @@ -0,0 +1,10 @@ +--- src/StreamDeck/Transport/LibUSBHIDAPI.py.orig 2024-04-08 21:05:19 UTC ++++ src/StreamDeck/Transport/LibUSBHIDAPI.py +@@ -154,6 +154,7 @@ class LibUSBHIDAPI(Transport): + "Windows": ["hidapi.dll", "libhidapi-0.dll", "./hidapi.dll"], + "Linux": ["libhidapi-libusb.so", "libhidapi-libusb.so.0"], + "Darwin": ["libhidapi.dylib"], ++ "FreeBSD": ["libhidapi.so"], + } + + self.platform_name = platform.system() diff --git a/comms/py-streamdeck/files/patch-test_test.py b/comms/py-streamdeck/files/patch-test_test.py new file mode 100644 index 000000000000..5217afdb46a7 --- /dev/null +++ b/comms/py-streamdeck/files/patch-test_test.py @@ -0,0 +1,19 @@ +--- test/test.py.orig 2024-04-20 20:51:55 UTC ++++ test/test.py +@@ -17,7 +17,16 @@ from PIL import ImageDraw + from StreamDeck.DeviceManager import DeviceManager + from StreamDeck.ImageHelpers import PILHelper + from PIL import ImageDraw ++import pytest + ++def initialize_decks(): ++ manager = DeviceManager(transport="dummy") ++ streamdecks = manager.enumerate() ++ return streamdecks ++ ++@pytest.fixture(params=initialize_decks()) ++def deck(request): ++ return request.param + + def test_pil_helpers(deck): + if not deck.is_visual(): diff --git a/comms/py-streamdeck/pkg-descr b/comms/py-streamdeck/pkg-descr new file mode 100644 index 000000000000..1512a55320a3 --- /dev/null +++ b/comms/py-streamdeck/pkg-descr @@ -0,0 +1,4 @@ +This is an open source Python 3 library to control an Elgato Stream Deck +directly, without the official software. This can allow you to create your +own custom front-ends, such as a custom control front-end for home +automation software.