This adds a recipe for pyfanotify - a python wrapper around linux'
fanotify interface.

Signed-off-by: Bartosz Golaszewski <[email protected]>
---
- fixed build with musl

 .../packagegroups/packagegroup-meta-python.bb |  1 +
 ...-FNM_EXTMATCH-if-not-already-defined.patch | 31 +++++++++++++++++++
 .../python/python3-pyfanotify_0.1.3.bb        | 18 +++++++++++
 3 files changed, 50 insertions(+)
 create mode 100644 
meta-python/recipes-devtools/python/python3-pyfanotify/0001-ext-define-FNM_EXTMATCH-if-not-already-defined.patch
 create mode 100644 
meta-python/recipes-devtools/python/python3-pyfanotify_0.1.3.bb

diff --git a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb 
b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
index f7bf36519..d2d9dcd18 100644
--- a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
+++ b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
@@ -300,6 +300,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
     python3-pydicti \
     python3-pyephem \
     python3-pyexpect \
+    python3-pyfanotify \
     python3-pyfirmata \
     python3-pyflakes \
     python3-pyhamcrest \
diff --git 
a/meta-python/recipes-devtools/python/python3-pyfanotify/0001-ext-define-FNM_EXTMATCH-if-not-already-defined.patch
 
b/meta-python/recipes-devtools/python/python3-pyfanotify/0001-ext-define-FNM_EXTMATCH-if-not-already-defined.patch
new file mode 100644
index 000000000..933e08626
--- /dev/null
+++ 
b/meta-python/recipes-devtools/python/python3-pyfanotify/0001-ext-define-FNM_EXTMATCH-if-not-already-defined.patch
@@ -0,0 +1,31 @@
+From 9e7894b97ae7afe43a9901b774de5aef401549ac Mon Sep 17 00:00:00 2001
+From: Bartosz Golaszewski <[email protected]>
+Date: Thu, 28 Apr 2022 16:32:06 +0200
+Subject: [PATCH] ext: define FNM_EXTMATCH if not already defined
+
+On musl this constant is not defined. Define it locally if not present.
+
+Signed-off-by: Bartosz Golaszewski <[email protected]>
+---
+Upstream-Status: Inappropriate
+
+ src/ext.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/ext.c b/src/ext.c
+index 2ba9a14..98ffc20 100644
+--- a/src/ext.c
++++ b/src/ext.c
+@@ -18,6 +18,9 @@
+ #include <sys/un.h>
+ #include <unistd.h>
+ 
++#ifndef FNM_EXTMATCH
++#define FNM_EXTMATCH 0
++#endif
+ 
+ PyDoc_STRVAR(ext__doc__,
+ "Wrapper for fanotify.\n"
+-- 
+2.32.0
+
diff --git a/meta-python/recipes-devtools/python/python3-pyfanotify_0.1.3.bb 
b/meta-python/recipes-devtools/python/python3-pyfanotify_0.1.3.bb
new file mode 100644
index 000000000..a7c8f958e
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pyfanotify_0.1.3.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Python wrapper for Linux fanotify."
+HOMEPAGE = "https://github.com/baskiton/pyfanotify";
+AUTHOR = "Alexander Baskikh"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=636a36c9df04efcfacf839b8866d9a37"
+
+SRC_URI += "file://0001-ext-define-FNM_EXTMATCH-if-not-already-defined.patch"
+SRC_URI[sha256sum] = 
"0efa73922fd705b4e8f8f0b51cb88198ceef66cc309e1de21674ef44c879029d"
+
+inherit pypi setuptools3
+
+RDEPENDS:${PN} += " \
+    python3-crypt \
+    python3-datetime \
+    python3-logging \
+    python3-multiprocessing \
+"
-- 
2.32.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#96846): 
https://lists.openembedded.org/g/openembedded-devel/message/96846
Mute This Topic: https://lists.openembedded.org/mt/90760162/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to