gentoo-overlay/dev-python/m2crypto/files/0.21.1-packaging.patch

56 lines
2.3 KiB
Diff

From 017d82b1f17446f38339589e25e9aba98f87f9f4 Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Mon, 25 May 2015 13:09:35 -0400
Subject: [PATCH] Gentoo-specific packaging fixes
Fix cross-compiles
EPREFIX support
Revert custom build and install classes
---
setup.py | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/setup.py b/setup.py
index 0967216..bca474a 100644
--- a/setup.py
+++ b/setup.py
@@ -66,8 +66,8 @@ class _M2CryptoBuildExt(build_ext.build_ext):
opensslIncludeDir = os.path.join(self.openssl, 'include', 'openssl')
opensslLibraryDir = os.path.join(self.openssl, 'lib')
- self.swig_opts = ['-I%s' % i for i in self.include_dirs + \
- [opensslIncludeDir, includeDir]]
+ eprefix = os.getenv('EPREFIX', '')
+ self.swig_opts = ['-I' + eprefix + '/usr/include']
if get_platform() == 'linux-x86_64':
self.swig_opts.append('-D__x86_64__')
self.swig_opts.append('-outdir')
@@ -76,8 +76,7 @@ class _M2CryptoBuildExt(build_ext.build_ext):
#self.swig_opts.append('-D__i386__') # Uncomment for early OpenSSL 0.9.7 versions, or on Fedora Core if build fails
#self.swig_opts.append('-DOPENSSL_NO_EC') # Try uncommenting if you can't build with EC disabled
- self.include_dirs += [os.path.join(self.openssl, opensslIncludeDir),
- os.path.join(os.getcwd(), 'SWIG')]
+ self.include_dirs += [os.path.join(os.getcwd(), 'SWIG')]
if sys.platform == 'cygwin':
# Cygwin SHOULD work (there's code in distutils), but
@@ -87,8 +86,6 @@ class _M2CryptoBuildExt(build_ext.build_ext):
# Someday distutils will be fixed and this won't be needed.
self.library_dirs += [os.path.join(self.openssl, 'bin')]
- self.library_dirs += [os.path.join(self.openssl, opensslLibraryDir)]
-
if sys.version_info < (2,4):
@@ -182,5 +179,5 @@ used to provide SSL for Twisted.''',
ext_modules = [m2crypto],
test_suite='tests.alltests.suite',
- cmdclass = {'build': CustomBuild, 'install': CustomInstall, 'build_ext': _M2CryptoBuildExt}
+ cmdclass = {'build_ext': _M2CryptoBuildExt}
)
--
2.4.1