public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michael Haubenwallner" <haubi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/prefix:master commit in: dev-lang/python/files/, dev-lang/python/
Date: Thu, 28 Apr 2016 15:07:12 +0000 (UTC)	[thread overview]
Message-ID: <1461855943.6b8e9c8593f902585590f446a291f492e4d2bf82.haubi@gentoo> (raw)

commit:     6b8e9c8593f902585590f446a291f492e4d2bf82
Author:     Michael Haubenwallner <michael.haubenwallner <AT> ssi-schaefer <DOT> com>
AuthorDate: Wed Apr 27 13:42:59 2016 +0000
Commit:     Michael Haubenwallner <haubi <AT> gentoo <DOT> 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
 


             reply	other threads:[~2016-04-28 15:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 15:07 Michael Haubenwallner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-04-10  7:37 [gentoo-commits] repo/proj/prefix:master commit in: dev-lang/python/files/, dev-lang/python/ Fabian Groffen
2020-12-10 20:46 Fabian Groffen
2018-05-03 13:05 Fabian Groffen
2018-05-03 12:05 Fabian Groffen
2018-05-03 10:39 Fabian Groffen
2018-05-03 10:39 Fabian Groffen
2017-10-31  9:29 Fabian Groffen
2016-05-12 13:41 Michael Haubenwallner
2015-12-14 20:36 Fabian Groffen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461855943.6b8e9c8593f902585590f446a291f492e4d2bf82.haubi@gentoo \
    --to=haubi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox