diff options
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-m2crypto_0.45.0.bb')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-m2crypto_0.45.0.bb | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto_0.45.0.bb b/meta-python/recipes-devtools/python/python3-m2crypto_0.45.0.bb new file mode 100644 index 0000000000..77f1f7df89 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-m2crypto_0.45.0.bb | |||
@@ -0,0 +1,52 @@ | |||
1 | SUMMARY = "A Python crypto and SSL toolkit" | ||
2 | HOMEPAGE = "https://gitlab.com/m2crypto/m2crypto" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e" | ||
6 | |||
7 | SRC_URI[sha256sum] = "ffc10d4d09901514f408dc74f60a4d7df21c44ebc9bf776c947bfdc7359421cf" | ||
8 | |||
9 | SRC_URI += " \ | ||
10 | file://0001-setup.py-Make-the-cmd-available.patch \ | ||
11 | " | ||
12 | |||
13 | inherit pypi siteinfo python_setuptools_build_meta | ||
14 | |||
15 | DEPENDS += "openssl swig-native" | ||
16 | RDEPENDS:${PN} += "\ | ||
17 | python3-datetime \ | ||
18 | python3-setuptools \ | ||
19 | python3-logging \ | ||
20 | python3-netclient \ | ||
21 | python3-netserver \ | ||
22 | python3-numbers \ | ||
23 | python3-xmlrpc \ | ||
24 | " | ||
25 | |||
26 | DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR} -I${STAGING_INCDIR}" | ||
27 | DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}" | ||
28 | |||
29 | SWIG_FEATURES ?= "-D__${HOST_ARCH}__ ${@['-D__ILP32__','-D__LP64__'][d.getVar('SITEINFO_BITS') != '32']} -DOPENSSL_NO_FILENAMES" | ||
30 | |||
31 | SWIG_FEATURES:append:riscv64 = " -D__SIZEOF_POINTER__=${SITEINFO_BITS}/8 -D__riscv_xlen=${SITEINFO_BITS}" | ||
32 | SWIG_FEATURES:append:riscv32 = " -D__SIZEOF_POINTER__=${SITEINFO_BITS}/8 -D__riscv_xlen=${SITEINFO_BITS}" | ||
33 | SWIG_FEATURES:append:mipsarch = " -D_MIPS_SZPTR=${SITEINFO_BITS}" | ||
34 | SWIG_FEATURES:append:powerpc64le = " -D__powerpc64__" | ||
35 | SWIG_FEATURES:append:x86 = " -D__i386__" | ||
36 | SWIG_FEATURES:append:x32 = " -D__ILP32__" | ||
37 | |||
38 | export SWIG_FEATURES | ||
39 | |||
40 | export STAGING_DIR | ||
41 | |||
42 | do_configure:prepend() { | ||
43 | # workaround for https://github.com/swiftlang/swift/issues/69311 | ||
44 | sed -i "/sys\/types.h/d" ${RECIPE_SYSROOT}${includedir}/openssl/e_os2.h | ||
45 | } | ||
46 | |||
47 | do_install:append() { | ||
48 | rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/M2Crypto/SSL/__pycache__/*.cpython-*.pyc | ||
49 | rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/M2Crypto/__pycache__/*.cpython-*.pyc | ||
50 | } | ||
51 | |||
52 | BBCLASSEXTEND = "native" | ||