blob: b4646fac7ef4ec929e71fc01988de77ef00f0ebe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
INHIBIT_DEFAULT_DEPS = "1"
LICENSE = "GPLv2 & LGPLv2.1"
BPN = "eglibc"
do_fetch[noexec] = "1"
do_unpack[noexec] = "1"
do_patch[noexec] = "1"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
# Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION
# is set. The idea is to avoid running localedef on the target (at first boot)
# to decrease initial boot time and avoid localedef being killed by the OOM
# killer which used to effectively break i18n on machines with < 128MB RAM.
# default to disabled
ENABLE_BINARY_LOCALE_GENERATION ?= "0"
ENABLE_BINARY_LOCALE_GENERATION_pn-eglibc-locale-nativesdk = "0"
#enable locale generation on these arches
# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips"
# set "1" to use cross-localedef for locale generation
# set "0" for qemu emulation of native localedef for locale generation
LOCALE_GENERATION_WITH_CROSS-LOCALEDEF = "1"
PR = "r19"
PKGSUFFIX = ""
PKGSUFFIX_virtclass-nativesdk = "-nativesdk"
PROVIDES = "virtual/libc-locale${PKGSUFFIX}"
PACKAGES = "localedef${PKGSUFFIX} ${PN}-dbg"
PACKAGES_DYNAMIC = "locale-base-* \
eglibc-gconv-* eglibc-charmap-* eglibc-localedata-* eglibc-binary-localedata-* \
glibc-gconv-*${PKGSUFFIX} glibc-charmap-* glibc-localedata-* glibc-binary-localedata-*"
# Create a eglibc-binaries package
ALLOW_EMPTY_${BPN}-binaries = "1"
PACKAGES += "${BPN}-binaries"
RRECOMMENDS_${BPN}-binaries = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-binary") != -1])}"
# Create a eglibc-charmaps package
ALLOW_EMPTY_${BPN}-charmaps = "1"
PACKAGES += "${BPN}-charmaps"
RRECOMMENDS_${BPN}-charmaps = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-charmap") != -1])}"
# Create a eglibc-gconvs package
ALLOW_EMPTY_${BPN}-gconvs = "1"
PACKAGES += "${BPN}-gconvs"
RRECOMMENDS_${BPN}-gconvs = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-gconv") != -1])}"
# Create a eglibc-localedatas package
ALLOW_EMPTY_${BPN}-localedatas = "1"
PACKAGES += "${BPN}-localedatas"
RRECOMMENDS_${BPN}-localedatas = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("eglibc-localedata") != -1])}"
DESCRIPTION_localedef = "eglibc: compile locale definition files"
# eglibc-gconv is dynamically added into PACKAGES, thus
# FILES_eglibc-gconv will not be automatically extended in multilib.
# Explicitly add ${MLPREFIX} for FILES_eglibc-gconv.
FILES_${MLPREFIX}eglibc-gconv = "${libdir}/gconv/*"
FILES_${PN}-dbg += "${libdir}/gconv/.debug/*"
FILES_localedef${PKGSUFFIX} = "${bindir}/localedef"
LOCALETREESRC = "${STAGING_INCDIR}/eglibc-locale-internal-${MULTIMACH_TARGET_SYS}"
do_install () {
mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir}
cp -fpPR ${LOCALETREESRC}/${bindir}/* ${D}${bindir}
cp -fpPR ${LOCALETREESRC}/${libdir}/locale ${D}${libdir}
cp -fpPR ${LOCALETREESRC}/${libdir}/gconv ${D}${libdir}
cp -fpPR ${LOCALETREESRC}/${datadir}/i18n ${D}${datadir}
cp -fpPR ${LOCALETREESRC}/${datadir}/locale ${D}${datadir}
cp -fpPR ${LOCALETREESRC}/SUPPORTED ${WORKDIR}
}
inherit libc-package
do_install[depends] += "virtual/${MLPREFIX}libc${PKGSUFFIX}:do_populate_sysroot"
BBCLASSEXTEND = "nativesdk"
|