[PATCH 73/73] glib-2.0: Fix locale location on musl

Khem Raj
2016-01-17T11:38:04Z

gettext.m4 macro does not detect musl triplets and falls back to
${libdir}/locale

It ends up with lot of packging warning
"files installed but not packaged"

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../{uclibc.patch => uclibc_musl_translation.patch} | 20 +++++++++++---------
meta/recipes-core/glib-2.0/glib-2.0_2.46.1.bb | 2 +-
meta/recipes-core/glib-2.0/glib.inc | 4 ++++
3 files changed, 16 insertions(+), 10 deletions(-)
rename meta/recipes-core/glib-2.0/glib-2.0/{uclibc.patch => uclibc_musl_translation.patch} (51%)

diff --git a/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch b/meta/recipes-core/glib-2.0/glib-2.0/uclibc_musl_translation.patch
similarity index 51%
rename from meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch
rename to meta/recipes-core/glib-2.0/glib-2.0/uclibc_musl_translation.patch
index 2a154fd..7aa6217 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch
+++ b/meta/recipes-core/glib-2.0/glib-2.0/uclibc_musl_translation.patch
@@ -5,16 +5,18 @@ based systems therefore lets set DATADIRNAME to "share".

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
-Index: glib-2.38.2/m4macros/glib-gettext.m4
+Index: glib-2.46.1/m4macros/glib-gettext.m4
===================================================================
---- glib-2.38.2.orig/m4macros/glib-gettext.m4 2013-11-07 07:29:13.000000000 -0800
-+++ glib-2.38.2/m4macros/glib-gettext.m4 2014-03-15 14:51:54.712135644 -0700
-@@ -239,7 +239,7 @@
- [CATOBJEXT=.mo
- DATADIRNAME=lib])
- ;;
-- *-*-openbsd*)
-+ *-*-openbsd* | *-*-linux-uclibc*)
+--- glib-2.46.1.orig/m4macros/glib-gettext.m4
++++ glib-2.46.1/m4macros/glib-gettext.m4
+@@ -243,6 +243,10 @@ msgstr ""
CATOBJEXT=.mo
DATADIRNAME=share
;;
++ *-*-musl* | *-*-linux-uclibc*)
++ CATOBJEXT=.gmo
++ DATADIRNAME=share
++ ;;
+ *)
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.46.1.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.46.1.bb
index 04951f4..937ae65 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.46.1.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.46.1.bb
@@ -11,7 +11,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://glib-2.0-configure-readlink.patch \
file://run-ptest \
file://ptest-paths.patch \
- file://uclibc.patch \
+ file://uclibc_musl_translation.patch \
file://0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch \
file://allow-run-media-sdX-drive-mount-if-username-root.patch \
file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index 86f7e0e..66082a2 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -73,6 +73,10 @@ do_install_append () {
fi
}

+do_install_append_libc-musl () {
+ rm -f ${D}${libdir}/charset.alias
+}
+
RDEPENDS_${PN}-ptest += "\
gnome-desktop-testing \
tzdata \
--
2.7.0