From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5E2E913820A for ; Thu, 28 Apr 2016 15:07:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D5A6A21C0D5; Thu, 28 Apr 2016 15:07:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3E72221C0D5 for ; Thu, 28 Apr 2016 15:07:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 03B39340CEE for ; Thu, 28 Apr 2016 15:07:14 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 354AD331 for ; Thu, 28 Apr 2016 15:07:12 +0000 (UTC) From: "Michael Haubenwallner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Haubenwallner" Message-ID: <1461855943.6b8e9c8593f902585590f446a291f492e4d2bf82.haubi@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: dev-lang/python/files/, dev-lang/python/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: dev-lang/python/files/python-2.5.2-cygwin-find_library.patch dev-lang/python/python-2.7.11.ebuild X-VCS-Directories: dev-lang/python/files/ dev-lang/python/ X-VCS-Committer: haubi X-VCS-Committer-Name: Michael Haubenwallner X-VCS-Revision: 6b8e9c8593f902585590f446a291f492e4d2bf82 X-VCS-Branch: master Date: Thu, 28 Apr 2016 15:07:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 1c10e1f1-bf54-4244-9ce6-9a5834e3b36e X-Archives-Hash: e111109262adb4dc521c6baa90dbc3f4 commit: 6b8e9c8593f902585590f446a291f492e4d2bf82 Author: Michael Haubenwallner ssi-schaefer com> AuthorDate: Wed Apr 27 13:42:59 2016 +0000 Commit: Michael Haubenwallner gentoo org> CommitDate: Thu Apr 28 15:05:43 2016 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=6b8e9c85 python-2.7.11: add patch to use dlltool on Cygwin .../files/python-2.5.2-cygwin-find_library.patch | 34 ++++++++++++++++++++++ dev-lang/python/python-2.7.11.ebuild | 3 ++ 2 files changed, 37 insertions(+) diff --git a/dev-lang/python/files/python-2.5.2-cygwin-find_library.patch b/dev-lang/python/files/python-2.5.2-cygwin-find_library.patch new file mode 100644 index 0000000..381d073 --- /dev/null +++ b/dev-lang/python/files/python-2.5.2-cygwin-find_library.patch @@ -0,0 +1,34 @@ +--- origsrc/Python-2.5.2/Lib/ctypes/util.py 2007-09-14 15:05:26.000000000 -0500 ++++ src/Python-2.5.2/Lib/ctypes/util.py 2008-11-25 17:54:47.319296200 -0600 +@@ -41,6 +41,20 @@ + continue + return None + ++elif sys.platform == "cygwin": ++ def find_library(name): ++ for libdir in ['/usr/lib', '/usr/local/lib']: ++ for libext in ['lib%s.dll.a' % name, 'lib%s.a' % name]: ++ implib = os.path.join(libdir, libext) ++ if not os.path.exists(implib): ++ continue ++ cmd = "dlltool -I " + implib + " 2>/dev/null" ++ res = os.popen(cmd).read().replace("\n","") ++ if not res: ++ continue ++ return res ++ return None ++ + elif os.name == "posix": + # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump + import re, tempfile, errno +@@ -157,6 +173,10 @@ + print cdll.LoadLibrary("libcrypto.dylib") + print cdll.LoadLibrary("libSystem.dylib") + print cdll.LoadLibrary("System.framework/System") ++ elif sys.platform == "cygwin": ++ print cdll.LoadLibrary("cygbz2-1.dll") ++ print find_library("crypt") ++ print cdll.LoadLibrary("cygcrypt-0.dll") + else: + print cdll.LoadLibrary("libm.so") + print cdll.LoadLibrary("libcrypt.so") diff --git a/dev-lang/python/python-2.7.11.ebuild b/dev-lang/python/python-2.7.11.ebuild index d974398..4906dc2 100644 --- a/dev-lang/python/python-2.7.11.ebuild +++ b/dev-lang/python/python-2.7.11.ebuild @@ -129,6 +129,9 @@ src_prepare() { epatch "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch" epatch "${FILESDIR}/python-2.7.10-system-libffi.patch" + # On Cygwin, find_library("c") has to return "cygwin1.dll" + epatch "${FILESDIR}/python-2.5.2-cygwin-find_library.patch" + # On AIX, we've wrapped /usr/ccs/bin/nm to work around long TMPDIR. sed -i -e "/^NM=.*nm$/s,^.*$,NM=$(tc-getNM)," Modules/makexp_aix || die