diff --git a/comms/Makefile b/comms/Makefile index 0943d7376ae3..9121e4c18575 100644 --- a/comms/Makefile +++ b/comms/Makefile @@ -1,221 +1,222 @@ COMMENT = Communication utilities SUBDIR += acfax SUBDIR += airspy SUBDIR += airspyhf SUBDIR += aldo SUBDIR += amtterm SUBDIR += anyremote SUBDIR += apitran SUBDIR += aprsd SUBDIR += atslog SUBDIR += bfhist SUBDIR += bforce-kst SUBDIR += birda SUBDIR += bladerf SUBDIR += bluegps SUBDIR += bluez-firmware SUBDIR += bpl+ SUBDIR += chirp SUBDIR += chu SUBDIR += concordance SUBDIR += conserver-com SUBDIR += cqrlog SUBDIR += cubicsdr SUBDIR += cutecom SUBDIR += cwdaemon SUBDIR += cwstudio SUBDIR += cyclonedds SUBDIR += dcf77pi SUBDIR += deforaos-phone SUBDIR += dfu-programmer SUBDIR += dfu-util SUBDIR += digiham SUBDIR += direwolf SUBDIR += dsd SUBDIR += dump1090 SUBDIR += ebook2cw SUBDIR += ebusd SUBDIR += echolinux SUBDIR += ems-flasher SUBDIR += fl_moxgen SUBDIR += flamp SUBDIR += flcluster SUBDIR += fldigi SUBDIR += fllog SUBDIR += flmsg SUBDIR += flrig SUBDIR += flwrap SUBDIR += freedv SUBDIR += gammu SUBDIR += gkermit SUBDIR += gnocky SUBDIR += gnokii SUBDIR += gnuradio SUBDIR += gpredict SUBDIR += gqrx SUBDIR += gr-osmosdr SUBDIR += grig SUBDIR += gstreamer1-plugins-spandsp SUBDIR += gtkmmorse SUBDIR += hackrf SUBDIR += hackrf-devel SUBDIR += hamlib SUBDIR += hcidump SUBDIR += hidapi SUBDIR += ibp SUBDIR += iceoryx SUBDIR += inspectrum SUBDIR += iwmbt-firmware SUBDIR += java-simple-serial-connector SUBDIR += kermit SUBDIR += klog SUBDIR += libconcord SUBDIR += libdc SUBDIR += libfap SUBDIR += libfec SUBDIR += libimobiledevice SUBDIR += libirman SUBDIR += libmodbus SUBDIR += librs232 SUBDIR += libsdr SUBDIR += libsdr-gui SUBDIR += libticables2 SUBDIR += libticalcs2 SUBDIR += libusbmuxd SUBDIR += limesuite SUBDIR += linrad SUBDIR += liquid-dsp SUBDIR += lirc SUBDIR += locator SUBDIR += lrzsz SUBDIR += lysdr SUBDIR += mbelib SUBDIR += mgetty+sendfax SUBDIR += minicom SUBDIR += morse SUBDIR += multimon-ng SUBDIR += nanovna-saver SUBDIR += nasawash SUBDIR += nec2c SUBDIR += nmealib SUBDIR += obexapp SUBDIR += opencbm SUBDIR += opencbm-kmod SUBDIR += opencbm-plugin-xa1541 SUBDIR += openobex SUBDIR += openzwave SUBDIR += owfs SUBDIR += p5-Cisco-UCS SUBDIR += p5-Device-Gsm SUBDIR += p5-Device-Modem SUBDIR += p5-Device-SerialPort SUBDIR += p5-Fax-Hylafax-Client SUBDIR += p5-Nexmo-SMS SUBDIR += p5-SMS-SMS77 SUBDIR += p5-SMS-Send SUBDIR += p5-SMS-Send-DeviceGsm SUBDIR += p5-SMS-Send-NexmoUnicode SUBDIR += p5-SMS-Send-TW-HiAir SUBDIR += p5-SMS-Send-TW-PChome SUBDIR += p5-SMS-Send-TW-Socket2Air SUBDIR += p5-SMS-Send-TW-chtsns SUBDIR += p5-SMS-Send-TW-emome SUBDIR += pear-Horde_ActiveSync SUBDIR += pear-Horde_SyncMl SUBDIR += picocom SUBDIR += pr SUBDIR += predict SUBDIR += py-adafruit-ampy SUBDIR += py-elelabs-zigbee-ezsp-utility SUBDIR += py-esptool SUBDIR += py-fritzconnection SUBDIR += py-hid SUBDIR += py-hidapi SUBDIR += py-libimobiledevice SUBDIR += py-libscrc SUBDIR += py-pymodbus SUBDIR += py-pyserial SUBDIR += py-pyserial-asyncio + SUBDIR += py-streamdeck SUBDIR += py-xmodem SUBDIR += pyla SUBDIR += qico SUBDIR += qpage SUBDIR += qrq SUBDIR += qsstv SUBDIR += qt5-connectivity SUBDIR += qt5-sensors SUBDIR += qt5-serialbus SUBDIR += qt5-serialport SUBDIR += qt6-connectivity SUBDIR += qt6-sensors SUBDIR += qt6-serialbus SUBDIR += qt6-serialport SUBDIR += qtel SUBDIR += quisk SUBDIR += redsea SUBDIR += remserial SUBDIR += rtl-433 SUBDIR += rtl-sdr SUBDIR += rubygem-callsign SUBDIR += rubygem-ruby-termios SUBDIR += rubygem-serialport SUBDIR += rxtx SUBDIR += scmxx SUBDIR += scrcpy SUBDIR += sdr++ SUBDIR += ser2net SUBDIR += serialoverip SUBDIR += sigdigger SUBDIR += sigutils SUBDIR += smstools3 SUBDIR += snap7 SUBDIR += soapyairspy SUBDIR += soapybladerf SUBDIR += soapyplutosdr SUBDIR += soapyredpitaya SUBDIR += soapyremote SUBDIR += soapysdr-rtlsdr SUBDIR += soapysdrhackrf SUBDIR += soapyuhd SUBDIR += spandsp SUBDIR += splat SUBDIR += sredird SUBDIR += sunxi-tools SUBDIR += suscan SUBDIR += suwidgets SUBDIR += svxlink SUBDIR += syncterm SUBDIR += tcpser SUBDIR += thebridge SUBDIR += tilp2 SUBDIR += tio SUBDIR += tits SUBDIR += tkscanfax SUBDIR += tlf SUBDIR += trustedqsl SUBDIR += twpsk SUBDIR += uarduno SUBDIR += uhd SUBDIR += uird SUBDIR += ujprog SUBDIR += unixcw SUBDIR += usbmuxd SUBDIR += viewfax SUBDIR += vrflash SUBDIR += wsjtx SUBDIR += wsjtz SUBDIR += wwl SUBDIR += wy60 SUBDIR += xastir SUBDIR += xcwcp SUBDIR += xdemorse SUBDIR += xdx SUBDIR += xlog SUBDIR += xmorse SUBDIR += xnec2c SUBDIR += xnecview SUBDIR += yagiuda SUBDIR += yfklog .include 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.