All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-selinux] [PATCH v1] libpcre: do no create links when compiling for windows
@ 2019-01-31 19:09 Sinan Kaya
  0 siblings, 0 replies; only message in thread
From: Sinan Kaya @ 2019-01-31 19:09 UTC (permalink / raw)
  To: yocto

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 <okaya@kernel.org>
---
 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 59c0184..dc287d7 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} ]; 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} ]; 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
 }
 
-- 
2.19.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-31 19:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-31 19:09 [meta-selinux] [PATCH v1] libpcre: do no create links when compiling for windows Sinan Kaya

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.