SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,32 @@
COMMENT = filesystem events monitoring
MODPY_EGG_VERSION = 0.9.6
DISTNAME = pyinotify-${MODPY_EGG_VERSION}
PKGNAME = py-${DISTNAME}
REVISION = 8
CATEGORIES = devel
HOMEPAGE = https://github.com/seb-m/pyinotify
# MIT
PERMIT_PACKAGE = Yes
# dlopen()ed
WANTLIB = lib/inotify/inotify
LIB_DEPENDS = devel/libinotify
MAKE_ENV = LIBRARY_PATH="${LOCALBASE}/lib/inotify:${LOCALBASE}/lib" \
LD_LIBRARY_PATH="${LOCALBASE}/lib/inotify:${LOCALBASE}/lib"
MODULES = lang/python
MODPY_PI = Yes
MODPY_PYBUILD = setuptools
FLAVORS = python3
FLAVOR = python3
pre-configure:
${SUBST_CMD} ${WRKSRC}/setup.py ${WRKSRC}/python*/pyinotify.py
.include <bsd.port.mk>

View file

@ -0,0 +1,2 @@
SHA256 (pyinotify-0.9.6.tar.gz) = nJmKXXYGyoNQZc2rwBOubGbrnqdqAKHjvG4M/itPcfQ=
SIZE (pyinotify-0.9.6.tar.gz) = 60998

View file

@ -0,0 +1,17 @@
https://github.com/seb-m/pyinotify/pull/153
Index: python3/pyinotify.py
--- python3/pyinotify.py.orig
+++ python3/pyinotify.py
@@ -211,6 +211,11 @@ class _CtypesLibcINotifyWrapper(INotifyWrapper):
except (OSError, IOError):
pass # Will attemp to load it with None anyway.
+ # Special handling for OpenBSD where the library is
+ # installed in a subdirectory.
+ if sys.platform.startswith('openbsd'):
+ libc_name = '${LOCALBASE}/lib/inotify/libinotify.so'
+
self._libc = ctypes.CDLL(libc_name, use_errno=True)
self._get_errno_func = ctypes.get_errno

View file

@ -0,0 +1,24 @@
https://github.com/seb-m/pyinotify/pull/153
Index: setup.py
--- setup.py.orig
+++ setup.py
@@ -25,7 +25,8 @@ if sys.version_info < (2, 4):
sys.exit(1)
# check linux platform
-if not platform.startswith('linux') and not platform.startswith('freebsd'):
+if not platform.startswith('linux') and not platform.startswith('freebsd') and \
+ not platform.startswith('openbsd'):
sys.stderr.write("inotify is not available on %s\n" % platform)
sys.exit(1)
@@ -71,7 +72,7 @@ def should_compile_ext_mod():
return True
try_libc_name = 'c'
- if platform.startswith('freebsd'):
+ if platform.startswith('freebsd') or platform.startswith('openbsd'):
try_libc_name = 'inotify'
libc_name = None

View file

@ -0,0 +1,2 @@
inotify functionality allows you to register one or more directories for
watching, and to simply block and wait for notification events.

View file

@ -0,0 +1,11 @@
@pkgpath devel/py-pyinotify
lib/python${MODPY_VERSION}/site-packages/${MODPY_PYCACHE}/
lib/python${MODPY_VERSION}/site-packages/${MODPY_PYCACHE}pyinotify.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
lib/python${MODPY_VERSION}/site-packages/${MODPY_PYCACHE}pyinotify.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/pyinotify-${MODPY_EGG_VERSION}.dist-info/
lib/python${MODPY_VERSION}/site-packages/pyinotify-${MODPY_EGG_VERSION}.dist-info/COPYING
lib/python${MODPY_VERSION}/site-packages/pyinotify-${MODPY_EGG_VERSION}.dist-info/METADATA
lib/python${MODPY_VERSION}/site-packages/pyinotify-${MODPY_EGG_VERSION}.dist-info/RECORD
lib/python${MODPY_VERSION}/site-packages/pyinotify-${MODPY_EGG_VERSION}.dist-info/WHEEL
lib/python${MODPY_VERSION}/site-packages/pyinotify-${MODPY_EGG_VERSION}.dist-info/top_level.txt
lib/python${MODPY_VERSION}/site-packages/pyinotify.py