Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK)) by mollari.NetBSD.org (Postfix) with ESMTPS id 3267D7A1B1 for ; Tue, 26 Jul 2016 16:44:30 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 9210985EA5; Tue, 26 Jul 2016 16:44:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 22A2385DFE for ; Tue, 26 Jul 2016 16:44:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id Pi9aCP89gj2M for ; Tue, 26 Jul 2016 16:44:28 +0000 (UTC) Received: from cvs.NetBSD.org (unknown [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 751EE84C6C for ; Tue, 26 Jul 2016 16:44:28 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 66D80FBB5; Tue, 26 Jul 2016 16:44:28 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1469551468158390" MIME-Version: 1.0 Date: Tue, 26 Jul 2016 16:44:28 +0000 From: "Kamil Rytarowski" Subject: CVS commit: pkgsrc/lang/python27 To: pkgsrc-changes@NetBSD.org Reply-To: kamil@netbsd.org X-Mailer: log_accum Message-Id: <20160726164428.66D80FBB5@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk This is a multi-part message in MIME format. --_----------=_1469551468158390 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: kamil Date: Tue Jul 26 16:44:28 UTC 2016 Modified Files: pkgsrc/lang/python27: Makefile distinfo pkgsrc/lang/python27/patches: patch-am Added Files: pkgsrc/lang/python27: options.mk Log Message: Add an option for Python: x11 Fix build on systems with disabled X11 Reported by , Andreas Kusalananda Kahari Tested by Andreas Kusalananda Kahari Possible direction is to make this switch by default disabled on Darwin. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 pkgsrc/lang/python27/Makefile cvs rdiff -u -r1.57 -r1.58 pkgsrc/lang/python27/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/lang/python27/options.mk cvs rdiff -u -r1.20 -r1.21 pkgsrc/lang/python27/patches/patch-am Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1469551468158390 Content-Disposition: inline Content-Length: 5245 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/lang/python27/Makefile diff -u pkgsrc/lang/python27/Makefile:1.65 pkgsrc/lang/python27/Makefile:1.66 --- pkgsrc/lang/python27/Makefile:1.65 Sat Jul 23 21:12:48 2016 +++ pkgsrc/lang/python27/Makefile Tue Jul 26 16:44:28 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.65 2016/07/23 21:12:48 kamil Exp $ +# $NetBSD: Makefile,v 1.66 2016/07/26 16:44:28 kamil Exp $ .include "dist.mk" @@ -178,16 +178,9 @@ SUBST_CLASSES+= pfindlib 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: pkgsrc/lang/python27/distinfo diff -u pkgsrc/lang/python27/distinfo:1.57 pkgsrc/lang/python27/distinfo:1.58 --- pkgsrc/lang/python27/distinfo:1.57 Sat Jul 23 18:28:26 2016 +++ pkgsrc/lang/python27/distinfo Tue Jul 26 16:44:28 2016 @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.57 2016/07/23 18:28:26 kamil Exp $ +$NetBSD: distinfo,v 1.58 2016/07/26 16:44:28 kamil Exp $ SHA1 (Python-2.7.12.tar.xz) = 05360b8ade117b35e266b2004a7f1f11250c6dcd RMD160 (Python-2.7.12.tar.xz) = c330f6ac08ed67f307de0e726a288bab16c832d5 @@ -20,7 +20,7 @@ SHA1 (patch-ad) = 96ae702995d434e2d7ec0a 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: pkgsrc/lang/python27/patches/patch-am diff -u pkgsrc/lang/python27/patches/patch-am:1.20 pkgsrc/lang/python27/patches/patch-am:1.21 --- pkgsrc/lang/python27/patches/patch-am:1.20 Sat Jul 23 18:28:26 2016 +++ pkgsrc/lang/python27/patches/patch-am Tue Jul 26 16:44:28 2016 @@ -1,4 +1,4 @@ -$NetBSD: patch-am,v 1.20 2016/07/23 18:28:26 kamil Exp $ +$NetBSD: patch-am,v 1.21 2016/07/26 16:44:28 kamil Exp $ Disabled modules for normal build: bsddb @@ -23,9 +23,6 @@ Build the 1.85 compat module all the tim 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 @@ and dynamic linker cannot find without i 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 Added files: Index: pkgsrc/lang/python27/options.mk diff -u /dev/null pkgsrc/lang/python27/options.mk:1.1 --- /dev/null Tue Jul 26 16:44:28 2016 +++ pkgsrc/lang/python27/options.mk Tue Jul 26 16:44:28 2016 @@ -0,0 +1,28 @@ +# $NetBSD: options.mk,v 1.1 2016/07/26 16:44:28 kamil Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.python27 +PKG_SUPPORTED_OPTIONS+= x11 +PKG_SUGGESTED_OPTIONS= x11 + +.include "../../mk/bsd.prefs.mk" +.include "../../mk/bsd.options.mk" + +.if !empty(PKG_OPTIONS:Mx11) +# Support for native X11 paths as an option +# This code is no-op for modular X11, however for simplicity don't make it conditional. +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'\],!" +.endif --_----------=_1469551468158390--