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