--- _migemo-0.40/Makefile.am 2003-05-28 21:14:04.000000000 +0900 +++ migemo-0.40/Makefile.am 2011-10-10 18:15:11.119113986 +0900 @@ -15,17 +15,17 @@ sed -e 's!@pkgdatadir@!$(pkgdatadir)!g' migemo.el.in > $@ migemo-dict: # SKK-JISYO.L - ruby -I. migemo-convert.rb SKK-JISYO.L > $@ + $(RUBY) -Eeuc-jp -I. migemo-convert.rb SKK-JISYO.L > $@ migemo-dict.idx: migemo-dict - ruby -I. migemo-index.rb migemo-dict > migemo-dict.idx + $(RUBY) -Eeuc-jp -I. migemo-index.rb migemo-dict > migemo-dict.idx migemo-dict.cache: frequent-chars migemo-dict migemo-dict.idx - sort frequent-chars | ruby -I. migemo-cache.rb migemo-dict + sort frequent-chars | $(RUBY) -Eeuc-jp -I. migemo-cache.rb migemo-dict frequent-chars: genchars.sh migemo-dict - sh genchars.sh > tmp.list1 - cat tmp.list1 | ruby -rromkan -ne 'puts $$_.to_kunrei' > tmp.list2 + RUBY=$(RUBY) sh genchars.sh > tmp.list1 + cat tmp.list1 | $(RUBY) -Eeuc-jp -rromkan -ne 'puts $$_.to_kunrei' > tmp.list2 cat tmp.list1 tmp.list2 | sort | uniq > frequent-chars clean-local: --- _migemo-0.40/acinclude.m4 2001-07-10 13:35:18.000000000 +0900 +++ migemo-0.40/acinclude.m4 2011-10-10 18:15:11.120113973 +0900 @@ -123,7 +123,7 @@ AC_MSG_CHECKING([where .rb files should go]) if test "x$rubydir" = x; then changequote(<<, >>) - rubydir=`ruby -rrbconfig -e 'puts Config::CONFIG["sitedir"]'` + rubydir=`$RUBY -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]'` changequote([, ]) fi AC_MSG_RESULT($rubydir) --- _migemo-0.40/configure.in 2003-05-28 21:18:18.000000000 +0900 +++ migemo-0.40/configure.in 2011-10-10 18:15:11.125113911 +0900 @@ -10,7 +10,7 @@ AM_PATH_RUBYDIR echo -n "checking Ruby/Bsearch... " -if ruby -rbsearch -e 'exit(if Bsearch::VERSION >= "1.2" then 0 else 1 end)'; then +if $RUBY -e 'require "bsearch"; exit(if Bsearch::VERSION::STRING >= "1.2" then 0 else 1 end)'; then echo found else echo not found @@ -19,7 +19,7 @@ fi echo -n "checking Ruby/Romkan... " -if ruby -rromkan -e 'exit(if Romkan::VERSION >= "0.3" then 0 else 1 end)'; then +if $RUBY -rromkan -e 'exit(if Romkan::VERSION >= "0.3" then 0 else 1 end)'; then echo found else echo not found --- migemo-0.40/tests/Makefile.am 2001-08-14 02:12:57.000000000 +0900 +++ migemo-0.40.patched/tests/Makefile.am 2011-10-10 19:48:44.078942331 +0900 @@ -5,13 +5,13 @@ test-dict.idx: test-dict ../migemo-index.rb - ruby -I.. ../migemo-index.rb test-dict > test-dict.idx + $(RUBY) -Eeuc-jp -I.. ../migemo-index.rb test-dict > test-dict.idx test-dict.cache: test-dict test-dict.idx ../migemo-cache.rb - ruby -rromkan -ne 'puts $$1.to_roma if /^(.+?) /' test-dict |\ + $(RUBY) -Eeuc-jp -rromkan -ne 'puts $$1.to_roma if /^(.+?) /' test-dict |\ while read line; do\ - echo $$line | ruby -ne 'chomp!;1.upto($$_.length) do |x| puts $$_[0,x] end';\ - done | ruby -I.. ../migemo-cache.rb test-dict + echo $$line | $(RUBY) -Eeuc-jp -ne 'chomp!;1.upto($$_.length) do |x| puts $$_[0,x] end';\ + done | $(RUBY) -Eeuc-jp -I.. ../migemo-cache.rb test-dict clean-local: rm -f tmp.* --- _migemo-0.40/genchars.sh 2001-08-13 18:30:48.000000000 +0900 +++ migemo-0.40.patched/genchars.sh 2011-10-10 18:15:11.125113911 +0900 @@ -1,6 +1,8 @@ #! /bin/sh -ruby -rromkan -nle 'head = split[0]; if /^\w+$/ =~ head then puts head else roma = head.to_roma; puts roma, roma.to_kunrei end' migemo-dict |uniq> tmp.ascii.words +RUBY=${RUBY:-ruby} + +${RUBY} -rromkan -nle 'head = split[0]; if /^\w+$/ =~ head then puts head else roma = head.to_roma; puts roma, roma.to_kunrei end' migemo-dict |uniq> tmp.ascii.words # Get the top 500 frequent ngrams. for i in 1 2 3 4 5 6 7 8; do