git: f1df0c77b9a6 - main - x11/py-pyautogui: Update to 0.9.54

From: Jose Alonso Cardenas Marquez <acm_at_FreeBSD.org>
Date: Sat, 05 Jul 2025 20:53:40 UTC
The branch main has been updated by acm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f1df0c77b9a6c9379a8bb20450de09cf65840c8e

commit f1df0c77b9a6c9379a8bb20450de09cf65840c8e
Author:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2025-07-05 20:53:08 +0000
Commit:     Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2025-07-05 20:53:29 +0000

    x11/py-pyautogui:  Update to 0.9.54
    
    - Improve FreeBSD support
---
 x11/py-pyautogui/Makefile                          |  7 ++--
 x11/py-pyautogui/distinfo                          |  6 ++--
 .../files/patch-pyautogui_____init____.py          | 40 ++++++++++++++++++++++
 3 files changed, 47 insertions(+), 6 deletions(-)

diff --git a/x11/py-pyautogui/Makefile b/x11/py-pyautogui/Makefile
index 8329e82f0b21..ec994a2535f6 100644
--- a/x11/py-pyautogui/Makefile
+++ b/x11/py-pyautogui/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	pyautogui
-DISTVERSION=	0.9.53
-PORTREVISION=	2
+DISTVERSION=	0.9.54
 CATEGORIES=	x11 python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -19,9 +18,11 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}python-xlib>0:x11-toolkits/py-python-xlib@${
 		${PYTHON_PKGNAMEPREFIX}pyscreeze>0:x11/py-pyscreeze@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}mouseinfo>0:x11/py-mouseinfo@${PY_FLAVOR}
 
-USES=		python
+USES=		python dos2unix
 USE_PYTHON=	distutils autoplist
 
 NO_ARCH=	yes
 
+DOS2UNIX_GLOB=	*.py
+
 .include <bsd.port.mk>
diff --git a/x11/py-pyautogui/distinfo b/x11/py-pyautogui/distinfo
index ef262012272a..4befb41ec0ab 100644
--- a/x11/py-pyautogui/distinfo
+++ b/x11/py-pyautogui/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1682517697
-SHA256 (PyAutoGUI-0.9.53.tar.gz) = d31de8f712218d90be7fc98091fce1a12a3e9196e0c814eb9afd73bb2ec97035
-SIZE (PyAutoGUI-0.9.53.tar.gz) = 59031
+TIMESTAMP = 1751744669
+SHA256 (PyAutoGUI-0.9.54.tar.gz) = dd1d29e8fd118941cb193f74df57e5c6ff8e9253b99c7b04f39cfc69f3ae04b2
+SIZE (PyAutoGUI-0.9.54.tar.gz) = 61236
diff --git a/x11/py-pyautogui/files/patch-pyautogui_____init____.py b/x11/py-pyautogui/files/patch-pyautogui_____init____.py
new file mode 100644
index 000000000000..451541f36524
--- /dev/null
+++ b/x11/py-pyautogui/files/patch-pyautogui_____init____.py
@@ -0,0 +1,40 @@
+--- pyautogui/__init__.py.orig	2025-07-05 19:46:17 UTC
++++ pyautogui/__init__.py
+@@ -540,7 +540,7 @@ elif sys.platform == "win32":
+     from . import _pyautogui_osx as platformModule
+ elif sys.platform == "win32":
+     from . import _pyautogui_win as platformModule
+-elif platform.system() == "Linux":
++elif platform.system() == "Linux" or platform.system() == "FreeBSD":
+     from . import _pyautogui_x11 as platformModule
+ else:
+     raise NotImplementedError("Your platform (%s) is not supported by PyAutoGUI." % (platform.system()))
+@@ -848,8 +848,8 @@ def _normalizeButton(button):
+ 
+     # Check that `button` has a valid value:
+     button = button.lower()
+-    if platform.system() == "Linux":
+-        # Check for valid button arg on Linux:
++    if platform.system() == "Linux" or platform.system() == "FreeBSD":
++        # Check for valid button arg on FreeBSD/Linux:
+         if button not in (LEFT, MIDDLE, RIGHT, PRIMARY, SECONDARY, 1, 2, 3, 4, 5, 6, 7):
+             raise PyAutoGUIException(
+                 "button argument must be one of ('left', 'middle', 'right', 'primary', 'secondary', 1, 2, 3, 4, 5, 6, 7)"
+@@ -1125,7 +1125,7 @@ def doubleClick(x=None, y=None, interval=0.0, button=L
+         platformModule._multiClick(x, y, button, 2)
+         _logScreenshot(logScreenshot, 'click', '%s,%s,%s,2' % (x, y, button), folder='.')
+     else:
+-        # Click for Windows or Linux:
++        # Click for Windows, FreeBSD or Linux:
+         click(x, y, 2, interval, button, duration, tween, logScreenshot, _pause=False)
+ 
+ 
+@@ -1167,7 +1167,7 @@ def tripleClick(x=None, y=None, interval=0.0, button=L
+         _logScreenshot(logScreenshot, "click", "%s,%s,%s,3" % (x, y, button), folder=".")
+         platformModule._multiClick(x, y, button, 3)
+     else:
+-        # Click for Windows or Linux:
++        # Click for Windows, FreeBSD or Linux:
+         click(x, y, 3, interval, button, duration, tween, logScreenshot, _pause=False)
+ 
+