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 5AA1D138208 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 BC75F21C0CB; 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 2FA5B21C0CB 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 3E4BA340CC3 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 22A90327 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.fb002e4bedb20a1d5c52788530e084ffc5ca430f.haubi@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: haubi X-VCS-Committer-Name: Michael Haubenwallner X-VCS-Revision: fb002e4bedb20a1d5c52788530e084ffc5ca430f 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: 15544336-1ab9-4c93-aec4-20fcf3c1ac68 X-Archives-Hash: 4ca03b19ca023ccbe570358677752f83 commit: fb002e4bedb20a1d5c52788530e084ffc5ca430f Author: Michael Haubenwallner ssi-schaefer com> AuthorDate: Wed Apr 27 13:41:04 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=fb002e4b bootstrap-prefix.sh: patch python to use dlltool for Cygwin scripts/bootstrap-prefix.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index f24baa9..074276d 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -691,6 +691,7 @@ bootstrap_python() { # --disable-shared causes modules to probably link against the # executable name, which must be the real executable at runtime # as well rather than some symlink (for Cygwin at least). + # And with dlltool, find_library("c") can return "cygwin1.dll". patch -p0 <<'EOP' --- Makefile.pre.in +++ Makefile.pre.in @@ -705,6 +706,29 @@ bootstrap_python() { @@ -3,1 +3,1 @@ -python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h +$HOSTPYTHON ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h +--- Lib/ctypes/util.py ++++ Lib/ctypes/util.py +@@ -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 EOP local myconf=""