diff options
Diffstat (limited to 'security/py-pycrypto/files/patch-setup.py')
-rw-r--r-- | security/py-pycrypto/files/patch-setup.py | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/security/py-pycrypto/files/patch-setup.py b/security/py-pycrypto/files/patch-setup.py index 8c89fdc14df6..d959eedfeb1a 100644 --- a/security/py-pycrypto/files/patch-setup.py +++ b/security/py-pycrypto/files/patch-setup.py @@ -1,20 +1,27 @@ ---- setup.py.orig Sat Aug 14 01:44:47 2004 -+++ setup.py Fri Oct 1 21:21:45 2004 -@@ -116,13 +116,14 @@ - build_ext.build_extensions(self) +--- ./setup.py.orig 2009-12-13 21:39:29.000000000 +0100 ++++ ./setup.py 2009-12-14 16:48:47.000000000 +0100 +@@ -136,6 +136,7 @@ + # especially helps the DES modules. + self.__add_compiler_option("-O3") + self.__add_compiler_option("-fomit-frame-pointer") ++ self.__add_compiler_option("-D_WCHAR_T_DEFINED") + # Don't include debug symbols unless debugging + self.__remove_compiler_option("-g") + if USE_GCOV: +@@ -152,7 +153,7 @@ + self.compiler.include_dirs.insert(0, "src/inc-msvc/") - def detect_modules (self): + # Detect libgmp and don't build _fastmath if it is missing. - lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib'] -- inc_dirs = self.compiler.include_dirs + ['/usr/include'] + lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib', '%%LOCALBASE%%/lib'] -+ inc_dirs = self.compiler.include_dirs + ['/usr/include', '%%LOCALBASE%%/include'] - exts = [] - if (self.compiler.find_library_file(lib_dirs, 'gmp')): - exts.append(Extension("Crypto.PublicKey._fastmath", -- include_dirs=['src/'], -+ include_dirs=['src/', '%%LOCALBASE%%/include'], - libraries=['gmp'], -+ library_dirs=['%%LOCALBASE%%/lib'], - sources=["src/_fastmath.c"])) - self.extensions += exts + if not (self.compiler.find_library_file(lib_dirs, 'gmp')): + print >>sys.stderr, "warning: GMP library not found; Not building Crypto.PublicKey._fastmath." + self.__remove_extensions(["Crypto.PublicKey._fastmath"]) +@@ -259,6 +260,7 @@ + Extension("Crypto.PublicKey._fastmath", + include_dirs=['src/'], + libraries=['gmp'], ++ library_dirs=['%%LOCALBASE%%/lib'], + sources=["src/_fastmath.c"]), + # Hash functions |