summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2006-08-13 14:00:45 +0000
committerPhil Blundell <philb@gnu.org>2006-08-13 14:00:45 +0000
commit4cfad8714d3f50c6c1a1808e9bdd8ddca72ea64b (patch)
tree8a6dd4371941591c13326e9503faf2a55d9a6c12 /packages
parent5240bd311339bb7ebfe9ef7e30f17475e9e2be8c (diff)
parent3a04c6da6ad2c135d83c7f0ef29aac23d7e0a3d4 (diff)
merge of '395d8c1ab96c40659f7304c72a28982ec1a4f0f9'
and 'fb1f22c1f370716bb4047f4959e9a5babc1f47f8'
Diffstat (limited to 'packages')
-rw-r--r--packages/glibc/glibc-package.bbclass32
1 files changed, 22 insertions, 10 deletions
diff --git a/packages/glibc/glibc-package.bbclass b/packages/glibc/glibc-package.bbclass
index 9d44190365..0e02aff176 100644
--- a/packages/glibc/glibc-package.bbclass
+++ b/packages/glibc/glibc-package.bbclass
@@ -199,12 +199,7 @@ python package_do_split_gconvs () {
if deps != []:
bb.data.setVar('RDEPENDS_%s' % pkg, " ".join(deps), d)
- use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
- if use_bin:
- do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='', aux_files_pattern_verbatim=binary_locales_dir + '/%s')
- else:
- do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='')
- bb.note("generation of binary locales disabled. this may break i18n!")
+ do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='')
bb.data.setVar('PACKAGES', bb.data.getVar('PACKAGES', d) + ' glibc-gconv', d)
f = open(os.path.join(bb.data.getVar('WORKDIR', d, 1), "SUPPORTED"), "r")
@@ -243,8 +238,12 @@ python package_do_split_gconvs () {
target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
qemu = "qemu-%s" % target_arch
pkgname = 'locale-base-' + legitimize_package_name(name)
-
- bb.data.setVar('RDEPENDS_%s' % pkgname, 'glibc-localedata-%s glibc-charmap-%s' % (legitimize_package_name(locale), legitimize_package_name(encoding)), d)
+ m = re.match("(.*)\.(.*)", name)
+ if m:
+ glibc_name = "%s.%s" % (m.group(1), m.group(2).lower().replace("-",""))
+ else:
+ glibc_name = name
+ bb.data.setVar('RDEPENDS_%s' % pkgname, 'glibc-binary-localedata-%s' % glibc_name, d)
rprovides = 'virtual-locale-%s' % legitimize_package_name(name)
m = re.match("(.*)_(.*)", name)
if m:
@@ -257,7 +256,7 @@ python package_do_split_gconvs () {
path = bb.data.getVar("PATH", d, 1)
i18npath = os.path.join(treedir, datadir, "i18n")
- localedef_opts = "--force --old-style --no-archive --prefix=%s --inputfile=%s/i18n/locales/%s --charmap=%s %s" % (treedir, datadir, locale, encoding, locale)
+ localedef_opts = "--force --old-style --no-archive --prefix=%s --inputfile=%s/i18n/locales/%s --charmap=%s %s" % (treedir, datadir, locale, encoding, name)
cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s %s/bin/localedef %s" % (path, i18npath, qemu, treedir, treedir, localedef_opts)
bb.note("generating locale %s (%s)" % (locale, encoding))
if os.system(cmd):
@@ -276,20 +275,33 @@ python package_do_split_gconvs () {
bb.build.exec_func("do_prep_locale_tree", d)
# Reshuffle names so that UTF-8 is preferred over other encodings
+ non_utf8 = []
for l in encodings.keys():
if len(encodings[l]) == 1:
output_locale(l, l, encodings[l][0])
+ if encodings[l][0] != "UTF-8":
+ non_utf8.append(l)
else:
if "UTF-8" in encodings[l]:
output_locale(l, l, "UTF-8")
encodings[l].remove("UTF-8")
+ else:
+ non_utf8.append(l)
for e in encodings[l]:
- output_locale('%s-%s' % (l, e), l, e)
+ output_locale('%s.%s' % (l, e), l, e)
+
+ if non_utf8 != []:
+ bb.note("the following locales are supported only in legacy encodings:")
+ bb.note(" " + " ".join(non_utf8))
use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
if use_bin:
bb.note("collecting binary locales from locale tree")
bb.build.exec_func("do_collect_bins_from_locale_tree", d)
+ 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)
+ else:
+ bb.note("generation of binary locales disabled. this may break i18n!")
+
}
# We want to do this indirection so that we can safely 'return'