summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-11-19 22:37:45 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-11-19 22:37:45 +0000
commit1e549b98e1afbc91a5673dd00954f7c4a358b8c0 (patch)
tree835affae2c6b4ecd8dd54887a4daf9c123e28bed /meta
parentebf6159c7b63ae01d20b83fdb38201189f0f9a1e (diff)
downloadpoky-1e549b98e1afbc91a5673dd00954f7c4a358b8c0.tar.gz
glibc: Separate out core glibc packaging functionality into a class
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/glibc-package.bbclass (renamed from meta/packages/glibc/glibc-package.bbclass)95
-rw-r--r--meta/packages/glibc/glibc_2.3.5+cvs20050627.bb2
-rw-r--r--meta/packages/glibc/glibc_2.4.bb2
-rw-r--r--meta/packages/glibc/glibc_2.5.bb2
-rw-r--r--meta/packages/glibc/glibc_2.6.1.bb2
-rw-r--r--meta/packages/glibc/glibc_2.9.bb2
-rw-r--r--meta/packages/glibc/glibc_csl-2005q3-2.bb2
7 files changed, 21 insertions, 86 deletions
diff --git a/meta/packages/glibc/glibc-package.bbclass b/meta/classes/glibc-package.bbclass
index 561805a66e..b16daa47f7 100644
--- a/meta/packages/glibc/glibc-package.bbclass
+++ b/meta/classes/glibc-package.bbclass
@@ -1,37 +1,20 @@
1# 1#
2# For now, we will skip building of a gcc package if it is a uclibc one 2# This class knows how to package up glibc. Its shared since prebuild binary toolchains
3# and our build is not a uclibc one, and we skip a glibc one if our build 3# may need packaging and its pointless to duplicate this code.
4# is a uclibc build.
5# 4#
6# See the note in gcc/gcc_3.4.0.oe 5# Caller should set GLIBC_INTERNAL_USE_BINARY_LOCALE to one of:
7# 6# "compile" - Use QEMU to generate the binary locale files
8 7# "precompiled" - The binary locale files are pregenerated and already present
9python __anonymous () { 8# "ondevice" - The device will build the locale files upon first boot through the postinst
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
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.
22 9
23# default to disabled until qemu works for everyone 10GLIBC_INTERNAL_USE_BINARY_LOCALE ?= "ondevice"
24ENABLE_BINARY_LOCALE_GENERATION ?= "0"
25 11
26# BINARY_LOCALE_ARCHES is a space separated list of regular expressions 12PACKAGES = "glibc-dbg glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
27BINARY_LOCALE_ARCHES ?= "arm.*"
28
29PACKAGES = "${PN}-dbg ${PN} catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
30PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-* locale-base-* glibc-binary-localedata-*" 13PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-* locale-base-* glibc-binary-localedata-*"
31 14
32libc_baselibs = "${base_libdir}/libc* ${base_libdir}/libm* ${base_libdir}/ld* ${base_libdir}/libpthread* ${base_libdir}/libresolv* ${base_libdir}/librt* ${base_libdir}/libutil* ${base_libdir}/libnsl* ${base_libdir}/libnss_files* ${base_libdir}/libnss_compat* ${base_libdir}/libnss_dns* ${base_libdir}/libdl* ${base_libdir}/libanl* ${base_libdir}/libBrokenLocale*" 15libc_baselibs = "${base_libdir}/libc* ${base_libdir}/libm* ${base_libdir}/ld* ${base_libdir}/libpthread* ${base_libdir}/libresolv* ${base_libdir}/librt* ${base_libdir}/libutil* ${base_libdir}/libnsl* ${base_libdir}/libnss_files* ${base_libdir}/libnss_compat* ${base_libdir}/libnss_dns* ${base_libdir}/libdl* ${base_libdir}/libanl* ${base_libdir}/libBrokenLocale*"
33 16
34FILES_${PN} = "${sysconfdir} ${libc_baselibs} ${base_sbindir}/ldconfig ${libexecdir}/* ${datadir}/zoneinfo" 17FILES_glibc = "${sysconfdir} ${libc_baselibs} ${base_sbindir}/ldconfig ${libexecdir}/* ${datadir}/zoneinfo"
35FILES_ldd = "${bindir}/ldd" 18FILES_ldd = "${bindir}/ldd"
36FILES_libsegfault = "${base_libdir}/libSegFault*" 19FILES_libsegfault = "${base_libdir}/libSegFault*"
37FILES_glibc-extra-nss = "${base_libdir}/libnss*" 20FILES_glibc-extra-nss = "${base_libdir}/libnss*"
@@ -40,7 +23,9 @@ FILES_glibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen"
40FILES_nscd = "${sbindir}/nscd* ${sysconfdir}/nscd* ${sysconfdir}/init.d/nscd*" 23FILES_nscd = "${sbindir}/nscd* ${sysconfdir}/nscd* ${sysconfdir}/init.d/nscd*"
41FILES_glibc-utils = "${bindir}/* ${sbindir}/*" 24FILES_glibc-utils = "${bindir}/* ${sbindir}/*"
42FILES_glibc-gconv = "${libdir}/gconv/*" 25FILES_glibc-gconv = "${libdir}/gconv/*"
43FILES_${PN}-dbg += " ${libdir}/gconv/.debug ${libexecdir}/*/.debug" 26FILES_glibc-dbg = "${bindir}/.debug ${sbindir}/.debug ${libdir}/.debug \
27 ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug \
28 ${libdir}/gconv/.debug ${libexecdir}/*/.debug"
44FILES_catchsegv = "${bindir}/catchsegv" 29FILES_catchsegv = "${bindir}/catchsegv"
45RDEPENDS_catchsegv = "libsegfault" 30RDEPENDS_catchsegv = "libsegfault"
46FILES_glibc-pcprofile = "${base_libdir}/libpcprofile.so" 31FILES_glibc-pcprofile = "${base_libdir}/libpcprofile.so"
@@ -55,36 +40,6 @@ DESCRIPTION_ldd = "glibc: print shared library dependencies"
55DESCRIPTION_localedef = "glibc: compile locale definition files" 40DESCRIPTION_localedef = "glibc: compile locale definition files"
56DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..." 41DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..."
57 42
58def get_glibc_fpu_setting(bb, d):
59 if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
60 return "--without-fp"
61 return ""
62
63EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
64EXTRA_OEMAKE += "rootsbindir=${base_sbindir}"
65
66OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
67
68do_install() {
69 oe_runmake install_root=${D} install
70 for r in ${rpcsvc}; do
71 h=`echo $r|sed -e's,\.x$,.h,'`
72 install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/
73 done
74 install -m 0644 ${WORKDIR}/etc/ld.so.conf ${D}/${sysconfdir}/
75 install -d ${D}${libdir}/locale
76 make -f ${WORKDIR}/generate-supported.mk IN="${S}/localedata/SUPPORTED" OUT="${WORKDIR}/SUPPORTED"
77 # get rid of some broken files...
78 for i in ${GLIBC_BROKEN_LOCALES}; do
79 grep -v $i ${WORKDIR}/SUPPORTED > ${WORKDIR}/SUPPORTED.tmp
80 mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED
81 done
82 rm -f ${D}/etc/rpc
83 rm -f ${D}${includedir}/scsi/sg.h
84 rm -f ${D}${includedir}/scsi/scsi_ioctl.h
85 rm -f ${D}${includedir}/scsi/scsi.h
86}
87
88TMP_LOCALE="/tmp/locale${libdir}/locale" 43TMP_LOCALE="/tmp/locale${libdir}/locale"
89 44
90locale_base_postinst() { 45locale_base_postinst() {
@@ -118,26 +73,6 @@ mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/
118rm -rf ${TMP_LOCALE} 73rm -rf ${TMP_LOCALE}
119} 74}
120 75
121python __anonymous () {
122 enabled = bb.data.getVar("ENABLE_BINARY_LOCALE_GENERATION", d, 1)
123
124 if enabled and int(enabled):
125 import re
126
127 target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
128 binary_arches = bb.data.getVar("BINARY_LOCALE_ARCHES", d, 1) or ""
129
130 for regexp in binary_arches.split(" "):
131 r = re.compile(regexp)
132
133 if r.match(target_arch):
134 depends = bb.data.getVar("DEPENDS", d, 1)
135 depends = "%s qemu-native" % depends
136 bb.data.setVar("DEPENDS", depends, d)
137 bb.data.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "1", d)
138 break
139}
140
141do_prep_locale_tree() { 76do_prep_locale_tree() {
142 treedir=${WORKDIR}/locale-tree 77 treedir=${WORKDIR}/locale-tree
143 rm -rf $treedir 78 rm -rf $treedir
@@ -276,13 +211,13 @@ python package_do_split_gconvs () {
276 211
277 def output_locale(name, locale, encoding): 212 def output_locale(name, locale, encoding):
278 use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1) 213 use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
279 if use_bin: 214 if use_bin == "compile":
280 output_locale_binary(name, locale, encoding) 215 output_locale_binary(name, locale, encoding)
281 else: 216 else:
282 output_locale_source(name, locale, encoding) 217 output_locale_source(name, locale, encoding)
283 218
284 use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1) 219 use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
285 if use_bin: 220 if use_bin == "compile":
286 bb.note("preparing tree for binary locale generation") 221 bb.note("preparing tree for binary locale generation")
287 bb.build.exec_func("do_prep_locale_tree", d) 222 bb.build.exec_func("do_prep_locale_tree", d)
288 223
@@ -307,7 +242,7 @@ python package_do_split_gconvs () {
307 bb.note(" " + " ".join(non_utf8)) 242 bb.note(" " + " ".join(non_utf8))
308 243
309 use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1) 244 use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
310 if use_bin: 245 if use_bin == "compile":
311 bb.note("collecting binary locales from locale tree") 246 bb.note("collecting binary locales from locale tree")
312 bb.build.exec_func("do_collect_bins_from_locale_tree", d) 247 bb.build.exec_func("do_collect_bins_from_locale_tree", d)
313 do_split_packages(d, binary_locales_dir, file_regex='(.*)', output_pattern='glibc-binary-localedata-%s', description='binary locale definition for %s', extra_depends='', allow_dirs=True) 248 do_split_packages(d, binary_locales_dir, file_regex='(.*)', output_pattern='glibc-binary-localedata-%s', description='binary locale definition for %s', extra_depends='', allow_dirs=True)
diff --git a/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb b/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb
index 3111ed3583..8c44c21156 100644
--- a/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb
+++ b/meta/packages/glibc/glibc_2.3.5+cvs20050627.bb
@@ -107,4 +107,4 @@ do_compile () {
107 107
108require glibc-stage.inc 108require glibc-stage.inc
109 109
110require glibc-package.bbclass 110require glibc-package.inc
diff --git a/meta/packages/glibc/glibc_2.4.bb b/meta/packages/glibc/glibc_2.4.bb
index 3f184a6b13..3102c5953c 100644
--- a/meta/packages/glibc/glibc_2.4.bb
+++ b/meta/packages/glibc/glibc_2.4.bb
@@ -134,4 +134,4 @@ do_compile () {
134 134
135require glibc-stage.inc 135require glibc-stage.inc
136 136
137require glibc-package.bbclass 137require glibc-package.inc
diff --git a/meta/packages/glibc/glibc_2.5.bb b/meta/packages/glibc/glibc_2.5.bb
index 5f95280584..a63b678949 100644
--- a/meta/packages/glibc/glibc_2.5.bb
+++ b/meta/packages/glibc/glibc_2.5.bb
@@ -145,4 +145,4 @@ do_compile () {
145 145
146require glibc-stage.inc 146require glibc-stage.inc
147 147
148require glibc-package.bbclass 148require glibc-package.inc
diff --git a/meta/packages/glibc/glibc_2.6.1.bb b/meta/packages/glibc/glibc_2.6.1.bb
index 3521f66fe3..790fdde97a 100644
--- a/meta/packages/glibc/glibc_2.6.1.bb
+++ b/meta/packages/glibc/glibc_2.6.1.bb
@@ -151,4 +151,4 @@ do_compile () {
151 151
152require glibc-stage.inc 152require glibc-stage.inc
153 153
154require glibc-package.bbclass 154require glibc-package.inc
diff --git a/meta/packages/glibc/glibc_2.9.bb b/meta/packages/glibc/glibc_2.9.bb
index 75f56d6146..7e3c70e204 100644
--- a/meta/packages/glibc/glibc_2.9.bb
+++ b/meta/packages/glibc/glibc_2.9.bb
@@ -155,6 +155,6 @@ do_compile () {
155 155
156require glibc-stage.inc 156require glibc-stage.inc
157 157
158require glibc-package.bbclass 158require glibc-package.inc
159 159
160BBCLASSEXTEND = "nativesdk" 160BBCLASSEXTEND = "nativesdk"
diff --git a/meta/packages/glibc/glibc_csl-2005q3-2.bb b/meta/packages/glibc/glibc_csl-2005q3-2.bb
index d2aa11605b..b1ea27dec5 100644
--- a/meta/packages/glibc/glibc_csl-2005q3-2.bb
+++ b/meta/packages/glibc/glibc_csl-2005q3-2.bb
@@ -86,4 +86,4 @@ do_compile () {
86 86
87require glibc-stage.inc 87require glibc-stage.inc
88 88
89require glibc-package.bbclass 89require glibc-package.inc