]> git.pld-linux.org Git - packages/anthy.git/blobdiff - anthy.spec
- rel 2
[packages/anthy.git] / anthy.spec
index ad7dbe0d589f168acbbe0a5e68275087496c4521..f499694e70a00da7eaeb377654634003c38a83ee 100644 (file)
@@ -2,17 +2,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
@@ -48,6 +52,50 @@ Statyczne biblioteki anthy.
 %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}
This page took 0.046634 seconds and 4 git commands to generate.