Patchwork [1/1] accel-ppp: fix qa issue 'found library in wrong location' while multilib enabled on qemux86-64

login
register
mail settings
Submitter Hongxu Jia
Date Nov. 7, 2013, 2:10 a.m.
Message ID <938ba7c6374320f101e870e1c5e97d51f1252875.1383789890.git.hongxu.jia@windriver.com>
Download mbox | patch
Permalink /patch/61225/
State Accepted, archived
Headers show

Comments

Hongxu Jia - Nov. 7, 2013, 2:10 a.m.
While multilib enabled on qemux86-64, accel-ppp-lib should be installed to
'${baselib}/accel-ppp', but the accel-ppp's CMakeLists.txt hardcoded
to install to 'lib/accel-ppp', such as:
...
INSTALL(TARGETS log_file
        LIBRARY DESTINATION lib/accel-ppp
)
...

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta-networking/recipes-protocols/accel-ppp/accel-ppp_git.bb | 9 +++++++++
 1 file changed, 9 insertions(+)

Patch

diff --git a/meta-networking/recipes-protocols/accel-ppp/accel-ppp_git.bb b/meta-networking/recipes-protocols/accel-ppp/accel-ppp_git.bb
index a7c10f7..dde1f43 100644
--- a/meta-networking/recipes-protocols/accel-ppp/accel-ppp_git.bb
+++ b/meta-networking/recipes-protocols/accel-ppp/accel-ppp_git.bb
@@ -30,3 +30,12 @@  PACKAGES =+ "${PN}-libs"
 FILES_${PN}-libs = "${libdir}/${BPN}/*.so /usr/lib/${BPN}/*.so"
 INSANE_SKIP_${PN}-libs = "dev-so"
 RDEPENDS_${PN} += "${PN}-libs"
+
+do_install_prepend() {
+    cmlist=`find ${S} -name CMakeLists.txt`
+    for file in $cmlist; do
+        sed -i -e "s:LIBRARY DESTINATION lib/accel-ppp:LIBRARY DESTINATION ${baselib}/accel-ppp:g" \
+               -e "s:\${CMAKE_INSTALL_PREFIX}/lib/accel-ppp:\${CMAKE_INSTALL_PREFIX}/${baselib}/accel-ppp:g" \
+               $cmlist
+    done
+}