Skip to contentSkip to conversation

python-m2crypto build fix

PATCH New Armin Kuster 1 participant 2 messages Mar 8, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python-m2crypto build fix

Found an issue running additional while new clean builds today.

I can squash this with the package update if you want.

Armin Kuster (1):
python-m2crypto: fix build issue

 .../python/python-m2crypto_0.23.0.bb               | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
Signature · 1 line
2.3.5
#1 lore raw

PATCH 1/1 python-m2crypto: fix build issue

restore swig file fiddling:

tmp/sysroots/qemux86/usr/include/openssl/opensslconf.h:45: Error: Unable to find 'openssl/opensslconf-64.h'
error: command 'swig' failed with exit status 1

---
 .../python/python-m2crypto_0.23.0.bb               | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
meta-python/recipes-devtools/python/python-m2crypto_0.23.0.bb +22 -0
index af8ca09..f6f0e1f 100644
@@ -27,4 +27,26 @@ SWIG_FEATURES_x86-64 = "-D__x86_64__"
 SWIG_FEATURES ?= ""
 export SWIG_FEATURES
 
+# Get around a problem with swig, but only if the
+# multilib header file exists.
+#
+do_compile_prepend() {
+    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"
Signature · 1 line
2.3.5