aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-08-28 19:46:06 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2017-08-31 10:18:33 +0200
commitf50e344cffbf0e1513308f0a2c845e21b272f1b5 (patch)
treebf04bd06ee0df92545b2aedd21477b76746691ca /meta-python
parent346d12ef942ef748821b04ab61df89c1ab506866 (diff)
downloadmeta-openembedded-contrib-f50e344cffbf0e1513308f0a2c845e21b272f1b5.tar.gz
meta-openembedded-contrib-f50e344cffbf0e1513308f0a2c845e21b272f1b5.tar.bz2
meta-openembedded-contrib-f50e344cffbf0e1513308f0a2c845e21b272f1b5.zip
python-m2crypto: Upgrade to 0.26.0
Use proper LICENCE file for LIC_FILES_CHKSUM Update homepage to point to gitlab Fix cross-build arch Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-python')
-rw-r--r--meta-python/recipes-devtools/python/python-m2crypto/cross-compile-platform.patch30
-rw-r--r--meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb (renamed from meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb)21
2 files changed, 41 insertions, 10 deletions
diff --git a/meta-python/recipes-devtools/python/python-m2crypto/cross-compile-platform.patch b/meta-python/recipes-devtools/python/python-m2crypto/cross-compile-platform.patch
new file mode 100644
index 0000000000..c6654e5402
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-m2crypto/cross-compile-platform.patch
@@ -0,0 +1,30 @@
+Do not compute platform, this does not work in cross compile environment
+since it pokes at the system for getting architecture values
+
+Upstream-Status: Inappropriate
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: M2Crypto-0.26.0/setup.py
+===================================================================
+--- M2Crypto-0.26.0.orig/setup.py
++++ M2Crypto-0.26.0/setup.py
+@@ -141,19 +141,6 @@ class _M2CryptoBuildExt(build_ext.build_
+ self.include_dirs.append(
+ os.path.join(self.openssl, 'include', 'openssl'))
+
+- # For RedHat-based distros, the '-D__{arch}__' option for
+- # Swig needs to be normalized, particularly on i386.
+- mach = platform.machine().lower()
+- if mach in ('i386', 'i486', 'i586', 'i686'):
+- arch = '__i386__'
+- elif mach in ('ppc64', 'powerpc64'):
+- arch = '__powerpc64__'
+- elif mach in ('ppc', 'powerpc'):
+- arch = '__powerpc__'
+- else:
+- arch = '__%s__' % mach
+- self.swig_opts.append('-D%s' % arch)
+-
+ self.swig_opts.extend(['-I%s' % i for i in self.include_dirs])
+ self.swig_opts.append('-includeall')
+ self.swig_opts.append('-modern')
diff --git a/meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb b/meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb
index 72523bd7f0..4b4fbbb7c2 100644
--- a/meta-python/recipes-devtools/python/python-m2crypto_0.25.1.bb
+++ b/meta-python/recipes-devtools/python/python-m2crypto_0.26.0.bb
@@ -1,13 +1,14 @@
SUMMARY = "A Python crypto and SSL toolkit"
-HOMEPAGE = "http://chandlerproject.org/bin/view/Projects/MeTooCrypto"
+HOMEPAGE = "https://gitlab.com/m2crypto/m2crypto"
LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://PKG-INFO;md5=95295693f047bb8f76928251a6154a60"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e"
-SRC_URI[md5sum] = "040234289fbef5bed4029f0f7d1dae35"
-SRC_URI[sha256sum] = "ac303a1881307a51c85ee8b1d87844d9866ee823b4fdbc52f7e79187c2d9acef"
-
-SRC_URI += "file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch "
+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
@@ -18,16 +19,16 @@ 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}"
-inherit setuptools
-
-SWIG_FEATURES_x86-64 = "-D__x86_64__"
-SWIG_FEATURES ?= ""
+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