wok-next diff notify-python/stuff/patches/notify-python-0.1.1-fix-GTK-symbols.patch @ rev 21068
Rebuild Perl modules
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Dec 11 23:38:35 2018 +0200 (2018-12-11) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/notify-python/stuff/patches/notify-python-0.1.1-fix-GTK-symbols.patch Tue Dec 11 23:38:35 2018 +0200 1.3 @@ -0,0 +1,25 @@ 1.4 +diff -up notify-python-0.1.1/src/__init__.py.BAD notify-python-0.1.1/src/__init__.py 1.5 +--- notify-python-0.1.1/src/__init__.py.BAD 2010-08-31 09:04:45.353844005 -0400 1.6 ++++ notify-python-0.1.1/src/__init__.py 2010-08-31 09:04:49.281844300 -0400 1.7 +@@ -1 +1,21 @@ 1.8 ++""" 1.9 ++Fedora's libnotify.so is not linked against GTK2 or GTK3. The idea 1.10 ++was to support being linked against different parallel-installable 1.11 ++GTK stacks. 1.12 ++ 1.13 ++Unfortunately, python needs to jump through some special hoops in order 1.14 ++to share symbols with extension modules, specifically, pygtk, which does 1.15 ++link against GTK2. 1.16 ++ 1.17 ++Without using sys.setdlopenflags(sys.getdlopenflags() | ctypes.RTLD_GLOBAL), 1.18 ++the result is: 1.19 ++libnotify-WARNING **: Missing symbol 'gdk_screen_make_display_name' 1.20 ++ 1.21 ++Thanks to David Malcolm for figuring out the workaround. 1.22 ++""" 1.23 ++import ctypes 1.24 ++import sys 1.25 ++sys.setdlopenflags(sys.getdlopenflags() | ctypes.RTLD_GLOBAL) 1.26 ++import gtk 1.27 ++ 1.28 + from _pynotify import *