summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2009-12-23 21:56:41 +0000
committerFabian Groffen <grobian@gentoo.org>2009-12-23 21:56:41 +0000
commite87d5a43643491191134d6b17de28598ae3f8d83 (patch)
tree9739af37165130385dbbb0af3fd822f7cbacec5e /dev-python/pycrypto
parentTweak pkg_nofetch message a bit for last commit. (diff)
downloadgentoo-2-e87d5a43643491191134d6b17de28598ae3f8d83.tar.gz
gentoo-2-e87d5a43643491191134d6b17de28598ae3f8d83.tar.bz2
gentoo-2-e87d5a43643491191134d6b17de28598ae3f8d83.zip
Inject the python conigured libdir to the library search path to avoid not finding GMP, bug #291949
(Portage version: 2.2.00.15134-prefix/cvs/Darwin powerpc)
Diffstat (limited to 'dev-python/pycrypto')
-rw-r--r--dev-python/pycrypto/ChangeLog7
-rw-r--r--dev-python/pycrypto/files/pycrypto-2.1.0-gmp.patch16
2 files changed, 21 insertions, 2 deletions
diff --git a/dev-python/pycrypto/ChangeLog b/dev-python/pycrypto/ChangeLog
index 5efb2aa42f61..92a13cc38c56 100644
--- a/dev-python/pycrypto/ChangeLog
+++ b/dev-python/pycrypto/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-python/pycrypto
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pycrypto/ChangeLog,v 1.82 2009/12/16 21:09:30 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pycrypto/ChangeLog,v 1.83 2009/12/23 21:56:41 grobian Exp $
+
+ 23 Dec 2009; Fabian Groffen <grobian@gentoo.org>
+ files/pycrypto-2.1.0-gmp.patch:
+ Inject the python conigured libdir to the library search path to avoid not
+ finding GMP, bug #291949
16 Dec 2009; Markus Meier <maekke@gentoo.org> pycrypto-2.1.0_beta1.ebuild:
amd64/arm/x86 stable, bug #295698
diff --git a/dev-python/pycrypto/files/pycrypto-2.1.0-gmp.patch b/dev-python/pycrypto/files/pycrypto-2.1.0-gmp.patch
index 1aafd8022d56..9b7c03baf93c 100644
--- a/dev-python/pycrypto/files/pycrypto-2.1.0-gmp.patch
+++ b/dev-python/pycrypto/files/pycrypto-2.1.0-gmp.patch
@@ -1,5 +1,19 @@
+* make GMP conditional
+* don't use hardwired search path /lib /usr/lib, but instead use the
+ python configured libdir (in particular under Prefix very important,
+ e.g. bug #291949)
+
--- setup.py
+++ setup.py
+@@ -36,7 +36,7 @@
+
+ __revision__ = "$Id: pycrypto-2.1.0-gmp.patch,v 1.2 2009/12/23 21:56:41 grobian Exp $"
+
+-from distutils import core
++from distutils import core, sysconfig
+ from distutils.core import Extension, Command
+ from distutils.command.build_ext import build_ext
+ import os, sys
@@ -151,11 +151,12 @@
if self.compiler.compiler_type == 'msvc':
self.compiler.include_dirs.insert(0, "src/inc-msvc/")
@@ -11,7 +25,7 @@
- self.__remove_extensions(["Crypto.PublicKey._fastmath"])
+ if os.environ.get("USE_GMP", "1") == "1":
+ # Detect libgmp and don't build _fastmath if it is missing.
-+ lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib']
++ lib_dirs = self.compiler.library_dirs + [sysconfig.get_config_var('LIBDIR'), '/lib', '/usr/lib']
+ if not (self.compiler.find_library_file(lib_dirs, 'gmp')):
+ print >>sys.stderr, "error: GMP library not found."
+ sys.exit(1)