diff options
Diffstat (limited to 'x11/py-pyscreeze')
-rw-r--r-- | x11/py-pyscreeze/Makefile | 4 | ||||
-rw-r--r-- | x11/py-pyscreeze/distinfo | 6 | ||||
-rw-r--r-- | x11/py-pyscreeze/files/patch-pyscreeze_____init____.py | 52 |
3 files changed, 56 insertions, 6 deletions
diff --git a/x11/py-pyscreeze/Makefile b/x11/py-pyscreeze/Makefile index 799c74f467ce..55004a3a918b 100644 --- a/x11/py-pyscreeze/Makefile +++ b/x11/py-pyscreeze/Makefile @@ -1,10 +1,8 @@ PORTNAME= pyscreeze -DISTVERSION= 0.1.28 -PORTREVISION= 1 +DISTVERSION= 1.0.1 CATEGORIES= x11 python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -DISTNAME= PyScreeze-${DISTVERSION} MAINTAINER= acm@FreeBSD.org COMMENT= cross-platform screenshot module for python diff --git a/x11/py-pyscreeze/distinfo b/x11/py-pyscreeze/distinfo index 42a1959fc685..f153f14d5a29 100644 --- a/x11/py-pyscreeze/distinfo +++ b/x11/py-pyscreeze/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1682524999 -SHA256 (PyScreeze-0.1.28.tar.gz) = 4428600ed19b30cd3f4b5d83767d198fc1dbae7439eecf9bd795445c009b67ae -SIZE (PyScreeze-0.1.28.tar.gz) = 25547 +TIMESTAMP = 1751745551 +SHA256 (pyscreeze-1.0.1.tar.gz) = cf1662710f1b46aa5ff229ee23f367da9e20af4a78e6e365bee973cad0ead4be +SIZE (pyscreeze-1.0.1.tar.gz) = 27826 diff --git a/x11/py-pyscreeze/files/patch-pyscreeze_____init____.py b/x11/py-pyscreeze/files/patch-pyscreeze_____init____.py new file mode 100644 index 000000000000..0c981964cf72 --- /dev/null +++ b/x11/py-pyscreeze/files/patch-pyscreeze_____init____.py @@ -0,0 +1,52 @@ +--- pyscreeze/__init__.py.orig 2025-07-05 20:35:11 UTC ++++ pyscreeze/__init__.py +@@ -64,7 +64,7 @@ try: + + GNOMESCREENSHOT_EXISTS = False + try: +- if sys.platform.startswith('linux'): ++ if sys.platform.startswith('linux') or sys.platform.startswith('freebsd'): + whichProc = subprocess.Popen(['which', 'gnome-screenshot'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + GNOMESCREENSHOT_EXISTS = whichProc.wait() == 0 + except OSError as ex: +@@ -77,7 +77,7 @@ try: + + SCROT_EXISTS = False + try: +- if sys.platform.startswith('linux'): ++ if sys.platform.startswith('linux') or sys.platform.startswith('freebsd'): + whichProc = subprocess.Popen(['which', 'scrot'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + SCROT_EXISTS = whichProc.wait() == 0 + except OSError as ex: +@@ -89,7 +89,7 @@ except OSError as ex: + raise + + # On Linux, figure out which window system is being used. +-if sys.platform.startswith('linux'): ++if sys.platform.startswith('linux') or sys.platform.startswith('freebsd'): + RUNNING_X11 = False + RUNNING_WAYLAND = False + if os.environ.get('XDG_SESSION_TYPE') == 'x11': +@@ -622,11 +622,11 @@ def _screenshot_linux(imageFilename=None, region=None) + subprocess.call(['gnome-screenshot', '-f', tmpFilename]) + elif RUNNING_WAYLAND and SCROT_EXISTS and not GNOMESCREENSHOT_EXISTS: + raise PyScreezeException( +- 'Your computer uses the Wayland window system. Scrot works on the X11 window system but not Wayland. You must install gnome-screenshot by running `sudo apt install gnome-screenshot`' # noqa ++ 'Your computer uses the Wayland window system. Scrot works on the X11 window system but not Wayland. You must install gnome-screenshot' # noqa + ) + else: + raise Exception( +- 'To take screenshots, you must install Pillow version 9.2.0 or greater and gnome-screenshot by running `sudo apt install gnome-screenshot`' # noqa ++ 'To take screenshots, you must install Pillow version 9.2.0 or greater and gnome-screenshot' # noqa + ) + + im = Image.open(tmpFilename) +@@ -772,7 +772,7 @@ elif sys.platform == 'win32': + screenshot = _screenshot_osx + elif sys.platform == 'win32': + screenshot = _screenshot_win32 +-elif sys.platform.startswith('linux'): ++elif sys.platform.startswith('linux') or sys.platform.startswith('freebsd'): + # Everything else is considered to be Linux. + screenshot = _screenshot_linux + else: |