* [PATCH] [meta-python] python3-m2crypto: Improve multilib header workaround
@ 2021-05-08 14:22 Richard Purdie
2021-05-08 16:03 ` [oe] " Khem Raj
0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2021-05-08 14:22 UTC (permalink / raw)
To: openembedded-devel
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 <richard.purdie@linuxfoundation.org>
---
.../python/python3-m2crypto_0.37.1.bb | 25 ++++---------------
1 file changed, 5 insertions(+), 20 deletions(-)
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb b/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb
index 896d9d2cc..45abaac33 100644
--- a/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb
+++ b/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [oe] [PATCH] [meta-python] python3-m2crypto: Improve multilib header workaround
2021-05-08 14:22 [PATCH] [meta-python] python3-m2crypto: Improve multilib header workaround Richard Purdie
@ 2021-05-08 16:03 ` Khem Raj
0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2021-05-08 16:03 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembeded-devel
Thanks for the fix, However, I have found a different way to fix it
correctly [1]
[1] https://lists.openembedded.org/g/openembedded-devel/topic/meta_oe_patch_v2/82680640?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,82680640
On Sat, May 8, 2021 at 7:22 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> 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 <richard.purdie@linuxfoundation.org>
> ---
> .../python/python3-m2crypto_0.37.1.bb | 25 ++++---------------
> 1 file changed, 5 insertions(+), 20 deletions(-)
>
> diff --git a/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb b/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb
> index 896d9d2cc..45abaac33 100644
> --- a/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb
> +++ b/meta-python/recipes-devtools/python/python3-m2crypto_0.37.1.bb
> @@ -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
>
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-08 16:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08 14:22 [PATCH] [meta-python] python3-m2crypto: Improve multilib header workaround Richard Purdie
2021-05-08 16:03 ` [oe] " Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.