diff options
Diffstat (limited to 'app-text/migemo')
-rw-r--r-- | app-text/migemo/ChangeLog | 11 | ||||
-rw-r--r-- | app-text/migemo/files/migemo-0.40-ruby-ng.patch | 16 | ||||
-rw-r--r-- | app-text/migemo/files/migemo-0.40_p2-ruby-ng.patch | 96 | ||||
-rw-r--r-- | app-text/migemo/migemo-0.40_p2.ebuild | 71 |
4 files changed, 184 insertions, 10 deletions
diff --git a/app-text/migemo/ChangeLog b/app-text/migemo/ChangeLog index e3c32dfa4deb..12c2eafe6687 100644 --- a/app-text/migemo/ChangeLog +++ b/app-text/migemo/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-text/migemo -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/migemo/ChangeLog,v 1.43 2013/02/21 13:19:44 ago Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/migemo/ChangeLog,v 1.44 2014/01/19 05:26:35 naota Exp $ + +*migemo-0.40_p2 (19 Jan 2014) + + 19 Jan 2014; Naohiro Aota <naota@gentoo.org> + +files/migemo-0.40_p2-ruby-ng.patch, +migemo-0.40_p2.ebuild, + files/migemo-0.40-ruby-ng.patch: + version bump to support ruby19. #493028 21 Feb 2013; Agostino Sarubbo <ago@gentoo.org> migemo-0.40-r5.ebuild: Stable for ia64, wrt bug #455952 diff --git a/app-text/migemo/files/migemo-0.40-ruby-ng.patch b/app-text/migemo/files/migemo-0.40-ruby-ng.patch index f2864412b6de..c242493dcd97 100644 --- a/app-text/migemo/files/migemo-0.40-ruby-ng.patch +++ b/app-text/migemo/files/migemo-0.40-ruby-ng.patch @@ -5,21 +5,21 @@ migemo-dict: # SKK-JISYO.L - ruby -I. migemo-convert.rb 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) -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) -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) -rromkan -ne 'puts $$_.to_kunrei' > tmp.list2 ++ cat tmp.list1 | $(RUBY) -Eeuc-jp -rromkan -ne 'puts $$_.to_kunrei' > tmp.list2 cat tmp.list1 tmp.list2 | sort | uniq > frequent-chars clean-local: @@ -61,16 +61,16 @@ test-dict.idx: test-dict ../migemo-index.rb - ruby -I.. ../migemo-index.rb test-dict > test-dict.idx -+ $(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) -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) -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.* diff --git a/app-text/migemo/files/migemo-0.40_p2-ruby-ng.patch b/app-text/migemo/files/migemo-0.40_p2-ruby-ng.patch new file mode 100644 index 000000000000..bd43cbe9dfd2 --- /dev/null +++ b/app-text/migemo/files/migemo-0.40_p2-ruby-ng.patch @@ -0,0 +1,96 @@ +diff --git a/Makefile.am b/Makefile.am +index 7548ae0..1f9213a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -15,17 +15,17 @@ migemo.el: migemo.el.in + 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 ++ cat tmp.list1 | ${RUBY} -Eeuc-jp -rromkan -ne 'puts $$_.to_kunrei' > tmp.list2 + cat tmp.list1 tmp.list2 | sort | uniq > frequent-chars + + clean-local: +diff --git a/acinclude.m4 b/acinclude.m4 +index f74e70e..50ca46c 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -123,7 +123,7 @@ AC_DEFUN(AM_PATH_RUBYDIR, + AC_MSG_CHECKING([where .rb files should go]) + if test "x$rubydir" = x; then + changequote(<<, >>) +- rubydir=`ruby -rrbconfig -e 'puts RbConfig::CONFIG["sitedir"]'` ++ rubydir=`${RUBY} -Eeuc-jp -rrbconfig -e 'puts RbConfig::CONFIG["sitedir"]'` + changequote([, ]) + fi + AC_MSG_RESULT($rubydir) +diff --git a/configure.in b/configure.in +index 2948e25..7ee3afc 100644 +--- a/configure.in ++++ b/configure.in +@@ -10,7 +10,7 @@ AM_PATH_LISPDIR + 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 -rbsearch -e 'exit(if Bsearch::VERSION::STRING >= "1.2" then 0 else 1 end)'; then + echo found + else + echo not found +@@ -19,7 +19,7 @@ else + 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 +diff --git a/genchars.sh b/genchars.sh +index 8e186d1..9a23483 100644 +--- a/genchars.sh ++++ b/genchars.sh +@@ -1,6 +1,7 @@ + #! /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 +diff --git a/tests/Makefile.am b/tests/Makefile.am +index b19bdb1..76f1638 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -5,13 +5,13 @@ noinst_DATA = test-dict.idx test-dict.cache + + + 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.* diff --git a/app-text/migemo/migemo-0.40_p2.ebuild b/app-text/migemo/migemo-0.40_p2.ebuild new file mode 100644 index 000000000000..7e91cf1e0633 --- /dev/null +++ b/app-text/migemo/migemo-0.40_p2.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/migemo/migemo-0.40_p2.ebuild,v 1.1 2014/01/19 05:26:35 naota Exp $ + +EAPI=5 +# jruby: dev-ruby/ruby-romkan not work +USE_RUBY="ruby19" + +inherit autotools elisp-common eutils ruby-ng + +MY_PV=${PV/_/} +DESCRIPTION="Migemo is Japanese Incremental Search Tool" +HOMEPAGE="http://0xcc.net/migemo/" +SRC_URI="https://github.com/yshl/migemo-for-Ruby-1.9/archive/${MY_PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="emacs" + +ruby_add_bdepend "dev-ruby/ruby-romkan dev-ruby/bsearch" + +DEPEND="${DEPEND} + app-dicts/migemo-dict[-unicode] + emacs? ( virtual/emacs + app-emacs/apel )" +RDEPEND="${DEPEND}" + +SITEFILE="50${PN}-gentoo.el" + +RUBY_PATCHES=( + "${FILESDIR}/${PN}-0.40-r5-without-emacs.patch" + "${FILESDIR}/${P}-ruby-ng.patch" +) +RUBY_S="migemo-for-Ruby-1.9-${MY_PV}" + +all_ruby_prepare() { + cp "${EPREFIX}"/usr/share/migemo/migemo-dict . + eautoreconf +} + +each_ruby_configure() { + RUBY="${RUBY}" econf $(use_with emacs) --with-lispdir="${SITELISP}/${PN}" +} + +each_ruby_install() { + emake DESTDIR="${ED}" \ + $(use emacs || echo "lispdir=") install +} + +all_ruby_install() { + rm "${ED}"/usr/share/migemo/migemo-dict + + if use emacs; then + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + dodoc AUTHORS ChangeLog INSTALL README +} + +pkg_postinst() { + if use emacs; then + elisp-site-regen + elog "Migemo adviced search is no longer enabled as a site default." + elog "Add the following line to your ~/.emacs file to enable it:" + elog " (require 'migemo)" + fi +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |