blob: 4b64f4613ce25770bffc2b1da16e385354ef3d91 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001Do not compute platform, this does not work in cross compile environment
2since it pokes at the system for getting architecture values
3
4Upstream-Status: Inappropriate
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08007Index: M2Crypto-0.30.1/setup.py
Brad Bishopd7bf8c12018-02-25 22:55:05 -05008===================================================================
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08009--- M2Crypto-0.30.1.orig/setup.py
10+++ M2Crypto-0.30.1/setup.py
11@@ -160,22 +160,6 @@ class _M2CryptoBuildExt(build_ext.build_
12 log.debug('self.include_dirs = %s', self.include_dirs)
13 log.debug('self.library_dirs = %s', self.library_dirs)
Brad Bishopd7bf8c12018-02-25 22:55:05 -050014
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015- if platform.system() == "Linux":
Brad Bishopd7bf8c12018-02-25 22:55:05 -050016- # For RedHat-based distros, the '-D__{arch}__' option for
17- # Swig needs to be normalized, particularly on i386.
18- mach = platform.machine().lower()
19- if mach in ('i386', 'i486', 'i586', 'i686'):
20- arch = '__i386__'
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080021- elif mach in ('ppc64', 'powerpc64', 'ppc64le', 'ppc64el'):
Brad Bishopd7bf8c12018-02-25 22:55:05 -050022- arch = '__powerpc64__'
23- elif mach in ('ppc', 'powerpc'):
24- arch = '__powerpc__'
25- else:
26- arch = '__%s__' % mach
27- self.swig_opts.append('-D%s' % arch)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080028- if mach in ('ppc64le', 'ppc64el'):
29- self.swig_opts.append('-D_CALL_ELF=2')
Brad Bishopd7bf8c12018-02-25 22:55:05 -050030-
31 self.swig_opts.extend(['-I%s' % i for i in self.include_dirs])
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080032
33 # Some Linux distributor has added the following line in