summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2016-12-15 08:15:40 +0100
committerJulien Cristau <jcristau@debian.org>2016-12-15 08:15:40 +0100
commit581742f03329c089280c9a189cae5566b40c82c4 (patch)
tree830dbaae348735eed76b23660086f7b76abf8ed3
parent5379ee1b0ea4e5ff9bfb8d24be8e7c3229ae5228 (diff)
Extend 0003-fix-python-startup-crash.patch to handle libc and libevdev
1) do not hardcode libc's SONAME 2) use libevdev's current SONAME rather than loading the .so symlink which may or may not be available.
-rw-r--r--debian/changelog4
-rw-r--r--debian/patches/0003-fix-python-startup-crash.patch26
2 files changed, 29 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index e60785f..87281b2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,7 +4,9 @@ evemu (2.6.0-0.1) UNRELEASED; urgency=medium
* Fix debian/watch and add upstream signature verification.
* New upstream release (closes: #834694)
* Update 0003-fix-python-startup-crash.patch to actually do something
- useful.
+ useful, and extend it to also 1) not hardcode libc's SONAME, and 2) use
+ libevdev's current SONAME rather than loading the .so symlink which may or
+ may not be available.
-- Julien Cristau <jcristau@debian.org> Thu, 15 Dec 2016 07:39:22 +0100
diff --git a/debian/patches/0003-fix-python-startup-crash.patch b/debian/patches/0003-fix-python-startup-crash.patch
index 9ec8ae0..0b074da 100644
--- a/debian/patches/0003-fix-python-startup-crash.patch
+++ b/debian/patches/0003-fix-python-startup-crash.patch
@@ -6,6 +6,32 @@ 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):
"""