After private conversation with Stefan I'm sending patch that uses links
in /usr/share/locale for LC_CTYPE instead of copying (by the way there was a commentary in /usr/src/share/locale/ctype/Makefile suggesting using
symlinks!).
Besides this patch adds locales for spanish speaking countries.

This method reduces the size of /usr/shar/locale from 2.1M to 556K (even with new locales for all spanish speaking countries).

The same can be done with LC_COLLATE (after having collation support).
Best regards.
--
Dios, gracias por tu amor infinito.
-- Vladimir Támara Patiño. http://vtamara.pasosdeJesus.org/
 http://www.pasosdejesus.org/dominio_publico_colombia.html

? m
? obj
Index: Makefile
===================================================================
RCS file: /cvs/src/share/locale/ctype/Makefile,v
retrieving revision 1.6
diff -r1.6 Makefile
83,90c83,91
< LOCALES += es_ES.ISO8859-1
<  LOCALESRC_es_ES.ISO8859-1 = en_US.ISO_8859-1
< 
< LOCALES += es_ES.ISO8859-15
<  LOCALESRC_es_ES.ISO8859-15 = en_US.DIS_8859-15
< 
< LOCALES += es_ES.UTF-8
<  LOCALESRC_es_ES.UTF-8 = en_US.UTF-8
---
> LOCALES_ES = es_AR es_BO es_CH es_CO es_CR es_CU es_DO es_EC es_ES es_GQ 
> es_GT es_HN es_MX es_NI es_PA es_PE es_PR es_PY es_SV es_US es_UY es_VE
> .for c in ${LOCALES_ES}
> LOCALES += ${c}.ISO8859-1
>  LOCALESRC_${c}.ISO8859-1 = en_US.ISO_8859-1
> LOCALES += ${c}.ISO8859-15
>  LOCALESRC_${c}.ISO8859-15 = en_US.DIS_8859-15
> LOCALES += ${c}.UTF-8
>  LOCALESRC_${c}.UTF-8 = en_US.UTF-8
> .endfor
296d296
< # TODO: more use of symlinks?
307,308c307,313
<       install -o ${LOCALEOWN} -g ${LOCALEGRP} -m ${LOCALEMODE} \
<           ${locale}.out ${DESTDIR}${LOCALEDIR}/${locale}/LC_CTYPE
---
>       if (test "${LOCALESRC_${locale}:S/ISO_/ISO/g:S/DIS_/ISO/g}" != 
> "${locale}") then { \
>               ln -fs 
> ../${LOCALESRC_${locale}:S/ISO_/ISO/g:S/DIS_/ISO/g}/LC_CTYPE 
> ${DESTDIR}${LOCALEDIR}/${locale}/LC_CTYPE; \
>       } else { \
>               install -o ${LOCALEOWN} -g ${LOCALEGRP} -m ${LOCALEMODE} \
>               ${locale}.out ${DESTDIR}${LOCALEDIR}/${locale}/LC_CTYPE; \
>       } fi;
> 
313,314c318,321
<       ${CPP} -I${.CURDIR} < ${.CURDIR}/${LOCALESRC_${locale}}.src | \
<           sed -e '/^#/d' | mklocale -o ${.TARGET}
---
>       if (test "${LOCALESRC_${locale}:S/ISO_/ISO/g:S/DIS_/ISO/g}" = 
> "${locale}") then { \
>               ${CPP} -I${.CURDIR} < 
> ${.CURDIR}/${LOCALESRC_${locale}:S/ISO_/ISO/g:S/DIS_/ISO/g}.src | \
>           sed -e '/^#/d' | mklocale -o ${.TARGET}; \
>       } fi;

Reply via email to