Patchwork [2/3] qmake_base.bbclass: fix lrelease/lupdate binary names

login
register
mail settings
Submitter Otavio Salvador
Date June 1, 2011, 8:09 p.m.
Message ID <ac909be8f5af8515017da51e7217fc15ef69379e.1306958862.git.otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/5249/
State New, archived
Headers show

Comments

Otavio Salvador - June 1, 2011, 8:09 p.m.
To support translation, qmake based projects usually call lrelease and
lupdate however OE changes the binary names so this needs some mangle
to work out of box.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/classes/qmake_base.bbclass |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
Paul Eggleton - June 2, 2011, 4:51 p.m.
On Wednesday 01 June 2011 21:09:54 Otavio Salvador wrote:
> To support translation, qmake based projects usually call lrelease and
> lupdate however OE changes the binary names so this needs some mangle
> to work out of box.
> 
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  meta/classes/qmake_base.bbclass |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/meta/classes/qmake_base.bbclass
> b/meta/classes/qmake_base.bbclass index a054efd..165d689 100644
> --- a/meta/classes/qmake_base.bbclass
> +++ b/meta/classes/qmake_base.bbclass
> @@ -92,6 +92,11 @@ qmake_base_do_configure() {
>  		bbnote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
>  	fi
> 
> +	# Hack .pro files to use OE utilities
> +	find -name '*.pro' \
> +	     -exec sed -i -e 's,=\s*.*/lrelease,= ${OE_QMAKE_LRELEASE},g' \
> +	                  -e 's,=\s*.*/lupdate,= ${OE_QMAKE_LUPDATE},g' '{}' ';'
> +
>  #bbnote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o
> Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'" unset
> QMAKESPEC || true
>  	${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile
> $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error
> calling ${OE_QMAKE_QMAKE} on $PROFILES"

Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Richard Purdie - June 2, 2011, 5:27 p.m.
On Thu, 2011-06-02 at 17:51 +0100, Paul Eggleton wrote:
> On Wednesday 01 June 2011 21:09:54 Otavio Salvador wrote:
> > To support translation, qmake based projects usually call lrelease and
> > lupdate however OE changes the binary names so this needs some mangle
> > to work out of box.
> > 
> > Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> > ---
> >  meta/classes/qmake_base.bbclass |    5 +++++
> >  1 files changed, 5 insertions(+), 0 deletions(-)
> > 
> > diff --git a/meta/classes/qmake_base.bbclass
> > b/meta/classes/qmake_base.bbclass index a054efd..165d689 100644
> > --- a/meta/classes/qmake_base.bbclass
> > +++ b/meta/classes/qmake_base.bbclass
> > @@ -92,6 +92,11 @@ qmake_base_do_configure() {
> >  		bbnote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
> >  	fi
> > 
> > +	# Hack .pro files to use OE utilities
> > +	find -name '*.pro' \
> > +	     -exec sed -i -e 's,=\s*.*/lrelease,= ${OE_QMAKE_LRELEASE},g' \
> > +	                  -e 's,=\s*.*/lupdate,= ${OE_QMAKE_LUPDATE},g' '{}' ';'
> > +
> >  #bbnote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o
> > Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'" unset
> > QMAKESPEC || true
> >  	${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile
> > $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error
> > calling ${OE_QMAKE_QMAKE} on $PROFILES"
> 
> Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com>

Merged to master, thanks.

Richard

Patch

diff --git a/meta/classes/qmake_base.bbclass b/meta/classes/qmake_base.bbclass
index a054efd..165d689 100644
--- a/meta/classes/qmake_base.bbclass
+++ b/meta/classes/qmake_base.bbclass
@@ -92,6 +92,11 @@  qmake_base_do_configure() {
 		bbnote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
 	fi
 
+	# Hack .pro files to use OE utilities
+	find -name '*.pro' \
+	     -exec sed -i -e 's,=\s*.*/lrelease,= ${OE_QMAKE_LRELEASE},g' \
+	                  -e 's,=\s*.*/lupdate,= ${OE_QMAKE_LUPDATE},g' '{}' ';'
+
 #bbnote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'"
 	unset QMAKESPEC || true
 	${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES"