git: 90fd691be027 - main - deskutils/normcap: New port: OCR powered screen-capture tool
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 Jan 2024 05:49:31 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=90fd691be027dd27b1409341da439048a3811cce commit 90fd691be027dd27b1409341da439048a3811cce Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2024-01-23 05:47:26 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2024-01-23 05:49:25 +0000 deskutils/normcap: New port: OCR powered screen-capture tool --- deskutils/Makefile | 1 + deskutils/normcap/Makefile | 32 ++++++++++++++++++++++ deskutils/normcap/distinfo | 3 ++ .../files/patch-normcap_screengrab_permissions.py | 31 +++++++++++++++++++++ deskutils/normcap/pkg-descr | 2 ++ 5 files changed, 69 insertions(+) diff --git a/deskutils/Makefile b/deskutils/Makefile index 7555404e366f..31be914985b6 100644 --- a/deskutils/Makefile +++ b/deskutils/Makefile @@ -190,6 +190,7 @@ SUBDIR += nanonote SUBDIR += nautilus-sendto SUBDIR += nextcloudclient + SUBDIR += normcap SUBDIR += note SUBDIR += notekit SUBDIR += notes diff --git a/deskutils/normcap/Makefile b/deskutils/normcap/Makefile new file mode 100644 index 000000000000..85e07682b781 --- /dev/null +++ b/deskutils/normcap/Makefile @@ -0,0 +1,32 @@ +PORTNAME= normcap +DISTVERSIONPREFIX= v +DISTVERSION= 0.5.4 +CATEGORIES= deskutils + +MAINTAINER= yuri@FreeBSD.org +COMMENT= OCR powered screen-capture tool +WWW= https://dynobo.github.io/normcap/ + +LICENSE= GPLv3 + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}Babel>=2.12.1:devel/py-babel@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}retry2>=0.9.5:devel/py-retry2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}rope>=1.7.0:devel/py-rope@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}shiboken6>=6.6.1:devel/shiboken6@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}toml>=0.10.2:textproc/py-toml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}types-retry>=0.9.9.4:devel/py-types-retry@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}types-toml>=0.10.8.1:devel/py-types-toml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.4.0:devel/py-typing-extensions@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}jeepney>=0.8.0:devel/py-jeepney@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyside6>0:devel/pyside6@${PY_FLAVOR} + +USES= python +USE_PYTHON= pep517 noflavors autoplist + +USE_GITHUB= yes +GH_ACCOUNT= dynobo + +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/deskutils/normcap/distinfo b/deskutils/normcap/distinfo new file mode 100644 index 000000000000..06eca95e63b6 --- /dev/null +++ b/deskutils/normcap/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1705913895 +SHA256 (dynobo-normcap-v0.5.4_GH0.tar.gz) = e483d1fa1c2612b48d812811400b4b64c1d7ed9d7edd3971a0fb121ce8fcae74 +SIZE (dynobo-normcap-v0.5.4_GH0.tar.gz) = 92856129 diff --git a/deskutils/normcap/files/patch-normcap_screengrab_permissions.py b/deskutils/normcap/files/patch-normcap_screengrab_permissions.py new file mode 100644 index 000000000000..8da592601bb7 --- /dev/null +++ b/deskutils/normcap/files/patch-normcap_screengrab_permissions.py @@ -0,0 +1,31 @@ +--- normcap/screengrab/permissions.py.orig 2024-01-22 09:18:58 UTC ++++ normcap/screengrab/permissions.py +@@ -225,9 +225,9 @@ def has_screenshot_permission() -> bool: + logger.debug("Checking screenshot permission") + if sys.platform == "darwin": + return _macos_has_screenshot_permission() +- if sys.platform == "linux" and not utils.is_wayland_display_manager(): ++ if (sys.platform == "linux" or sys.platform.startswith("freebsd")) and not utils.is_wayland_display_manager(): + return True +- if sys.platform == "linux" and utils.is_wayland_display_manager(): ++ if (sys.platform == "linux" or sys.platform.startswith("freebsd")) and utils.is_wayland_display_manager(): + return _dbus_portal_has_screenshot_permission() + if sys.platform == "win32": + return True +@@ -245,14 +245,14 @@ def request_screenshot_permission( + ) + return + +- if sys.platform == "linux" and not utils.is_wayland_display_manager(): ++ if (sys.platform == "linux" or sys.platform.startswith("freebsd")) and not utils.is_wayland_display_manager(): + logger.debug( + "Not necessary to request screenshot permission on Linux, if the " + "display manager is not Wayland. Skipping." + ) + return + +- if sys.platform == "linux" and utils.is_wayland_display_manager(): ++ if (sys.platform == "linux" or sys.platform.startswith("freebsd")) and utils.is_wayland_display_manager(): + logger.debug("Show request permission dialog.") + dbus_portal_show_request_permission_dialog( + title=dialog_title, text=linux_dialog_text diff --git a/deskutils/normcap/pkg-descr b/deskutils/normcap/pkg-descr new file mode 100644 index 000000000000..9da27278776b --- /dev/null +++ b/deskutils/normcap/pkg-descr @@ -0,0 +1,2 @@ +NormCap is an OCR powered screen-capture tool to capture information instead +of images.