wok-next view 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 source
1 diff -up notify-python-0.1.1/src/__init__.py.BAD notify-python-0.1.1/src/__init__.py
2 --- notify-python-0.1.1/src/__init__.py.BAD 2010-08-31 09:04:45.353844005 -0400
3 +++ notify-python-0.1.1/src/__init__.py 2010-08-31 09:04:49.281844300 -0400
4 @@ -1 +1,21 @@
5 +"""
6 +Fedora's libnotify.so is not linked against GTK2 or GTK3. The idea
7 +was to support being linked against different parallel-installable
8 +GTK stacks.
9 +
10 +Unfortunately, python needs to jump through some special hoops in order
11 +to share symbols with extension modules, specifically, pygtk, which does
12 +link against GTK2.
13 +
14 +Without using sys.setdlopenflags(sys.getdlopenflags() | ctypes.RTLD_GLOBAL),
15 +the result is:
16 +libnotify-WARNING **: Missing symbol 'gdk_screen_make_display_name'
17 +
18 +Thanks to David Malcolm for figuring out the workaround.
19 +"""
20 +import ctypes
21 +import sys
22 +sys.setdlopenflags(sys.getdlopenflags() | ctypes.RTLD_GLOBAL)
23 +import gtk
24 +
25 from _pynotify import *