summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-m2crypto
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-m2crypto')
-rw-r--r--meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-Make-the-cmd-available.patch37
-rw-r--r--meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-address-openssl-3.x-build-issue.patch28
-rw-r--r--meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch33
-rw-r--r--meta-python/recipes-devtools/python/python3-m2crypto/avoid-host-contamination.patch23
-rw-r--r--meta-python/recipes-devtools/python/python3-m2crypto/cross-compile-platform.patch33
5 files changed, 37 insertions, 117 deletions
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-Make-the-cmd-available.patch b/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-Make-the-cmd-available.patch
new file mode 100644
index 0000000000..c4262985ba
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-Make-the-cmd-available.patch
@@ -0,0 +1,37 @@
1From eaeb95ec64762a58dde7cf368fc17188382e7df6 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <mingli.yu@windriver.com>
3Date: Fri, 28 Mar 2025 12:13:26 +0800
4Subject: [PATCH] setup.py: Make the cmd available
5
6The cmd will be None in OE environment as below.
7 >>> import os
8 >>> os.environ.get('CC', 'gcc')
9'x86_64-wrs-linux-gcc -m64 -march=nehalem -mtune=generic -mfpmath=sse -msse4.2 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/buildarea/tmp/work/corei7-64-wrs-linux/python3-m2crypto/0.44.0/recipe-sysroot'
10 >>> import shutil
11 >>> shutil.which(os.environ.get('CC', 'gcc'))
12 >>> cmd = [shutil.which(os.environ.get('CC', 'gcc'))]
13 >>> print(cmd)
14[None]
15
16So change the check logic to get the expected cmd.
17
18Upstream-Status: Inappropriate [oe specific]
19
20Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
21---
22 setup.py | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/setup.py b/setup.py
26index 9938e67..21e2346 100644
27--- a/setup.py
28+++ b/setup.py
29@@ -230,7 +230,7 @@ class _M2CryptoBuildExt(build_ext.build_ext):
30 with open(
31 "src/SWIG/x509_v_flag.h", "w", encoding="utf-8"
32 ) as x509_v_h:
33- cmd = [shutil.which(os.environ.get('CC', 'gcc'))]
34+ cmd = os.environ.get('CC', 'gcc').split()
35 cflags = os.environ.get("CFLAGS")
36 if cflags is not None:
37 cmd += cflags.split()
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-address-openssl-3.x-build-issue.patch b/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-address-openssl-3.x-build-issue.patch
deleted file mode 100644
index c67e50803b..0000000000
--- a/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-address-openssl-3.x-build-issue.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From 0d824e5c2ab13e761ffaeabdccf9513d5b8f280d Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Fri, 8 Oct 2021 11:18:35 +0200
4Subject: [PATCH] setup.py: address openssl 3.x build issue
5
6swig throws:
7| /home/alex/development/poky/build-metaoe/tmp/work/x86_64-linux/python3-m2crypto-native/0.38.0-r0/recipe-sysroot-native/usr/include/openssl/macros.h:155: Error: CPP #error ""OPENSSL_API_COMPAT expresses an impossible API compatibility level"". Use the -cpperraswarn option to continue swig processing.
8
9I'm not sure why; upstream should take a look.
10
11Upstream-Status: Inappropriate [workaround]
12Signed-off-by: Alexander Kanavin <alex@linutronix.de>
13---
14 setup.py | 1 +
15 1 file changed, 1 insertion(+)
16
17diff --git a/setup.py b/setup.py
18index 2c65404..74704bc 100644
19--- a/setup.py
20+++ b/setup.py
21@@ -192,6 +192,7 @@ class _M2CryptoBuildExt(build_ext.build_ext):
22
23 self.swig_opts.append('-includeall')
24 self.swig_opts.append('-modern')
25+ self.swig_opts.append('-cpperraswarn')
26 self.swig_opts.append('-builtin')
27
28 # These two lines are a workaround for
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch b/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch
deleted file mode 100644
index 0baadfcaa5..0000000000
--- a/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From dfb83a41aaeae326e9b6f02b233af375bc7b8815 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Fri, 29 Mar 2013 15:17:17 +0100
4Subject: [PATCH] setup.py: link in sysroot, not in host directories
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7
8Upstream-Status: Pending [Unknown]
9---
10 setup.py | 6 +++---
11 1 file changed, 3 insertions(+), 3 deletions(-)
12
13--- a/setup.py
14+++ b/setup.py
15@@ -135,6 +135,7 @@ class _M2CryptoBuildExt(build_ext.build_
16 self.set_undefined_options('build', ('bundledlls', 'bundledlls'))
17
18 self.libraries = ['ssl', 'crypto']
19+ self.openssl = os.environ.get( "STAGING_DIR" )
20 if sys.platform == 'win32':
21 self.libraries = ['ssleay32', 'libeay32']
22 if self.openssl and openssl_version(self.openssl,
23@@ -159,8 +160,8 @@ class _M2CryptoBuildExt(build_ext.build_
24
25 if self.openssl is not None:
26 log.debug('self.openssl = %s', self.openssl)
27- openssl_library_dir = os.path.join(self.openssl, 'lib')
28- openssl_include_dir = os.path.join(self.openssl, 'include')
29+ openssl_library_dir = os.environ.get( "STAGING_LIBDIR" )
30+ openssl_include_dir = os.environ.get( "STAGING_INCDIR" )
31
32 self.library_dirs.append(openssl_library_dir)
33 self.include_dirs.append(openssl_include_dir)
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/avoid-host-contamination.patch b/meta-python/recipes-devtools/python/python3-m2crypto/avoid-host-contamination.patch
deleted file mode 100644
index 3cd6f7c276..0000000000
--- a/meta-python/recipes-devtools/python/python3-m2crypto/avoid-host-contamination.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1Filter out '/usr/include' for swig to avoid host contamination issue.
2
3Upstream-Status: Inappropriate [cross compile specific]
4
5Signed-off-by: Kai Kang <kai.kang@windriver.com>
6---
7 setup.py | 3 ++-
8 1 file changed, 2 insertions(+), 1 deletion(-)
9
10diff --git a/setup.py b/setup.py
11index 5a12981..389d49f 100644
12--- a/setup.py
13+++ b/setup.py
14@@ -153,7 +153,8 @@ class _M2CryptoBuildExt(build_ext.build_ext):
15 self.swig_opts.append('-py3')
16
17 # swig seems to need the default header file directories
18- self.swig_opts.extend(['-I%s' % i for i in _get_additional_includes()])
19+ self.swig_opts.extend(['-I%s' % i for i in _get_additional_includes()
20+ if i != '/usr/include'])
21
22 log.debug('self.include_dirs = %s', self.include_dirs)
23 log.debug('self.library_dirs = %s', self.library_dirs)
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/cross-compile-platform.patch b/meta-python/recipes-devtools/python/python3-m2crypto/cross-compile-platform.patch
deleted file mode 100644
index 77ef7e557e..0000000000
--- a/meta-python/recipes-devtools/python/python3-m2crypto/cross-compile-platform.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1Do 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
7--- a/setup.py
8+++ b/setup.py
9@@ -169,24 +169,6 @@ class _M2CryptoBuildExt(build_ext.build_
10 log.debug('self.include_dirs = %s', self.include_dirs)
11 log.debug('self.library_dirs = %s', self.library_dirs)
12
13- if platform.system() == "Linux":
14- # For RedHat-based distros, the '-D__{arch}__' option for
15- # Swig needs to be normalized, particularly on i386.
16- mach = platform.machine().lower()
17- if mach in ('i386', 'i486', 'i586', 'i686'):
18- arch = '__i386__'
19- elif mach in ('ppc64', 'powerpc64', 'ppc64le', 'ppc64el'):
20- arch = '__powerpc64__'
21- elif mach in ('ppc', 'powerpc'):
22- arch = '__powerpc__'
23- else:
24- arch = '__%s__' % mach
25- self.swig_opts.append('-D%s' % arch)
26- if mach in ('ppc64le', 'ppc64el'):
27- self.swig_opts.append('-D_CALL_ELF=2')
28- if mach in ('arm64_be'):
29- self.swig_opts.append('-D__AARCH64EB__')
30-
31 self.swig_opts.extend(['-I%s' % i for i in self.include_dirs])
32
33 # Some Linux distributor has added the following line in