Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=setup.git;a=commitdiff;h=09b459f5604e5366c05bd39aa88f58f0ca015ec5
commit 09b459f5604e5366c05bd39aa88f58f0ca015ec5 Author: Miklos Vajna <[email protected]> Date: Thu Jan 15 21:26:10 2009 +0100 handle utf8 po files as input diff --git a/Makefile b/Makefile index 89ef4e4..bcb0a13 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ export CCACHE_DIR=/var/cache/ccache/setup export CCACHE_NOLINK=1 export CCACHE_UMASK=002 DIALOG_LANGS = `find po -name *.po |sed 's/.*\/\(.*\).po/\1/' |tr '\n' ' '` -GLIBC_LANGS = en_US,ISO-8859-1 da_DK,ISO-8859-1 de_DE,ISO-8859-1 fr_FR,ISO-8859-1 hu_HU,ISO-8859-2 id_ID,ISO-8859-1 it_IT,ISO-8859-1 nl_NL,ISO-8859-1 pt_BR,ISO-8859-1 ro_RO,ISO-8859-2 sk_SK,ISO-8859-2 sv_SE,ISO-8859-1 cs_CZ,ISO-8859-2 +GLIBC_LANGS = en_US,ISO-8859-1 da_DK,ISO-8859-1 de_DE,ISO-8859-1 fr_FR,ISO-8859-1 hu_HU,ISO-8859-2 id_ID,ISO-8859-1 it_IT,ISO-8859-1 nl_NL,ISO-8859-1 pt_BR,ISO-8859-1 ro_RO,ISO-8859-2 sk_SK,ISO-8859-2 sv_SE,ISO-8859-1 cs_CZ,ISO-8859-2 es_ES,ISO-8859-1 ru_RU,ISO-8859-5 tr_TR,ISO-8859-9 ifeq ($(CARCH),x86_64) QEMU ?= qemu-system-x86_64 endif @@ -94,7 +94,7 @@ compile: check ccache $(packages) misc prepare: rm -rf config.mak - make -C po pos + make -C po pos GLIBC_LANGS="$(GLIBC_LANGS)" check_root: @if [ "`id -u`" != 0 ]; then \ diff --git a/po/Makefile b/po/Makefile index e466689..1e65d5b 100644 --- a/po/Makefile +++ b/po/Makefile @@ -7,15 +7,24 @@ pos: for i in $(LANGS); \ do \ cp $(PO_DIR)/setup/$$i/setup.po $$i.po; \ - if ! msgfmt -c --statistics -o $$i.gmo $$i.po; then \ - echo "WARNING: $$i.po will break your build!"; \ + charset=$$(echo $(GLIBC_LANGS)|sed 's/ /\n/g'|grep ^$$i|sed 's/.*,//'); \ + if [ -z "$$charset" ]; then \ + echo '$$charset empty for '$$i'!'; \ + exit 1; \ + fi; \ + iconv -f UTF-8 -t $$charset < $$i.po > $$i.new.po; \ + sed "s/UTF-8/$$charset/" $$i.new.po > $$i.po; \ + rm $$i.new.po; \ + if ! msgfmt -c --statistics -o /dev/null $$i.po; then \ + echo "$$i.po would break your build!"; \ + exit 1; \ fi; \ done mos: for i in $(wildcard *.po); do \ echo -n "$$i: "; \ - msgfmt -c --statistics -o ../merge/usr/share/locale/`basename $$i .po`/LC_MESSAGES/setup.mo $$i; \ + msgfmt -o ../merge/usr/share/locale/`basename $$i .po`/LC_MESSAGES/setup.mo $$i; \ done pot: intltool-extract _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
