diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-08-17 09:51:00 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-08-17 09:51:00 +0000 |
commit | 2138caee5d80a58604bf6af0dacc121115b4eb62 (patch) | |
tree | 0b130e2a42d4ab2806e1b59e6ec1be09ad396476 | |
parent | fac2ae48d93c5bf4f93025ecb71eb21a62b540d1 (diff) | |
download | drakx-2138caee5d80a58604bf6af0dacc121115b4eb62.tar drakx-2138caee5d80a58604bf6af0dacc121115b4eb62.tar.gz drakx-2138caee5d80a58604bf6af0dacc121115b4eb62.tar.bz2 drakx-2138caee5d80a58604bf6af0dacc121115b4eb62.tar.xz drakx-2138caee5d80a58604bf6af0dacc121115b4eb62.zip |
- don't generate locales.tar.bz2, do the same directly (since it's now quite simple)
- when using ramdisk, we now have all the locales, no need to handle it specially
-rw-r--r-- | perl-install/Makefile | 10 | ||||
-rw-r--r-- | perl-install/lang.pm | 30 | ||||
-rw-r--r-- | perl-install/share/Makefile | 6 | ||||
-rw-r--r-- | perl-install/share/gen_locales.pl | 12 | ||||
-rwxr-xr-x | perl-install/share/gen_locales.sh | 19 | ||||
-rw-r--r-- | perl-install/share/list | 12 |
6 files changed, 18 insertions, 71 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile index ae743fe85..86dd6feb4 100644 --- a/perl-install/Makefile +++ b/perl-install/Makefile @@ -79,8 +79,6 @@ install_pms: $(DIRS) mo_files : $(MOFILES) get_needed_files: $(DIRS) mo_files - $(MAKE) -C share - eval `perl -V:version`; \ cat share/list `../tools/specific_arch share/list` | \ perl -pe "s/ARCH/$(ARCH)/g ; s/PERL_VERSION/$$version/g ; s|/LIB/|/$(LIB)/|g " | \ @@ -109,7 +107,7 @@ get_needed_files: $(DIRS) mo_files install -d $(DEST)/usr/share/langs install -d $(DEST)/usr/share/gtk install -d $(DEST)/usr/share/xmodmap - install -d $(DEST)/usr/X11R6/lib/X11 + install -d $(DEST)/usr/X11R6/lib/X11/locale install -d $(MEDIA_INFO_DEST) install -s $(LOCALFILES) $(DEST)/usr/bin # cp -f $(LOCALFILES2) $(DEST)/usr/bin @@ -120,6 +118,8 @@ ifeq (sparc,$(ARCH)) ln -s /tmp $(DEST)/usr/X11R6/lib/X11/xkb/compiled ln -s /usr/X11R6/lib/X11/xkb/xkbcomp $(DEST)/usr/bin/xkbcomp endif + cp -a /usr/X11R6/lib/X11/locale/{C,en_US.UTF-8,iso8859-1} $(DEST)/usr/X11R6/lib/X11/locale + ifeq (i386,$(ARCH)) install -s /sbin/cardmgr $(DEST)/usr/bin endif @@ -163,7 +163,7 @@ else ln -sf ash $(DEST)/usr/bin/sh endif - for i in fonts keyboards locales keymaps; do tar xfj `../tools/specific_arch share/$$i.tar.bz2` -C $(DEST); done + for i in fonts keyboards locales-skeleton keymaps; do tar xfj `../tools/specific_arch share/$$i.tar.bz2` -C $(DEST); done grep ChangeLog CVS/Entries > $(DEST)/usr/share/VERSION @@ -175,6 +175,8 @@ endif cp `perl -I. -Mlang -e 'lang::png_lang_files()'` $(DEST)/usr/share/langs cd share ; cp compssUsers.pl* rpmsrate $(MEDIA_INFO_DEST) + perl -I. -Mlang -e 'symlink "UTF-8", "$(DEST)/usr/share/locale/$$_" foreach lang::list_langs()' + clean-rpmsrate $(MEDIA_INFO_DEST)/rpmsrate $(MAIN_RPMS_DIR) for i in ../kernel/modules.description ../kernel/all.modules/modules.cz*; do cp -f $$i $(DEST)/lib/; done diff --git a/perl-install/lang.pm b/perl-install/lang.pm index d9d0ef3c8..21ab7d993 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -878,36 +878,6 @@ sub set { my $lang = $locale->{lang}; exists $langs{$lang} or log::l("lang::set: trying to set to $lang but I don't know it!"), return; - my $dir = "$ENV{SHARE_PATH}/locale"; - if (!-e "$dir/$lang" && common::usingRamdisk()) { - @ENV{qw(LANG LC_ALL LANGUAGE LINGUAS)} = (); - - my @LCs = qw(LC_ADDRESS LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME); - - #- model locale, everything is taken from it - my $model_locale = 'en_US.UTF-8'; - - #- removing everything - #- except in model locale: only removing LC_COLLATE if it is there - #eval { rm_rf($_ eq $model_locale ? "$dir/$_/LC_COLLATE" : "$dir/$_") } foreach all($dir); - eval { $_ ne $model_locale and rm_rf("$dir/$_") } foreach all($dir); - - if (!-e "$dir/$model_locale") { - #- getting the model locale - mkdir "$dir/$model_locale"; - mkdir "$dir/$model_locale/LC_MESSAGES"; - install_any::getAndSaveFile("$dir/$model_locale/$_") foreach @LCs, 'LC_MESSAGES/SYS_LC_MESSAGES'; - } - mkdir "$dir/$lang"; - - #- linking to the main charset - symlink "../$model_locale/$_", "$dir/$lang/$_" foreach @LCs, 'LC_MESSAGES'; - - #- getting LC_COLLATE (putting it directly in $lang) - #install_any::getAndSaveFile("install/stage2/live$dir/$lang/LC_COLLATE", "$dir/$lang/LC_COLLATE"); - symlink "../$model_locale/LC_COLLATE", "$dir/$lang/LC_COLLATE"; - } - #- set all LC_* variables to a unique locale ("C"), and only redefine #- LC_COLLATE (for sorting) and LANGUAGE (for the po files) $ENV{$_} = 'C' foreach qw(LC_NUMERIC LC_TIME LC_MONETARY LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION); diff --git a/perl-install/share/Makefile b/perl-install/share/Makefile deleted file mode 100644 index 732724179..000000000 --- a/perl-install/share/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -all: locales.tar.bz2 - -# /usr/lib/libc.a to depend on the current glibc -# /usr/share/i18n/locale/en_US to ensure we have glibc-localedata -locales.tar.bz2: locales-skeleton.tar.bz2 gen_locales.sh /usr/lib/libc.a /usr/share/i18n/locales/en_US - ./gen_locales.sh diff --git a/perl-install/share/gen_locales.pl b/perl-install/share/gen_locales.pl deleted file mode 100644 index fcc03f0c9..000000000 --- a/perl-install/share/gen_locales.pl +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/perl - -use MDK::Common; -use lang; - -foreach (lang::list_langs()) { - if (my $exist = readlink "usr/share/locale/$_") { - die "symlink $_ already exist and is $exist\n"; - } else { - symlink "en_US.UTF-8", "usr/share/locale/$_" or die "can't create symlink $_"; - } -} diff --git a/perl-install/share/gen_locales.sh b/perl-install/share/gen_locales.sh deleted file mode 100755 index 6d1ed5fe1..000000000 --- a/perl-install/share/gen_locales.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -rm -rf .tmp ; mkdir .tmp ; cd .tmp -tar xfj ../locales-skeleton.tar.bz2 - -# locale utf-8 -for i in LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_MESSAGES/SYS_LC_MESSAGES ; do - install -D -m 644 /usr/share/locale/UTF-8/$i usr/share/locale/en_US.UTF-8/$i -done - -perl -I../.. ../gen_locales.pl || exit 1 - -for i in C en_US.UTF-8 iso8859-1 ; do - cp -a /usr/X11R6/lib/X11/locale/$i usr/X11R6/lib/X11/locale -done - -tar cfj ../locales.tar.bz2 usr - -cd .. ; rm -rf .tmp diff --git a/perl-install/share/list b/perl-install/share/list index 2d816fc1a..1d43a396f 100644 --- a/perl-install/share/list +++ b/perl-install/share/list @@ -162,6 +162,18 @@ /usr/share/ldetect-lst/isdn.db /usr/share/ldetect-lst/pcitable /usr/share/ldetect-lst/usbtable +/usr/share/locale/UTF-8/LC_ADDRESS +/usr/share/locale/UTF-8/LC_COLLATE +/usr/share/locale/UTF-8/LC_CTYPE +/usr/share/locale/UTF-8/LC_IDENTIFICATION +/usr/share/locale/UTF-8/LC_MEASUREMENT +/usr/share/locale/UTF-8/LC_MONETARY +/usr/share/locale/UTF-8/LC_NAME +/usr/share/locale/UTF-8/LC_NUMERIC +/usr/share/locale/UTF-8/LC_PAPER +/usr/share/locale/UTF-8/LC_TELEPHONE +/usr/share/locale/UTF-8/LC_TIME +/usr/share/locale/UTF-8/LC_MESSAGES/SYS_LC_MESSAGES /bin/brltty /etc/brltty/text.*.tbl /etc/brltty/brltty-??.hlp |