python3-m2crypto: Improve multilib header workaround
PATCH 1/1 python3-m2crypto: Improve multilib header workaround
The multilib header issues continue to cause problems for this recipe. Simplfy the workaround to something which resolves all the current issues and is much simpler to understand/maintain.
Signed-off-by Richard Purdie <[email protected]>
--- .../python/python3-m2crypto_0.37.1.bb | 25 ++++--------------- 1 file changed, 5 insertions(+), 20 deletions(-)
meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb +5 -20
@@ -36,27 +36,12 @@ SWIG_FEATURES_x32 = "-D__ILP32__" SWIG_FEATURES ?= "-D__${HOST_ARCH}__" export SWIG_FEATURES -# Get around a problem with swig, but only if the -# multilib header file exists. -# do_configure_prepend() { - ${CPP} -dM - < /dev/null | grep -v '__\(STDC\|REGISTER_PREFIX\|GNUC\|STDC_HOSTED\)__' \ - | sed 's/^\(#define \([^ ]*\) .*\)$/#undef \2\n\1/' > ${S}/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}\./" "${S}/$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}\./" "${S}/$i" - done + # swig can't handle any multilib header redirection so just remove it for this build + if [ -e ${STAGING_INCDIR}/openssl/opensslconf-64.h ] ;then + cp ${STAGING_INCDIR}/openssl/opensslconf-64.h ${STAGING_INCDIR}/openssl/opensslconf.h + elif [ -e ${STAGING_INCDIR}/openssl/opensslconf-32.h ] ;then + cp ${STAGING_INCDIR}/openssl/opensslconf-32.h ${STAGING_INCDIR}/openssl/opensslconf.h fi }
Signature · 1 line
2.25.1
Thanks for the fix, However, I have found a different way to fix it correctly [1]
Quoted 53 lines · Richard Purdie
The multilib header issues continue to cause problems for this recipe. Simplfy the workaround to something which resolves all the current issues and is much simpler to understand/maintain.
Signed-off-by Richard Purdie <[email protected]>--- .../python/python3-m2crypto_0.37.1.bb | 25 ++++--------------- 1 file changed, 5 insertions(+), 20 deletions(-)meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb +5
-21@@ -36,27 +36,12 @@ SWIG_FEATURES_x32 = "-D__ILP32__" SWIG_FEATURES ?= "-D__${HOST_ARCH}__" export SWIG_FEATURES -# Get around a problem with swig, but only if the -# multilib header file exists. -# do_configure_prepend() { - ${CPP} -dM - < /dev/null | grep -v '__\(STDC\|REGISTER_PREFIX\|GNUC\|STDC_HOSTED\)__' \ - | sed 's/^\(#define \([^ ]*\) .*\)$/#undef \2\n\1/' > ${S}/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}\./" "${S}/$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}\./" "${S}/$i" - done + # swig can't handle any multilib header redirection so just remove it for this build + if [ -e ${STAGING_INCDIR}/openssl/opensslconf-64.h ] ;then + cp ${STAGING_INCDIR}/openssl/opensslconf-64.h ${STAGING_INCDIR}/openssl/opensslconf.h + elif [ -e ${STAGING_INCDIR}/openssl/opensslconf-32.h ] ;then + cp ${STAGING_INCDIR}/openssl/opensslconf-32.h ${STAGING_INCDIR}/openssl/opensslconf.h fi } --2.25.1