From: Gyorgy Sarvari <skandigraun@gmail.com>
To: liezhi.yang@windriver.com, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 1/1] autotools.bbclass: Copy gettext/po/Makefile.in.in to all po/Makefile.in.in
Date: Wed, 21 May 2025 10:55:25 +0200 [thread overview]
Message-ID: <a4e6e52e-b27a-496f-a715-24ceca866ab6@gmail.com> (raw)
In-Reply-To: <ec444128381202080ec89649e127d0e6ae6cbdf5.1747817251.git.liezhi.yang@windriver.com>
On 5/21/25 10:50, Robert Yang via lists.openembedded.org wrote:
> From: Robert Yang <liezhi.yang@windriver.com>
>
> The previous code only copied to ${S}/po/Makefile.in.in, but there might be
> other po/Makefile.in.in in ${S}, for example:
> * bison:
> runtime-po/Makefile.in.in
> gnulib-po/Makefile.in.in
>
> * gawk:
> extension/po/Makefile.in.in
>
> * fontconfig
> po-conf/Makefile.in.in
>
> * There might be more recipes in oe-core, and more recipes from other layers.
>
> The build would be failed after upgrade gettext to 0.24.1 since gettext changed
> the way to include Makevars, so we have to fix the recipes one by one, such as:
> do_configure:prepend() {
> cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/runtime-po/
> cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/gnulib-po/
> }
>
> Even if we don't upgrade gettext to 0.24.1, have different po/Makefile.in.in in
> the same ${S} is a kind of bug, this patch can fix the issues.
>
> The fix way is:
> Find all possible po/Makefile.in.in, if it is the same as ${S}/po/Makefile.in.in,
> then override it with ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in.
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
> meta/classes-recipe/autotools.bbclass | 22 +++++++++++++++++++++-
> 1 file changed, 21 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes-recipe/autotools.bbclass b/meta/classes-recipe/autotools.bbclass
> index 948f8c183a..d4138bfc57 100644
> --- a/meta/classes-recipe/autotools.bbclass
> +++ b/meta/classes-recipe/autotools.bbclass
> @@ -188,8 +188,28 @@ autotools_do_configure() {
> elif [ "${BPN}" != "gettext" ] && grep -q "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
> # We'd call gettextize here if it wasn't so broken...
> cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
> + # Find all possible po/Makefile.in.in, if it is the same as
> + # po/Makefile.in.in, then override it with
> + # ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in.
> if [ -d ${S}/po/ ]; then
> - cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/
> + makefile_in_in_top=${S}/po/Makefile.in.in
> + need_copy=$makefile_in_in_top
> + if [ -f $makefile_in_in_top ]; then
> + makefile_in_ins="$(find ${S} -name Makefile.in.in)"
> + for makefile_in_in in $makefile_in_ins; do
> + if [ $makefile_in_in != $makefile_in_in_top ]; then
> + diff="$(diff ${S}/po/Makefile.in.in $makefile_in_in)"
> + if [ -z $difff ]; then
There seems to be an extra f (difff vs diff)
> + need_copy="$need_copy $makefile_in_in"
> + fi
> + fi
> + done
> + fi
> + for makefile in $need_copy; do
> + cmd="cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in $makefile"
> + bbnote "Running $cmd"
> + $cmd
> + done
> if [ ! -e ${S}/po/remove-potcdate.sed ]; then
> cp ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sed ${S}/po/
> fi
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#217006): https://lists.openembedded.org/g/openembedded-core/message/217006
> Mute This Topic: https://lists.openembedded.org/mt/113225997/6084445
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [skandigraun@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
next prev parent reply other threads:[~2025-05-21 8:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-21 8:50 [PATCH 0/1] autotools.bbclass: Copy gettext/po/Makefile.in.in to all po/Makefile.in.in liezhi.yang
2025-05-21 8:50 ` [PATCH 1/1] " liezhi.yang
2025-05-21 8:55 ` Gyorgy Sarvari [this message]
2025-05-21 9:26 ` [OE-core] " Robert Yang
2025-05-21 10:21 ` Ross Burton
2025-05-21 11:56 ` Robert Yang
2025-06-05 5:40 ` Robert Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a4e6e52e-b27a-496f-a715-24ceca866ab6@gmail.com \
--to=skandigraun@gmail.com \
--cc=liezhi.yang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox