From 15bd5f4ebb70f3cfc36534a759ce2dbd6515d6e6 Mon Sep 17 00:00:00 2001 From: Jens Rehsack Date: Mon, 27 Aug 2018 13:07:35 +0200 Subject: python{, 3}-m2crypto: update from 0.26.4 -> 0.30.1 Updating recipe for crypto and SSL toolkit for python and support python3 infrastructure of Yocto as well as the already supported python2 line. Refresh patches to fix devtool warnings Signed-off-by: Jens Rehsack Signed-off-by: Khem Raj --- .../recipes-devtools/python/python-m2crypto.inc | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python-m2crypto.inc (limited to 'meta-python/recipes-devtools/python/python-m2crypto.inc') diff --git a/meta-python/recipes-devtools/python/python-m2crypto.inc b/meta-python/recipes-devtools/python/python-m2crypto.inc new file mode 100644 index 0000000000..d0eaa819b1 --- /dev/null +++ b/meta-python/recipes-devtools/python/python-m2crypto.inc @@ -0,0 +1,56 @@ +SUMMARY = "A Python crypto and SSL toolkit" +HOMEPAGE = "https://gitlab.com/m2crypto/m2crypto" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e" + +FILESEXTRAPATHS_prepend := "${THISDIR}/python-m2crypto:" + +SRC_URI += "file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \ + file://cross-compile-platform.patch \ + file://m2crypto-0.26.4-gcc_macros.patch \ + " +SRC_URI[md5sum] = "7fce3cbf85eb84a669682892b935746b" +SRC_URI[sha256sum] = "a1b2751cdadc6afac3df8a5799676b7b7c67a6ad144bb62d38563062e7cd3fc6" + +PYPI_PACKAGE = "M2Crypto" +inherit pypi siteinfo + +DEPENDS += "openssl swig-native" +RDEPENDS_${PN} += "python-typing" + +DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" +DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_DIR_HOST}" + +SWIG_FEATURES_x86 = "-D__i386__" +SWIG_FEATURES ?= "-D__${HOST_ARCH}__" +export SWIG_FEATURES + +# Get around a problem with swig, but only if the +# multilib header file exists. +# +do_configure_prepend() { + ${CPP} -dM - < /dev/null | grep -v __STDC__ | grep -v __REGISTER_PREFIX__ | grep -v __GNUC__ \ + | sed 's/^\(#define \([^ ]*\) .*\)$/#undef \2\n\1/' > SWIG/gcc_macros.h + if [ "${SITEINFO_BITS}" = "64" ];then + bit="64" + else + bit="32" + fi + + if [ -e ${STAGING_INCDIR}/openssl/opensslconf-${bit}.h ] ;then + for i in SWIG/_ec.i SWIG/_evp.i; do + sed -i -e "s/opensslconf.*\./opensslconf-${bit}\./" "$i" + done + elif [ -e ${STAGING_INCDIR}/openssl/opensslconf-n${bit}.h ] ;then + for i in SWIG/_ec.i SWIG/_evp.i; do + sed -i -e "s/opensslconf.*\./opensslconf-n${bit}\./" "$i" + done + fi +} + +BBCLASSEXTEND = "native" + +# http://errors.yoctoproject.org/Errors/Details/184714/ +# SWIG/_m2crypto.i:10: Error: Unable to find 'gcc_macros.h' +CLEANBROKEN = "1" -- cgit 1.2.3-korg