pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/46069: x11/py-wxpython: wxcairo not loading
>Number: 46069
>Category: pkg
>Synopsis: x11/py-wxpython: wxcairo not loading
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 21 20:45:00 +0000 2012
>Originator: anthony mallet
>Release: 5.99.56
>Organization:
>Environment:
NetBSD ficus 5.99.56 NetBSD 5.99.56 (FICUS) #11: Mon Feb 13 19:36:45 CET 2012
troot@ficus:/usr/obj/sys/arch/i386/compile/FICUS i386
>Description:
wxcairo package from x11/py-wxpython fails to load.
Attached patch fixes the problem for me. I'm not sure this is the "ultimate"
fix, but I can't come up with something else :)
See http://mail-index.netbsd.org/tech-pkg/2012/02/20/msg008552.html for some
more details.
>How-To-Repeat:
python2.6 -c 'import wx.lib.wxcairo'
>Fix:
--- wx/lib/wxcairo.py.orig 2012-02-21 21:20:39.000000000 +0100
+++ wx/lib/wxcairo.py 2012-02-21 21:20:58.000000000 +0100
@@ -229,10 +229,9 @@
if cairoLib is not None:
return
- location = None
for name in ['cairo', 'cairo-2', 'libcairo-2']:
- location = ctypes.util.find_library(name)
- if location:
+ cairoLib = ctypes.CDLL('lib' + name + '.so')
+ if cairoLib:
break
else:
# If the above didn't find it on OS X then we still have a
@@ -246,12 +245,11 @@
if 'libcairo' in path:
location = path
break
+ cairoLib = ctypes.CDLL(location)
- if not location:
+ if not cairoLib:
raise RuntimeError, "Unable to find the Cairo shared library"
-
- cairoLib = ctypes.CDLL(location)
-
+
#----------------------------------------------------------------------------
# For other DLLs we'll just use a dictionary to track them, as there
@@ -262,14 +260,13 @@
dll = _dlls.get(key, None)
if dll is not None:
return dll
- location = None
- for name in names:
- location = ctypes.util.find_library(name)
- if location:
- break
- if not location:
- raise RuntimeError, msg
+ location = 'lib' + names[0] + '.so'
dll = ctypes.CDLL(location)
+ if not dll:
+ location = 'lib' + names[0] + '.dylib'
+ dll = ctypes.CDLL(location)
+ if not dll:
+ raise RuntimeError, msg
_dlls[key] = dll
return dll
Home |
Main Index |
Thread Index |
Old Index