pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/python27 Fix dlopen(3) calls in _ctypes.so for X1...
details: https://anonhg.NetBSD.org/pkgsrc/rev/444f53460b48
branches: trunk
changeset: 350107:444f53460b48
user: kamil <kamil%pkgsrc.org@localhost>
date: Sat Jul 23 18:28:26 2016 +0000
description:
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'.
This might be the last step to fix issues with running GUI Python
applications on NetBSD.
Bump PKGREVISION.
diffstat:
lang/python27/Makefile | 12 ++++++++++--
lang/python27/distinfo | 4 ++--
lang/python27/patches/patch-am | 35 +++++++++++++++++++++++------------
3 files changed, 35 insertions(+), 16 deletions(-)
diffs (172 lines):
diff -r 3bb060e56c96 -r 444f53460b48 lang/python27/Makefile
--- a/lang/python27/Makefile Sat Jul 23 17:28:22 2016 +0000
+++ b/lang/python27/Makefile Sat Jul 23 18:28:26 2016 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.63 2016/07/23 13:09:15 kamil Exp $
+# $NetBSD: Makefile,v 1.64 2016/07/23 18:28:26 kamil Exp $
.include "dist.mk"
PKGNAME= python27-${PY_DISTVERSION}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= lang python
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
@@ -180,6 +180,12 @@
SUBST_FILES.pfindlib= Lib/ctypes/util.py
SUBST_SED.pfindlib= -e 's!\(-Wl,-t -o\)!${COMPILER_RPATH_FLAG}${X11BASE}/lib -L${X11BASE}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib \1!'
+SUBST_CLASSES+= cdlopen
+SUBST_MESSAGE.cdlopen= Handle X11BASE paths in dlopen(3) calls of _ctypes.so
+SUBST_STAGE.cdlopen= pre-configure
+SUBST_FILES.cdlopen= setup.py
+SUBST_VARS.cdlopen= X11BASE
+
SUBST_CLASSES+= sslbase
SUBST_MESSAGE.sslbase= Fixing find-file for openssl with SSLBASE.
SUBST_STAGE.sslbase= pre-configure
@@ -218,4 +224,6 @@
.include "../../devel/zlib/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
+# Required to detect X11BASE paths in dlopen(3) calls of _ctypes.so
+.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r 3bb060e56c96 -r 444f53460b48 lang/python27/distinfo
--- a/lang/python27/distinfo Sat Jul 23 17:28:22 2016 +0000
+++ b/lang/python27/distinfo Sat Jul 23 18:28:26 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.56 2016/07/11 12:17:13 ryoon Exp $
+$NetBSD: distinfo,v 1.57 2016/07/23 18:28:26 kamil Exp $
SHA1 (Python-2.7.12.tar.xz) = 05360b8ade117b35e266b2004a7f1f11250c6dcd
RMD160 (Python-2.7.12.tar.xz) = c330f6ac08ed67f307de0e726a288bab16c832d5
@@ -20,7 +20,7 @@
SHA1 (patch-ae) = d836d77854a2b3d79fa34a06a8e2493bf0a503e6
SHA1 (patch-ah) = 90b19239d8a7c8abc3bbc05d49408a2c5da6174d
SHA1 (patch-al) = 541936b79f281db06761f4fa6a65a04e852b02b4
-SHA1 (patch-am) = a7697dda83b151fdd30d460bdcf5ab3cc057c92b
+SHA1 (patch-am) = 5e763a0fe26be562cf5e49e6313a9f18d9ee9908
SHA1 (patch-an) = 9aad78714c4fe1a21cf66a6627d97d164ecea196
SHA1 (patch-ao) = 5bcfad96f8e490351160f1a7c1f4ece7706a33fa
SHA1 (patch-au) = 0ecdb937cbd58e3dbfa6fb94d1af5838619c77fd
diff -r 3bb060e56c96 -r 444f53460b48 lang/python27/patches/patch-am
--- a/lang/python27/patches/patch-am Sat Jul 23 17:28:22 2016 +0000
+++ b/lang/python27/patches/patch-am Sat Jul 23 18:28:26 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-am,v 1.19 2015/04/24 03:01:36 rodent Exp $
+$NetBSD: patch-am,v 1.20 2016/07/23 18:28:26 kamil Exp $
Disabled modules for normal build:
bsddb
@@ -23,7 +23,10 @@
cygwin 2.7.3-no-libm.patch
---- setup.py.orig 2014-12-10 16:00:01.000000000 +0000
+Set X11BASE rpath value for _ctypes.so, it's required as it calls dlopen(3)
+and dynamic linker cannot find without it X11 libraries.
+
+--- setup.py.orig 2016-06-25 21:49:32.000000000 +0000
+++ setup.py
@@ -33,7 +33,7 @@ host_platform = get_platform()
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
@@ -34,7 +37,7 @@
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
-@@ -438,10 +438,15 @@ class PyBuildExt(build_ext):
+@@ -454,10 +454,15 @@ class PyBuildExt(build_ext):
os.unlink(tmpfile)
def detect_modules(self):
@@ -54,7 +57,7 @@
if cross_compiling:
self.add_gcc_paths()
self.add_multiarch_paths()
-@@ -553,7 +558,7 @@ class PyBuildExt(build_ext):
+@@ -569,7 +574,7 @@ class PyBuildExt(build_ext):
# Check for MacOS X, which doesn't need libm.a at all
math_libs = ['m']
@@ -63,7 +66,7 @@
math_libs = []
# XXX Omitted modules: gl, pure, dl, SGI-specific modules
-@@ -789,11 +794,10 @@ class PyBuildExt(build_ext):
+@@ -809,11 +814,10 @@ class PyBuildExt(build_ext):
libraries=math_libs) )
# Detect SSL support for the socket module (via _ssl)
search_for_ssl_incs_in = [
@@ -78,7 +81,7 @@
)
if ssl_incs is not None:
krb5_h = find_file('krb5.h', inc_dirs,
-@@ -801,9 +805,7 @@ class PyBuildExt(build_ext):
+@@ -821,9 +825,7 @@ class PyBuildExt(build_ext):
if krb5_h:
ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
@@ -89,7 +92,7 @@
if (ssl_incs is not None and
ssl_libs is not None):
-@@ -822,7 +824,7 @@ class PyBuildExt(build_ext):
+@@ -842,7 +844,7 @@ class PyBuildExt(build_ext):
# look for the openssl version header on the compiler search path.
opensslv_h = find_file('openssl/opensslv.h', [],
@@ -98,7 +101,7 @@
if opensslv_h:
name = os.path.join(opensslv_h[0], 'openssl/opensslv.h')
if host_platform == 'darwin' and is_macosx_sdk_path(name):
-@@ -922,175 +924,6 @@ class PyBuildExt(build_ext):
+@@ -942,175 +944,6 @@ class PyBuildExt(build_ext):
else:
raise ValueError("unknown major BerkeleyDB version", major)
@@ -274,7 +277,7 @@
# The sqlite interface
sqlite_setup_debug = False # verbose debug prints from this script?
-@@ -1207,35 +1040,39 @@ class PyBuildExt(build_ext):
+@@ -1227,35 +1060,39 @@ class PyBuildExt(build_ext):
# we do not build this one. Otherwise this build will pick up
# the more recent berkeleydb's db.h file first in the include path
# when attempting to compile and it will fail.
@@ -338,7 +341,7 @@
config_args = [arg.strip("'")
for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
dbm_args = [arg for arg in config_args
-@@ -1247,7 +1084,7 @@ class PyBuildExt(build_ext):
+@@ -1267,7 +1104,7 @@ class PyBuildExt(build_ext):
dbmext = None
for cand in dbm_order:
if cand == "ndbm":
@@ -347,7 +350,7 @@
# Some systems have -lndbm, others have -lgdbm_compat,
# others don't have either
if self.compiler.find_library_file(lib_dirs,
-@@ -1291,18 +1128,14 @@ class PyBuildExt(build_ext):
+@@ -1311,18 +1148,14 @@ class PyBuildExt(build_ext):
libraries = gdbm_libs)
break
elif cand == "bdb":
@@ -374,7 +377,15 @@
if dbmext is not None:
exts.append(dbmext)
else:
-@@ -2230,9 +2063,9 @@ def main():
+@@ -2113,6 +1946,7 @@ class PyBuildExt(build_ext):
+ extra_compile_args=extra_compile_args,
+ extra_link_args=extra_link_args,
+ libraries=[],
++ runtime_library_dirs=['@X11BASE@/lib'],
+ sources=sources,
+ depends=depends)
+ ext_test = Extension('_ctypes_test',
+@@ -2250,9 +2084,9 @@ def main():
ext_modules=[Extension('_struct', ['_struct.c'])],
# Scripts to install
Home |
Main Index |
Thread Index |
Old Index