aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-devtools/python/python-m2crypto.inc
diff options
context:
space:
mode:
authorJens Rehsack <sno@netbsd.org>2018-08-27 13:07:35 +0200
committerKhem Raj <raj.khem@gmail.com>2018-08-28 09:36:28 -0700
commitb37c8ae8d93cc5c3ff57865f5d97909e7bfe436e (patch)
treef0877dc9a422f2bc903f022269ae07050672e545 /recipes-devtools/python/python-m2crypto.inc
parent150cde3add7266c6c9b3c320f3200164ec3317ff (diff)
downloadmeta-python2-b37c8ae8d93cc5c3ff57865f5d97909e7bfe436e.tar.gz
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 (From meta-openembedded commit: 15bd5f4ebb70f3cfc36534a759ce2dbd6515d6e6) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Tim Orling <ticotimo@gmail.com>
Diffstat (limited to 'recipes-devtools/python/python-m2crypto.inc')
-rw-r--r--recipes-devtools/python/python-m2crypto.inc56
1 files changed, 56 insertions, 0 deletions
diff --git a/recipes-devtools/python/python-m2crypto.inc b/recipes-devtools/python/python-m2crypto.inc
new file mode 100644
index 0000000..d0eaa81
--- /dev/null
+++ b/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"