diff options
Diffstat (limited to 'meta/recipes-core/glibc/glibc-locale.inc')
-rw-r--r-- | meta/recipes-core/glibc/glibc-locale.inc | 49 |
1 files changed, 22 insertions, 27 deletions
diff --git a/meta/recipes-core/glibc/glibc-locale.inc b/meta/recipes-core/glibc/glibc-locale.inc index ef06389ff9..c63c9edd76 100644 --- a/meta/recipes-core/glibc/glibc-locale.inc +++ b/meta/recipes-core/glibc/glibc-locale.inc | |||
@@ -5,14 +5,9 @@ SUMMARY = "Locale data from glibc" | |||
5 | BPN = "glibc" | 5 | BPN = "glibc" |
6 | LOCALEBASEPN = "${MLPREFIX}glibc" | 6 | LOCALEBASEPN = "${MLPREFIX}glibc" |
7 | 7 | ||
8 | # glibc-collateral.inc inhibits all default deps, but do_package needs objcopy | 8 | # Do not inhibit default deps, do_package requires binutils/gcc for |
9 | # ERROR: objcopy failed with exit code 127 (cmd was 'i586-webos-linux-objcopy' --only-keep-debug 'glibc-locale/2.17-r0/package/usr/lib/gconv/IBM1166.so' 'glibc-locale/2.17-r0/package/usr/lib/gconv/.debug/IBM1166.so') | 9 | # objcopy/gcc-nm and glibc-locale depends on virtual/libc directly. |
10 | # ERROR: Function failed: split_and_strip_files | 10 | INHIBIT_DEFAULT_DEPS = "" |
11 | BINUTILSDEP = "virtual/${MLPREFIX}${TARGET_PREFIX}binutils:do_populate_sysroot" | ||
12 | BINUTILSDEP_class-nativesdk = "virtual/${TARGET_PREFIX}binutils-crosssdk:do_populate_sysroot" | ||
13 | do_package[depends] += "${BINUTILSDEP}" | ||
14 | |||
15 | DEPENDS += "virtual/libc" | ||
16 | 11 | ||
17 | # Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION | 12 | # Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION |
18 | # is set. The idea is to avoid running localedef on the target (at first boot) | 13 | # is set. The idea is to avoid running localedef on the target (at first boot) |
@@ -21,11 +16,11 @@ DEPENDS += "virtual/libc" | |||
21 | 16 | ||
22 | # default to disabled | 17 | # default to disabled |
23 | ENABLE_BINARY_LOCALE_GENERATION ?= "0" | 18 | ENABLE_BINARY_LOCALE_GENERATION ?= "0" |
24 | ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-glibc-locale = "1" | 19 | ENABLE_BINARY_LOCALE_GENERATION:pn-nativesdk-glibc-locale = "1" |
25 | 20 | ||
26 | #enable locale generation on these arches | 21 | #enable locale generation on these arches |
27 | # BINARY_LOCALE_ARCHES is a space separated list of regular expressions | 22 | # BINARY_LOCALE_ARCHES is a space separated list of regular expressions |
28 | BINARY_LOCALE_ARCHES ?= "arc arm.* aarch64 i[3-6]86 x86_64 powerpc mips mips64 riscv32 riscv64" | 23 | BINARY_LOCALE_ARCHES ?= "arc arm.* aarch64 i[3-6]86 x86_64 powerpc mips mips64 riscv32 riscv64 loongarch64" |
29 | 24 | ||
30 | # set "1" to use cross-localedef for locale generation | 25 | # set "1" to use cross-localedef for locale generation |
31 | # set "0" for qemu emulation of native localedef for locale generation | 26 | # set "0" for qemu emulation of native localedef for locale generation |
@@ -33,39 +28,40 @@ LOCALE_GENERATION_WITH_CROSS-LOCALEDEF = "1" | |||
33 | 28 | ||
34 | PROVIDES = "virtual/libc-locale" | 29 | PROVIDES = "virtual/libc-locale" |
35 | 30 | ||
36 | PACKAGES = "localedef ${PN}-dbg" | 31 | PACKAGES = "localedef ${PN}-dbg ${LOCALEBASEPN}-locale-alias" |
37 | 32 | ||
38 | PACKAGES_DYNAMIC = "^locale-base-.* \ | 33 | PACKAGES_DYNAMIC = "^locale-base-.* \ |
39 | ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \ | 34 | ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \ |
40 | ^${MLPREFIX}glibc-gconv$" | 35 | ^${MLPREFIX}glibc-gconv$" |
41 | 36 | ||
42 | # Create a glibc-binaries package | 37 | # Create a glibc-binaries package |
43 | ALLOW_EMPTY_${BPN}-binaries = "1" | 38 | ALLOW_EMPTY:${BPN}-binaries = "1" |
44 | PACKAGES += "${BPN}-binaries" | 39 | PACKAGES += "${BPN}-binaries" |
45 | RRECOMMENDS_${BPN}-binaries = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-binary") != -1])}" | 40 | RRECOMMENDS:${BPN}-binaries = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-binary-") != -1])}" |
46 | 41 | ||
47 | # Create a glibc-charmaps package | 42 | # Create a glibc-charmaps package |
48 | ALLOW_EMPTY_${BPN}-charmaps = "1" | 43 | ALLOW_EMPTY:${BPN}-charmaps = "1" |
49 | PACKAGES += "${BPN}-charmaps" | 44 | PACKAGES += "${BPN}-charmaps" |
50 | RRECOMMENDS_${BPN}-charmaps = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-charmap") != -1])}" | 45 | RRECOMMENDS:${BPN}-charmaps = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-charmap-") != -1])}" |
51 | 46 | ||
52 | # Create a glibc-gconvs package | 47 | # Create a glibc-gconvs package |
53 | ALLOW_EMPTY_${BPN}-gconvs = "1" | 48 | ALLOW_EMPTY:${BPN}-gconvs = "1" |
54 | PACKAGES += "${BPN}-gconvs" | 49 | PACKAGES += "${BPN}-gconvs" |
55 | RRECOMMENDS_${BPN}-gconvs = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-gconv") != -1])}" | 50 | RRECOMMENDS:${BPN}-gconvs = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-gconv-") != -1])}" |
56 | 51 | ||
57 | # Create a glibc-localedatas package | 52 | # Create a glibc-localedatas package |
58 | ALLOW_EMPTY_${BPN}-localedatas = "1" | 53 | ALLOW_EMPTY:${BPN}-localedatas = "1" |
59 | PACKAGES += "${BPN}-localedatas" | 54 | PACKAGES += "${BPN}-localedatas" |
60 | RRECOMMENDS_${BPN}-localedatas = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-localedata") != -1])}" | 55 | RRECOMMENDS:${BPN}-localedatas = "${@" ".join([p for p in d.getVar('PACKAGES').split() if p.find("glibc-localedata-") != -1])}" |
61 | 56 | ||
62 | DESCRIPTION_localedef = "glibc: compile locale definition files" | 57 | DESCRIPTION:localedef = "glibc: compile locale definition files" |
63 | 58 | ||
64 | # glibc-gconv is dynamically added into PACKAGES, thus | 59 | # glibc-gconv is dynamically added into PACKAGES, thus |
65 | # FILES_glibc-gconv will not be automatically extended in multilib. | 60 | # FILES:glibc-gconv will not be automatically extended in multilib. |
66 | # Explicitly add ${MLPREFIX} for FILES_glibc-gconv. | 61 | # Explicitly add ${MLPREFIX} for FILES:glibc-gconv. |
67 | FILES_${MLPREFIX}glibc-gconv = "${libdir}/gconv/*" | 62 | FILES:${MLPREFIX}glibc-gconv = "${libdir}/gconv/*" |
68 | FILES_localedef = "${bindir}/localedef" | 63 | FILES:localedef = "${bindir}/localedef" |
64 | FILES:${LOCALEBASEPN}-locale-alias = "${datadir}/locale/locale.alias" | ||
69 | 65 | ||
70 | LOCALETREESRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale" | 66 | LOCALETREESRC = "${COMPONENTS_DIR}/${PACKAGE_ARCH}/glibc-stash-locale" |
71 | 67 | ||
@@ -87,10 +83,9 @@ do_install() { | |||
87 | if [ ${PACKAGE_NO_GCONV} -eq 0 ]; then | 83 | if [ ${PACKAGE_NO_GCONV} -eq 0 ]; then |
88 | copy_locale_files ${libdir}/gconv 0755 | 84 | copy_locale_files ${libdir}/gconv 0755 |
89 | copy_locale_files ${datadir}/i18n 0644 | 85 | copy_locale_files ${datadir}/i18n 0644 |
90 | else | ||
91 | # Remove the libdir if it is empty when gconv is not copied | ||
92 | find ${D}${libdir} -type d -empty -delete | ||
93 | fi | 86 | fi |
87 | # Remove empty dirs in libdir when gconv or locales are not copied | ||
88 | find ${D}${libdir} -type d -empty -delete | ||
94 | copy_locale_files ${datadir}/locale 0644 | 89 | copy_locale_files ${datadir}/locale 0644 |
95 | install -m 0644 ${LOCALETREESRC}/SUPPORTED ${WORKDIR}/SUPPORTED | 90 | install -m 0644 ${LOCALETREESRC}/SUPPORTED ${WORKDIR}/SUPPORTED |
96 | } | 91 | } |