Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 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 | FILESEXTRAPATHS:prepend := "${THISDIR}/python-m2crypto:" |
| 8 | |
| 9 | SRC_URI += "file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \ |
| 10 | file://cross-compile-platform.patch \ |
| 11 | file://avoid-host-contamination.patch \ |
| 12 | file://0001-setup.py-address-openssl-3.x-build-issue.patch \ |
| 13 | " |
| 14 | SRC_URI[sha256sum] = "bbfd113ec55708c05816252a4f09e4237df4f3bbfc8171cbbc33057d257bbb30" |
| 15 | |
| 16 | PYPI_PACKAGE = "M2Crypto" |
| 17 | inherit pypi siteinfo setuptools3 |
| 18 | |
| 19 | DEPENDS += "openssl swig-native" |
| 20 | RDEPENDS:${PN} += "\ |
| 21 | ${PYTHON_PN}-datetime \ |
| 22 | ${PYTHON_PN}-distutils \ |
| 23 | ${PYTHON_PN}-logging \ |
| 24 | ${PYTHON_PN}-netclient \ |
| 25 | ${PYTHON_PN}-netserver \ |
| 26 | ${PYTHON_PN}-numbers \ |
| 27 | ${PYTHON_PN}-smtpd \ |
| 28 | ${PYTHON_PN}-xmlrpc \ |
| 29 | " |
| 30 | |
| 31 | DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR} -I${STAGING_INCDIR}" |
| 32 | DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}" |
| 33 | |
| 34 | SWIG_FEATURES ?= "-D__${HOST_ARCH}__ ${@['-D__ILP32__','-D__LP64__'][d.getVar('SITEINFO_BITS') != '32']} -DOPENSSL_NO_FILENAMES" |
| 35 | |
| 36 | SWIG_FEATURES:append:riscv64 = " -D__SIZEOF_POINTER__=${SITEINFO_BITS}/8 -D__riscv_xlen=${SITEINFO_BITS}" |
| 37 | SWIG_FEATURES:append:riscv32 = " -D__SIZEOF_POINTER__=${SITEINFO_BITS}/8 -D__riscv_xlen=${SITEINFO_BITS}" |
| 38 | SWIG_FEATURES:append:mipsarch = " -D_MIPS_SZPTR=${SITEINFO_BITS}" |
| 39 | SWIG_FEATURES:append:powerpc64le = " -D__powerpc64__" |
| 40 | SWIG_FEATURES:append:x86 = " -D__i386__" |
| 41 | SWIG_FEATURES:append:x32 = " -D__ILP32__" |
| 42 | |
| 43 | export SWIG_FEATURES |
| 44 | |
| 45 | export STAGING_DIR |
| 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" |