Patchwork [26/30] qmake_base.bbclass: add generate_qt_config_file task

login
register
mail settings
Submitter Saul Wold
Date May 10, 2011, 5:26 a.m.
Message ID <118af5382d7c13327de95c46e4976ed7863ba3d0.1305004776.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/3583/
State New, archived
Headers show

Comments

Saul Wold - May 10, 2011, 5:26 a.m.
From: Otavio Salvador <otavio@ossystems.com.br>

This writes a qt.conf inside WORKDIR to properly configure projects
based on CMake. This is required since qmake variables (returned
by -query command) are fixed into the binary and can only be
changed using a qt.conf file.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/classes/qmake_base.bbclass |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
Richard Purdie - May 10, 2011, 8:43 a.m.
On Mon, 2011-05-09 at 22:26 -0700, Saul Wold wrote:
> From: Otavio Salvador <otavio@ossystems.com.br>
> 
> This writes a qt.conf inside WORKDIR to properly configure projects
> based on CMake. This is required since qmake variables (returned
> by -query command) are fixed into the binary and can only be
> changed using a qt.conf file.
> 
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  meta/classes/qmake_base.bbclass |   15 +++++++++++++++
>  1 files changed, 15 insertions(+), 0 deletions(-)
> 
> diff --git a/meta/classes/qmake_base.bbclass b/meta/classes/qmake_base.bbclass
> index 24a0f11..37c44c7 100644
> --- a/meta/classes/qmake_base.bbclass
> +++ b/meta/classes/qmake_base.bbclass
> @@ -31,6 +31,21 @@ oe_qmake_mkspecs () {
>      done
>  }
>  
> +do_generate_qt_config_file() {
> +	export QT_CONF_PATH=${WORKDIR}/qt.conf
> +	bbwarn "${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/

Can we simplify this to use STAGING_BINDIR_NATIVE, STAGING_INCDIR,
STAGING_LIBDIR and STAGING_DATADIR?

Cheers,

Richard
Koen Kooi - May 10, 2011, 9:20 a.m.
Op 10 mei 2011, om 10:43 heeft Richard Purdie het volgende geschreven:

> On Mon, 2011-05-09 at 22:26 -0700, Saul Wold wrote:
>> From: Otavio Salvador <otavio@ossystems.com.br>
>> 
>> This writes a qt.conf inside WORKDIR to properly configure projects
>> based on CMake. This is required since qmake variables (returned
>> by -query command) are fixed into the binary and can only be
>> changed using a qt.conf file.
>> 
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> ---
>> meta/classes/qmake_base.bbclass |   15 +++++++++++++++
>> 1 files changed, 15 insertions(+), 0 deletions(-)
>> 
>> diff --git a/meta/classes/qmake_base.bbclass b/meta/classes/qmake_base.bbclass
>> index 24a0f11..37c44c7 100644
>> --- a/meta/classes/qmake_base.bbclass
>> +++ b/meta/classes/qmake_base.bbclass
>> @@ -31,6 +31,21 @@ oe_qmake_mkspecs () {
>>     done
>> }
>> 
>> +do_generate_qt_config_file() {
>> +	export QT_CONF_PATH=${WORKDIR}/qt.conf
>> +	bbwarn "${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/
> 
> Can we simplify this to use STAGING_BINDIR_NATIVE, STAGING_INCDIR,
> STAGING_LIBDIR and STAGING_DATADIR?


And consider the case of building without MACHINE and distros having a different staging layout. I know angstrom has one to enable parallel builds of uclibc and eglibc.

regards,

Koen
Otavio Salvador - May 10, 2011, 12:46 p.m.
On Tue, May 10, 2011 at 06:20, Koen Kooi <koen@dominion.thruhere.net> wrote:
> And consider the case of building without MACHINE and distros having a different staging layout. I know angstrom has one to enable parallel builds of uclibc and eglibc.

In this case what we ought to use?
Koen Kooi - May 10, 2011, 1:32 p.m.
Op 10 mei 2011, om 14:46 heeft Otavio Salvador het volgende geschreven:

> On Tue, May 10, 2011 at 06:20, Koen Kooi <koen@dominion.thruhere.net> wrote:
>> And consider the case of building without MACHINE and distros having a different staging layout. I know angstrom has one to enable parallel builds of uclibc and eglibc.
> 
> In this case what we ought to use?

Keep prefix empty and use STAGING_LIBDIR, etc as RP said.

> 
> -- 
> Otavio Salvador                             O.S. Systems
> E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
> Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/classes/qmake_base.bbclass b/meta/classes/qmake_base.bbclass
index 24a0f11..37c44c7 100644
--- a/meta/classes/qmake_base.bbclass
+++ b/meta/classes/qmake_base.bbclass
@@ -31,6 +31,21 @@  oe_qmake_mkspecs () {
     done
 }
 
+do_generate_qt_config_file() {
+	export QT_CONF_PATH=${WORKDIR}/qt.conf
+	bbwarn "${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++)