diff options
author | Mike Turquette <mturquette@gmail.com> | 2008-12-02 20:27:25 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2008-12-02 20:27:25 +0000 |
commit | b3e49b643e34388f3c35afa17a164ef500490b1c (patch) | |
tree | 331d9187a1e9d5d51e3b1dbe20473a0bae49d920 | |
parent | 7cd5d53f081b082478a3e876f65d0e5cb7df7b34 (diff) | |
download | poky-b3e49b643e34388f3c35afa17a164ef500490b1c.tar.gz |
external-csl-toolchain: Add 2007q3-51 and update 2006q3-27
-rw-r--r-- | meta/packages/meta/external-csl-toolchain_2006q3-27.bb | 9 | ||||
-rw-r--r-- | meta/packages/meta/external-csl-toolchain_2007q3-51.bb | 265 |
2 files changed, 272 insertions, 2 deletions
diff --git a/meta/packages/meta/external-csl-toolchain_2006q3-27.bb b/meta/packages/meta/external-csl-toolchain_2006q3-27.bb index b8d7ad7d9c..008e580b9b 100644 --- a/meta/packages/meta/external-csl-toolchain_2006q3-27.bb +++ b/meta/packages/meta/external-csl-toolchain_2006q3-27.bb | |||
@@ -32,9 +32,14 @@ do_install() { | |||
32 | } | 32 | } |
33 | 33 | ||
34 | do_stage() { | 34 | do_stage() { |
35 | install -d ${STAGING_INCDIR} | 35 | install -d ${STAGING_INCDIR} |
36 | cp -a ${S}/arm-none-linux-gnueabi/libc/usr/include/* ${STAGING_INCDIR} | ||
36 | 37 | ||
37 | cp -a ${S}/arm-none-linux-gnueabi/libc/usr/include/* ${STAGING_INCDIR} | 38 | install -d ${STAGING_LIBDIR} |
39 | cp -a ${S}/arm-none-linux-gnueabi/libc/usr/lib/* ${STAGING_LIBDIR} | ||
40 | |||
41 | install -d ${STAGING_DIR_TARGET}${layout_base_libdir} | ||
42 | cp -a ${S}/arm-none-linux-gnueabi/libc/lib/* ${STAGING_DIR_TARGET}${base_libdir} | ||
38 | } | 43 | } |
39 | 44 | ||
40 | PACKAGES = "libgcc libgcc-dev libstdc++ libstdc++-dev linux-libc-headers" | 45 | PACKAGES = "libgcc libgcc-dev libstdc++ libstdc++-dev linux-libc-headers" |
diff --git a/meta/packages/meta/external-csl-toolchain_2007q3-51.bb b/meta/packages/meta/external-csl-toolchain_2007q3-51.bb new file mode 100644 index 0000000000..879e719fcd --- /dev/null +++ b/meta/packages/meta/external-csl-toolchain_2007q3-51.bb | |||
@@ -0,0 +1,265 @@ | |||
1 | INHIBIT_DEFAULT_DEPS = "1" | ||
2 | |||
3 | PROVIDES = "\ | ||
4 | linux-libc-headers \ | ||
5 | virtual/arm-none-linux-gnueabi-gcc \ | ||
6 | virtual/arm-none-linux-gnueabi-g++ \ | ||
7 | virtual/arm-none-linux-gnueabi-gcc-initial \ | ||
8 | virtual/arm-none-linux-gnueabi-binutils \ | ||
9 | virtual/arm-none-linux-gnueabi-libc-for-gcc \ | ||
10 | virtual/libc \ | ||
11 | virtual/libintl \ | ||
12 | virtual/libiconv \ | ||
13 | glibc-thread-db \ | ||
14 | virtual/linux-libc-headers " | ||
15 | RPROVIDES = "glibc-utils libsegfault glibc-thread-db" | ||
16 | PACKAGES_DYNAMIC = "glibc-gconv-*" | ||
17 | PR = "r1" | ||
18 | |||
19 | SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-${PV}-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 \ | ||
20 | file://SUPPORTED" | ||
21 | |||
22 | S = "${WORKDIR}/arm-2007q3" | ||
23 | |||
24 | do_install() { | ||
25 | install -d ${D}${sysconfdir} ${D}${bindir} ${D}${sbindir} ${D}${base_bindir} ${D}${libdir} | ||
26 | install -d ${D}${base_libdir} ${D}${base_sbindir} ${D}${datadir} | ||
27 | |||
28 | cp -a ${S}/arm-none-linux-gnueabi/libc/lib/* ${D}${base_libdir} | ||
29 | cp -a ${S}/arm-none-linux-gnueabi/libc/etc/* ${D}${sysconfdir} | ||
30 | cp -a ${S}/arm-none-linux-gnueabi/libc/sbin/* ${D}${base_sbindir} | ||
31 | cp -a ${S}/arm-none-linux-gnueabi/libc/usr/* ${D}/usr | ||
32 | } | ||
33 | |||
34 | do_stage() { | ||
35 | install -d ${STAGING_INCDIR} | ||
36 | cp -a ${S}/arm-none-linux-gnueabi/libc/usr/include/* ${STAGING_INCDIR} | ||
37 | |||
38 | install -d ${STAGING_LIBDIR} | ||
39 | cp -a ${S}/arm-none-linux-gnueabi/libc/usr/lib/* ${STAGING_LIBDIR} | ||
40 | |||
41 | install -d ${STAGING_DIR_TARGET}${layout_base_libdir} | ||
42 | cp -a ${S}/arm-none-linux-gnueabi/libc/lib/* ${STAGING_DIR_TARGET}${base_libdir} | ||
43 | } | ||
44 | |||
45 | PACKAGES = "libgcc libgcc-dev libstdc++ libstdc++-dev linux-libc-headers" | ||
46 | FILES_libgcc = "${base_libdir}/libgcc_s.so.1" | ||
47 | FILES_libgcc-dev = "${base_libdir}/libgcc_s.so" | ||
48 | FILES_libstdc++ = "${libdir}/libstdc++.so.*" | ||
49 | FILES_libstdc++-dev = "${includedir}/c++/${PV} \ | ||
50 | ${libdir}/libstdc++.so \ | ||
51 | ${libdir}/libstdc++.la \ | ||
52 | ${libdir}/libstdc++.a \ | ||
53 | ${libdir}/libsupc++.la \ | ||
54 | ${libdir}/libsupc++.a" | ||
55 | FILES_linux-libc-headers = "${includedir}/asm* \ | ||
56 | ${includedir}/linux \ | ||
57 | ${includedir}/mtd \ | ||
58 | ${includedir}/rdma \ | ||
59 | ${includedir}/scsi \ | ||
60 | ${includedir}/sound \ | ||
61 | ${includedir}/video \ | ||
62 | " | ||
63 | |||
64 | PACKAGES += "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" | ||
65 | |||
66 | libc_baselibs = "/lib/libc* /lib/libm* /lib/ld* /lib/libpthread* /lib/libresolv* /lib/librt* /lib/libutil* /lib/libnsl* /lib/libnss_files* /lib/libnss_compat* /lib/libnss_dns* /lib/libdl* /lib/libanl* /lib/libBrokenLocale*" | ||
67 | |||
68 | FILES_glibc = "${sysconfdir} ${libc_baselibs} /sbin/ldconfig ${libexecdir}/* ${datadir}/zoneinfo" | ||
69 | FILES_glibc-dev = "${includedir}" | ||
70 | FILES_ldd = "${bindir}/ldd" | ||
71 | FILES_libsegfault = "/lib/libSegFault*" | ||
72 | FILES_glibc-extra-nss = "/lib/libnss*" | ||
73 | FILES_glibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen ${libdir}/*.so" | ||
74 | FILES_nscd = "${sbindir}/nscd*" | ||
75 | FILES_glibc-utils = "${bindir}/* ${sbindir}/*" | ||
76 | FILES_glibc-gconv = "${libdir}/gconv/*" | ||
77 | FILES_glibc-dbg += " ${libdir}/gconv/.debug ${libexecdir}/*/.debug ${base_libdir}/.debug ${libdir}/.debug" | ||
78 | FILES_catchsegv = "${bindir}/catchsegv" | ||
79 | RDEPENDS_catchsegv = "libsegfault" | ||
80 | FILES_glibc-pcprofile = "/lib/libpcprofile.so" | ||
81 | FILES_glibc-thread-db = "/lib/libthread_db*" | ||
82 | RPROVIDES_glibc-dev += "libc-dev" | ||
83 | LEAD_SONAME = "libc.so.6" | ||
84 | |||
85 | DESCRIPTION_sln = "glibc: create symbolic links between files" | ||
86 | DESCRIPTION_nscd = "glibc: name service cache daemon for passwd, group, and hosts" | ||
87 | DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services" | ||
88 | DESCRIPTION_ldd = "glibc: print shared library dependencies" | ||
89 | DESCRIPTION_localedef = "glibc: compile locale definition files" | ||
90 | DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..." | ||
91 | |||
92 | FILES_sln = "${base_sbindir}/sln" | ||
93 | FILES_localedef = "${bindir}/localedef" | ||
94 | |||
95 | |||
96 | TMP_LOCALE="/tmp/locale${libdir}/locale" | ||
97 | |||
98 | locale_base_postinst() { | ||
99 | #!/bin/sh | ||
100 | |||
101 | if [ "x$D" != "x" ]; then | ||
102 | exit 1 | ||
103 | fi | ||
104 | |||
105 | rm -rf ${TMP_LOCALE} | ||
106 | mkdir -p ${TMP_LOCALE} | ||
107 | if [ -f ${libdir}/locale/locale-archive ]; then | ||
108 | cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/ | ||
109 | fi | ||
110 | localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s --prefix=/tmp/locale %s | ||
111 | mkdir -p ${libdir}/locale/ | ||
112 | mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/ | ||
113 | rm -rf ${TMP_LOCALE} | ||
114 | } | ||
115 | |||
116 | locale_base_postrm() { | ||
117 | #!/bin/sh | ||
118 | |||
119 | rm -rf ${TMP_LOCALE} | ||
120 | mkdir -p ${TMP_LOCALE} | ||
121 | if [ -f ${libdir}/locale/locale-archive ]; then | ||
122 | cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/ | ||
123 | fi | ||
124 | localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=%s --prefix=/tmp/locale %s | ||
125 | mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/ | ||
126 | rm -rf ${TMP_LOCALE} | ||
127 | } | ||
128 | |||
129 | python package_do_split_gconvs () { | ||
130 | import os, re | ||
131 | if (bb.data.getVar('PACKAGE_NO_GCONV', d, 1) == '1'): | ||
132 | bb.note("package requested not splitting gconvs") | ||
133 | return | ||
134 | |||
135 | if not bb.data.getVar('PACKAGES', d, 1): | ||
136 | return | ||
137 | |||
138 | libdir = bb.data.getVar('libdir', d, 1) | ||
139 | if not libdir: | ||
140 | bb.error("libdir not defined") | ||
141 | return | ||
142 | datadir = bb.data.getVar('datadir', d, 1) | ||
143 | if not datadir: | ||
144 | bb.error("datadir not defined") | ||
145 | return | ||
146 | |||
147 | gconv_libdir = os.path.join(libdir, "gconv") | ||
148 | charmap_dir = os.path.join(datadir, "i18n", "charmaps") | ||
149 | locales_dir = os.path.join(datadir, "i18n", "locales") | ||
150 | binary_locales_dir = os.path.join(libdir, "locale") | ||
151 | |||
152 | do_split_packages(d, gconv_libdir, file_regex='^(.*)\.so$', output_pattern='glibc-gconv-%s', description='gconv module for character set %s', extra_depends='glibc-gconv') | ||
153 | |||
154 | do_split_packages(d, charmap_dir, file_regex='^(.*)\.gz$', output_pattern='glibc-charmap-%s', description='character map for %s encoding', extra_depends='') | ||
155 | |||
156 | def calc_locale_deps(fn, pkg, file_regex, output_pattern, group): | ||
157 | deps = [] | ||
158 | f = open(fn, "r") | ||
159 | c_re = re.compile('^copy "(.*)"') | ||
160 | i_re = re.compile('^include "(\w+)".*') | ||
161 | for l in f.readlines(): | ||
162 | m = c_re.match(l) or i_re.match(l) | ||
163 | if m: | ||
164 | dp = legitimize_package_name('glibc-localedata-%s' % m.group(1)) | ||
165 | if not dp in deps: | ||
166 | deps.append(dp) | ||
167 | f.close() | ||
168 | if deps != []: | ||
169 | bb.data.setVar('RDEPENDS_%s' % pkg, " ".join(deps), d) | ||
170 | |||
171 | do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='') | ||
172 | bb.data.setVar('PACKAGES', bb.data.getVar('PACKAGES', d) + ' glibc-gconv', d) | ||
173 | |||
174 | f = open(os.path.join(bb.data.getVar('WORKDIR', d, 1), "SUPPORTED"), "r") | ||
175 | supported = f.readlines() | ||
176 | f.close() | ||
177 | |||
178 | dot_re = re.compile("(.*)\.(.*)") | ||
179 | |||
180 | # Collate the locales by base and encoding | ||
181 | encodings = {} | ||
182 | for l in supported: | ||
183 | l = l[:-1] | ||
184 | (locale, charset) = l.split(" ") | ||
185 | m = dot_re.match(locale) | ||
186 | if m: | ||
187 | locale = m.group(1) | ||
188 | if not encodings.has_key(locale): | ||
189 | encodings[locale] = [] | ||
190 | encodings[locale].append(charset) | ||
191 | |||
192 | def output_locale_source(name, locale, encoding): | ||
193 | pkgname = 'locale-base-' + legitimize_package_name(name) | ||
194 | |||
195 | bb.data.setVar('RDEPENDS_%s' % pkgname, 'localedef glibc-localedata-%s glibc-charmap-%s' % (legitimize_package_name(locale), legitimize_package_name(encoding)), d) | ||
196 | rprovides = 'virtual-locale-%s' % legitimize_package_name(name) | ||
197 | m = re.match("(.*)_(.*)", name) | ||
198 | if m: | ||
199 | rprovides += ' virtual-locale-%s' % m.group(1) | ||
200 | bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d) | ||
201 | bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d) | ||
202 | bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d) | ||
203 | bb.data.setVar('pkg_postinst_%s' % pkgname, bb.data.getVar('locale_base_postinst', d, 1) % (locale, encoding, locale), d) | ||
204 | bb.data.setVar('pkg_postrm_%s' % pkgname, bb.data.getVar('locale_base_postrm', d, 1) % (locale, encoding, locale), d) | ||
205 | |||
206 | def output_locale_binary(name, locale, encoding): | ||
207 | target_arch = bb.data.getVar("TARGET_ARCH", d, 1) | ||
208 | qemu = "qemu-%s" % target_arch | ||
209 | pkgname = 'locale-base-' + legitimize_package_name(name) | ||
210 | m = re.match("(.*)\.(.*)", name) | ||
211 | if m: | ||
212 | glibc_name = "%s.%s" % (m.group(1), m.group(2).lower().replace("-","")) | ||
213 | else: | ||
214 | glibc_name = name | ||
215 | bb.data.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('glibc-binary-localedata-%s' % glibc_name), d) | ||
216 | rprovides = 'virtual-locale-%s' % legitimize_package_name(name) | ||
217 | m = re.match("(.*)_(.*)", name) | ||
218 | if m: | ||
219 | rprovides += ' virtual-locale-%s' % m.group(1) | ||
220 | bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d) | ||
221 | bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d) | ||
222 | bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d) | ||
223 | |||
224 | treedir = os.path.join(bb.data.getVar("WORKDIR", d, 1), "locale-tree") | ||
225 | path = bb.data.getVar("PATH", d, 1) | ||
226 | i18npath = os.path.join(treedir, datadir, "i18n") | ||
227 | |||
228 | localedef_opts = "--force --old-style --no-archive --prefix=%s --inputfile=%s/i18n/locales/%s --charmap=%s %s" % (treedir, datadir, locale, encoding, name) | ||
229 | cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s %s/bin/localedef %s" % (path, i18npath, qemu, treedir, treedir, localedef_opts) | ||
230 | bb.note("generating locale %s (%s)" % (locale, encoding)) | ||
231 | if os.system(cmd): | ||
232 | raise bb.build.FuncFailed("localedef returned an error (command was %s)." % cmd) | ||
233 | |||
234 | def output_locale(name, locale, encoding): | ||
235 | output_locale_source(name, locale, encoding) | ||
236 | |||
237 | # Reshuffle names so that UTF-8 is preferred over other encodings | ||
238 | non_utf8 = [] | ||
239 | for l in encodings.keys(): | ||
240 | if len(encodings[l]) == 1: | ||
241 | output_locale(l, l, encodings[l][0]) | ||
242 | if encodings[l][0] != "UTF-8": | ||
243 | non_utf8.append(l) | ||
244 | else: | ||
245 | if "UTF-8" in encodings[l]: | ||
246 | output_locale(l, l, "UTF-8") | ||
247 | encodings[l].remove("UTF-8") | ||
248 | else: | ||
249 | non_utf8.append(l) | ||
250 | for e in encodings[l]: | ||
251 | output_locale('%s.%s' % (l, e), l, e) | ||
252 | |||
253 | if non_utf8 != []: | ||
254 | bb.note("the following locales are supported only in legacy encodings:") | ||
255 | bb.note(" " + " ".join(non_utf8)) | ||
256 | } | ||
257 | |||
258 | # We want to do this indirection so that we can safely 'return' | ||
259 | # from the called function even though we're prepending | ||
260 | python populate_packages_prepend () { | ||
261 | if bb.data.getVar('DEBIAN_NAMES', d, 1): | ||
262 | bb.data.setVar('PKG_glibc', 'libc6', d) | ||
263 | bb.data.setVar('PKG_glibc-dev', 'libc6-dev', d) | ||
264 | bb.build.exec_func('package_do_split_gconvs', d) | ||
265 | } | ||