pkgsrc/lang/python35
kamil 7e651b0c9e Forward port patches from python27 for dlopen(3)
Original changes in python27/Makefile r1.62-r1.67
=================================================

Add an option for Python: x11

Fix dlopen(3) calls in _ctypes.so for X11BASE libraries

A Python code can dynamically load shared libraries and it's wrapped with
a plain dlopen(3) call. The holder of this interface (_ctypes module)
without rpath set to X11BASE cannot detect libs like 'GL'.

Fixing find_library() on POSIX-like (excluding Darwin) systems.

This isn't addressing Python's wrapper for dlopen(3).

This possibily addresses mostly NetBSD as other popular OSes have ldconfig.

Testing commands:

 - before applying the patch

>>> from ctypes.util import find_library
>>> find_library("m")
'libm.so.0'
>>> find_library("crypto")
'libcrypto.so.11'
>>> find_library("GL")
>>> find_library("curl")

 - after applying the patch
>>> from ctypes.util import find_library
>>> find_library("m")
'libm.so.0'
>>> find_library("crypto")
'libcrypto.so.11'
>>> find_library("GL")
'libGL.so.2'
>>> find_library("curl")
'libcurl.so.4'

This patch doesn't solve the case of custom dirs like $PREFIX/qt5/lib.
However it's solving most common cases of using this call.

A possible solution is to parse the output "pkg_info -La"... however it's
very slow. In other words a cache with libraries might be needed to handle
it efficiently.
2016-09-18 12:44:49 +00:00
..
patches Changes 3.5.2: 2016-07-02 15:07:47 +00:00
ALTERNATIVES
buildlink3.mk
DESCR
dist.mk Changes 3.5.2: 2016-07-02 15:07:47 +00:00
distinfo Changes 3.5.2: 2016-07-02 15:07:47 +00:00
Makefile Forward port patches from python27 for dlopen(3) 2016-09-18 12:44:49 +00:00
options.mk Forward port patches from python27 for dlopen(3) 2016-09-18 12:44:49 +00:00
PLIST Changes 3.5.2: 2016-07-02 15:07:47 +00:00
PLIST.Darwin
PLIST.FreeBSD
PLIST.IRIX
PLIST.Linux
PLIST.SunOS