diff options
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-package.inc')
-rw-r--r-- | meta/recipes-core/eglibc/eglibc-package.inc | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc new file mode 100644 index 0000000000..8ee6bba067 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-package.inc | |||
@@ -0,0 +1,99 @@ | |||
1 | # | ||
2 | # For now, we will skip building of a gcc package if it is a uclibc one | ||
3 | # and our build is not a uclibc one, and we skip a eglibc one if our build | ||
4 | # is a uclibc build. | ||
5 | # | ||
6 | # See the note in gcc/gcc_3.4.0.oe | ||
7 | # | ||
8 | |||
9 | python __anonymous () { | ||
10 | import bb, re | ||
11 | uc_os = (re.match('.*uclibc*', bb.data.getVar('TARGET_OS', d, 1)) != None) | ||
12 | if uc_os: | ||
13 | raise bb.parse.SkipPackage("incompatible with target %s" % | ||
14 | bb.data.getVar('TARGET_OS', d, 1)) | ||
15 | } | ||
16 | |||
17 | # 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) | ||
19 | # to decrease initial boot time and avoid localedef being killed by the OOM | ||
20 | # killer which used to effectively break i18n on machines with < 128MB RAM. | ||
21 | |||
22 | # default to disabled until qemu works for everyone | ||
23 | ENABLE_BINARY_LOCALE_GENERATION ?= "0" | ||
24 | |||
25 | # BINARY_LOCALE_ARCHES is a space separated list of regular expressions | ||
26 | BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips" | ||
27 | |||
28 | # Set this to zero if you don't want ldconfig in the output package | ||
29 | USE_LDCONFIG ?= "1" | ||
30 | |||
31 | PACKAGES = "eglibc-dbg eglibc catchsegv sln nscd ldd localedef eglibc-utils eglibc-pic eglibc-dev eglibc-doc eglibc-locale libcidn libmemusage libsegfault eglibc-extra-nss eglibc-thread-db eglibc-pcprofile" | ||
32 | |||
33 | PACKAGES_DYNAMIC = " \ | ||
34 | glibc-gconv-* glibc-charmap-* glibc-localedata-* glibc-binary-localedata-* \ | ||
35 | eglibc-gconv-* eglibc-charmap-* eglibc-localedata-* eglibc-binary-localedata-* \ | ||
36 | locale-base-*" | ||
37 | |||
38 | RPROVIDES_eglibc = "glibc" | ||
39 | RPROVIDES_eglibc-utils = "glibc-utils" | ||
40 | RPROVIDES_eglibc-pic = "glibc-pic" | ||
41 | RPROVIDES_eglibc-dev = "glibc-dev" | ||
42 | RPROVIDES_eglibc-doc = "glibc-doc" | ||
43 | RPROVIDES_eglibc-locale = "glibc-locale" | ||
44 | RPROVIDES_eglibc-extra-nss = "glibc-extra-nss" | ||
45 | RPROVIDES_eglibc-thread-db = "glibc-thread-db" | ||
46 | RPROVIDES_eglibc-pcprofile = "glibc-pcprofile" | ||
47 | RPROVIDES_eglibc-dbg = "glibc-dbg" | ||
48 | libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${base_libdir}/libc*.so.* ${base_libdir}/libc*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so" | ||
49 | |||
50 | FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig', '', d)}" | ||
51 | FILES_ldd = "${bindir}/ldd" | ||
52 | FILES_libsegfault = "${base_libdir}/libSegFault*" | ||
53 | FILES_libcidn = "${base_libdir}/libcidn*.so" | ||
54 | FILES_libmemusage = "${base_libdir}/libmemusage.so" | ||
55 | FILES_eglibc-extra-nss = "${base_libdir}/libnss*" | ||
56 | FILES_sln = "/sbin/sln" | ||
57 | FILES_eglibc-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/" | ||
58 | FILES_eglibc-dev_append += "${bindir}/rpcgen ${libdir}/*.a \ | ||
59 | ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal" | ||
60 | FILES_nscd = "${sbindir}/nscd*" | ||
61 | FILES_eglibc-utils = "${bindir}/* ${sbindir}/*" | ||
62 | FILES_eglibc-gconv = "${libdir}/gconv/*" | ||
63 | FILES_${PN}-dbg += "${libexecdir}/*/.debug ${libdir}/gconv/.debug" | ||
64 | FILES_catchsegv = "${bindir}/catchsegv" | ||
65 | RDEPENDS_catchsegv = "libsegfault" | ||
66 | FILES_eglibc-pcprofile = "${base_libdir}/libpcprofile.so" | ||
67 | FILES_eglibc-thread-db = "${base_libdir}/libthread_db*" | ||
68 | FILES_localedef = "${bindir}/localedef" | ||
69 | RPROVIDES_eglibc-dev += "libc-dev" | ||
70 | |||
71 | DESCRIPTION_sln = "eglibc: create symbolic links between files" | ||
72 | DESCRIPTION_nscd = "eglibc: name service cache daemon for passwd, group, and hosts" | ||
73 | DESCRIPTION_eglibc-extra-nss = "eglibc: nis, nisplus and hesiod search services" | ||
74 | DESCRIPTION_ldd = "eglibc: print shared library dependencies" | ||
75 | DESCRIPTION_localedef = "eglibc: compile locale definition files" | ||
76 | DESCRIPTION_eglibc-utils = "eglibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..." | ||
77 | |||
78 | python __anonymous () { | ||
79 | enabled = bb.data.getVar("ENABLE_BINARY_LOCALE_GENERATION", d, 1) | ||
80 | |||
81 | if enabled and int(enabled): | ||
82 | import re | ||
83 | |||
84 | target_arch = bb.data.getVar("TARGET_ARCH", d, 1) | ||
85 | binary_arches = bb.data.getVar("BINARY_LOCALE_ARCHES", d, 1) or "" | ||
86 | |||
87 | for regexp in binary_arches.split(" "): | ||
88 | r = re.compile(regexp) | ||
89 | |||
90 | if r.match(target_arch): | ||
91 | depends = bb.data.getVar("DEPENDS", d, 1) | ||
92 | depends = "%s qemu-native" % depends | ||
93 | bb.data.setVar("DEPENDS", depends, d) | ||
94 | bb.data.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile", d) | ||
95 | break | ||
96 | } | ||
97 | |||
98 | inherit libc-package | ||
99 | |||