From 542fefa61f0ac1dcdacac2630fd44950ac11cdd9 Mon Sep 17 00:00:00 2001 From: Jonathan Liu Date: Fri, 7 Jun 2013 15:15:37 +1000 Subject: classes/qmake_base: update .pro hack This adds support for lconvert and xmlpatterns tools and tweaks the sed expressions to handle more complex assignments in .pro files like: LRELEASE = $$targetPath($$[QT_INSTALL_BINS]/lrelease) Signed-off-by: Jonathan Liu Signed-off-by: Saul Wold --- meta/classes/qmake_base.bbclass | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'meta') diff --git a/meta/classes/qmake_base.bbclass b/meta/classes/qmake_base.bbclass index 52e7fb0ff8..79040cde0f 100644 --- a/meta/classes/qmake_base.bbclass +++ b/meta/classes/qmake_base.bbclass @@ -94,9 +94,20 @@ qmake_base_do_configure() { fi # Hack .pro files to use OE utilities + LCONVERT_NAME=$(basename ${OE_QMAKE_LCONVERT}) + LRELEASE_NAME=$(basename ${OE_QMAKE_LRELEASE}) + LUPDATE_NAME=$(basename ${OE_QMAKE_LUPDATE}) + XMLPATTERNS_NAME=$(basename ${OE_QMAKE_XMLPATTERNS}) find -name '*.pro' \ - -exec sed -i -e 's,=\s*.*/lrelease,= ${OE_QMAKE_LRELEASE},g' \ - -e 's,=\s*.*/lupdate,= ${OE_QMAKE_LUPDATE},g' '{}' ';' + -exec sed -i -e "s|\(=\s*.*\)/$LCONVERT_NAME|\1/lconvert|g" \ + -e "s|\(=\s*.*\)/$LRELEASE_NAME|\1/lrelease|g" \ + -e "s|\(=\s*.*\)/$LUPDATE_NAME|\1/lupdate|g" \ + -e "s|\(=\s*.*\)/$XMLPATTERNS_NAME|\1/xmlpatterns|g" \ + -e "s|\(=\s*.*\)/lconvert|\1/$LCONVERT_NAME|g" \ + -e "s|\(=\s*.*\)/lrelease|\1/$LRELEASE_NAME|g" \ + -e "s|\(=\s*.*\)/lupdate|\1/$LUPDATE_NAME|g" \ + -e "s|\(=\s*.*\)/xmlpatterns|\1/$XMLPATTERNS_NAME|g" \ + '{}' ';' #bbnote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'" unset QMAKESPEC || true -- cgit v1.2.3