Author: baggins Date: Fri Jul 15 20:24:17 2011 GMT Module: packages Tag: HEAD ---- Log message: - rel 2 - build utf-8 dicts (courtesy of ALTLinux)
---- Files affected: packages/anthy: anthy.spec (1.7 -> 1.8) ---- Diffs: ================================================================ Index: packages/anthy/anthy.spec diff -u packages/anthy/anthy.spec:1.7 packages/anthy/anthy.spec:1.8 --- packages/anthy/anthy.spec:1.7 Tue Jul 12 22:54:32 2011 +++ packages/anthy/anthy.spec Fri Jul 15 22:24:12 2011 @@ -3,17 +3,21 @@ # TODO: # - emacs mode # +# Conditional build: +%bcond_without utf8 # build euc-jp dict +# Summary: A Japanese character input system library (with dictionary) Summary(pl.UTF-8): System wprowadzania znaków japońskich (ze słownikiem) Name: anthy Version: 9100h -Release: 1 +Release: 2 License: GPL Group: Libraries Source0: http://dl.sourceforge.jp/anthy/37536/%{name}-%{version}.tar.gz # Source0-md5: 1f558ff7ed296787b55bb1c6cf131108 URL: http://anthy.sourceforge.jp/ BuildRequires: automake +BuildRequires: iconv BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -49,6 +53,50 @@ %prep %setup -q +%if %{with utf8} +cd alt-cannadic +for i in gcanna.ctd gcannaf.ctd gtankan.ctd; do + iconv -f euc-jp -t utf-8 $i > $i.utf8 +done +cd extra +for i in g-jiritu-34.t gc-fullname-34.t gf-fuzoku-34.t gt-tankanji_hikanji-34.t gt-tankanji_kanji-34.t; do + sed -e 's/^\([^ ]*\)t[ ]*\(#[A-Z0-9\*]*\)[ ]*\([^ ]*\)$/\1 \2 \3/g' $i > $i.norm +done +cd ../../mkworddic +for i in adjust.t compound.t extra.t udict zipcode.t; do + iconv -f euc-jp -t utf-8 $i > $i.utf8 +done +cd .. + +if [ ! -f mkworddic/dict.args.in-orig ]; then + cp -a mkworddic/dict.args.in{,-orig} +fi + +cat <<_EOF_ > mkworddic/dict.args.in +# Generated by rpm script +set_input_encoding utf8 +read @top_srcdir@/alt-cannadic/gcanna.ctd.utf8 +read @top_srcdir@/alt-cannadic/gcannaf.ctd.utf8 +read @top_srcdir@/alt-cannadic/gtankan.ctd.utf8 +read @top_srcdir@/alt-cannadic/extra/g-jiritu-34.t.norm +read @top_srcdir@/alt-cannadic/extra/gc-fullname-34.t.norm +read @top_srcdir@/alt-cannadic/extra/gt-tankanji_kanji-34.t.norm +read @top_srcdir@/alt-cannadic/extra/gt-tankanji_hikanji-34.t.norm +read @top_srcdir@/alt-cannadic/extra/gf-fuzoku-34.t.norm +read @top_srcdir@/mkworddic/adjust.t.utf8 +read @top_srcdir@/mkworddic/compound.t.utf8 +read @top_srcdir@/mkworddic/extra.t.utf8 +read @top_srcdir@/alt-cannadic/g_fname.t +# +build_reverse_dict +set_dict_encoding utf8 +read_uc @top_srcdir@/mkworddic/udict.utf8 +write anthy.wdic +done +_EOF_ +touch -r mkworddic/dict.args.in{-orig,} +%endif + %build %configure %{__make} @@ -104,6 +152,10 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.8 2011/07/15 20:24:12 baggins +- rel 2 +- build utf-8 dicts (courtesy of ALTLinux) + Revision 1.7 2011/07/12 20:54:32 baggins - added TODO ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/anthy/anthy.spec?r1=1.7&r2=1.8&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
