aboutsummaryrefslogtreecommitdiffstats
path: root/japanese
diff options
context:
space:
mode:
authornobutaka <nobutaka@FreeBSD.org>2011-08-23 01:17:43 +0800
committernobutaka <nobutaka@FreeBSD.org>2011-08-23 01:17:43 +0800
commit495e0e5b7210fe10abb881e1c61747bb63533647 (patch)
treecde730b0946b7c308dd71a15f6aa734e89103abe /japanese
parent03990dfb6b1eac1f5f40d57437cccf703a00e139 (diff)
downloadfreebsd-ports-gnome-495e0e5b7210fe10abb881e1c61747bb63533647.tar.gz
freebsd-ports-gnome-495e0e5b7210fe10abb881e1c61747bb63533647.tar.zst
freebsd-ports-gnome-495e0e5b7210fe10abb881e1c61747bb63533647.zip
Add cmigemo, C implementation of Migemo Japanese incremental search tool.
Diffstat (limited to 'japanese')
-rw-r--r--japanese/Makefile1
-rw-r--r--japanese/cmigemo/Makefile51
-rw-r--r--japanese/cmigemo/distinfo4
-rw-r--r--japanese/cmigemo/files/patch-Makefile18
-rw-r--r--japanese/cmigemo/files/patch-compile_Make_gcc.mak11
-rw-r--r--japanese/cmigemo/files/patch-compile_config.mk.in24
-rw-r--r--japanese/cmigemo/files/patch-compile_unix.mak57
-rw-r--r--japanese/cmigemo/files/patch-dict_dict.mak42
-rw-r--r--japanese/cmigemo/files/patch-src_wordbuf.c10
-rw-r--r--japanese/cmigemo/pkg-descr4
-rw-r--r--japanese/cmigemo/pkg-plist21
11 files changed, 243 insertions, 0 deletions
diff --git a/japanese/Makefile b/japanese/Makefile
index 9c404074aeff..8c8e2fd7a499 100644
--- a/japanese/Makefile
+++ b/japanese/Makefile
@@ -35,6 +35,7 @@
SUBDIR += celrw
SUBDIR += chasen
SUBDIR += chasen-base
+ SUBDIR += cmigemo
SUBDIR += csrd
SUBDIR += ctags
SUBDIR += dbskkd-cdb
diff --git a/japanese/cmigemo/Makefile b/japanese/cmigemo/Makefile
new file mode 100644
index 000000000000..5ccb1080b4a8
--- /dev/null
+++ b/japanese/cmigemo/Makefile
@@ -0,0 +1,51 @@
+# New ports collection makefile for: cmigemo
+# Date created: 22 August 2011
+# Whom: MANTANI Nobutaka <nobutaka@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= cmigemo
+PORTVERSION= 20110227
+CATEGORIES= japanese
+MASTER_SITES?= ${MASTER_SITE_GOOGLE_CODE}
+DISTNAME= ${PORTNAME}-default-src-${PORTVERSION}
+DIST_SUBDIR= cmigemo
+
+MAINTAINER= nobutaka@FreeBSD.org
+COMMENT= C implementation of Migemo Japanese incremental search tool
+
+.if !defined(MASTERDIR)
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/doc/LICENSE_MIT.txt
+
+RUN_DEPENDS= ${DATADIR}/cp932/migemo-dict:${PORTSDIR}/japanese/cmigemo-dict
+
+USE_LDCONFIG= yes
+
+ALL_TARGET= gcc-rel gcc-dat
+INSTALL_TARGET= gcc-install
+
+DOCSDIR= ${PREFIX}/share/doc/ja/${PORTNAME}
+PORTDOCS= README_j.txt
+.endif
+
+USE_ZIP= yes
+USE_GMAKE= yes
+USE_ICONV= yes
+
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS= --prefix=${PREFIX}
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-default-src
+
+.if !defined(MASTERDIR) && !defined(NOPORTDOCS)
+INSTALL_TARGET+=gcc-install-doc
+.endif
+
+.if !target(post-extract)
+post-extract:
+ ${CHMOD} a+x ${WRKSRC}/configure
+.endif
+
+.include <bsd.port.mk>
diff --git a/japanese/cmigemo/distinfo b/japanese/cmigemo/distinfo
new file mode 100644
index 000000000000..a8792ee06041
--- /dev/null
+++ b/japanese/cmigemo/distinfo
@@ -0,0 +1,4 @@
+SHA256 (cmigemo/cmigemo-default-src-20110227.zip) = 4aa759b2e055ef3c3fbeb9e92f7f0aacc1fd1f8602fdd2f122719793ee14414c
+SIZE (cmigemo/cmigemo-default-src-20110227.zip) = 116574
+SHA256 (cmigemo/SKK-JISYO.L-20110813.bz2) = 560da93401f0a58417d61e2ff41a43a24f0886877797bbea879ba9db3e70e3d9
+SIZE (cmigemo/SKK-JISYO.L-20110813.bz2) = 1694235
diff --git a/japanese/cmigemo/files/patch-Makefile b/japanese/cmigemo/files/patch-Makefile
new file mode 100644
index 000000000000..c13fc890b66b
--- /dev/null
+++ b/japanese/cmigemo/files/patch-Makefile
@@ -0,0 +1,18 @@
+--- Makefile.orig 2011-02-27 19:45:40.000000000 +0900
++++ Makefile 2011-08-21 14:21:53.000000000 +0900
+@@ -52,8 +52,14 @@
+ $(MAKE) -f compile/Make_gcc.mak
+ gcc-dict:
+ $(MAKE) -f compile/Make_gcc.mak dictionary
+-gcc-install: gcc-all
++gcc-dat:
++ $(MAKE) -f compile/Make_gcc.mak dat
++gcc-install: gcc-rel gcc-dat
+ $(MAKE) -f compile/Make_gcc.mak install
++gcc-install-dict: gcc-dict
++ $(MAKE) -f compile/Make_gcc.mak install-dict
++gcc-install-doc:
++ $(MAKE) -f compile/Make_gcc.mak install-doc
+ gcc-uninstall:
+ $(MAKE) -f compile/Make_gcc.mak uninstall
+ gcc-clean:
diff --git a/japanese/cmigemo/files/patch-compile_Make_gcc.mak b/japanese/cmigemo/files/patch-compile_Make_gcc.mak
new file mode 100644
index 000000000000..789ca2035fcc
--- /dev/null
+++ b/japanese/cmigemo/files/patch-compile_Make_gcc.mak
@@ -0,0 +1,11 @@
+--- compile/Make_gcc.mak.orig 2011-08-17 00:54:29.000000000 +0900
++++ compile/Make_gcc.mak 2011-08-17 00:56:14.000000000 +0900
+@@ -44,4 +44,7 @@
+ $(RM) $(libdir)/$(libmigemo)
+
+ dictionary:
+- cd dict && $(MAKE) gcc
++ cd dict && $(MAKE) gcc-dict
++
++dat:
++ cd dict && $(MAKE) gcc-dat
diff --git a/japanese/cmigemo/files/patch-compile_config.mk.in b/japanese/cmigemo/files/patch-compile_config.mk.in
new file mode 100644
index 000000000000..bc103f0c5663
--- /dev/null
+++ b/japanese/cmigemo/files/patch-compile_config.mk.in
@@ -0,0 +1,24 @@
+--- compile/config.mk.in.orig 2011-02-27 19:45:40.000000000 +0900
++++ compile/config.mk.in 2011-08-17 00:07:28.000000000 +0900
+@@ -18,8 +18,8 @@
+ incdir = $(prefix)/include
+ # WARNING: Directories $(dictdir) and $(docdir) will be deleted whole the
+ # directory when unintall.
+-dictdir = $(prefix)/share/migemo
+-docdir = $(prefix)/doc/migemo
++dictdir = $(prefix)/share/cmigemo
++docdir = $(prefix)/share/doc/ja/cmigemo
+
+ ##############################################################################
+ # Commands
+@@ -33,8 +33,8 @@
+ PERL = perl
+ BUNZIP2 = bzip2 -d
+ GUNZIP = gzip -d
+-FILTER_CP932 = ${PROGRAM_ENCODEFILTER} -s
+-FILTER_EUCJP = ${PROGRAM_ENCODEFILTER} -e
++FILTER_CP932 = iconv -t cp932 -f euc-jp
++FILTER_EUCJP = iconv -t euc-jp -f cp932
+ FILTER_UTF8 = iconv -t utf-8 -f cp932
+ INSTALL = ${PROGRAM_INSTALL} -c
+ INSTALL_PROGRAM = $(INSTALL) -m 755
diff --git a/japanese/cmigemo/files/patch-compile_unix.mak b/japanese/cmigemo/files/patch-compile_unix.mak
new file mode 100644
index 000000000000..eac0234fcf28
--- /dev/null
+++ b/japanese/cmigemo/files/patch-compile_unix.mak
@@ -0,0 +1,57 @@
+--- compile/unix.mak.orig 2011-02-27 19:45:40.000000000 +0900
++++ compile/unix.mak 2011-08-21 14:23:10.000000000 +0900
+@@ -39,36 +39,48 @@
+ $(MKDIR) $(bindir)
+ $(MKDIR) $(libdir)
+ $(MKDIR) $(incdir)
+- $(MKDIR) $(docdir)
++
++install-mkdir-dict:
+ $(MKDIR) $(dictdir)
+ $(MKDIR) $(dictdir)/cp932
+ $(MKDIR) $(dictdir)/euc-jp
+ $(MKDIR) $(dictdir)/utf-8
+
+-install-dict:
++install-mkdir-doc:
++ $(MKDIR) $(docdir)
++
++install-dict: install-mkdir-dict
+ $(INSTALL_DATA) dict/migemo-dict $(dictdir)/cp932
++ if [ -d dict/euc-jp.d ]; then \
++ $(INSTALL_DATA) dict/euc-jp.d/migemo-dict $(dictdir)/euc-jp; \
++ fi
++ if [ -d dict/utf-8.d ]; then \
++ $(INSTALL_DATA) dict/utf-8.d/migemo-dict $(dictdir)/utf-8; \
++ fi
++
++install-dat: install-mkdir-dict
+ $(INSTALL_DATA) dict/han2zen.dat $(dictdir)/cp932
+ $(INSTALL_DATA) dict/hira2kata.dat $(dictdir)/cp932
+ $(INSTALL_DATA) dict/roma2hira.dat $(dictdir)/cp932
+ $(INSTALL_DATA) dict/zen2han.dat $(dictdir)/cp932
+ if [ -d dict/euc-jp.d ]; then \
+- $(INSTALL_DATA) dict/euc-jp.d/migemo-dict $(dictdir)/euc-jp; \
+ $(INSTALL_DATA) dict/euc-jp.d/han2zen.dat $(dictdir)/euc-jp; \
+ $(INSTALL_DATA) dict/euc-jp.d/hira2kata.dat $(dictdir)/euc-jp; \
+ $(INSTALL_DATA) dict/euc-jp.d/roma2hira.dat $(dictdir)/euc-jp; \
+ $(INSTALL_DATA) dict/euc-jp.d/zen2han.dat $(dictdir)/euc-jp; \
+ fi
+ if [ -d dict/utf-8.d ]; then \
+- $(INSTALL_DATA) dict/utf-8.d/migemo-dict $(dictdir)/utf-8; \
+ $(INSTALL_DATA) dict/utf-8.d/han2zen.dat $(dictdir)/utf-8; \
+ $(INSTALL_DATA) dict/utf-8.d/hira2kata.dat $(dictdir)/utf-8; \
+ $(INSTALL_DATA) dict/utf-8.d/roma2hira.dat $(dictdir)/utf-8; \
+ $(INSTALL_DATA) dict/utf-8.d/zen2han.dat $(dictdir)/utf-8; \
+ fi
+
+-install: $(outdir)cmigemo$(EXEEXT) $(libmigemo_DSO) install-mkdir install-dict install-lib
+- $(INSTALL_DATA) $(srcdir)migemo.h $(incdir)
++install-doc: install-mkdir-doc
+ $(INSTALL_DATA) doc/README_j.txt $(docdir)
++
++install: $(outdir)cmigemo$(EXEEXT) $(libmigemo_DSO) install-mkdir install-dat install-lib
++ $(INSTALL_DATA) $(srcdir)migemo.h $(incdir)
+ $(INSTALL_PROGRAM) $(outdir)cmigemo$(EXEEXT) $(bindir)
+
+ ##############################################################################
diff --git a/japanese/cmigemo/files/patch-dict_dict.mak b/japanese/cmigemo/files/patch-dict_dict.mak
new file mode 100644
index 000000000000..f8721f11b1f0
--- /dev/null
+++ b/japanese/cmigemo/files/patch-dict_dict.mak
@@ -0,0 +1,42 @@
+--- dict/dict.mak.orig 2011-02-27 19:45:40.000000000 +0900
++++ dict/dict.mak 2011-08-17 01:04:58.000000000 +0900
+@@ -32,10 +32,10 @@
+ ##############################################################################
+ # Dictionary in euc-jp
+ #
+-euc-jp: cp932 euc-jp-files
+-euc-jp-files: $(EUCJP_DIR) $(EUCJP_DIR)/migemo-dict \
+- $(EUCJP_DIR)/zen2han.dat $(EUCJP_DIR)/han2zen.dat \
+- $(EUCJP_DIR)/hira2kata.dat $(EUCJP_DIR)/roma2hira.dat
++euc-jp-dict: cp932 $(EUCJP_DIR) $(EUCJP_DIR)/migemo-dict
++euc-jp-dat: $(EUCJP_DIR) $(EUCJP_DIR)/zen2han.dat \
++ $(EUCJP_DIR)/han2zen.dat $(EUCJP_DIR)/hira2kata.dat \
++ $(EUCJP_DIR)/roma2hira.dat
+ $(EUCJP_DIR):
+ $(MKDIR) $(EUCJP_DIR)
+ $(EUCJP_DIR)/migemo-dict: migemo-dict
+@@ -52,10 +52,10 @@
+ ##############################################################################
+ # Dictionary in utf-8
+ #
+-utf-8: cp932 utf-8-files
+-utf-8-files: $(UTF8_DIR) $(UTF8_DIR)/migemo-dict \
+- $(UTF8_DIR)/zen2han.dat $(UTF8_DIR)/han2zen.dat \
+- $(UTF8_DIR)/hira2kata.dat $(UTF8_DIR)/roma2hira.dat
++utf-8-dict: cp932 $(UTF8_DIR) $(UTF8_DIR)/migemo-dict
++utf-8-dat: $(UTF8_DIR) $(UTF8_DIR)/zen2han.dat \
++ $(UTF8_DIR)/han2zen.dat $(UTF8_DIR)/hira2kata.dat \
++ $(UTF8_DIR)/roma2hira.dat
+ $(UTF8_DIR):
+ $(MKDIR) $(UTF8_DIR)
+ $(UTF8_DIR)/migemo-dict: migemo-dict
+@@ -87,7 +87,8 @@
+ ##############################################################################
+ # for GNU/gcc(Linux‘¼)
+ #
+-gcc: euc-jp
++gcc-dict: euc-jp-dict utf-8-dict
++gcc-dat: euc-jp-dat utf-8-dat
+
+ ##############################################################################
+ # for MacOS X
diff --git a/japanese/cmigemo/files/patch-src_wordbuf.c b/japanese/cmigemo/files/patch-src_wordbuf.c
new file mode 100644
index 000000000000..2d2b63349c8f
--- /dev/null
+++ b/japanese/cmigemo/files/patch-src_wordbuf.c
@@ -0,0 +1,10 @@
+--- src/wordbuf.c.orig 2011-08-13 23:52:52.000000000 +0900
++++ src/wordbuf.c 2011-08-13 23:53:22.000000000 +0900
+@@ -9,6 +9,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <limits.h>
+ #include "wordbuf.h"
+
+ #define WORDLEN_DEF 64
diff --git a/japanese/cmigemo/pkg-descr b/japanese/cmigemo/pkg-descr
new file mode 100644
index 000000000000..048a41d34567
--- /dev/null
+++ b/japanese/cmigemo/pkg-descr
@@ -0,0 +1,4 @@
+C/Migemo is a C language implementation of Migemo Japanese incremental search
+tool. You can search a text for Japanese words without having to input kanji.
+
+WWW: http://www.kaoriya.net/software/cmigemo
diff --git a/japanese/cmigemo/pkg-plist b/japanese/cmigemo/pkg-plist
new file mode 100644
index 000000000000..b4c33c48c755
--- /dev/null
+++ b/japanese/cmigemo/pkg-plist
@@ -0,0 +1,21 @@
+bin/cmigemo
+include/migemo.h
+lib/libmigemo.so.1.1.0
+lib/libmigemo.so.1
+lib/libmigemo.so
+%%DATADIR%%/cp932/han2zen.dat
+%%DATADIR%%/cp932/hira2kata.dat
+%%DATADIR%%/cp932/roma2hira.dat
+%%DATADIR%%/cp932/zen2han.dat
+%%DATADIR%%/euc-jp/han2zen.dat
+%%DATADIR%%/euc-jp/hira2kata.dat
+%%DATADIR%%/euc-jp/roma2hira.dat
+%%DATADIR%%/euc-jp/zen2han.dat
+%%DATADIR%%/utf-8/han2zen.dat
+%%DATADIR%%/utf-8/hira2kata.dat
+%%DATADIR%%/utf-8/roma2hira.dat
+%%DATADIR%%/utf-8/zen2han.dat
+@dirrmtry %%DATADIR%%/cp932
+@dirrmtry %%DATADIR%%/euc-jp
+@dirrmtry %%DATADIR%%/utf-8
+@dirrmtry %%DATADIR%%