[OE-core] [PATCH] glib-2.0/glib.inc: fix broken mingw build

Juro Bystricky juro.bystricky at intel.com
Thu Apr 12 22:28:07 UTC 2018


mingw build was broken by the commit:
"glib-2.0/glib.inc: apply MLPREFIX renaming to all package classes"

When building for mingw, we encounter build errors such as:

  mv: cannot stat '<builddir>/<...>/usr/libexec/gio-querymodules': No such file or directory

The file that exists is actually "gio-querymodules.exe", but still there is no
good reason to rename it to "nativesdk-gio-querymodules.exe".
So for mingw we simply avoid renaming of the executable, by skippng the line:

  mv -v ${D}${libexecdir}/gio-querymodules ${D}${libexecdir}/${MLPREFIX}gio-querymodules

[YOCTO #12679]

Signed-off-by: Juro Bystricky <juro.bystricky at intel.com>
---
 meta/recipes-core/glib-2.0/glib.inc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index b7c32e6..92ac19e 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -91,6 +91,9 @@ USE_NLS_class-target = "yes"
 USE_NLS_class-nativesdk = "yes"
 CACHED_CONFIGUREVARS_append_class-native = " ac_cv_path_MSGFMT=/bin/false"
 
+EXEEXT = ""
+EXEEXT_mingw32 = ".exe"
+
 do_install_append () {
 	if [ -f ${D}${bindir}/gtester-report ]; then
 		sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python3|'
@@ -106,7 +109,7 @@ do_install_append () {
 	fi
 
         # Make sure gio-querymodules is unique among multilibs
-        if test "x${MLPREFIX}" != "x"; then
+        if test "x${MLPREFIX}" != "x" && test "${EXEEXT}" != ".exe"; then
                 mv ${D}${libexecdir}/gio-querymodules ${D}${libexecdir}/${MLPREFIX}gio-querymodules
         fi
 }
-- 
2.7.4




More information about the Openembedded-core mailing list