Index: Makefile =================================================================== RCS file: /public/netbsd-rsync/pkgsrc/lang/python27/Makefile,v retrieving revision 1.65 diff -u -r1.65 Makefile --- Makefile 23 Jul 2016 21:12:48 -0000 1.65 +++ Makefile 24 Jul 2016 23:29:32 -0000 @@ -178,16 +178,9 @@ SUBST_MESSAGE.pfindlib= Fixing find_library() on POSIX-like (excluding Darwin) systems. SUBST_STAGE.pfindlib= pre-configure 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_SED.pfindlib= -e 's!\(-Wl,-t -o\)!${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 - -# Required to detect X11BASE paths in dlopen(3) calls of _ctypes.so -USE_X11= yes +.include "options.mk" SUBST_CLASSES+= sslbase SUBST_MESSAGE.sslbase= Fixing find-file for openssl with SSLBASE. Index: distinfo =================================================================== RCS file: /public/netbsd-rsync/pkgsrc/lang/python27/distinfo,v retrieving revision 1.57 diff -u -r1.57 distinfo --- distinfo 23 Jul 2016 18:28:26 -0000 1.57 +++ distinfo 24 Jul 2016 23:41:06 -0000 @@ -20,7 +20,7 @@ SHA1 (patch-ae) = d836d77854a2b3d79fa34a06a8e2493bf0a503e6 SHA1 (patch-ah) = 90b19239d8a7c8abc3bbc05d49408a2c5da6174d SHA1 (patch-al) = 541936b79f281db06761f4fa6a65a04e852b02b4 -SHA1 (patch-am) = 5e763a0fe26be562cf5e49e6313a9f18d9ee9908 +SHA1 (patch-am) = cf82bd1996aea8a8536bd37a74563bb85817c968 SHA1 (patch-an) = 9aad78714c4fe1a21cf66a6627d97d164ecea196 SHA1 (patch-ao) = 5bcfad96f8e490351160f1a7c1f4ece7706a33fa SHA1 (patch-au) = 0ecdb937cbd58e3dbfa6fb94d1af5838619c77fd Index: options.mk =================================================================== RCS file: options.mk diff -N options.mk --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ options.mk 24 Jul 2016 23:56:26 -0000 @@ -0,0 +1,33 @@ +# $NetBSD: Makefile,v 1.65 2016/07/23 21:12:48 kamil Exp $ + +# Support for native X11 paths as an option +PKG_OPTIONS_VAR= PKG_OPTIONS.python27 +.if ${X11_TYPE} == "native" +PKG_SUPPORTED_OPTIONS+= x11native +PKG_SUGGESTED_OPTIONS= x11native +.else +PKG_SUPPORTED_OPTIONS+= +PKG_SUGGESTED_OPTIONS= +.endif + +.include "../../mk/bsd.prefs.mk" +.include "../../mk/bsd.options.mk" + +.if !empty(PKG_OPTIONS:Mx11native) +SUBST_CLASSES+= x11findlib +SUBST_MESSAGE.x11findlib= Fixing find_library() for native X11. +SUBST_STAGE.x11findlib= pre-configure +SUBST_FILES.x11findlib= Lib/ctypes/util.py +SUBST_SED.x11findlib= -e 's!\(-Wl,-t -o\)!${COMPILER_RPATH_FLAG}${X11BASE}/lib -L${X11BASE}/lib \1!' + +# Required to get definition of X11BASE and retain X11 rpath paths for linker +# We need to pass rpath to _ctypes.so to get functional dlopen(3) for X11 libs +USE_X11= yes + +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_SED.cdlopen= -e "s!\(libraries=\[\],\)!\1 runtime_library_dirs=\['${X11BASE}/lib'\],!" +SUBST_VARS.cdlopen= X11BASE +.endif Index: patches/patch-am =================================================================== RCS file: /public/netbsd-rsync/pkgsrc/lang/python27/patches/patch-am,v retrieving revision 1.20 diff -u -r1.20 patch-am --- patches/patch-am 23 Jul 2016 18:28:26 -0000 1.20 +++ patches/patch-am 24 Jul 2016 23:41:00 -0000 @@ -23,9 +23,6 @@ cygwin 2.7.3-no-libm.patch -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() @@ -377,15 +374,7 @@ if dbmext is not None: exts.append(dbmext) else: -@@ -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(): +@@ -2250,9 +2083,9 @@ def main(): ext_modules=[Extension('_struct', ['_struct.c'])], # Scripts to install