# HG changeset patch # User Christophe Lincoln # Date 1265145472 -3600 # Node ID d42b38d61b43cba30a0ba4018eeb029c40c27149 # Parent 6da0090271894cf11d737b04b07d75894065bc8f glibc-base and locale pack: switch to UTF-8 diff -r 6da009027189 -r d42b38d61b43 glibc-base/receipt --- a/glibc-base/receipt Tue Feb 02 15:27:48 2010 +0100 +++ b/glibc-base/receipt Tue Feb 02 22:17:52 2010 +0100 @@ -3,11 +3,13 @@ PACKAGE="glibc-base" VERSION="2.10.1" CATEGORY="base-system" -SHORT_DESC="GNU libc minimal libraries for SliTaz based system." +SHORT_DESC="GNU libc minimal libraries and UTF-8 support for SliTaz." WEB_SITE="http://www.gnu.org/software/libc/" WANTED="glibc" MAINTAINER="pankso@slitaz.org" +DEFAULT_LOCALE="de_DE en_US en_GB es_ES fr_FR fr_CH pt_BR ru_RU" + # Rules to gen a SliTaz package suitable for Tazpkg. # # Full glibc is very long to compile (see package glibc for more @@ -27,6 +29,11 @@ do cp -a ${_pkg}$file ${fs}$file done + # i18n + for i in $DEFAULT_LOCALE + do + cp $_pkg/usr/share/i18n/locales/$i $fs/usr/share/i18n/locales + done } # Call ldconfig and remove old glibc-2.3.6 (slitaz 1.0) and glibc-2.7 diff -r 6da009027189 -r d42b38d61b43 glibc-base/stuff/mkdir.list --- a/glibc-base/stuff/mkdir.list Tue Feb 02 15:27:48 2010 +0100 +++ b/glibc-base/stuff/mkdir.list Tue Feb 02 22:17:52 2010 +0100 @@ -3,6 +3,8 @@ /usr/bin /usr/lib/gconv /usr/lib/locale -/usr/share/locale/fr/LC_MESSAGES /usr/share/zoneinfo/America /usr/share/zoneinfo/Europe +/usr/share/i18n/locales +/usr/share/i18n/charmaps +/usr/share/locale diff -r 6da009027189 -r d42b38d61b43 glibc-base/stuff/wanted-files.list --- a/glibc-base/stuff/wanted-files.list Tue Feb 02 15:27:48 2010 +0100 +++ b/glibc-base/stuff/wanted-files.list Tue Feb 02 22:17:52 2010 +0100 @@ -17,9 +17,26 @@ /usr/lib/gconv/UNICODE.so /usr/lib/gconv/gconv-modules /usr/lib/gconv/ANSI_X3.110.so -/usr/lib/gconv/ISO8859-1.so -/usr/lib/gconv/ISO8859-15.so -/usr/lib/gconv/ISO8859-2.so + +/usr/bin/locale +/usr/bin/localedef + +/usr/share/locale/locale.alias +/usr/share/i18n/charmaps/UTF-8.gz + +/usr/share/i18n/locales/i18n +/usr/share/i18n/locales/iso14651_t1 +/usr/share/i18n/locales/iso14651_t1_common +/usr/share/i18n/locales/translit_neutral +/usr/share/i18n/locales/translit_combining +/usr/share/i18n/locales/translit_circle +/usr/share/i18n/locales/translit_cjk_compat +/usr/share/i18n/locales/translit_compat +/usr/share/i18n/locales/translit_font +/usr/share/i18n/locales/translit_fraction +/usr/share/i18n/locales/translit_narrow +/usr/share/i18n/locales/translit_small +/usr/share/i18n/locales/translit_wide /usr/share/zoneinfo/Europe/Madrid /usr/share/zoneinfo/Europe/Moscow @@ -34,11 +51,6 @@ /usr/share/zoneinfo/America/Sao_Paulo /usr/share/zoneinfo/America/Mexico_City -/usr/share/locale/fr/LC_MESSAGES/libc.mo -/usr/share/locale/locale.alias - -/usr/bin/locale - /etc/rpc /etc/ld.so.conf /etc/ld.so.cache diff -r 6da009027189 -r d42b38d61b43 glibc-locale/receipt --- a/glibc-locale/receipt Tue Feb 02 15:27:48 2010 +0100 +++ b/glibc-locale/receipt Tue Feb 02 22:17:52 2010 +0100 @@ -5,14 +5,11 @@ CATEGORY="system-tools" SHORT_DESC="The GNU C libraries locale files and utilities (see also locale-*)." MAINTAINER="pankso@slitaz.org" -DEPENDS="glibc-base glibc-extra-samba" +DEPENDS="glibc-base glibc-extra-samba slitaz-i18n" WANTED="glibc" WEB_SITE="http://www.gnu.org/software/libc/" -LOCALE_PACK="de cs es fr ru id it pt hu" - -# When we will switch to UTF-8 some change must be done here, localdef -# must be include in glibc-base as well has some files in /usr/share/i18n. +LOCALE_PACK="cs de es fr hu id it pt ru sl zh_CN zh_TW" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() @@ -25,10 +22,18 @@ cp -a $_pkg/usr/share/zoneinfo $fs/usr/share # Utilities and tools - cp -a $_pkg/usr/bin/localedef $fs/usr/bin cp -a $_pkg/usr/bin/iconv $fs/usr/bin cp -a $_pkg/usr/bin/tzselect $fs/usr/bin + # Rm slitaz-i18n files. + ver=`grep ^VERSION $WOK/slitaz-i18n/receipt | cut -d "\"" -f 2` + echo -n "Removing all slitaz-i18n files..." + for file in `cat $WOK/slitaz-i18n/taz/slitaz-i18n-$ver/files.list` + do + rm -f ${fs}$file + done + status + # Rm base files. echo -n "Removing all base files..." for file in `cat $WOK/glibc-base/taz/glibc-base-$VERSION/files.list` diff -r 6da009027189 -r d42b38d61b43 locale-cs/receipt --- a/locale-cs/receipt Tue Feb 02 15:27:48 2010 +0100 +++ b/locale-cs/receipt Tue Feb 02 22:17:52 2010 +0100 @@ -11,7 +11,7 @@ LOCALE="cs" LOCALEDEF="cs_CZ" -CHARMAP="ISO-8859-2" +CHARMAP="UTF-8" # Rules to configure and make the package. compile_rules() @@ -36,7 +36,6 @@ get_core_messages PACKAGE="$PKG_NAME" VERSION="$PKG_VERS" - localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF } # Back to C if it's the last used locale. diff -r 6da009027189 -r d42b38d61b43 locale-de/receipt --- a/locale-de/receipt Tue Feb 02 15:27:48 2010 +0100 +++ b/locale-de/receipt Tue Feb 02 22:17:52 2010 +0100 @@ -11,7 +11,7 @@ LOCALE="de" LOCALEDEF="de_DE" -CHARMAP="ISO-8859-1" +CHARMAP="UTF-8" # Rules to configure and make the package. compile_rules() @@ -36,7 +36,6 @@ get_core_messages PACKAGE="$PKG_NAME" VERSION="$PKG_VERS" - localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF } # Back to C if it's the last used locale. diff -r 6da009027189 -r d42b38d61b43 locale-es/receipt --- a/locale-es/receipt Tue Feb 02 15:27:48 2010 +0100 +++ b/locale-es/receipt Tue Feb 02 22:17:52 2010 +0100 @@ -11,7 +11,7 @@ LOCALE="es" LOCALEDEF="es_ES" -CHARMAP="ISO-8859-1" +CHARMAP="UTF-8" # Rules to configure and make the package. compile_rules() @@ -36,7 +36,6 @@ get_core_messages PACKAGE="$PKG_NAME" VERSION="$PKG_VERS" - localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF } # Back to C if it's the last used locale. diff -r 6da009027189 -r d42b38d61b43 locale-fr/receipt --- a/locale-fr/receipt Tue Feb 02 15:27:48 2010 +0100 +++ b/locale-fr/receipt Tue Feb 02 22:17:52 2010 +0100 @@ -11,7 +11,7 @@ LOCALE="fr" LOCALEDEF="fr_FR" -CHARMAP="ISO-8859-1" +CHARMAP="UTF-8" # Rules to configure and make the package. compile_rules() @@ -35,9 +35,11 @@ mk_locale_dir get_slitaz_messages get_core_messages + ver=`grep ^VERSION $WOK/glibc/receipt | cut -d "\"" -f 2` + cp -a $WOK/glibc/glibc-$ver/_pkg/usr/share/locale/$LOCALE/* \ + $fs/usr/share/locale/$LOCALE PACKAGE="$PKG_NAME" VERSION="$PKG_VERS" - localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF } # Back to C if it's the last used locale. diff -r 6da009027189 -r d42b38d61b43 locale-hu/receipt --- a/locale-hu/receipt Tue Feb 02 15:27:48 2010 +0100 +++ b/locale-hu/receipt Tue Feb 02 22:17:52 2010 +0100 @@ -11,7 +11,7 @@ LOCALE="hu" LOCALEDEF="hu_HU" -CHARMAP="ISO-8859-2" +CHARMAP="UTF-8" # Rules to configure and make the package. compile_rules() @@ -36,7 +36,6 @@ get_core_messages PACKAGE="$PKG_NAME" VERSION="$PKG_VERS" - localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF } # Back to C if it's the last used locale. diff -r 6da009027189 -r d42b38d61b43 locale-id/receipt --- a/locale-id/receipt Tue Feb 02 15:27:48 2010 +0100 +++ b/locale-id/receipt Tue Feb 02 22:17:52 2010 +0100 @@ -11,7 +11,7 @@ LOCALE="id" LOCALEDEF="id_ID" -CHARMAP="ISO-8859-1" +CHARMAP="UTF-8" # Rules to configure and make the package. compile_rules() @@ -36,7 +36,6 @@ get_core_messages PACKAGE="$PKG_NAME" VERSION="$PKG_VERS" - localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF } # Back to C if it's the last used locale. diff -r 6da009027189 -r d42b38d61b43 locale-it/receipt --- a/locale-it/receipt Tue Feb 02 15:27:48 2010 +0100 +++ b/locale-it/receipt Tue Feb 02 22:17:52 2010 +0100 @@ -11,7 +11,7 @@ LOCALE="it" LOCALEDEF="it_IT" -CHARMAP="ISO-8859-1" +CHARMAP="UTF-8" # Rules to configure and make the package. compile_rules() @@ -36,7 +36,6 @@ get_core_messages PACKAGE="$PKG_NAME" VERSION="$PKG_VERS" - localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF } # Back to C if it's the last used locale. diff -r 6da009027189 -r d42b38d61b43 locale-pt/receipt --- a/locale-pt/receipt Tue Feb 02 15:27:48 2010 +0100 +++ b/locale-pt/receipt Tue Feb 02 22:17:52 2010 +0100 @@ -11,7 +11,7 @@ LOCALE="pt" LOCALEDEF="pt_BR" -CHARMAP="ISO-8859-1" +CHARMAP="UTF-8" # Rules to configure and make the package. compile_rules() @@ -37,7 +37,6 @@ PACKAGE="$PKG_NAME" VERSION="$PKG_VERS" LOCALE="pt_BR" - localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF } # Post install to remove old locale-pt_BR. diff -r 6da009027189 -r d42b38d61b43 locale-ru/receipt --- a/locale-ru/receipt Tue Feb 02 15:27:48 2010 +0100 +++ b/locale-ru/receipt Tue Feb 02 22:17:52 2010 +0100 @@ -36,7 +36,6 @@ get_core_messages PACKAGE="$PKG_NAME" VERSION="$PKG_VERS" - localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF } # Back to C if it's the last used locale. diff -r 6da009027189 -r d42b38d61b43 locale-sl/receipt --- a/locale-sl/receipt Tue Feb 02 15:27:48 2010 +0100 +++ b/locale-sl/receipt Tue Feb 02 22:17:52 2010 +0100 @@ -36,7 +36,6 @@ get_core_messages PACKAGE="$PKG_NAME" VERSION="$PKG_VERS" - localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF } # Back to C if it's the last used locale. diff -r 6da009027189 -r d42b38d61b43 locale-zh_CN/receipt --- a/locale-zh_CN/receipt Tue Feb 02 15:27:48 2010 +0100 +++ b/locale-zh_CN/receipt Tue Feb 02 22:17:52 2010 +0100 @@ -33,15 +33,9 @@ mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale PKG_NAME="$PACKAGE" PKG_VERS="$VERSION" - # Get the core packages messages. - for pkg in $CORE_PKGS - do - [ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt - if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then - cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \ - $fs/usr/share/locale - fi - done + mk_locale_dir + get_slitaz_messages + get_core_messages PACKAGE="$PKG_NAME" VERSION="$PKG_VERS" localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF.UTF-8 diff -r 6da009027189 -r d42b38d61b43 locale-zh_TW/receipt --- a/locale-zh_TW/receipt Tue Feb 02 15:27:48 2010 +0100 +++ b/locale-zh_TW/receipt Tue Feb 02 22:17:52 2010 +0100 @@ -9,9 +9,6 @@ BUILD_DEPENDS="glibc glibc-locale xorg-libX11" WEB_SITE="http://www.slitaz.org/" -CORE_PKGS="asunder alsaplayer epdfview galculator geany gpicview gparted \ -glib gtk+ grsync leafpad lxpanel lxtask obconf openbox pcmanfm xpad" - LOCALE="zh_TW" LOCALEDEF="zh_TW" CHARMAP="UTF-8" @@ -30,18 +27,11 @@ # Genereted locale files are in /usr/lib/locale. genpkg_rules() { - mkdir -p $fs/usr/share/locale/$LOCALE $fs/usr/lib/locale PKG_NAME="$PACKAGE" PKG_VERS="$VERSION" - # Get the core packages messages. - for pkg in $CORE_PKGS - do - [ -f $WOK/$pkg/receipt ] && . $WOK/$pkg/receipt - if [ -d $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE ]; then - cp -a $WOK/$pkg/$PACKAGE-$VERSION/_pkg/usr/share/locale/$LOCALE \ - $fs/usr/share/locale - fi - done + mk_locale_dir + get_slitaz_messages + get_core_messages PACKAGE="$PKG_NAME" VERSION="$PKG_VERS" localedef -i $LOCALEDEF -c -f $CHARMAP $fs/usr/lib/locale/$LOCALEDEF.UTF-8 diff -r 6da009027189 -r d42b38d61b43 slitaz-i18n/receipt --- a/slitaz-i18n/receipt Tue Feb 02 15:27:48 2010 +0100 +++ b/slitaz-i18n/receipt Tue Feb 02 22:17:52 2010 +0100 @@ -1,9 +1,9 @@ # SliTaz package receipt PACKAGE="slitaz-i18n" -VERSION="1.0" +VERSION="3.0" CATEGORY="system-tools" -SHORT_DESC="SliTaz internationalization meta packages to build locale pack." +SHORT_DESC="SliTaz internationalization meta package to buld locale pack." MAINTAINER="pankso@slitaz.org" DEPENDS="slitaz-configs slitaz-doc slitaz-tools" SUGGESTED="locale-de locale-es locale-fr locale-hu locale-pt" @@ -15,9 +15,13 @@ mkdir -p $fs/usr/share/doc/slitaz . stuff/locale-pack.conf cat > $fs/usr/share/doc/slitaz/i18n.txt << _EOT_ -SliTaz 18n information +SliTaz i18n information ================================================================================ +This package provide the necessary functions and configs for SliTaz locale pack. +SliTaz use UTF-8 by default and tazlocale (from the SliTaz tools) to configure +system language. + Translated packages files include in the core languages pack (from upstream): ---- diff -r 6da009027189 -r d42b38d61b43 slitaz-i18n/stuff/locale-pack.conf --- a/slitaz-i18n/stuff/locale-pack.conf Tue Feb 02 15:27:48 2010 +0100 +++ b/slitaz-i18n/stuff/locale-pack.conf Tue Feb 02 22:17:52 2010 +0100 @@ -1,4 +1,4 @@ # Packages translation include in the language pack. -CORE_PKGS="asunder alsaplayer epdfview galculator geany gpicview gparted \ -glib gtk+ grsync leafpad lxpanel lxtask obconf openbox pcmanfm xpad" +CORE_PKGS="asunder alsaplayer epdfview galculator viewnior gparted \ +glib gtk+ leafpad lxpanel lxtask obconf openbox pcmanfm" diff -r 6da009027189 -r d42b38d61b43 slitaz-i18n/stuff/locale-pack.functions --- a/slitaz-i18n/stuff/locale-pack.functions Tue Feb 02 15:27:48 2010 +0100 +++ b/slitaz-i18n/stuff/locale-pack.functions Tue Feb 02 22:17:52 2010 +0100 @@ -7,7 +7,6 @@ $fs/usr/share/locale/$LOCALE \ $fs/usr/share/slitaz/messages \ $fs/usr/share/doc/slitaz \ - $fs/usr/lib/locale \ $fs/etc/xdg/openbox }