Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: geis-2.2.17_9: ModuleNotFoundError: No module named 'geis'
Date: Mon, 15 Nov 2021 16:35:45 +0100	[thread overview]
Message-ID: <20211115153545.Z-2H-kodA-syRxRHv1sVmMDJndYTHGTCl8Lns8sWBVo@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-34080@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 10331 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/issues/34080#issuecomment-969031401

Comment:
Maybe something like this, I don't know how to test.
```diff
 ...er-and-return-type-sizes-for-64-bit-syste.patch | 134 +++++++++++++++++++++
 srcpkgs/geis/patches/gir-import.patch              |  65 ++++++++++
 srcpkgs/geis/template                              |   6 +-
 3 files changed, 204 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/geis/patches/0001-Add-parameter-and-return-type-sizes-for-64-bit-syste.patch b/srcpkgs/geis/patches/0001-Add-parameter-and-return-type-sizes-for-64-bit-syste.patch
new file mode 100644
index 0000000000..f8cbd74e7a
--- /dev/null
+++ b/srcpkgs/geis/patches/0001-Add-parameter-and-return-type-sizes-for-64-bit-syste.patch
@@ -0,0 +1,134 @@
+From fb93de8120eafbe47e37038fbcdfb1232e8daee0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bernhard=20=C3=9Cbelacker?= <bernhardu@mailbox.org>
+Date: Wed, 8 May 2019 05:19:11 +0200
+Subject: [PATCH] Add parameter and return type sizes for 64 bit systems.
+
+https://bugs.debian.org/855124
+---
+ python/geis/geis_v2.py | 39 ++++++++++++++++++++++++++++++++-------
+ 1 file changed, 32 insertions(+), 7 deletions(-)
+
+diff --git a/python/geis/geis_v2.py b/python/geis/geis_v2.py
+index edd8063..793355f 100644
+--- a/python/geis/geis_v2.py
++++ b/python/geis/geis_v2.py
+@@ -62,24 +62,40 @@ try:
+     _geis_new.errcheck = _check_null
+     _geis_delete = _geis_lib.geis_delete
+     _geis_get_configuration = _geis_lib.geis_get_configuration
++    _geis_get_configuration.argtypes = [ ctypes.c_void_p, ctypes.c_char_p ]
+     _geis_dispatch_events = _geis_lib.geis_dispatch_events
++    _geis_dispatch_events.argtypes = [ ctypes.c_void_p ]
+     _geis_register_class_callback = _geis_lib.geis_register_class_callback
+     _geis_register_device_callback = _geis_lib.geis_register_device_callback
+     _geis_register_event_callback = _geis_lib.geis_register_event_callback
+     _geis_next_event = _geis_lib.geis_next_event
++    _geis_next_event.argtypes = [ ctypes.c_void_p, ctypes.c_void_p ]
+ 
+     _geis_subscription_new = _geis_lib.geis_subscription_new
+     _geis_subscription_new.restype = ctypes.c_void_p
++    _geis_subscription_new.argtypes = [ ctypes.c_void_p, ctypes.c_char_p, ctypes.c_int ]
+     _geis_subscription_new.errcheck = _check_null
+     _geis_subscription_delete = _geis_lib.geis_subscription_delete
+     _geis_subscription_activate = _geis_lib.geis_subscription_activate
++    _geis_subscription_activate.argtypes = [ ctypes.c_void_p ]
+     _geis_subscription_deactivate = _geis_lib.geis_subscription_deactivate
+     _geis_subscription_name = _geis_lib.geis_subscription_name
++    _geis_subscription_add_filter = _geis_lib.geis_subscription_add_filter
++    _geis_subscription_add_filter.argtypes = [ ctypes.c_void_p, ctypes.c_void_p ]
+ 
+     _geis_attr_name = _geis_lib.geis_attr_name
+     _geis_attr_name.restype = ctypes.c_char_p
++    _geis_attr_name.argtypes = [ ctypes.c_void_p ]
+     _geis_attr_type = _geis_lib.geis_attr_type
++    _geis_attr_type.argtypes = [ ctypes.c_void_p ]
+     _geis_attr_value_to_pointer = _geis_lib.geis_attr_value_to_pointer
++    _geis_attr_value_to_pointer.restype = ctypes.c_void_p
++    _geis_attr_value_to_pointer.argtypes = [ ctypes.c_void_p ]
++    _geis_attr_value_to_string = _geis_lib.geis_attr_value_to_string
++    _geis_attr_value_to_string.restype = ctypes.c_char_p
++    _geis_attr_value_to_string.argtypes = [ ctypes.c_void_p ]
++    _geis_attr_value_to_integer = _geis_lib.geis_attr_value_to_integer
++    _geis_attr_value_to_integer.argtypes = [ ctypes.c_void_p ]
+ 
+     _geis_event_type = _geis_lib.geis_event_type
+     _geis_event_attr_count = _geis_lib.geis_event_attr_count
+@@ -89,10 +105,14 @@ try:
+     _geis_gesture_class_unref = _geis_lib.geis_gesture_class_unref
+     _geis_gesture_class_name = _geis_lib.geis_gesture_class_name
+     _geis_gesture_class_name.restype = ctypes.c_char_p
++    _geis_gesture_class_name.argtypes = [ ctypes.c_void_p ]
+     _geis_gesture_class_id = _geis_lib.geis_gesture_class_id
++    _geis_gesture_class_id.argtypes = [ ctypes.c_void_p ]
+     _geis_gesture_class_attr_count = _geis_lib.geis_gesture_class_attr_count
++    _geis_gesture_class_attr_count.argtypes = [ ctypes.c_void_p ]
+     _geis_gesture_class_attr = _geis_lib.geis_gesture_class_attr
+     _geis_gesture_class_attr.restype = ctypes.c_void_p
++    _geis_gesture_class_attr.argtypes = [ ctypes.c_void_p ]
+ 
+     _geis_device_ref = _geis_lib.geis_device_ref
+     _geis_device_unref = _geis_lib.geis_device_unref
+@@ -125,6 +145,13 @@ try:
+     _geis_frame_is_class = _geis_lib.geis_frame_is_class
+     _geis_frame_touchid_count = _geis_lib.geis_frame_touchid_count
+     _geis_frame_touchid = _geis_lib.geis_frame_touchid
++    
++    _geis_filter_new = _geis_lib.geis_filter_new
++    _geis_filter_new.restype = ctypes.c_void_p
++    _geis_filter_new.argtypes = [ ctypes.c_void_p, ctypes.c_char_p ]
++    _geis_filter_add_term = _geis_lib.geis_filter_add_term
++    _geis_filter_add_term.argtypes = [ ctypes.c_void_p, ctypes.c_int ]
++    
+ 
+ except AttributeError as ex:
+     print(ex)
+@@ -399,7 +426,7 @@ def _attr_type_float(attr):
+ def _attr_type_integer(attr):
+     """ Extracts an attribute value as a integer.
+     """
+-    return _geis_lib.geis_attr_value_to_integer(attr)
++    return _geis_attr_value_to_integer(attr)
+ 
+ 
+ def _attr_type_pointer(attr):
+@@ -412,9 +439,7 @@ def _attr_type_pointer(attr):
+ def _attr_type_string(attr):
+     """ Extracts an attribute value as a string.
+     """
+-    geis_attr_value_to_string = _geis_lib.geis_attr_value_to_string
+-    geis_attr_value_to_string.restype = ctypes.c_char_p
+-    return geis_attr_value_to_string(attr)
++    return _geis_attr_value_to_string(attr)
+ 
+ 
+ def _attr_type_unknown(attr):
+@@ -568,7 +593,7 @@ class Filter(object):
+     """
+ 
+     def __init__(self, geis, name):
+-        self._filter  = _geis_lib.geis_filter_new(geis, name.encode('utf-8'))
++        self._filter  = _geis_filter_new(geis, name.encode('utf-8'))
+ 
+     def __del__(self):
+         _geis_lib.geis_filter_delete(self._filter)
+@@ -592,7 +617,7 @@ class Filter(object):
+             if len(term) != 3:
+                 raise ValueError('invalid filter term')
+             name, op, value = term
+-            _geis_lib.geis_filter_add_term(self._filter, facility,
++            _geis_filter_add_term(self._filter, facility,
+                                            name.encode('utf-8'), op, value, 0)
+ 
+ 
+@@ -643,7 +668,7 @@ class Subscription(object):
+         # keep a reference to the filter for Python doesn't garbage collect it
+         if filt not in self._filters:
+             self._filters.append(filt)
+-        _geis_lib.geis_subscription_add_filter(self._sub, filt)
++        _geis_subscription_add_filter(self._sub, filt)
+ 
+     def remove_filter(self, filt):
+         """ Removes a filter from the subscription.
+-- 
+2.11.0
+
diff --git a/srcpkgs/geis/patches/gir-import.patch b/srcpkgs/geis/patches/gir-import.patch
new file mode 100644
index 0000000000..049cf2a927
--- /dev/null
+++ b/srcpkgs/geis/patches/gir-import.patch
@@ -0,0 +1,65 @@
+Index: geis-2.2.17/python/pygeis
+===================================================================
+--- geis-2.2.17.orig/python/pygeis
++++ geis-2.2.17/python/pygeis
+@@ -21,6 +21,8 @@
+ 
+ import argparse
+ import geis
++import gi
++gi.require_version("Gtk", "3.0")
+ from gi.repository import GLib
+ import sys
+ 
+Index: geis-2.2.17/tools/geisview/classview.py
+===================================================================
+--- geis-2.2.17.orig/tools/geisview/classview.py
++++ geis-2.2.17/tools/geisview/classview.py
+@@ -19,6 +19,8 @@
+ 
+ 
+ 
++import gi
++gi.require_version("Gtk", "3.0")
+ from gi.repository import Gtk
+ 
+ class GestureClassView(Gtk.Window):
+Index: geis-2.2.17/tools/geisview/deviceview.py
+===================================================================
+--- geis-2.2.17.orig/tools/geisview/deviceview.py
++++ geis-2.2.17/tools/geisview/deviceview.py
+@@ -19,6 +19,8 @@
+ 
+ 
+ 
++import gi
++gi.require_version("Gtk", "3.0")
+ from gi.repository import Gtk
+ 
+ class DeviceView(Gtk.Window):
+Index: geis-2.2.17/tools/geisview/filter_definition.py
+===================================================================
+--- geis-2.2.17.orig/tools/geisview/filter_definition.py
++++ geis-2.2.17/tools/geisview/filter_definition.py
+@@ -22,6 +22,8 @@
+ import geis
+ import geisview.defaults
+ import os
++import gi
++gi.require_version("Gtk", "3.0")
+ from gi.repository import Gtk
+ 
+ # A list of filter facilities to choose from
+Index: geis-2.2.17/tools/geisview/filter_list.py
+===================================================================
+--- geis-2.2.17.orig/tools/geisview/filter_list.py
++++ geis-2.2.17/tools/geisview/filter_list.py
+@@ -22,6 +22,8 @@
+ import geisview.defaults
+ import geisview.filter_definition
+ import os
++import gi
++gi.require_version("Gtk", "3.0")
+ from gi.repository import Gtk
+ 
+ class FilterList(object):
diff --git a/srcpkgs/geis/template b/srcpkgs/geis/template
index 9f4fdba8dd..329d27b7dd 100644
--- a/srcpkgs/geis/template
+++ b/srcpkgs/geis/template
@@ -5,7 +5,8 @@ revision=9
 build_style="gnu-configure"
 configure_args="--disable-static"
 hostmakedepends="pkg-config python3-devel"
-makedepends="dbus-devel grail-devel frame-devel libXi-devel python3-devel xorg-server-devel"
+makedepends="dbus-devel grail-devel frame-devel libXi-devel python3-devel
+ xorg-server-devel"
 short_desc="Gesture Engine Interface and Support"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-only"
@@ -28,8 +29,11 @@ geis-devel_package() {
 }
 geis-python3_package() {
 	short_desc+=" - Python3 bindings"
+	depends="python3-gobject geis"
 	pkg_install() {
+		vmove usr/bin/geisview
 		vmove usr/bin/pygeis
+		vmove usr/share/man/man1/geisview.1
 		vmove usr/share/man/man1/pygeis.1
 		vmove usr/lib/python3*
 	}
```

  parent reply	other threads:[~2021-11-15 15:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-14 15:36 [ISSUE] " pudiva
2021-11-14 19:03 ` ericonr
2021-11-15 15:19 ` sgn
2021-11-15 15:35 ` sgn [this message]
2022-06-12  2:16 ` github-actions

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211115153545.Z-2H-kodA-syRxRHv1sVmMDJndYTHGTCl8Lns8sWBVo@z \
    --to=sgn@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).