File: 0003-fix-python-startup-crash.patch

package info (click to toggle)
evemu 2.7.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 6,260 kB
  • sloc: sh: 4,331; ansic: 1,718; python: 1,186; makefile: 125; cpp: 11
file content (47 lines) | stat: -rw-r--r-- 1,529 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Description: fix crash in python bindings
 The python bindings were using an incorrect search string to locate the DSO and
 would crash unless the -dev binary package was also installed.
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/evemu/+bug/1152774
Author: Stephen M. Webb <stephen.webb@canonical.com>

--- evemu-2.6.0.orig/python/evemu/base.py
+++ evemu-2.6.0/python/evemu/base.py
@@ -141,11 +141,11 @@ class LibC(LibraryWrapper):
     Wrapper for API calls to the C library.
     """
 
     @staticmethod
     def _cdll():
-        return ctypes.CDLL("libc.so.6", use_errno=True)
+        return ctypes.CDLL(None, use_errno=True)
 
     _api_prototypes = {
         "fdopen": {
             "argtypes": (c_int, c_char_p),
             "restype": c_void_p,
@@ -167,11 +167,11 @@ class LibEvdev(LibraryWrapper):
     Wrapper for API calls to libevdev
     """
 
     @staticmethod
     def _cdll():
-        return ctypes.CDLL("libevdev.so", use_errno=True)
+        return ctypes.CDLL("libevdev.so.2", use_errno=True)
 
     _api_prototypes = {
         #const char *libevdev_event_type_get_name(unsigned int type);
         "libevdev_event_type_get_name": {
             "argtypes": (c_uint,),
@@ -207,11 +207,11 @@ class LibEvdev(LibraryWrapper):
 class LibEvemu(LibraryWrapper):
     """
     Wrapper for API calls to the evemu library.
     """
 
-    _LIBNAME = "libevemu.so"
+    _LIBNAME = "libevemu.so.3"
 
     @staticmethod
     def _cdll():
         return ctypes.CDLL(LibEvemu._LIBNAME, use_errno=True)