Patchwork autotools.bbclass: fixed bash build error

login
register
mail settings
Submitter Wenlin Kang
Date May 14, 2014, 9:30 a.m.
Message ID <1400059849-7711-1-git-send-email-wenlin.kang@windriver.com>
Download mbox | patch
Permalink /patch/72147/
State New
Headers show

Comments

Wenlin Kang - May 14, 2014, 9:30 a.m.
When build bash, a error occurs, the cause is that autotools uses
improper Makefile.in.in which is from path/gettext/po/ but not bash
itself in bash/po/,so to avoid some error to occur, we should use
package itself Makefile.in.in file if it has.

Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
---
 meta/classes/autotools.bbclass |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Chris Larson - May 14, 2014, 5:45 p.m.
On Wed, May 14, 2014 at 2:30 AM, Wenlin Kang <wenlin.kang@windriver.com>wrote:

> When build bash, a error occurs, the cause is that autotools uses
> improper Makefile.in.in which is from path/gettext/po/ but not bash
> itself in bash/po/,so to avoid some error to occur, we should use
> package itself Makefile.in.in file if it has.
>
> Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
>

This will cause breakage when the shipped Makefile.in.in gettext version
mismatches with the gettext-native/gettext we built.
Wenlin Kang - May 15, 2014, 2:32 a.m.
On 2014?05?15? 01:45, Christopher Larson wrote:
>
> On Wed, May 14, 2014 at 2:30 AM, Wenlin Kang 
> <wenlin.kang@windriver.com <mailto:wenlin.kang@windriver.com>> wrote:
>
>     When build bash, a error occurs, the cause is that autotools uses
>     improper Makefile.in.in <http://Makefile.in.in> which is from
>     path/gettext/po/ but not bash
>     itself in bash/po/,so to avoid some error to occur, we should use
>     package itself Makefile.in.in <http://Makefile.in.in> file if it has.
>
>     Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com
>     <mailto:wenlin.kang@windriver.com>>
>
>
> This will cause breakage when the shipped Makefile.in.in 
> <http://Makefile.in.in> gettext version mismatches with the 
> gettext-native/gettext we built.

     but if we directly use gettext-native/gettext/Makefile.in.in just 
as now,  for bash, it do occur some problem,  can't  get correct value 
of PACKAGE, VERSION due to use incorrect  variable name(the right should 
is PACKAGE_NAME, PACKAGE_VERSION) , can't get BUILD_DIR, and  can't get 
po-directories(it indeed isn't exist) in bash/po/Makefile.
these all can trigger a build error in bash/po ,  so, whether we can 
have a much well solution for it, can you have some good advices, thanks?
> -- 
> Christopher Larson
> clarson at kergoth dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Maintainer - Tslib
> Senior Software Engineer, Mentor Graphics

Patch

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 0dc1e6b..db46e3b 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -230,7 +230,9 @@  autotools_do_configure() {
 			# We'd call gettextize here if it wasn't so broken...
 				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/Makefile.in.in ]; then
+						cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/
+					fi
 					if [ ! -e ${S}/po/remove-potcdate.sin ]; then
 						cp ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sin ${S}/po/
 					fi