View | Details | Raw Unified | Return to bug 278266 | Differences between
and this patch

Collapse All | Expand All

(-)b/comms/py-streamdeck/Makefile (+34 lines)
Added Link Here
1
PORTNAME=	streamdeck
2
DISTVERSION=	0.9.5
3
CATEGORIES=	comms python
4
MASTER_SITES=   PYPI
5
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
6
7
MAINTAINER=	tiago.gasiba@gmail.com
8
COMMENT=	Python library to control the Elgato Stream Deck
9
WWW=		https://github.com/abcminiuser/python-elgato-streamdeck
10
11
LICENSE=	MIT
12
LICENSE_COMB=	single
13
LICENSE_FILE=	${WRKSRC}/LICENSE
14
15
BUILD_DEPENDS=  \
16
    ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \
17
    ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
18
LIB_DEPENDS=    libhidapi.so:comms/hidapi
19
RUN_DEPENDS=    \
20
    ${PYTHON_PKGNAMEPREFIX}pillow>=8.1.1:graphics/py-pillow@${PY_FLAVOR}
21
22
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>=3.2.1:devel/py-pytest@${PY_FLAVOR}
23
24
USES=		python dos2unix
25
USE_PYTHON=	autoplist pep517
26
27
post-patch:
28
	${RM} ${WRKSRC}/src/StreamDeck/Transport/LibUSBHIDAPI.py.orig
29
30
TEST_WRKSRC= ${WRKSRC}/test
31
DO_MAKE_TEST=   ${SETENV} ${TEST_ENV} pytest-${PYTHON_VER}
32
TEST_TARGET=	test.py
33
34
.include <bsd.port.mk>
(-)b/comms/py-streamdeck/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1713635550
2
SHA256 (streamdeck-0.9.5.tar.gz) = 04796266b44577ae03f940f5c5ca69d87007e03d19eed89b6b02686c030ceb91
3
SIZE (streamdeck-0.9.5.tar.gz) = 2555109
(-)b/comms/py-streamdeck/files/patch-src_StreamDeck_Transport_LibUSBHIDAPI.py (+10 lines)
Added Link Here
1
--- src/StreamDeck/Transport/LibUSBHIDAPI.py.orig	2024-04-08 21:05:19 UTC
2
+++ src/StreamDeck/Transport/LibUSBHIDAPI.py
3
@@ -154,6 +154,7 @@ class LibUSBHIDAPI(Transport):
4
                 "Windows": ["hidapi.dll", "libhidapi-0.dll", "./hidapi.dll"],
5
                 "Linux": ["libhidapi-libusb.so", "libhidapi-libusb.so.0"],
6
                 "Darwin": ["libhidapi.dylib"],
7
+                "FreeBSD": ["libhidapi.so"],
8
             }
9
 
10
             self.platform_name = platform.system()
(-)b/comms/py-streamdeck/files/patch-test_test.py (+19 lines)
Added Link Here
1
--- test/test.py.orig	2024-04-20 20:51:55 UTC
2
+++ test/test.py
3
@@ -17,7 +17,16 @@ from PIL import ImageDraw
4
 from StreamDeck.DeviceManager import DeviceManager
5
 from StreamDeck.ImageHelpers import PILHelper
6
 from PIL import ImageDraw
7
+import pytest
8
 
9
+def initialize_decks():
10
+    manager = DeviceManager(transport="dummy")
11
+    streamdecks = manager.enumerate()
12
+    return streamdecks
13
+
14
+@pytest.fixture(params=initialize_decks())
15
+def deck(request):
16
+    return request.param
17
 
18
 def test_pil_helpers(deck):
19
     if not deck.is_visual():
(-)b/comms/py-streamdeck/pkg-descr (-1 / +4 lines)
Added Link Here
0
- 
1
This is an open source Python 3 library to control an Elgato Stream Deck
2
directly, without the official software. This can allow you to create your
3
own custom front-ends, such as a custom control front-end for home
4
automation software.

Return to bug 278266