[oe-commits] Richard Purdie : autotools.bbclass: Fix gettext macro versions issues

git at git.openembedded.org git at git.openembedded.org
Thu Oct 11 13:17:08 UTC 2012


Module: openembedded-core.git
Branch: master-next
Commit: e8e9b6b010dae92e3a2908e04c1a5bf206fd6c33
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=e8e9b6b010dae92e3a2908e04c1a5bf206fd6c33

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Thu Oct 11 08:43:01 2012 +0000

autotools.bbclass: Fix gettext macro versions issues

gettext m4 macros don't use the usual versioning/serial mechanism used by
aclocal. It therefore won't update them over and above any local version of
the macro. Equally, we don't run gettextize due to it doing slightly crazy
things to the build.

When we put the aclocal directory as a -I option to aclocal, if this was
found first compared to any recipe provided macros, the correct version
of the gettext macro would still "win". With the switch so correctly override
the system directory, older recipe provided macros may get used.

This patch manually removes the problematic m4 macros in the case we're using
gettext and need to use the correct m4 macros.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/autotools.bbclass |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 23058be..3935db2 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -179,9 +179,14 @@ autotools_do_configure() {
 			else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
 				# We'd call gettextize here if it wasn't so broken...
 					cp ${STAGING_DATADIR}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
-					if [ -d ${S}/po/ -a ! -e ${S}/po/Makefile.in.in ]; then
+					if [ -d ${S}/po/ ]; then
 						cp ${STAGING_DATADIR}/gettext/po/Makefile.in.in ${S}/po/
 					fi
+					for i in gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4; do
+						for j in `find ${S} -name $i | grep -v aclocal-copy`; do
+							rm $j
+						done
+					done
 				fi
 			fi
 		fi





More information about the Openembedded-commits mailing list