From: Jonathan Liu <net147@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 3/3] classes/qmake_base: update .pro hack
Date: Fri, 7 Jun 2013 15:15:37 +1000 [thread overview]
Message-ID: <1370582137-26940-4-git-send-email-net147@gmail.com> (raw)
In-Reply-To: <1370582137-26940-1-git-send-email-net147@gmail.com>
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 <net147@gmail.com>
---
meta/classes/qmake_base.bbclass | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/meta/classes/qmake_base.bbclass b/meta/classes/qmake_base.bbclass
index 3762887..86bbede 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
--
1.8.2.3
prev parent reply other threads:[~2013-06-07 5:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-07 5:15 [PATCH 0/3] qt4: add support for lconvert and xmlpatterns tools Jonathan Liu
2013-06-07 5:15 ` [PATCH 1/3] qt4-native: build lconvert and xmlpatterns Jonathan Liu
2013-06-07 5:15 ` [PATCH 2/3] classes/qmake2: export OE_QMAKE_LCONVERT and OE_QMAKE_XMLPATTERNS Jonathan Liu
2013-06-07 5:15 ` Jonathan Liu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1370582137-26940-4-git-send-email-net147@gmail.com \
--to=net147@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox