Patchwork [meta-oe,v4,12/12] qmake_base.bbclass: sync with oe-core class

login
register
mail settings
Submitter Otavio Salvador
Date May 9, 2011, 7:16 p.m.
Message ID <1304968617-4949-12-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/3527/
State New, archived
Headers show

Comments

Otavio Salvador - May 9, 2011, 7:16 p.m.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta-oe/classes/qmake_base.bbclass |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

Patch

diff --git a/meta-oe/classes/qmake_base.bbclass b/meta-oe/classes/qmake_base.bbclass
index 577c0fa..654c7c8 100644
--- a/meta-oe/classes/qmake_base.bbclass
+++ b/meta-oe/classes/qmake_base.bbclass
@@ -1,6 +1,6 @@ 
 
 OE_QMAKE_PLATFORM = "${TARGET_OS}-oe-g++"
-QMAKESPEC = "${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}"
+QMAKESPEC := "${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}"
 
 # We override this completely to eliminate the -e normally passed in
 EXTRA_OEMAKE = ' MAKEFLAGS= '
@@ -34,6 +34,20 @@  oe_qmake_mkspecs () {
     done
 }
 
+do_generate_qt_config_file() {
+	export QT_CONF_PATH=${WORKDIR}/qt.conf
+	cat > ${WORKDIR}/qt.conf <<EOF
+[Paths]
+Prefix = ${STAGING_DIR}
+Binaries = ${BUILD_SYS}${bindir_native}
+Headers = ${MACHINE}${prefix}/include/qt4
+Plugins = ${MACHINE}${prefix}/lib/qt4/plugins/
+Mkspecs = ${MACHINE}${prefix}/share/qt4/mkspecs/
+EOF
+}
+
+addtask generate_qt_config_file after do_patch before do_configure
+
 qmake_base_do_configure() {
 	case ${QMAKESPEC} in
 	*linux-oe-g++|*linux-uclibc-oe-g++|*linux-gnueabi-oe-g++|*linux-uclibceabi-oe-g++)
@@ -42,7 +56,7 @@  qmake_base_do_configure() {
 		die Unsupported target ${TARGET_OS} for oe-g++ qmake spec
 		;;
 	*)
-		oenote Searching for qmake spec file
+		bbnote Searching for qmake spec file
 		paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-${TARGET_ARCH}-g++"
 		paths="${QMAKE_MKSPEC_PATH}/${TARGET_OS}-g++ $paths"
 
@@ -58,7 +72,7 @@  qmake_base_do_configure() {
 		;;
 	esac
 
-	oenote "using qmake spec in ${QMAKESPEC}, using profiles '${QMAKE_PROFILES}'"
+	bbnote "using qmake spec in ${QMAKESPEC}, using profiles '${QMAKE_PROFILES}'"
 
 	if [ -z "${QMAKE_PROFILES}" ]; then 
 		PROFILES="`ls *.pro`"
@@ -73,15 +87,15 @@  qmake_base_do_configure() {
 	if [ ! -z "${EXTRA_QMAKEVARS_POST}" ]; then
 		AFTER="-after"
 		QMAKE_VARSUBST_POST="${EXTRA_QMAKEVARS_POST}"
-		oenote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}"
+		bbnote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}"
 	fi
 
 	if [ ! -z "${EXTRA_QMAKEVARS_PRE}" ]; then
 		QMAKE_VARSUBST_PRE="${EXTRA_QMAKEVARS_PRE}"
-		oenote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
+		bbnote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
 	fi
 
-#oenote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'"
+#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"
 }