From e222c07ae9b38f77095c76c326f16dc17dcc73c9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 2 Oct 2017 09:06:54 -0700 Subject: python-m2crypto: Upgrade to 0.26.4 Signed-off-by: Khem Raj Signed-off-by: Martin Jansa --- .../m2crypto-0.26.4-gcc_macros.patch | 24 +++++++++++ .../python/python-m2crypto_0.26.0.bb | 50 ---------------------- .../python/python-m2crypto_0.26.4.bb | 50 ++++++++++++++++++++++ 3 files changed, 74 insertions(+), 50 deletions(-) create mode 100644 meta-python/recipes-devtools/python/python-m2crypto/m2crypto-0.26.4-gcc_macros.patch delete mode 100644 meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb create mode 100644 meta-python/recipes-devtools/python/python-m2crypto_0.26.4.bb diff --git a/meta-python/recipes-devtools/python/python-m2crypto/m2crypto-0.26.4-gcc_macros.patch b/meta-python/recipes-devtools/python/python-m2crypto/m2crypto-0.26.4-gcc_macros.patch new file mode 100644 index 0000000000..2d738cc94e --- /dev/null +++ b/meta-python/recipes-devtools/python/python-m2crypto/m2crypto-0.26.4-gcc_macros.patch @@ -0,0 +1,24 @@ +Imported from Fedora + +--- M2Crypto/SWIG/_m2crypto.i 2017-09-26 11:26:33.000000000 +0200 ++++ M2Crypto-0.26.4/SWIG/_m2crypto.i 2017-09-26 21:04:14.080330741 +0200 +@@ -7,6 +7,7 @@ + * Copyright (c) 2009-2010 Heikki Toivonen. All rights reserved. + * + */ ++%import "gcc_macros.h" + + %module(threads=1) m2crypto + /* We really don't need threadblock (PyGILState_Ensure() etc.) anywhere. +@@ -15,11 +16,6 @@ + %nothreadblock; + %nothreadallow; + +-#if SWIG_VERSION >= 0x030000 +-#define __WCHAR_MAX__ __WCHAR_MAX +-#define __WCHAR_MIN__ __WCHAR_MIN +-#endif +- + %{ + #if __GNUC__ < 5 + #pragma GCC diagnostic ignored "-Wunused-label" diff --git a/meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb b/meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb deleted file mode 100644 index 4b4fbbb7c2..0000000000 --- a/meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb +++ /dev/null @@ -1,50 +0,0 @@ -SUMMARY = "A Python crypto and SSL toolkit" -HOMEPAGE = "https://gitlab.com/m2crypto/m2crypto" - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e" - -SRC_URI += "file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \ - file://cross-compile-platform.patch \ - " -SRC_URI[md5sum] = "9f02f0b88fbe225cc6ea8680945cafa0" -SRC_URI[sha256sum] = "05d94fd9b2dae2fb8e072819a795f0e05d3611b09ea185f68e1630530ec09ae8" - -PYPI_PACKAGE = "M2Crypto" -inherit pypi setuptools 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_compile_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" diff --git a/meta-python/recipes-devtools/python/python-m2crypto_0.26.4.bb b/meta-python/recipes-devtools/python/python-m2crypto_0.26.4.bb new file mode 100644 index 0000000000..272c76ca17 --- /dev/null +++ b/meta-python/recipes-devtools/python/python-m2crypto_0.26.4.bb @@ -0,0 +1,50 @@ +SUMMARY = "A Python crypto and SSL toolkit" +HOMEPAGE = "https://gitlab.com/m2crypto/m2crypto" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e" + +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] = "5c74c25ba8b45122318a165a3a2059ad" +SRC_URI[sha256sum] = "5cae7acc0b34821f8c0ddf6665e482893fe1f198ad6379e61ffa9d8e65f5c199" + +PYPI_PACKAGE = "M2Crypto" +inherit pypi setuptools 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_compile_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" -- cgit 1.2.3-korg