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