summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python/recipes-devtools/python')
-rw-r--r--meta-python/recipes-devtools/python/python-m2crypto.inc (renamed from meta-python/recipes-devtools/python/python-m2crypto_0.26.4.bb)10
-rw-r--r--meta-python/recipes-devtools/python/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch44
-rw-r--r--meta-python/recipes-devtools/python/python-m2crypto/cross-compile-platform.patch21
-rw-r--r--meta-python/recipes-devtools/python/python-m2crypto/m2crypto-0.26.4-gcc_macros.patch17
-rw-r--r--meta-python/recipes-devtools/python/python-m2crypto_0.30.1.bb2
-rw-r--r--meta-python/recipes-devtools/python/python3-m2crypto_0.30.1.bb2
6 files changed, 52 insertions, 44 deletions
diff --git a/meta-python/recipes-devtools/python/python-m2crypto_0.26.4.bb b/meta-python/recipes-devtools/python/python-m2crypto.inc
index 0da4274d9..d0eaa819b 100644
--- a/meta-python/recipes-devtools/python/python-m2crypto_0.26.4.bb
+++ b/meta-python/recipes-devtools/python/python-m2crypto.inc
@@ -1,18 +1,20 @@
1SUMMARY = "A Python crypto and SSL toolkit" 1SUMMARY = "A Python crypto and SSL toolkit"
2HOMEPAGE = "https://gitlab.com/m2crypto/m2crypto" 2HOMEPAGE = "https://gitlab.com/m2crypto/m2crypto"
3 3
4LICENSE = "BSD" 4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e" 5LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e"
6 6
7FILESEXTRAPATHS_prepend := "${THISDIR}/python-m2crypto:"
8
7SRC_URI += "file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \ 9SRC_URI += "file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \
8 file://cross-compile-platform.patch \ 10 file://cross-compile-platform.patch \
9 file://m2crypto-0.26.4-gcc_macros.patch \ 11 file://m2crypto-0.26.4-gcc_macros.patch \
10 " 12 "
11SRC_URI[md5sum] = "5c74c25ba8b45122318a165a3a2059ad" 13SRC_URI[md5sum] = "7fce3cbf85eb84a669682892b935746b"
12SRC_URI[sha256sum] = "5cae7acc0b34821f8c0ddf6665e482893fe1f198ad6379e61ffa9d8e65f5c199" 14SRC_URI[sha256sum] = "a1b2751cdadc6afac3df8a5799676b7b7c67a6ad144bb62d38563062e7cd3fc6"
13 15
14PYPI_PACKAGE = "M2Crypto" 16PYPI_PACKAGE = "M2Crypto"
15inherit pypi setuptools siteinfo 17inherit pypi siteinfo
16 18
17DEPENDS += "openssl swig-native" 19DEPENDS += "openssl swig-native"
18RDEPENDS_${PN} += "python-typing" 20RDEPENDS_${PN} += "python-typing"
diff --git a/meta-python/recipes-devtools/python/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch b/meta-python/recipes-devtools/python/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch
index c71b16fec..b339d93f7 100644
--- a/meta-python/recipes-devtools/python/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch
+++ b/meta-python/recipes-devtools/python/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch
@@ -10,30 +10,26 @@ Upstream-status: Unknown
10 setup.py | 6 +++--- 10 setup.py | 6 +++---
11 1 file changed, 3 insertions(+), 3 deletions(-) 11 1 file changed, 3 insertions(+), 3 deletions(-)
12 12
13diff --git a/setup.py b/setup.py 13Index: M2Crypto-0.30.1/setup.py
14index 3407c82..15ed7cd 100644 14===================================================================
15--- a/setup.py 15--- M2Crypto-0.30.1.orig/setup.py
16+++ b/setup.py 16+++ M2Crypto-0.30.1/setup.py
17@@ -127,7 +127,7 @@ class _M2CryptoBuildExt(build_ext.build_ext): 17@@ -130,6 +130,7 @@ class _M2CryptoBuildExt(build_ext.build_
18 self.openssl = os.path.join(self.openssl, 'OpenSSL') 18 self.set_undefined_options('build', ('bundledlls', 'bundledlls'))
19 else:
20 self.libraries = ['ssl', 'crypto']
21- self.openssl = '/usr'
22+ self.openssl = os.environ.get( "STAGING_DIR" )
23 19
24 def finalize_options(self): 20 self.libraries = ['ssl', 'crypto']
25 '''Overloaded build_ext implementation to append custom openssl 21+ self.openssl = os.environ.get( "STAGING_DIR" )
26@@ -143,8 +143,8 @@ class _M2CryptoBuildExt(build_ext.build_ext): 22 if sys.platform == 'win32':
27 if _openssl and os.path.isdir(_openssl): 23 self.libraries = ['ssleay32', 'libeay32']
28 self.openssl = _openssl 24 if self.openssl and openssl_version(self.openssl, 0x10100000, True):
25@@ -150,8 +151,8 @@ class _M2CryptoBuildExt(build_ext.build_
29 26
30- self.include_dirs.append(os.path.join(self.openssl, 'include')) 27 if self.openssl is not None:
31- openssl_library_dir = os.path.join(self.openssl, 'lib') 28 log.debug('self.openssl = %s', self.openssl)
32+ self.include_dirs.append(os.environ.get( "STAGING_INCDIR" )) 29- openssl_library_dir = os.path.join(self.openssl, 'lib')
33+ openssl_library_dir = os.environ.get( "STAGING_LIBDIR" ) 30- openssl_include_dir = os.path.join(self.openssl, 'include')
31+ openssl_library_dir = os.environ.get( "STAGING_LIBDIR" )
32+ openssl_include_dir = os.environ.get( "STAGING_INCDIR" )
34 33
35 if platform.system() == "Linux": 34 self.library_dirs.append(openssl_library_dir)
36 if _multiarch: # on Fedora/RHEL it is an empty string 35 self.include_dirs.append(openssl_include_dir)
37--
382.7.4
39
diff --git a/meta-python/recipes-devtools/python/python-m2crypto/cross-compile-platform.patch b/meta-python/recipes-devtools/python/python-m2crypto/cross-compile-platform.patch
index c6654e540..4b64f4613 100644
--- a/meta-python/recipes-devtools/python/python-m2crypto/cross-compile-platform.patch
+++ b/meta-python/recipes-devtools/python/python-m2crypto/cross-compile-platform.patch
@@ -4,27 +4,30 @@ since it pokes at the system for getting architecture values
4Upstream-Status: Inappropriate 4Upstream-Status: Inappropriate
5Signed-off-by: Khem Raj <raj.khem@gmail.com> 5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6 6
7Index: M2Crypto-0.26.0/setup.py 7Index: M2Crypto-0.30.1/setup.py
8=================================================================== 8===================================================================
9--- M2Crypto-0.26.0.orig/setup.py 9--- M2Crypto-0.30.1.orig/setup.py
10+++ M2Crypto-0.26.0/setup.py 10+++ M2Crypto-0.30.1/setup.py
11@@ -141,19 +141,6 @@ class _M2CryptoBuildExt(build_ext.build_ 11@@ -160,22 +160,6 @@ class _M2CryptoBuildExt(build_ext.build_
12 self.include_dirs.append( 12 log.debug('self.include_dirs = %s', self.include_dirs)
13 os.path.join(self.openssl, 'include', 'openssl')) 13 log.debug('self.library_dirs = %s', self.library_dirs)
14 14
15- if platform.system() == "Linux":
15- # For RedHat-based distros, the '-D__{arch}__' option for 16- # For RedHat-based distros, the '-D__{arch}__' option for
16- # Swig needs to be normalized, particularly on i386. 17- # Swig needs to be normalized, particularly on i386.
17- mach = platform.machine().lower() 18- mach = platform.machine().lower()
18- if mach in ('i386', 'i486', 'i586', 'i686'): 19- if mach in ('i386', 'i486', 'i586', 'i686'):
19- arch = '__i386__' 20- arch = '__i386__'
20- elif mach in ('ppc64', 'powerpc64'): 21- elif mach in ('ppc64', 'powerpc64', 'ppc64le', 'ppc64el'):
21- arch = '__powerpc64__' 22- arch = '__powerpc64__'
22- elif mach in ('ppc', 'powerpc'): 23- elif mach in ('ppc', 'powerpc'):
23- arch = '__powerpc__' 24- arch = '__powerpc__'
24- else: 25- else:
25- arch = '__%s__' % mach 26- arch = '__%s__' % mach
26- self.swig_opts.append('-D%s' % arch) 27- self.swig_opts.append('-D%s' % arch)
28- if mach in ('ppc64le', 'ppc64el'):
29- self.swig_opts.append('-D_CALL_ELF=2')
27- 30-
28 self.swig_opts.extend(['-I%s' % i for i in self.include_dirs]) 31 self.swig_opts.extend(['-I%s' % i for i in self.include_dirs])
29 self.swig_opts.append('-includeall') 32
30 self.swig_opts.append('-modern') 33 # Some Linux distributor has added the following line in
diff --git a/meta-python/recipes-devtools/python/python-m2crypto/m2crypto-0.26.4-gcc_macros.patch b/meta-python/recipes-devtools/python/python-m2crypto/m2crypto-0.26.4-gcc_macros.patch
index 2d738cc94..931c25c8e 100644
--- a/meta-python/recipes-devtools/python/python-m2crypto/m2crypto-0.26.4-gcc_macros.patch
+++ b/meta-python/recipes-devtools/python/python-m2crypto/m2crypto-0.26.4-gcc_macros.patch
@@ -1,16 +1,19 @@
1Imported from Fedora 1Imported from Fedora
2 2
3--- M2Crypto/SWIG/_m2crypto.i 2017-09-26 11:26:33.000000000 +0200 3Index: M2Crypto-0.30.1/SWIG/_m2crypto.i
4+++ M2Crypto-0.26.4/SWIG/_m2crypto.i 2017-09-26 21:04:14.080330741 +0200 4===================================================================
5@@ -7,6 +7,7 @@ 5--- M2Crypto-0.30.1.orig/SWIG/_m2crypto.i
6+++ M2Crypto-0.30.1/SWIG/_m2crypto.i
7@@ -7,7 +7,7 @@
6 * Copyright (c) 2009-2010 Heikki Toivonen. All rights reserved. 8 * Copyright (c) 2009-2010 Heikki Toivonen. All rights reserved.
7 * 9 *
8 */ 10 */
11-
9+%import "gcc_macros.h" 12+%import "gcc_macros.h"
10
11 %module(threads=1) m2crypto 13 %module(threads=1) m2crypto
12 /* We really don't need threadblock (PyGILState_Ensure() etc.) anywhere. 14 /* We really don't need threadblock (PyGILState_Ensure() etc.) anywhere.
13@@ -15,11 +16,6 @@ 15 Disable threadallow as well, only enable it for operations likely to
16@@ -15,11 +15,6 @@
14 %nothreadblock; 17 %nothreadblock;
15 %nothreadallow; 18 %nothreadallow;
16 19
@@ -20,5 +23,5 @@ Imported from Fedora
20-#endif 23-#endif
21- 24-
22 %{ 25 %{
23 #if __GNUC__ < 5 26 #ifdef _WIN32
24 #pragma GCC diagnostic ignored "-Wunused-label" 27 #define _WINSOCKAPI_
diff --git a/meta-python/recipes-devtools/python/python-m2crypto_0.30.1.bb b/meta-python/recipes-devtools/python/python-m2crypto_0.30.1.bb
new file mode 100644
index 000000000..c612fcdc5
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-m2crypto_0.30.1.bb
@@ -0,0 +1,2 @@
1inherit setuptools
2require python-m2crypto.inc
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto_0.30.1.bb b/meta-python/recipes-devtools/python/python3-m2crypto_0.30.1.bb
new file mode 100644
index 000000000..4d63d4bd3
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-m2crypto_0.30.1.bb
@@ -0,0 +1,2 @@
1inherit setuptools3
2require python-m2crypto.inc