diff mbox series

[oe,meta-python,17/17] python-m2crypto: Ignore WCHAR_MAX and WCHAR_MIN when on musl

Message ID 20180906172210.42551-17-raj.khem@gmail.com
State Accepted
Commit 5ccc6fd2dabc6aa0454e45ca168a9eca3c983cba
Headers show
Series [oe,meta-oe,01/17] pkcs11-helper: Upgrade to 1.25.1 | expand

Commit Message

Khem Raj Sept. 6, 2018, 5:22 p.m. UTC
This fixes the build until we upgrade to swig 4.0 where this is fixed

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../recipes-devtools/python/python-m2crypto.inc  |  9 +++------
 .../m2crypto-0.26.4-gcc_macros.patch             | 16 ++++++++++++----
 2 files changed, 15 insertions(+), 10 deletions(-)

-- 
2.18.0

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python-m2crypto.inc b/meta-python/recipes-devtools/python/python-m2crypto.inc
index da714874af..a36ab8a7fa 100644
--- a/meta-python/recipes-devtools/python/python-m2crypto.inc
+++ b/meta-python/recipes-devtools/python/python-m2crypto.inc
@@ -19,10 +19,11 @@  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}"
+DISTUTILS_BUILD_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR} -I${STAGING_INCDIR}"
+DISTUTILS_INSTALL_ARGS += "build_ext --openssl=${STAGING_EXECPREFIXDIR}"
 
 SWIG_FEATURES_x86 = "-D__i386__"
+SWIG_FEATURES_x32 = "-D__ILP32__"
 SWIG_FEATURES ?= "-D__${HOST_ARCH}__"
 export SWIG_FEATURES
 
@@ -51,7 +52,3 @@  do_configure_prepend() {
 }
 
 BBCLASSEXTEND = "native"
-
-# http://errors.yoctoproject.org/Errors/Details/184714/
-# SWIG/_m2crypto.i:10: Error: Unable to find 'gcc_macros.h'
-CLEANBROKEN = "1"
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
index 931c25c8ee..7f6dd29f8a 100644
--- 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
@@ -4,16 +4,19 @@  Index: M2Crypto-0.30.1/SWIG/_m2crypto.i
 ===================================================================
 --- M2Crypto-0.30.1.orig/SWIG/_m2crypto.i
 +++ M2Crypto-0.30.1/SWIG/_m2crypto.i
-@@ -7,7 +7,7 @@
-  * Copyright (c) 2009-2010 Heikki Toivonen. All rights reserved.
+@@ -8,6 +8,11 @@
   *
   */
--
+ 
 +%import "gcc_macros.h"
++
++%ignore WCHAR_MAX;
++%ignore WCHAR_MIN;
++
  %module(threads=1) m2crypto
  /* We really don't need threadblock (PyGILState_Ensure() etc.) anywhere.
     Disable threadallow as well, only enable it for operations likely to
-@@ -15,11 +15,6 @@
+@@ -15,11 +20,6 @@
  %nothreadblock;
  %nothreadallow;
  
@@ -25,3 +28,8 @@  Index: M2Crypto-0.30.1/SWIG/_m2crypto.i
  %{
  #ifdef _WIN32
  #define _WINSOCKAPI_
+@@ -95,4 +95,3 @@ static PyObject *x509_store_verify_cb_fu
+ %constant int encrypt = 1;
+ %constant int decrypt = 0;
+ #endif
+-