On 8/30/25 22:55, Gyorgy Sarvari via lists.openembedded.org wrote:
> diff --git a/meta/classes-recipe/autotools.bbclass 
> b/meta/classes-recipe/autotools.bbclass
> index 948f8c183a..0d83e68679 100644
> --- a/meta/classes-recipe/autotools.bbclass
> +++ b/meta/classes-recipe/autotools.bbclass
> @@ -186,13 +186,35 @@ autotools_do_configure() {
>                               echo "no" | glib-gettextize --force --copy
>                       fi
>               elif [ "${BPN}" != "gettext" ] && grep -q 
> "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC; then
> -                     # We'd call gettextize here if it wasn't so broken...
> +                     # Gettextize could be called here, however it doesn't 
> make the job much easier:
> +                     # It doesn't discover relevant po folders on its own, 
> so they still need to be
> +                     # found by some heurestics. Also, it would require 
> always the full gettext
> +                     # package always, instead of gettext-minimal-native.
>                       cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath 
> ${AUTOTOOLS_AUXDIR}/
> -                     if [ -d ${S}/po/ ]; then
> -                             cp -f 
> ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/
> -                             if [ ! -e ${S}/po/remove-potcdate.sed ]; then
> -                                     cp 
> ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sed ${S}/po/
> +                     if [ -d ${S}/po ]; then
> +                             if [ -f ${S}/po/Makefile.in.in ]; then
> +                                     # search for all Makefile.in.in files 
> that are identical to ./po/Makefile.in.in, by md5sum
> +                                     base_makefile_hash=`md5sum 
> ${S}/po/Makefile.in.in | tr -s ' ' | cut -f1 -d' '`
> +                                     makefiles_to_update=`find ${S} -name 
> Makefile.in.in -exec md5sum {} \+ | grep $base_makefile_hash | tr -s ' ' | 
> cut -d' ' -f2`
> +                             else
> +                                     # if there is no po/Makefile.in.in, 
> then just copy the latest there, without
> +                                     # searching for others
> +                                     
> makefiles_to_update="./po/Makefile.in.in"
>                               fi
> +                             bbnote List of Makefile.in.ins to update: 
> $makefiles_to_update
> +                             for makefile in ${makefiles_to_update}; do
> +                                     makefile_dir=$(dirname $makefile)
> +                                     bbnote Executing: cp 
> ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${makefile_dir}/
> +                                     cp 
> ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${makefile_dir}/
> +                                     if [ ! -e 
> ${makefile_dir}/remove-potcdate.sed ]; then
> +                                             cp 
> ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sed ${makefile_dir}/
> +                                     fi
> +                             done
> +                             for makevars in `find ${S} -name Makevars`; do
> +                                     bbnote Concatenating Makevars: $makevars
> +                                     cat 
> ${STAGING_DATADIR_NATIVE}/gettext/po/Makevars.template.minimal ${makevars} >> 
> ${makevars}.yocto_temp
> +                                     mv ${makevars}.yocto_temp ${makevars}
> +                             done
>                       fi
>

In principle I think that it's about as I can make it on my own (sans AB
failures[1]), but there would be a few question marks on my end:

1. If you have a better idea for relevant Makefile.in.in heurestics in
autotools.bbclass, I'm listening
2. I *think* that the Makevars concatenation makes actual sense, and the
build success is not only an accident - but I'm not 100% sure if that's
the best way to handle this. If you know gettext, I'd like to hear your
opinion. (This was inspired by gettextize's behavior. Upon running it,
it copies the Makevars.template with default values in the po folder,
and asks you to set up all the variables from it in your Makevars file)

[1]: I did build recipes and multiple images successfully, but not
"bitbake world" on multiple configs
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#222628): 
https://lists.openembedded.org/g/openembedded-core/message/222628
Mute This Topic: https://lists.openembedded.org/mt/114982746/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to