summaryrefslogtreecommitdiff
path: root/textproc
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2012-08-12 11:52:26 +0000
committerobache <obache@pkgsrc.org>2012-08-12 11:52:26 +0000
commit6e165ac51994c7a2b259edbfe216492c6b6cf0ae (patch)
tree9fcdf5103b20841ce8576b9110b3a06d1ceb31c6 /textproc
parent05213f92511b9dd12841716b7b314f6996994d99 (diff)
downloadpkgsrc-6e165ac51994c7a2b259edbfe216492c6b6cf0ae.tar.gz
Drop Ruby-1.8 and welcome Ruby-1.9 support (with some fixes).
based on PR 46765 by Miwa Susumu.
Diffstat (limited to 'textproc')
-rw-r--r--textproc/migemo/Makefile9
-rw-r--r--textproc/migemo/Makefile.common4
-rw-r--r--textproc/migemo/distinfo12
-rw-r--r--textproc/migemo/patches/patch-aa2
-rw-r--r--textproc/migemo/patches/patch-ab2
-rw-r--r--textproc/migemo/patches/patch-genchars.sh12
-rw-r--r--textproc/migemo/patches/patch-migemo19
-rw-r--r--textproc/migemo/patches/patch-migemo-cache.rb24
-rw-r--r--textproc/migemo/patches/patch-migemo-client18
-rw-r--r--textproc/migemo/patches/patch-migemo-convert.rb23
-rw-r--r--textproc/migemo/patches/patch-migemo-grep18
-rw-r--r--textproc/migemo/patches/patch-migemo-index.rb11
-rw-r--r--textproc/migemo/patches/patch-migemo-server36
-rw-r--r--textproc/migemo/patches/patch-migemo.rb.in21
-rw-r--r--textproc/migemo/patches/patch-tests_Makefile.am13
15 files changed, 216 insertions, 8 deletions
diff --git a/textproc/migemo/Makefile b/textproc/migemo/Makefile
index e5a5ae9b1c2..b99c08c0475 100644
--- a/textproc/migemo/Makefile
+++ b/textproc/migemo/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2011/09/21 21:40:20 joerg Exp $
+# $NetBSD: Makefile,v 1.7 2012/08/12 11:52:26 obache Exp $
.include "../../textproc/migemo/Makefile.common"
@@ -7,14 +7,17 @@ PKGREVISION= 1
COMMENT= Japanese text search tool/library
+LICENSE= gnu-gpl-v2
+
PKG_DESTDIR_SUPPORT= user-destdir
-DEPENDS+= ${RUBY_PKGPREFIX}-bsearch-*:../../devel/ruby-bsearch
-DEPENDS+= ${RUBY_PKGPREFIX}-romkan-*:../../converters/ruby-romkan
+DEPENDS+= ${RUBY_PKGPREFIX}-bsearch-[0-9]*:../../devel/ruby-bsearch
+DEPENDS+= ${RUBY_PKGPREFIX}-romkan-[0-9]*:../../converters/ruby-romkan
USE_TOOLS+= autoconf automake aclocal
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --with-rubydir=${PREFIX}/${RUBY_VENDORLIB}
+MAKE_ENV+= RUBYOPT=-Ke
REPLACE_RUBY= migemo migemo-client migemo-grep migemo-server
diff --git a/textproc/migemo/Makefile.common b/textproc/migemo/Makefile.common
index 186677a06d1..44d8b903689 100644
--- a/textproc/migemo/Makefile.common
+++ b/textproc/migemo/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.2 2011/09/21 21:40:20 joerg Exp $
+# $NetBSD: Makefile.common,v 1.3 2012/08/12 11:52:26 obache Exp $
#
# used by textproc/migemo/Makefile
# used by textproc/migemo-elisp/Makefile
@@ -12,4 +12,4 @@ MASTER_SITES= http://0xcc.net/migemo/
MAINTAINER= yamajun@ofug.net
HOMEPAGE= http://0xcc.net/migemo/
-RUBY_VERSION_SUPPORTED= 18
+RUBY_VERSION_SUPPORTED= 192 193
diff --git a/textproc/migemo/distinfo b/textproc/migemo/distinfo
index 62138d730c6..a36245a674d 100644
--- a/textproc/migemo/distinfo
+++ b/textproc/migemo/distinfo
@@ -1,7 +1,17 @@
-$NetBSD: distinfo,v 1.1.1.1 2008/02/10 13:08:51 obache Exp $
+$NetBSD: distinfo,v 1.2 2012/08/12 11:52:26 obache Exp $
SHA1 (migemo-0.40.tar.gz) = 0c7f066c4c271a8e2556ea9d9cc850c650eaebc8
RMD160 (migemo-0.40.tar.gz) = 6663ac89abc89e4c568c44a71e8ae1f016920df0
Size (migemo-0.40.tar.gz) = 1674941 bytes
SHA1 (patch-aa) = a83ce755f3751b9bea6c2e4b4c09d94d2c9a932c
SHA1 (patch-ab) = 1f0062c64e694e465803e4b4c2bd89855b071ac0
+SHA1 (patch-genchars.sh) = 33afe99f246d5c896a32023116d5621021b5adae
+SHA1 (patch-migemo) = 9aa65760f9c130049a7252af9cf9c67d2edddd00
+SHA1 (patch-migemo-cache.rb) = 21deacfc7a7e82db33507c2d43145bdb53b91a14
+SHA1 (patch-migemo-client) = b7c3033aeb39bc6926a33f3a8c2b48554874a560
+SHA1 (patch-migemo-convert.rb) = 8a894c045aab9447e5c09f5ccfd34715cf3e8813
+SHA1 (patch-migemo-grep) = d8686169a9d4787c1056ca5d9838a00bca06a60f
+SHA1 (patch-migemo-index.rb) = 84b9c571c2d1c9bfdbd207043c6c7bb2a78b72da
+SHA1 (patch-migemo-server) = 8fff0f4e40f90a7ec0202a0cec9fd0d866d0fce4
+SHA1 (patch-migemo.rb.in) = 007f1595b098e517d28e35a6fa9db8e2ba1618f4
+SHA1 (patch-tests_Makefile.am) = b50396a22695baa66011ed18d89528f630214241
diff --git a/textproc/migemo/patches/patch-aa b/textproc/migemo/patches/patch-aa
index b6c6a2808a5..14005f214d9 100644
--- a/textproc/migemo/patches/patch-aa
+++ b/textproc/migemo/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.1.1.1 2008/02/10 13:08:51 obache Exp $
+$NetBSD: patch-aa,v 1.2 2012/08/12 11:52:26 obache Exp $
--- configure.in.orig 2003-05-28 12:18:18.000000000 +0000
+++ configure.in
diff --git a/textproc/migemo/patches/patch-ab b/textproc/migemo/patches/patch-ab
index 2a8054fe973..b0ab3ec98d1 100644
--- a/textproc/migemo/patches/patch-ab
+++ b/textproc/migemo/patches/patch-ab
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.1.1.1 2008/02/10 13:08:51 obache Exp $
+$NetBSD: patch-ab,v 1.2 2012/08/12 11:52:26 obache Exp $
--- Makefile.am.orig 2003-05-28 12:14:04.000000000 +0000
+++ Makefile.am
diff --git a/textproc/migemo/patches/patch-genchars.sh b/textproc/migemo/patches/patch-genchars.sh
new file mode 100644
index 00000000000..3359540620c
--- /dev/null
+++ b/textproc/migemo/patches/patch-genchars.sh
@@ -0,0 +1,12 @@
+$NetBSD: patch-genchars.sh,v 1.1 2012/08/12 11:52:26 obache Exp $
+
+--- genchars.sh.orig 2001-08-13 18:30:48.000000000 +0900
++++ genchars.sh 2011-08-21 23:37:29.000000000 +0900
+@@ -1,6 +1,6 @@
+ #! /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 -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/textproc/migemo/patches/patch-migemo b/textproc/migemo/patches/patch-migemo
new file mode 100644
index 00000000000..be9075f98f8
--- /dev/null
+++ b/textproc/migemo/patches/patch-migemo
@@ -0,0 +1,19 @@
+$NetBSD: patch-migemo,v 1.1 2012/08/12 11:52:26 obache Exp $
+
+--- migemo.orig 2003-05-27 03:01:10.000000000 +0000
++++ migemo
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env ruby
++#! /usr/bin/env ruby -Ke
+ #
+ # migemo - a tool for Japanese incremental search.
+ #
+@@ -10,8 +10,6 @@
+ # the GNU General Public License version 2.
+ #
+
+-$KCODE = "e"
+-
+ require 'migemo'
+ require 'getoptlong'
+ require 'thread'
diff --git a/textproc/migemo/patches/patch-migemo-cache.rb b/textproc/migemo/patches/patch-migemo-cache.rb
new file mode 100644
index 00000000000..6d73622a6bf
--- /dev/null
+++ b/textproc/migemo/patches/patch-migemo-cache.rb
@@ -0,0 +1,24 @@
+$NetBSD: patch-migemo-cache.rb,v 1.1 2012/08/12 11:52:26 obache Exp $
+
+--- migemo-cache.rb.orig 2001-07-14 17:38:56.000000000 +0000
++++ migemo-cache.rb
+@@ -1,5 +1,4 @@
+ require 'migemo'
+-$KCODE="e"
+ raise if ARGV[0] == nil
+ dict = ARGV[0]
+ static_dict = MigemoStaticDict.new(dict)
+@@ -18,10 +17,10 @@ lines.each do |line|
+ migemo = Migemo.new(static_dict, pattern)
+ migemo.optimization = 3
+ data = Marshal.dump(migemo.regex_tree)
+- output = [pattern.length].pack("N") + pattern +
+- [data.length].pack("N") + data
++ output = [pattern.bytesize].pack("N") + pattern.dup.force_encoding("ASCII-8BIT") +
++ [data.bytesize].pack("N") + data
+ cache.print output
+ index.print [idx].pack("N")
+- idx += output.length
++ idx += output.bytesize
+ end
+
diff --git a/textproc/migemo/patches/patch-migemo-client b/textproc/migemo/patches/patch-migemo-client
new file mode 100644
index 00000000000..23d1e79228d
--- /dev/null
+++ b/textproc/migemo/patches/patch-migemo-client
@@ -0,0 +1,18 @@
+$NetBSD: patch-migemo-client,v 1.1 2012/08/12 11:52:26 obache Exp $
+
+--- migemo-client.orig 2001-08-13 09:30:48.000000000 +0000
++++ migemo-client
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env ruby
++#!/usr/bin/env ruby -Ke
+ #
+ # migemo-client - a client to communicate with migemo-server.
+ #
+@@ -10,7 +10,6 @@
+ # the GNU General Public License version 2.
+ #
+
+-$KCODE = "e"
+ require 'net/http'
+ require 'getoptlong'
+
diff --git a/textproc/migemo/patches/patch-migemo-convert.rb b/textproc/migemo/patches/patch-migemo-convert.rb
new file mode 100644
index 00000000000..1ecaedf6502
--- /dev/null
+++ b/textproc/migemo/patches/patch-migemo-convert.rb
@@ -0,0 +1,23 @@
+$NetBSD: patch-migemo-convert.rb,v 1.1 2012/08/12 11:52:26 obache Exp $
+
+--- migemo-convert.rb.orig 2003-05-26 06:55:22.000000000 +0000
++++ migemo-convert.rb
+@@ -1,3 +1,4 @@
++#coding: euc-jp
+ #
+ # Ruby/Migemo - a library for Japanese incremental search.
+ #
+@@ -14,12 +15,12 @@
+ #
+ # Convert a SKK's dictionary into Migemo's.
+ #
+-$KCODE= "e"
+ require 'romkan'
+
+ HIRAGANA = "[¤¡-¤ó¡¼¡Á]"
+ KANJI = "[°¡-ô¤]"
+
++$stdin.set_encoding(Encoding::EUC_JP)
+ puts ";;"
+ puts ";; This is Migemo's dictionary generated from SKK's."
+ puts ";;"
diff --git a/textproc/migemo/patches/patch-migemo-grep b/textproc/migemo/patches/patch-migemo-grep
new file mode 100644
index 00000000000..c24f2a627e6
--- /dev/null
+++ b/textproc/migemo/patches/patch-migemo-grep
@@ -0,0 +1,18 @@
+$NetBSD: patch-migemo-grep,v 1.1 2012/08/12 11:52:26 obache Exp $
+
+--- migemo-grep.orig 2003-05-27 07:43:07.000000000 +0000
++++ migemo-grep
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env ruby
++#! /usr/bin/env ruby -Ke
+ #
+ # migemo-grep - a simple grep-like tool employing migemo.
+ #
+@@ -9,7 +9,6 @@
+ # You can redistribute it and/or modify it under the terms of
+ # the GNU General Public License version 2.
+ #
+-$KCODE = "e"
+
+ require 'migemo'
+ require 'getoptlong'
diff --git a/textproc/migemo/patches/patch-migemo-index.rb b/textproc/migemo/patches/patch-migemo-index.rb
new file mode 100644
index 00000000000..1382ca932e4
--- /dev/null
+++ b/textproc/migemo/patches/patch-migemo-index.rb
@@ -0,0 +1,11 @@
+$NetBSD: patch-migemo-index.rb,v 1.1 2012/08/12 11:52:26 obache Exp $
+
+--- migemo-index.rb.orig 2003-05-26 15:45:53.000000000 +0900
++++ migemo-index.rb 2011-08-22 02:21:25.000000000 +0900
+@@ -19,5 +19,5 @@
+ unless line =~ /^;/
+ print [offset].pack("N")
+ end
+- offset += line.length
++ offset += line.bytesize
+ end
diff --git a/textproc/migemo/patches/patch-migemo-server b/textproc/migemo/patches/patch-migemo-server
new file mode 100644
index 00000000000..47c0c80e39e
--- /dev/null
+++ b/textproc/migemo/patches/patch-migemo-server
@@ -0,0 +1,36 @@
+$NetBSD: patch-migemo-server,v 1.1 2012/08/12 11:52:27 obache Exp $
+
+--- migemo-server.orig 2001-08-13 09:30:51.000000000 +0000
++++ migemo-server
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env ruby
++#! /usr/bin/env ruby -Ke
+ #
+ # migemo-server
+ #
+@@ -10,7 +10,6 @@
+ # the GNU General Public License version 2.
+ #
+
+-$KCODE = "e"
+ require 'migemo'
+ require 'cgi'
+ require 'socket'
+@@ -73,7 +72,7 @@ class MigemoServer
+ end
+
+ def print_form (socket)
+- print_http (socket,
++ print_http(socket,
+ ['HTTP/1.0 200',
+ 'Content-type: text/html'],
+ <<"EOF")
+@@ -111,7 +110,7 @@ EOF
+
+ def print_http (socket, header, body)
+ header.each { |h| socket.syswrite h + CRLF }
+- socket.syswrite 'Content-Length: ' + body.size.to_s + CRLF
++ socket.syswrite 'Content-Length: ' + body.bytesize.to_s + CRLF
+ socket.syswrite CRLF
+ socket.syswrite body
+ end
diff --git a/textproc/migemo/patches/patch-migemo.rb.in b/textproc/migemo/patches/patch-migemo.rb.in
new file mode 100644
index 00000000000..150d4443476
--- /dev/null
+++ b/textproc/migemo/patches/patch-migemo.rb.in
@@ -0,0 +1,21 @@
+$NetBSD: patch-migemo.rb.in,v 1.1 2012/08/12 11:52:27 obache Exp $
+
+--- migemo.rb.in.orig 2003-05-28 12:00:52.000000000 +0000
++++ migemo.rb.in
+@@ -14,7 +14,6 @@
+ require 'migemo-dict'
+ require 'migemo-regex'
+ require 'romkan'
+-require 'jcode'
+ include MigemoRegex
+
+ class String
+@@ -24,7 +23,7 @@ class String
+ end
+
+ def quotemeta
+- self.gsub(/([^ \w])/, '\\\\\\1')
++ self.gsub(/([[:punct:]])/, '\\\\\\1')
+ end
+
+ def first
diff --git a/textproc/migemo/patches/patch-tests_Makefile.am b/textproc/migemo/patches/patch-tests_Makefile.am
new file mode 100644
index 00000000000..70abb95de66
--- /dev/null
+++ b/textproc/migemo/patches/patch-tests_Makefile.am
@@ -0,0 +1,13 @@
+$NetBSD: patch-tests_Makefile.am,v 1.1 2012/08/12 11:52:27 obache Exp $
+
+--- tests/Makefile.am.orig 2001-08-13 17:12:57.000000000 +0000
++++ tests/Makefile.am
+@@ -10,7 +10,7 @@ test-dict.idx: test-dict ../migemo-index
+ test-dict.cache: test-dict test-dict.idx ../migemo-cache.rb
+ ruby -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';\
++ echo $$line | ruby -ne '$$_.chomp!;1.upto($$_.length) do |x| puts $$_[0,x] end';\
+ done | ruby -I.. ../migemo-cache.rb test-dict
+
+ clean-local: