diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2013-04-29 11:59:52 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-05-05 12:56:34 +0200 |
commit | d57e27ec08164d1c06e7f5169aa0fb23725f78b4 (patch) | |
tree | 064fe85f00e47ce2120836b3af10f3b6480c99aa | |
parent | cd2ac1d786da2be205f8059da9f58f919fa4a24b (diff) | |
download | meta-qt5-d57e27ec08164d1c06e7f5169aa0fb23725f78b4.tar.gz |
qt5: Instead of fixing paths after installation, fix them in Makefile before
* thanks to Mikko Levonmaa
* move it from qt5.inc to qmake5_base.bbclass, because it can be useful
for other apps too
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r-- | classes/qmake5_base.bbclass | 23 | ||||
-rw-r--r-- | recipes-qt/qt5/qt5.inc | 15 |
2 files changed, 24 insertions, 14 deletions
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass index 0181edc0..42c3e9ae 100644 --- a/classes/qmake5_base.bbclass +++ b/classes/qmake5_base.bbclass | |||
@@ -138,3 +138,26 @@ qmake5_base_do_configure () { | |||
138 | CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} -r $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST" | 138 | CMD="${OE_QMAKE_QMAKE} -makefile -o Makefile ${OE_QMAKE_DEBUG_OUTPUT} -r $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST" |
139 | $CMD || die "Error calling $CMD" | 139 | $CMD || die "Error calling $CMD" |
140 | } | 140 | } |
141 | |||
142 | qmake5_base_do_install() { | ||
143 | # Fix install paths for all | ||
144 | find -name "Makefile*" | xargs sed -i "s,(INSTALL_ROOT)${STAGING_DIR_TARGET},(INSTALL_ROOT),g" | ||
145 | |||
146 | oe_runmake install INSTALL_ROOT=${D} | ||
147 | |||
148 | # everything except HostData and HostBinaries is prefixed with sysroot value, | ||
149 | # but we cannot remove sysroot override, because that's useful for pkg-config etc | ||
150 | # In some cases like QtQmlDevTools in qtdeclarative, the sed above does not work, | ||
151 | # fix them manually | ||
152 | if [ -d ${D}${STAGING_DIR_TARGET} ] ; then | ||
153 | echo "Some files are installed in wrong directory ${D}${STAGING_DIR_TARGET}" | ||
154 | cp -ra ${D}${STAGING_DIR_TARGET}/* ${D} | ||
155 | rm -rf ${D}${STAGING_DIR_TARGET} | ||
156 | # remove empty dirs | ||
157 | TMP=`dirname ${D}/${STAGING_DIR_TARGET}` | ||
158 | while test ${TMP} != ${D}; do | ||
159 | rmdir ${TMP} | ||
160 | TMP=`dirname ${TMP}`; | ||
161 | done | ||
162 | fi | ||
163 | } | ||
diff --git a/recipes-qt/qt5/qt5.inc b/recipes-qt/qt5/qt5.inc index 4e78577a..474eee21 100644 --- a/recipes-qt/qt5/qt5.inc +++ b/recipes-qt/qt5/qt5.inc | |||
@@ -82,20 +82,7 @@ do_compile() { | |||
82 | } | 82 | } |
83 | 83 | ||
84 | do_install() { | 84 | do_install() { |
85 | oe_runmake install INSTALL_ROOT=${D} | 85 | qmake5_base_do_install |
86 | |||
87 | # everything except HostData and HostBinaries is prefixed with sysroot value, | ||
88 | # but we cannot remove sysroot override, because that's useful for pkg-config etc | ||
89 | if [ -d ${D}${STAGING_DIR_TARGET} ] ; then | ||
90 | cp -ra ${D}${STAGING_DIR_TARGET}/* ${D} | ||
91 | rm -rf ${D}${STAGING_DIR_TARGET} | ||
92 | # remove empty dirs | ||
93 | TMP=`dirname ${D}/${STAGING_DIR_TARGET}` | ||
94 | while test ${TMP} != ${D}; do | ||
95 | rmdir ${TMP} | ||
96 | TMP=`dirname ${TMP}`; | ||
97 | done | ||
98 | fi | ||
99 | } | 86 | } |
100 | 87 | ||
101 | PACKAGES =. "${PN}-tools-dbg ${PN}-plugins-dbg ${PN}-tools ${PN}-plugins ${PN}-mkspecs " | 88 | PACKAGES =. "${PN}-tools-dbg ${PN}-plugins-dbg ${PN}-tools ${PN}-plugins ${PN}-mkspecs " |