diff mbox series

[meta-oe] python3-m2crypto: workaround for swig issue with sys/types.h

Message ID 20241201090119.1946131-1-peter.marko@siemens.com
State Under Review
Headers show
Series [meta-oe] python3-m2crypto: workaround for swig issue with sys/types.h | expand

Commit Message

Marko, Peter Dec. 1, 2024, 9:01 a.m. UTC
From: Peter Marko <peter.marko@siemens.com>

Upgrade to openssl 3.4.0 added sys/types.h into include/openssl/e_os2.h
Unfortunetelly swig has issue with this and the build broke.
Add a workaroung to remove this include until swig is fixed.
In our setup this include is not necessary.

Upstream issue: https://github.com/swiftlang/swift/issues/69311

Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
master-next has already 0.43.0, but that does not compile for other reasons yet
so I have updated 0.42.0 that the master can compile with newest oe-core with openssl 4.3.0

 .../recipes-devtools/python/python3-m2crypto_0.42.0.bb       | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-m2crypto_0.42.0.bb b/meta-python/recipes-devtools/python/python3-m2crypto_0.42.0.bb
index 6b178cd127..b50ae31e4c 100644
--- a/meta-python/recipes-devtools/python/python3-m2crypto_0.42.0.bb
+++ b/meta-python/recipes-devtools/python/python3-m2crypto_0.42.0.bb
@@ -35,6 +35,11 @@  export SWIG_FEATURES
 
 export STAGING_DIR
 
+do_configure:prepend() {
+    # workaround for https://github.com/swiftlang/swift/issues/69311
+    sed -i "/sys\/types.h/d" ${RECIPE_SYSROOT}${includedir}/openssl/e_os2.h
+}
+
 do_install:append() {
     rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/M2Crypto/SSL/__pycache__/*.cpython-*.pyc
     rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/M2Crypto/__pycache__/*.cpython-*.pyc