[oe-commits] [openembedded-core] 07/09: uninative/mtools: Set GCONV_PATH centrally to ensure the correct value

git at git.openembedded.org git at git.openembedded.org
Sat Mar 5 08:26:58 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 8de6ab35dd7c384b382aaf5563f49b379b27df9a
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Sat Mar 5 08:21:50 2016 +0000

    uninative/mtools: Set GCONV_PATH centrally to ensure the correct value
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/uninative.bbclass                | 15 ++++++++++-----
 meta/recipes-devtools/mtools/mtools_3.9.9.bb  |  5 -----
 meta/recipes-devtools/mtools/mtools_4.0.18.bb |  5 -----
 3 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
index 7f242de..6abcbed 100644
--- a/meta/classes/uninative.bbclass
+++ b/meta/classes/uninative.bbclass
@@ -57,9 +57,7 @@ python uninative_event_fetchloader() {
         cmd = d.expand("mkdir -p ${STAGING_DIR}-uninative; cd ${STAGING_DIR}-uninative; tar -xjf ${UNINATIVE_DLDIR}/${UNINATIVE_TARBALL}; ${STAGING_DIR}-uninative/relocate_sdk.py ${STAGING_DIR}-uninative/${BUILD_ARCH}-linux ${UNINATIVE_LOADER} ${UNINATIVE_LOADER} ${STAGING_DIR}-uninative/${BUILD_ARCH}-linux/${bindir_native}/patchelf-uninative")
         subprocess.check_call(cmd, shell=True)
 
-        d.setVar("NATIVELSBSTRING", "universal")
-        d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp")
-        d.prependVar("PATH", "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:")
+        enable_uninative(d)
 
     except bb.fetch2.BBFetchException as exc:
         bb.warn("Disabling uninative as unable to fetch uninative tarball: %s" % str(exc))
@@ -76,14 +74,21 @@ python uninative_event_enable() {
     This event handler is called in the workers and is responsible for setting
     up uninative if a loader is found.
     """
+    enable_uninative(d)
+}
 
+def enable_uninative(d):
     loader = d.getVar("UNINATIVE_LOADER", True)
     if os.path.exists(loader):
         bb.debug(2, "Enabling uninative")
         d.setVar("NATIVELSBSTRING", "universal")
+
+        uninative_dir = "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux"
         d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp")
-        d.prependVar("PATH", "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:")
-}
+        d.prependVar("PATH", "%s${bindir_native}:" % uninative_dir)
+        # We need this so mcopy (mtools) can find codepages correctly for example
+        d.setVar("GCONV_PATH", "%s${libdir_native}/gconv" % uninative_dir)
+        d.setVarFlag("GCONV_PATH", "export", "1")
 
 python uninative_changeinterp () {
     import subprocess
diff --git a/meta/recipes-devtools/mtools/mtools_3.9.9.bb b/meta/recipes-devtools/mtools/mtools_3.9.9.bb
index 26d52a9..3423917 100644
--- a/meta/recipes-devtools/mtools/mtools_3.9.9.bb
+++ b/meta/recipes-devtools/mtools/mtools_3.9.9.bb
@@ -51,8 +51,3 @@ do_install_prepend () {
     mkdir -p ${D}/${bindir}
     mkdir -p ${D}/${datadir}
 }
-
-do_install_append_class-native () {
-    create_wrapper ${D}${bindir}/mcopy \
-        GCONV_PATH=${libdir}/gconv
-}
diff --git a/meta/recipes-devtools/mtools/mtools_4.0.18.bb b/meta/recipes-devtools/mtools/mtools_4.0.18.bb
index 479fd32..efde547 100644
--- a/meta/recipes-devtools/mtools/mtools_4.0.18.bb
+++ b/meta/recipes-devtools/mtools/mtools_4.0.18.bb
@@ -48,8 +48,3 @@ do_install_prepend () {
     mkdir -p ${D}/${bindir}
     mkdir -p ${D}/${datadir}
 }
-
-do_install_append_class-native () {
-    create_wrapper ${D}${bindir}/mcopy \
-        GCONV_PATH=${libdir}/gconv
-}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list