summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-locale.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-locale.inc')
-rw-r--r--meta/recipes-core/eglibc/eglibc-locale.inc96
1 files changed, 96 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-locale.inc b/meta/recipes-core/eglibc/eglibc-locale.inc
new file mode 100644
index 0000000..4da5abd
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-locale.inc
@@ -0,0 +1,96 @@
1include eglibc-collateral.inc
2
3SUMMARY = "Locale data from eglibc"
4
5BPN = "eglibc"
6LOCALEBASEPN = "${MLPREFIX}eglibc"
7
8# eglibc-collateral.inc inhibits all default deps, but do_package needs objcopy
9# ERROR: objcopy failed with exit code 127 (cmd was 'i586-webos-linux-objcopy' --only-keep-debug 'eglibc-locale/2.17-r0/package/usr/lib/gconv/IBM1166.so' 'eglibc-locale/2.17-r0/package/usr/lib/gconv/.debug/IBM1166.so')
10# ERROR: Function failed: split_and_strip_files
11BINUTILSDEP = "virtual/${MLPREFIX}${TARGET_PREFIX}binutils:do_populate_sysroot"
12BINUTILSDEP_class-nativesdk = "virtual/${TARGET_PREFIX}binutils-crosssdk:do_populate_sysroot"
13do_package[depends] += "${BINUTILSDEP}"
14
15# Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION
16# is set. The idea is to avoid running localedef on the target (at first boot)
17# to decrease initial boot time and avoid localedef being killed by the OOM
18# killer which used to effectively break i18n on machines with < 128MB RAM.
19
20# default to disabled
21ENABLE_BINARY_LOCALE_GENERATION ?= "0"
22ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-eglibc-locale = "0"
23
24#enable locale generation on these arches
25# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
26BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips mips64"
27
28# set "1" to use cross-localedef for locale generation
29# set "0" for qemu emulation of native localedef for locale generation
30LOCALE_GENERATION_WITH_CROSS-LOCALEDEF = "1"
31
32PROVIDES = "virtual/libc-locale"
33
34PACKAGES = "localedef ${PN}-dbg"
35
36PACKAGES_DYNAMIC = "^locale-base-.* \
37 ^eglibc-gconv-.* ^eglibc-charmap-.* ^eglibc-localedata-.* ^eglibc-binary-localedata-.* \
38 ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \
39 ^${MLPREFIX}eglibc-gconv$"
40
41# Create a eglibc-binaries package
42ALLOW_EMPTY_${BPN}-binaries = "1"
43PACKAGES += "${BPN}-binaries"
44RRECOMMENDS_${BPN}-binaries = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-binary") != -1])}"
45
46# Create a eglibc-charmaps package
47ALLOW_EMPTY_${BPN}-charmaps = "1"
48PACKAGES += "${BPN}-charmaps"
49RRECOMMENDS_${BPN}-charmaps = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-charmap") != -1])}"
50
51# Create a eglibc-gconvs package
52ALLOW_EMPTY_${BPN}-gconvs = "1"
53PACKAGES += "${BPN}-gconvs"
54RRECOMMENDS_${BPN}-gconvs = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-gconv") != -1])}"
55
56# Create a eglibc-localedatas package
57ALLOW_EMPTY_${BPN}-localedatas = "1"
58PACKAGES += "${BPN}-localedatas"
59RRECOMMENDS_${BPN}-localedatas = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-localedata") != -1])}"
60
61DESCRIPTION_localedef = "eglibc: compile locale definition files"
62
63# eglibc-gconv is dynamically added into PACKAGES, thus
64# FILES_eglibc-gconv will not be automatically extended in multilib.
65# Explicitly add ${MLPREFIX} for FILES_eglibc-gconv.
66FILES_${MLPREFIX}eglibc-gconv = "${libdir}/gconv/*"
67FILES_${PN}-dbg += "${libdir}/gconv/.debug/*"
68FILES_localedef = "${bindir}/localedef"
69
70LOCALETREESRC = "${STAGING_INCDIR}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}"
71
72do_install () {
73 mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir}
74 if [ -n "$(ls ${LOCALETREESRC}/${bindir})" ]; then
75 cp -fpPR ${LOCALETREESRC}/${bindir}/* ${D}${bindir}
76 fi
77 if [ -n "$(ls ${LOCALETREESRC}/${localedir})" ]; then
78 mkdir -p ${D}${localedir}
79 cp -fpPR ${LOCALETREESRC}/${localedir}/* ${D}${localedir}
80 fi
81 if [ -e ${LOCALETREESRC}/${libdir}/gconv ]; then
82 cp -fpPR ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir}
83 fi
84 if [ -e ${LOCALETREESRC}/${datadir}/i18n ]; then
85 cp -fpPR ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir}
86 fi
87 if [ -e ${LOCALETREESRC}/${datadir}/locale ]; then
88 cp -fpPR ${LOCALETREESRC}/${datadir}/locale ${D}${datadir}
89 fi
90 chown root.root -R ${D}
91 cp -fpPR ${LOCALETREESRC}/SUPPORTED ${WORKDIR}
92}
93
94inherit libc-package
95
96BBCLASSEXTEND = "nativesdk"