diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-11 08:43:01 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-10-18 12:13:46 +0100 |
commit | 7950bdf88dd3e0af6fd5a1edb34f63c24e913bbb (patch) | |
tree | fb71e2a13a24e23d6fecca09ed6ef278081b63da /meta/classes/autotools.bbclass | |
parent | c0bf72308911a8d1c23f43d60788d82aff453883 (diff) | |
download | poky-7950bdf88dd3e0af6fd5a1edb34f63c24e913bbb.tar.gz |
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.
This patch also always ensures the gettext manipulations happen, even in the
-native case since missing or stale gettext files could cause build failures.
(From OE-Core rev: e9645d2bbeabaa5251d49edd659ab320fd66d0ee)
(From OE-Core rev: 841ea3c1c18e50e77fccbd5f44d6a79a50913b67)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/autotools.bbclass')
-rw-r--r-- | meta/classes/autotools.bbclass | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index 7c99bbdbac..59c5bae8fa 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass | |||
@@ -166,21 +166,24 @@ autotools_do_configure() { | |||
166 | else | 166 | else |
167 | CONFIGURE_AC=configure.ac | 167 | CONFIGURE_AC=configure.ac |
168 | fi | 168 | fi |
169 | if ! echo ${EXTRA_OECONF} | grep -q "\-\-disable-nls"; then | 169 | if grep "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then |
170 | if grep "^[[:space:]]*AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then | 170 | if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then |
171 | if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then | 171 | : do nothing -- we still have an old unmodified configure.ac |
172 | : do nothing -- we still have an old unmodified configure.ac | 172 | else |
173 | else | 173 | bbnote Executing glib-gettextize --force --copy |
174 | bbnote Executing glib-gettextize --force --copy | 174 | echo "no" | glib-gettextize --force --copy |
175 | echo "no" | glib-gettextize --force --copy | 175 | fi |
176 | fi | 176 | else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then |
177 | else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then | 177 | # We'd call gettextize here if it wasn't so broken... |
178 | # We'd call gettextize here if it wasn't so broken... | 178 | cp ${STAGING_DATADIR}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/ |
179 | cp ${STAGING_DATADIR}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/ | 179 | if [ -d ${S}/po/ ]; then |
180 | if [ -d ${S}/po/ -a ! -e ${S}/po/Makefile.in.in ]; then | 180 | cp ${STAGING_DATADIR}/gettext/po/Makefile.in.in ${S}/po/ |
181 | cp ${STAGING_DATADIR}/gettext/po/Makefile.in.in ${S}/po/ | ||
182 | fi | ||
183 | fi | 181 | fi |
182 | for i in gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4; do | ||
183 | for j in `find ${S} -name $i | grep -v aclocal-copy`; do | ||
184 | rm $j | ||
185 | done | ||
186 | done | ||
184 | fi | 187 | fi |
185 | fi | 188 | fi |
186 | mkdir -p m4 | 189 | mkdir -p m4 |