From aed85f4d0c5686d8e202e0d24699d71c1759b455 Mon Sep 17 00:00:00 2001 From: Sinan Kaya Date: Thu, 31 Jan 2019 19:09:40 +0000 Subject: libpcre: do no create links when compiling for windows lipcre-native is trying to create symbolic links to so files when used with meta-mingw. Remove this condition for mingw builds. Signed-off-by: Sinan Kaya Signed-off-by: Joe MacDonald --- recipes-support/libpcre/libpcre_selinux.inc | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/recipes-support/libpcre/libpcre_selinux.inc b/recipes-support/libpcre/libpcre_selinux.inc index d886792..3810078 100644 --- a/recipes-support/libpcre/libpcre_selinux.inc +++ b/recipes-support/libpcre/libpcre_selinux.inc @@ -1,11 +1,17 @@ do_install_append () { - if [ ! ${D}${libdir} -ef ${D}${base_libdir} -a -e ${D}${libdir}/libpcre.so ]; then - realsofile=`readlink ${D}${libdir}/libpcre.so` - mkdir -p ${D}/${base_libdir}/ - mv -f ${D}${libdir}/libpcre.so.* ${D}${base_libdir}/ - relpath=${@os.path.relpath("${base_libdir}", "${libdir}")} - ln -sf ${relpath}/${realsofile} ${D}${libdir}/libpcre.so - ln -sf ${relpath}/${realsofile} ${D}${libdir}/libpcre.so.1 + # This code creates libpcre for both the dev machine (SDK native) + # and for cross-compiling (machine arch). For Linux (SDK Linux native + # + all machine arch), symlinks to the .so files have to be created, + # but not for the Windows SDK native. + if [ ${TARGET_OS} != "mingw32" ]; then + if [ ! ${D}${libdir} -ef ${D}${base_libdir} -a -e ${D}${libdir}/libpcre.so ]; then + realsofile=`readlink ${D}${libdir}/libpcre.so` + mkdir -p ${D}/${base_libdir}/ + mv -f ${D}${libdir}/libpcre.so.* ${D}${base_libdir}/ + relpath=${@os.path.relpath("${base_libdir}", "${libdir}")} + ln -sf ${relpath}/${realsofile} ${D}${libdir}/libpcre.so + ln -sf ${relpath}/${realsofile} ${D}${libdir}/libpcre.so.1 + fi fi } -- cgit v1.2.3-54-g00ecf