[OE-core] [PATCH] zlib: minor symbolic link issue

Matthieu CRAPET Matthieu.CRAPET at ingenico.com
Wed May 20 09:47:44 UTC 2015


Hello,

Just tell me if something is wrong, I can provide a v2 patch.

Regards,
Matthieu


-----Message d'origine-----
De : openembedded-core-bounces at lists.openembedded.org [mailto:openembedded-core-bounces at lists.openembedded.org] De la part de Matthieu Crapet
Envoyé : mardi 5 mai 2015 10:14
À : openembedded-core at lists.openembedded.org
Objet : [OE-core] [PATCH] zlib: minor symbolic link issue

libz.so symbolic link created in ${libdir} is ../..//lib/libz.so.1.2.8 Make it cleaner and generic (idea comes from libcgroup recipe).

Signed-off-by: Matthieu Crapet <Matthieu.Crapet at ingenico.com>
---
 meta/recipes-core/zlib/zlib_1.2.8.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/zlib/zlib_1.2.8.bb b/meta/recipes-core/zlib/zlib_1.2.8.bb
index ca0ba3f..5e11f23 100644
--- a/meta/recipes-core/zlib/zlib_1.2.8.bb
+++ b/meta/recipes-core/zlib/zlib_1.2.8.bb
@@ -6,7 +6,6 @@ SECTION = "libs"
 LICENSE = "Zlib"
 LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=fde612df1e5933c428b73844a0c494fd"
 
-
 SRC_URI = "http://www.zlib.net/${BPN}-${PV}.tar.xz \
            file://remove.ldconfig.call.patch \
            file://Makefile-runtests.patch \ @@ -54,7 +53,8 @@ do_install_append_class-target() {
 		mkdir -p ${D}/${base_libdir}
 		mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir}
 		tmp=`readlink ${D}/${libdir}/libz.so`
-		ln -sf ../../${base_libdir}/$tmp ${D}/${libdir}/libz.so
+		rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
+		ln -sf ${rel_lib_prefix}${base_libdir}/$tmp ${D}/${libdir}/libz.so
 	fi
 }
 
--
1.9.1

--
_______________________________________________
Openembedded-core mailing list
Openembedded-core at lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list