Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

1
textproc/migemo/DESCR Normal file
View File

@@ -0,0 +1 @@
Japanese incremental text search tools/library.

28
textproc/migemo/Makefile Normal file
View File

@@ -0,0 +1,28 @@
# $NetBSD: Makefile,v 1.8 2012/10/25 06:56:08 asau Exp $
.include "../../textproc/migemo/Makefile.common"
PKGNAME= ${RUBY_PKGPREFIX}-migemo-${MIGEMO_VERSION}
PKGREVISION= 1
COMMENT= Japanese text search tool/library
LICENSE= gnu-gpl-v2
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
pre-configure:
cd ${WRKSRC} && aclocal && automake -a --foreign -i && autoconf
TEST_TARGET= check
.include "../../lang/ruby/modules.mk"
.include "../../mk/bsd.pkg.mk"

View File

@@ -0,0 +1,15 @@
# $NetBSD: Makefile.common,v 1.4 2012/09/16 15:30:45 taca Exp $
#
# used by textproc/migemo/Makefile
# used by textproc/migemo-elisp/Makefile
MIGEMO_VERSION= 0.40
DISTNAME= migemo-${MIGEMO_VERSION}
CATEGORIES= textproc
MASTER_SITES= http://0xcc.net/migemo/
MAINTAINER= yamajun@ofug.net
HOMEPAGE= http://0xcc.net/migemo/
RUBY_VERSION_SUPPORTED= 193

18
textproc/migemo/PLIST Normal file
View File

@@ -0,0 +1,18 @@
@comment $NetBSD: PLIST,v 1.4 2009/06/14 18:17:22 joerg Exp $
bin/migemo
bin/migemo-client
bin/migemo-grep
bin/migemo-server
${RUBY_VENDORLIB}/migemo-cache.rb
${RUBY_VENDORLIB}/migemo-convert.rb
${RUBY_VENDORLIB}/migemo-dict.rb
${RUBY_VENDORLIB}/migemo-index.rb
${RUBY_VENDORLIB}/migemo-regex.rb
${RUBY_VENDORLIB}/migemo.rb
share/migemo/migemo-dict
share/migemo/migemo-dict.cache
share/migemo/migemo-dict.cache.idx
share/migemo/migemo-dict.idx
share/migemo/migemo.ja.rd
share/migemo/regex-dict.sample
share/migemo/user-dict.sample

17
textproc/migemo/distinfo Normal file
View File

@@ -0,0 +1,17 @@
$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

View File

@@ -0,0 +1,12 @@
$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
@@ -6,7 +6,6 @@ if test "$RUBY" = "no"; then
AC_MSG_ERROR(ruby not found)
fi
-AM_PATH_LISPDIR
AM_PATH_RUBYDIR
echo -n "checking Ruby/Bsearch... "

View File

@@ -0,0 +1,25 @@
$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
@@ -1,6 +1,5 @@
SUBDIRS = tests
bin_SCRIPTS = migemo migemo-grep migemo-server migemo-client
-lisp_LISP = migemo.el
ruby_data_ = migemo-dict.rb migemo-regex.rb\
migemo-convert.rb migemo-index.rb migemo-cache.rb
ruby_DATA = migemo.rb $(ruby_data_)
@@ -8,12 +7,9 @@ pkgdata_DATA = migemo-dict migemo-dict.
migemo-dict.cache migemo-dict.cache.idx\
user-dict.sample regex-dict.sample\
migemo.ja.rd
-EXTRA_DIST = $(bin_SCRIPTS) migemo.rb.in $(ruby_data_) migemo.el.in \
+EXTRA_DIST = $(bin_SCRIPTS) migemo.rb.in $(ruby_data_) \
genchars.sh ngram.sh frequent-chars $(pkgdata_DATA)
-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 > $@

View File

@@ -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

View File

@@ -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'

View File

@@ -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

View File

@@ -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'

View File

@@ -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 ";;"

View File

@@ -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'

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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: