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 glibc one if our build
6 # See the note in gcc/gcc_3.4.0.oe
9 python __anonymous () {
11 uc_os = (re.match('.*uclibc*', bb.data.getVar('TARGET_OS', d, 1)) != None)
13 raise bb.parse.SkipPackage("incompatible with target %s" %
14 bb.data.getVar('TARGET_OS', d, 1))
18 # Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION
19 # is set. The idea is to avoid running localedef on the target (at first boot)
20 # to decrease initial boot time and avoid localedef being killed by the OOM
21 # killer which used to effectively break i18n on machines with < 128MB RAM.
23 # default to disabled until qemu works for everyone
24 ENABLE_BINARY_LOCALE_GENERATION ?= "0"
26 # BINARY_LOCALE_ARCHES is a space separated list of regular expressions
27 BINARY_LOCALE_ARCHES ?= "arm.* sh3.* i[3-6]86 x86_64 powerpc"
29 # Set this to zero if you don't want ldconfig in the output package
34 INITSCRIPT_NAME = "nscd"
35 INITSCRIPT_PACKAGES = "nscd"
36 INITSCRIPT_PARAMS = "start 40 S . stop 40 0 6 1 ."
39 def get_glibc_fpu_setting(bb, d):
40 if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
44 EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
45 EXTRA_OEMAKE += "rootsbindir=${base_sbindir}"
47 OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
50 oe_runmake install_root=${D} install
51 for r in ${rpcsvc}; do
52 h=`echo $r|sed -e's,\.x$,.h,'`
53 install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/
55 install -d ${D}${libdir}/locale
56 make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED"
57 # get rid of some broken files...
58 for i in ${GLIBC_BROKEN_LOCALES}; do
59 grep -v $i ${WORKDIR}/SUPPORTED > ${WORKDIR}/SUPPORTED.tmp
60 mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED
62 rm -f ${D}{sysconfdir}/rpc
63 install -d ${D}${sysconfdir}/init.d
64 install -m 0644 ${S}/nscd/nscd.conf ${D}${sysconfdir}/
65 install ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd
69 python __anonymous () {
70 enabled = bb.data.getVar("ENABLE_BINARY_LOCALE_GENERATION", d, 1)
72 if enabled and int(enabled):
75 target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
76 binary_arches = bb.data.getVar("BINARY_LOCALE_ARCHES", d, 1) or ""
78 for regexp in binary_arches.split(" "):
79 r = re.compile(regexp)
81 if r.match(target_arch):
82 depends = bb.data.getVar("DEPENDS", d, 1)
83 depends = "%s qemu-native" % depends
84 bb.data.setVar("DEPENDS", depends, d)
85 bb.data.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile", d)