1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 USE_RUBY="ruby24 ruby25 ruby26"
7 inherit cvs ruby-single
11 DESCRIPTION="Jisyo (dictionary) files for the SKK Japanese-input software"
12 HOMEPAGE="http://openlab.ring.gr.jp/skk/dic.html"
13 ECVS_SERVER="openlab.jp:/circus/cvsroot"
18 LICENSE="GPL-2 freedist public-domain"
21 IUSE="cdb ${USE_RUBY//ruby/ruby_targets_ruby}"
33 S="${WORKDIR}/${ECVS_MODULE}"
35 DOCS=( ChangeLog{,.{1..3}} READMEs/committers.txt edict_doc.txt zipcode/README.ja )
37 SKKTOOLS_DIR="${EPREFIX}/usr/share/skktools/convert2skk"
40 rm -f ${MY_PN}.{wrong*,noregist,not_wrong,hukugougo,notes,requested,pubdic+}
46 cdbmake "${1}" "${1}.tmp"
54 local ctdic="${MY_PN}.china_taiwan" ruby
56 for ruby in ${RUBY_TARGETS_PREFERENCE}; do
57 if use ruby_targets_${ruby}; then
58 ${ruby} ${SKKTOOLS_DIR}/ctdicconv.rb csv/${ctdic##*.}.csv | skkdic-expr2 >> ${ctdic}
64 local cdbmake=cdb_make f
65 if has_version dev-db/tinycdb; then
68 for f in {,zipcode/}${MY_PN}.*; do
71 s = substr($0, index($0, " ") + 1)
72 print "+" length($1) "," length(s) ":" $1 "->" s
77 ' ${f} | ${cdbmake} ${f}.cdb || die
83 insinto /usr/share/skk
84 doins {,zipcode/}${MY_PN}.*