blob: e0f4870beaeadff07c1f344300318998e4eb278f [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "A Python crypto and SSL toolkit"
2HOMEPAGE = "https://gitlab.com/m2crypto/m2crypto"
3
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e"
6
Patrick Williams213cb262021-08-07 19:21:33 -05007FILESEXTRAPATHS:prepend := "${THISDIR}/python-m2crypto:"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08008
9SRC_URI += "file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \
10 file://cross-compile-platform.patch \
Andrew Geissler69721092021-07-23 12:57:00 -040011 file://avoid-host-contamination.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080012 "
Andrew Geissler69721092021-07-23 12:57:00 -040013SRC_URI[sha256sum] = "99f2260a30901c949a8dc6d5f82cd5312ffb8abc92e76633baf231bbbcb2decb"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080014
15PYPI_PACKAGE = "M2Crypto"
Andrew Geisslerf103a7f2021-05-07 16:09:40 -050016inherit pypi siteinfo setuptools3
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080017
18DEPENDS += "openssl swig-native"
Patrick Williams213cb262021-08-07 19:21:33 -050019RDEPENDS:${PN} += "\
Andrew Geissler89770b02020-06-13 10:40:47 -050020 ${PYTHON_PN}-datetime \
21 ${PYTHON_PN}-distutils \
22 ${PYTHON_PN}-logging \
23 ${PYTHON_PN}-netclient \
24 ${PYTHON_PN}-netserver \
25 ${PYTHON_PN}-numbers \
26 ${PYTHON_PN}-smtpd \
Andrew Geissler89770b02020-06-13 10:40:47 -050027 ${PYTHON_PN}-xmlrpc \
28"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029
30DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR} -I${STAGING_INCDIR}"
31DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}"
32
Patrick Williams213cb262021-08-07 19:21:33 -050033SWIG_FEATURES:x86 = "-D__i386__"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080034SWIG_FEATURES_x32 = "-D__ILP32__"
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070035
36SWIG_FEATURES ?= "-D__${HOST_ARCH}__ ${@['-D__ILP32__','-D__LP64__'][d.getVar('SITEINFO_BITS') != '32']}"
37
Patrick Williams213cb262021-08-07 19:21:33 -050038SWIG_FEATURES:append:riscv64 = " -D__SIZEOF_POINTER__=${SITEINFO_BITS}/8 -D__riscv_xlen=${SITEINFO_BITS}"
39SWIG_FEATURES:append:riscv32 = " -D__SIZEOF_POINTER__=${SITEINFO_BITS}/8 -D__riscv_xlen=${SITEINFO_BITS}"
40SWIG_FEATURES:append:mipsarch = " -D_MIPS_SZPTR=${SITEINFO_BITS}"
41SWIG_FEATURES:append:powerpc64le = " -D_:powerpc64__"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080042export SWIG_FEATURES
43
Andrew Geissler69721092021-07-23 12:57:00 -040044export STAGING_DIR
45
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080046BBCLASSEXTEND = "native"