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
|
From d2cc2ef66376d2f8f33c9f5275c73bb7f846f864 Mon Sep 17 00:00:00 2001
From: neusepoff <neusepoff>
Date: Thu, 8 Oct 2015 10:33:49 -0700
Subject: use find_library first prior adding libraries by a pattern of the
name
Origin: http://code.google.com/p/pyglet/issues/detail?id=456#c8
Bug: http://code.google.com/p/pyglet/issues/detail?id=456
Bug-Debian: http://bugs.debian.org/584548
From original patch comments:
okay, this has to do with the nvidia package of debian providing the
wrong link for the libGL.so alternative (linking to the diversion
instead of the right file), see:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597452
it doesn't harm most software as these are linked agains libGL.so.1
anyway. but pyglet is trying to load libGL.so first and then falling
back to find_library().
I've attached a patch witch solves this by trying to load the library
using find_library() first and then falling back to the hardcoded
name.
Patch-Name: up_no_standard_config_available
---
pyglet/lib.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pyglet/lib.py b/pyglet/lib.py
index d290d8f..12621c8 100644
--- a/pyglet/lib.py
+++ b/pyglet/lib.py
@@ -96,7 +96,9 @@ class LibraryLoader(object):
platform_names = list(platform_names)
if self.platform == 'linux2':
- platform_names.extend(['lib%s.so' % n for n in names])
+ for name in names:
+ libname = ctypes.util.find_library(name)
+ platform_names.append(libname or 'lib%s.so' % name)
platform_names.extend(names)
for name in platform_names:
|