[oe] [meta-qt5][PATCH] qmake5_base.bbclass: Add install support for native builds

Poole Jr, Donald R. donald.poole at swri.org
Fri May 2 18:44:35 UTC 2014


Martin, et. al,

What is the processes for patch submission review? Does the review team
review and test the patch and then report it¹s acceptance?

Donald R. Poole, Jr.
Research Engineer
Voice: 210.522.3131 | Fax: 210.522.4931
Tactical Networks & Communications (tacticalnetworks.swri.org)
Southwest Research Institute (SwRI)


On 5/1/14, 4:03 PM, "Martin Jansa" <martin.jansa at gmail.com> wrote:

>On Thu, May 01, 2014 at 03:01:01PM -0500, Donald R. Poole, Jr. wrote:
>> From: "Donald R. Poole, Jr" <donald (dot) poole (at) swri (dot) org>
>> 
>> Currently, if you are building native applications with Qt5, the
>>current qmake5_base_do_install() method assumes an install into the
>>image folder for the target. Since the native builds handle this a
>>little differently, this patch should account for the native install
>>scenario.
>
>Can you explain a bit why you're building qt5 native application? Is it
>used to build some target packages?
>
>> ---
>>  classes/qmake5_base.bbclass |   37
>>++++++++++++++++++++++---------------
>>  1 file changed, 22 insertions(+), 15 deletions(-)
>> 
>> diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass
>> index 18fdb2a..df8a59a 100644
>> --- a/classes/qmake5_base.bbclass
>> +++ b/classes/qmake5_base.bbclass
>> @@ -163,23 +163,30 @@ qmake5_base_do_configure () {
>>  
>>  qmake5_base_do_install() {
>>      # Fix install paths for all
>> -    find -name "Makefile*" | xargs sed -i
>>"s,(INSTALL_ROOT)${STAGING_DIR_TARGET},(INSTALL_ROOT),g"
>> +    if [ "${BUILD_SYS}" = "${HOST_SYS}" ] ; then
>> +        find -name "Makefile*" | xargs sed -i
>>"s,(INSTALL_ROOT),(INSTALL_ROOT)${STAGING_DIR_NATIVE},g"
>> +    else
>> +        find -name "Makefile*" | xargs sed -i
>>"s,(INSTALL_ROOT)${STAGING_DIR_TARGET},(INSTALL_ROOT),g"
>> +    fi
>>  
>>      oe_runmake install INSTALL_ROOT=${D}
>>  
>> -    # everything except HostData and HostBinaries is prefixed with
>>sysroot value,
>> -    # but we cannot remove sysroot override, because that's useful for
>>pkg-config etc
>> -    # In some cases like QtQmlDevTools in qtdeclarative, the sed above
>>does not work,
>> -    # fix them manually
>> -    if [ -d ${D}${STAGING_DIR_TARGET} ] && [ -n
>>"${STAGING_DIR_TARGET}" ] ; then
>> -        echo "Some files are installed in wrong directory
>>${D}${STAGING_DIR_TARGET}"
>> -        cp -ra ${D}${STAGING_DIR_TARGET}/* ${D}
>> -        rm -rf ${D}${STAGING_DIR_TARGET}
>> -        # remove empty dirs
>> -        TMP=`dirname ${D}/${STAGING_DIR_TARGET}`
>> -        while test ${TMP} != ${D}; do
>> -            rmdir ${TMP}
>> -            TMP=`dirname ${TMP}`;
>> -        done
>> +    # Only do this for target builds. Native install work a little
>>differently
>> +    if [ "${BUILD_SYS}" != "${HOST_SYS}" ] ; then
>> +        # everything except HostData and HostBinaries is prefixed with
>>sysroot value,
>> +        # but we cannot remove sysroot override, because that's useful
>>for pkg-config etc
>> +        # In some cases like QtQmlDevTools in qtdeclarative, the sed
>>above does not work,
>> +        # fix them manually
>> +        if [ -d ${D}${STAGING_DIR_TARGET} ] && [ -n
>>"${STAGING_DIR_TARGET}" ] ; then
>> +            echo "Some files are installed in wrong directory
>>${D}${STAGING_DIR_TARGET}"
>> +            cp -ra ${D}${STAGING_DIR_TARGET}/* ${D}
>> +            rm -rf ${D}${STAGING_DIR_TARGET}
>> +            # remove empty dirs
>> +            TMP=`dirname ${D}/${STAGING_DIR_TARGET}`
>> +            while test ${TMP} != ${D}; do
>> +                rmdir ${TMP}
>> +                TMP=`dirname ${TMP}`;
>> +            done
>> +        fi
>>      fi
>>  }
>> -- 
>> 1.7.9.5
>> 
>> -- 
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
>-- 
>Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com




More information about the Openembedded-devel mailing list