pkgsrc/lang/python34
kamil 856a440f3f 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:36:41 +00:00
..
patches A few years ago, a brilliant mind decided to hard-code DT_RUNPATH for 2016-02-23 15:07:36 +00:00
ALTERNATIVES Add python2/python3 wrappers to respective lang/python?? packages. 2015-11-16 13:47:25 +00:00
buildlink3.mk
DESCR
dist.mk Changes 3.4.5: 2016-07-02 15:23:33 +00:00
distinfo Changes 3.4.5: 2016-07-02 15:23:33 +00:00
Makefile Forward port patches from python27 for dlopen(3) 2016-09-18 12:36:41 +00:00
options.mk Forward port patches from python27 for dlopen(3) 2016-09-18 12:36:41 +00:00
PLIST Changes 3.4.5: 2016-07-02 15:23:33 +00:00
PLIST.Darwin Fix building on OS X 2014-05-09 16:33:29 +00:00
PLIST.FreeBSD
PLIST.IRIX
PLIST.Linux
PLIST.SunOS