summary refs log tree commit diff
path: root/pkgs/development/python-modules/shapely/library-paths.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/shapely/library-paths.patch')
-rw-r--r--pkgs/development/python-modules/shapely/library-paths.patch10
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/shapely/library-paths.patch b/pkgs/development/python-modules/shapely/library-paths.patch
index 4081936abe3..319eb8a72db 100644
--- a/pkgs/development/python-modules/shapely/library-paths.patch
+++ b/pkgs/development/python-modules/shapely/library-paths.patch
@@ -2,7 +2,7 @@ diff --git a/shapely/geos.py b/shapely/geos.py
 index d5a67d2..19b7ffc 100644
 --- a/shapely/geos.py
 +++ b/shapely/geos.py
-@@ -61,123 +61,11 @@ def load_dll(libname, fallbacks=None, mode=DEFAULT_MODE):
+@@ -61,127 +61,10 @@ def load_dll(libname, fallbacks=None, mode=DEFAULT_MODE):
              "Could not find lib {} or load any of its variants {}.".format(
                  libname, fallbacks or []))
  
@@ -80,7 +80,11 @@ index d5a67d2..19b7ffc 100644
 -            ]
 -        _lgeos = load_dll('geos_c', fallbacks=alt_paths)
 -
--    free = load_dll('c').free
+-    # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen
+-    # manpage says, "If filename is NULL, then the returned handle is for the
+-    # main program". This way we can let the linker do the work to figure out
+-    # which libc Python is actually using.
+-    free = CDLL(None).free
 -    free.argtypes = [c_void_p]
 -    free.restype = None
 -
@@ -112,7 +116,7 @@ index d5a67d2..19b7ffc 100644
 -            except WindowsError:
 -                # XXX: See http://trac.gispython.org/projects/PCL/ticket/149
 -                pass
- 
+-
 -elif sys.platform == 'sunos5':
 -    _lgeos = load_dll('geos_c', fallbacks=['libgeos_c.so.1', 'libgeos_c.so'])
 -    free = CDLL('libc.so.1').free