diff options
author | obache <obache> | 2012-01-21 13:38:41 +0000 |
---|---|---|
committer | obache <obache> | 2012-01-21 13:38:41 +0000 |
commit | 2b524b32f5dbe81c7b61adf98e7311ce66c363c6 (patch) | |
tree | d3af142417c81ae4d92cf66ae3497f14b842aeed /textproc/cmigemo | |
parent | 186bd398a48e3fef82d506096b58a2740d44bd8d (diff) | |
download | pkgsrc-2b524b32f5dbe81c7b61adf98e7311ce66c363c6.tar.gz |
Import cmigemo-1.3e.20110227 as textproc/cmigemo.
Based on PR 45815 by Kiyono, Goro.
Migemo is a library to generate regex pattern to search Japanese (which includes
Hiragana/Kanji) text without any IME easily. C/Migemo is an implementation of
that Migemo library.
Diffstat (limited to 'textproc/cmigemo')
-rw-r--r-- | textproc/cmigemo/DESCR | 3 | ||||
-rw-r--r-- | textproc/cmigemo/Makefile | 47 | ||||
-rw-r--r-- | textproc/cmigemo/PLIST | 20 | ||||
-rw-r--r-- | textproc/cmigemo/distinfo | 13 | ||||
-rw-r--r-- | textproc/cmigemo/patches/patch-compile_Make__gcc.mak | 43 | ||||
-rw-r--r-- | textproc/cmigemo/patches/patch-compile_config.mk.in | 35 | ||||
-rw-r--r-- | textproc/cmigemo/patches/patch-compile_unix.mak | 44 | ||||
-rw-r--r-- | textproc/cmigemo/patches/patch-dict_dict.mak | 48 | ||||
-rw-r--r-- | textproc/cmigemo/patches/patch-src_wordbuf.c | 24 |
9 files changed, 277 insertions, 0 deletions
diff --git a/textproc/cmigemo/DESCR b/textproc/cmigemo/DESCR new file mode 100644 index 00000000000..e43d67940ba --- /dev/null +++ b/textproc/cmigemo/DESCR @@ -0,0 +1,3 @@ +Migemo is a library to generate regex pattern to search Japanese (which includes +Hiragana/Kanji) text without any IME easily. C/Migemo is an implementation of +that Migemo library. diff --git a/textproc/cmigemo/Makefile b/textproc/cmigemo/Makefile new file mode 100644 index 00000000000..c992e1d50da --- /dev/null +++ b/textproc/cmigemo/Makefile @@ -0,0 +1,47 @@ +# $NetBSD: Makefile,v 1.1.1.1 2012/01/21 13:38:41 obache Exp $ +# + +DISTNAME= cmigemo-default-src-20110227 +PKGNAME= ${DISTNAME:S/-default-src-/-1.3e./} +CATEGORIES= textproc +MASTER_SITES= http://cmigemo.googlecode.com/files/ +EXTRACT_SUFX= .zip +DISTFILES= ${DEFAULT_DISTFILES} ${JISYOFILE} + +MAINTAINER= goro@venus.dti.ne.jp +HOMEPAGE= http://www.kaoriya.net/software/cmigemo +COMMENT= Migemo library implemented in C +LICENSE= mit + +# sync with inputmethod/skk-jisyo-cdb +SKKJISYO_VERS= 201102 +JISYOFILE= SKK-JISYO.L.${SKKJISYO_VERS}.bz2 +SITES.${SKKJISYO_FILE}= ${MASTER_SITE_FREEBSD_LOCAL:=matusita/skk-jisyo/} + +BUILD_DEPENDS+= nkf>=2.06:../../converters/nkf + +PKG_DESTDIR_SUPPORT= user-destdir + +HAS_CONFIGURE= yes +USE_TOOLS+= perl gzip gmake +USE_LIBTOOL= yes +WRKSRC= ${WRKDIR}/cmigemo-default-src + +CONFIGURE_ARGS+= --prefix=${PREFIX} +INSTALL_MAKE_FLAGS+= prefix=${DESTDIR}${PREFIX} + +SUBST_CLASSES+= prefix +SUBST_STAGE.prefix= post-configure +SUBST_FILES.prefix= compile/config_default.mk compile/Make_gcc.mak compile/Make_sun.mak doc/README* tools/migemo.vim +SUBST_SED.prefix= -e 's,/usr/local,${PREFIX},g' + +BUILD_TARGET= gcc-all +INSTALL_TARGET= gcc-install + +post-extract: + ${MV} ${WRKDIR}/${JISYOFILE:R} ${WRKSRC}/dict/SKK-JISYO.L + +# no need to fetch SKK dictionaly file +TOOLS_NOOP+= curl + +.include "../../mk/bsd.pkg.mk" diff --git a/textproc/cmigemo/PLIST b/textproc/cmigemo/PLIST new file mode 100644 index 00000000000..45c6beb821b --- /dev/null +++ b/textproc/cmigemo/PLIST @@ -0,0 +1,20 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2012/01/21 13:38:41 obache Exp $ +bin/cmigemo +include/migemo.h +lib/libmigemo.la +share/doc/migemo/README_j.txt +share/migemo/cp932/han2zen.dat +share/migemo/cp932/hira2kata.dat +share/migemo/cp932/migemo-dict +share/migemo/cp932/roma2hira.dat +share/migemo/cp932/zen2han.dat +share/migemo/euc-jp/han2zen.dat +share/migemo/euc-jp/hira2kata.dat +share/migemo/euc-jp/migemo-dict +share/migemo/euc-jp/roma2hira.dat +share/migemo/euc-jp/zen2han.dat +share/migemo/utf-8/han2zen.dat +share/migemo/utf-8/hira2kata.dat +share/migemo/utf-8/migemo-dict +share/migemo/utf-8/roma2hira.dat +share/migemo/utf-8/zen2han.dat diff --git a/textproc/cmigemo/distinfo b/textproc/cmigemo/distinfo new file mode 100644 index 00000000000..c12c790acd1 --- /dev/null +++ b/textproc/cmigemo/distinfo @@ -0,0 +1,13 @@ +$NetBSD: distinfo,v 1.1.1.1 2012/01/21 13:38:41 obache Exp $ + +SHA1 (SKK-JISYO.L.201102.bz2) = 14a6160269548a6ead1adf627fa0b9c8e27751fe +RMD160 (SKK-JISYO.L.201102.bz2) = d993fd99ed2156fb2163e021a850094b53590518 +Size (SKK-JISYO.L.201102.bz2) = 1694273 bytes +SHA1 (cmigemo-default-src-20110227.zip) = 25e279c56d3a8f1e82cbfb3526d1b38742d1d66c +RMD160 (cmigemo-default-src-20110227.zip) = 38d0670b3ebe36af78650a0b13dbdf14b16ded95 +Size (cmigemo-default-src-20110227.zip) = 116574 bytes +SHA1 (patch-compile_Make__gcc.mak) = c99e3e335142ffa3e24655980b6eca6dc5235842 +SHA1 (patch-compile_config.mk.in) = 7480a20f597c49ba18a2ab01098f7ee2a492d026 +SHA1 (patch-compile_unix.mak) = f0fe8277035ebcf8e5aeef83ab72fd466a1ec8ce +SHA1 (patch-dict_dict.mak) = 80f59a3110b6b152c0a03d829077c059a23e843b +SHA1 (patch-src_wordbuf.c) = 27194e8b6e5e297eb16d7d0f0b8d3d61604f94fb diff --git a/textproc/cmigemo/patches/patch-compile_Make__gcc.mak b/textproc/cmigemo/patches/patch-compile_Make__gcc.mak new file mode 100644 index 00000000000..37c32ee8c2c --- /dev/null +++ b/textproc/cmigemo/patches/patch-compile_Make__gcc.mak @@ -0,0 +1,43 @@ +$NetBSD: patch-compile_Make__gcc.mak,v 1.1.1.1 2012/01/21 13:38:41 obache Exp $ + +* libtoolize + +--- compile/Make_gcc.mak.orig 2011-02-27 10:45:40.000000000 +0000 ++++ compile/Make_gcc.mak +@@ -9,12 +9,12 @@ + ############################################################################## + # 環境に応じてこの変数を変更する + # +-libmigemo_LIB = libmigemo.so.1.1.0 +-libmigemo_DSO = libmigemo.so.1 +-libmigemo = libmigemo.so ++libmigemo_LIB = libmigemo.la ++libmigemo_DSO = libmigemo.la ++libmigemo = libmigemo.la + EXEEXT = +-CFLAGS_MIGEMO = -fPIC +-LDFLAGS_MIGEMO = -Wl,-rpath,.,-rpath,/usr/local/lib,-rpath,/usr/lib ++CFLAGS_MIGEMO = -shared ++LDFLAGS_MIGEMO = -rpath ${libdir} + + include config.mk + include compile/unix.mak +@@ -27,16 +27,10 @@ include compile/clean.mak + # + $(libmigemo_LIB): $(libmigemo_DSO) + $(libmigemo_DSO): $(libmigemo_OBJ) +- $(CC) -shared -o $(libmigemo_LIB) -Wl,-soname,$@ $(libmigemo_OBJ) +- $(RM) $@ $(libmigemo) +- ln -s $(libmigemo_LIB) $@ +- ln -s $(libmigemo_LIB) $(libmigemo) ++ libtool --mode=link $(CC) $(CFLAGS_MIGEMO) $(LDFLAGS_MIGEMO) -o $(libmigemo_LIB) -version-number 1:1:0 $(libmigemo_OBJ) + + install-lib: $(libmigemo_DSO) +- $(INSTALL_PROGRAM) $(libmigemo_LIB) $(libdir) +- $(RM) $(libdir)/$(libmigemo_DSO) $(libdir)/$(libmigemo) +- ln -s $(libmigemo_LIB) $(libdir)/$(libmigemo_DSO) +- ln -s $(libmigemo_LIB) $(libdir)/$(libmigemo) ++ libtool --mode=install $(INSTALL_PROGRAM) $(libmigemo_LIB) $(libdir) + + uninstall-lib: + $(RM) $(libdir)/$(libmigemo_DSO) diff --git a/textproc/cmigemo/patches/patch-compile_config.mk.in b/textproc/cmigemo/patches/patch-compile_config.mk.in new file mode 100644 index 00000000000..aae21169da9 --- /dev/null +++ b/textproc/cmigemo/patches/patch-compile_config.mk.in @@ -0,0 +1,35 @@ +$NetBSD: patch-compile_config.mk.in,v 1.1.1.1 2012/01/21 13:38:41 obache Exp $ + +* change docdir to usual location +* avoid to depend on iconv(1) +* libtoolize + +--- compile/config.mk.in.orig 2011-02-27 10:45:40.000000000 +0000 ++++ compile/config.mk.in +@@ -19,7 +19,7 @@ incdir = $(prefix)/include + # WARNING: Directories $(dictdir) and $(docdir) will be deleted whole the + # directory when unintall. + dictdir = $(prefix)/share/migemo +-docdir = $(prefix)/doc/migemo ++docdir = $(prefix)/share/doc/migemo + + ############################################################################## + # Commands +@@ -35,7 +35,7 @@ BUNZIP2 = bzip2 -d + GUNZIP = gzip -d + FILTER_CP932 = ${PROGRAM_ENCODEFILTER} -s + FILTER_EUCJP = ${PROGRAM_ENCODEFILTER} -e +-FILTER_UTF8 = iconv -t utf-8 -f cp932 ++FILTER_UTF8 = nkf --oc=UTF-8 --ic=Windows-31J + INSTALL = ${PROGRAM_INSTALL} -c + INSTALL_PROGRAM = $(INSTALL) -m 755 + INSTALL_DATA = $(INSTALL) -m 644 +@@ -43,7 +43,7 @@ INSTALL_DATA = $(INSTALL) -m 644 + ############################################################################## + # Constants + # +-O = o ++O = lo + EXE = + CONFIG_DEFAULT = compile/config_default.mk + CONFIG_IN = ${config_in} diff --git a/textproc/cmigemo/patches/patch-compile_unix.mak b/textproc/cmigemo/patches/patch-compile_unix.mak new file mode 100644 index 00000000000..662e3d284f7 --- /dev/null +++ b/textproc/cmigemo/patches/patch-compile_unix.mak @@ -0,0 +1,44 @@ +$NetBSD: patch-compile_unix.mak,v 1.1.1.1 2012/01/21 13:38:41 obache Exp $ + +* honor user customized CFLAGS +* libtoolize + +--- compile/unix.mak.orig 2011-02-27 10:45:40.000000000 +0000 ++++ compile/unix.mak +@@ -10,7 +10,7 @@ libmigemo_SRC = $(SRC) + libmigemo_OBJ = $(OBJ) + + DEFINES = +-CFLAGS = -O2 -Wall $(DEFINES) $(CFLAGS_MIGEMO) ++CFLAGS += -Wall $(DEFINES) $(CFLAGS_MIGEMO) + LDFLAGS = $(LDFLAGS_MIGEMO) + LIBS = + +@@ -24,13 +24,13 @@ dirs: + done + + $(outdir)cmigemo$(EXEEXT): $(objdir)main.$(O) $(libmigemo_LIB) +- $(CC) -o $@ $(objdir)main.$(O) -L. -L$(outdir) -lmigemo $(LDFLAGS) ++ ${LIBTOOL} --mode=link $(CC) -o $@ $(objdir)main.$(O) -L. -L$(outdir) -lmigemo $(LDFLAGS) + +-$(objdir)main.o: $(srcdir)main.c +- $(CC) $(CFLAGS) -o $@ -c $< ++$(objdir)main.$(O): $(srcdir)main.c ++ ${LIBTOOL} --mode=compile $(CC) $(CFLAGS) -o $@ -c $< + +-$(objdir)%.o: $(srcdir)%.c +- $(CC) $(CFLAGS) -o $@ -c $< ++$(objdir)%.$(O): $(srcdir)%.c ++ ${LIBTOOL} --mode=compile $(CC) $(CFLAGS) -o $@ -c $< + + ############################################################################## + # Install +@@ -69,7 +69,7 @@ install-dict: + install: $(outdir)cmigemo$(EXEEXT) $(libmigemo_DSO) install-mkdir install-dict install-lib + $(INSTALL_DATA) $(srcdir)migemo.h $(incdir) + $(INSTALL_DATA) doc/README_j.txt $(docdir) +- $(INSTALL_PROGRAM) $(outdir)cmigemo$(EXEEXT) $(bindir) ++ ${LIBTOOL} --mode=install $(INSTALL_PROGRAM) $(outdir)cmigemo$(EXEEXT) $(bindir) + + ############################################################################## + # Uninstall diff --git a/textproc/cmigemo/patches/patch-dict_dict.mak b/textproc/cmigemo/patches/patch-dict_dict.mak new file mode 100644 index 00000000000..8eb77b3c519 --- /dev/null +++ b/textproc/cmigemo/patches/patch-dict_dict.mak @@ -0,0 +1,48 @@ +$NetBSD: patch-dict_dict.mak,v 1.1.1.1 2012/01/21 13:38:41 obache Exp $ + +* generage UTF-8 dict and dat files for all platforms + http://code.google.com/p/cmigemo/source/detail?spec=svn4e16f44f91df858b41c39af25798214b1c995a7a&r=55d9df600d6b83d16c1e61d4f201adfb81a1f5a4 + +--- dict/dict.mak.orig 2011-02-27 10:45:40.000000000 +0000 ++++ dict/dict.mak +@@ -2,7 +2,7 @@ + # + # 辞書ファイルのメンテナンス + # +-# Written By: MURAOKA Taro <koron@tka.att.ne.jp> ++# Written By: MURAOKA Taro <koron.kaoriya@gmail.com> + + DICT = migemo-dict + DICT_BASE = base-dict +@@ -77,22 +77,27 @@ msvc: cp932 utf-8 + ############################################################################## + # for Borland C 5 + # +-bc5: cp932 ++bc5: cp932 utf-8 + + ############################################################################## + # for Cygwin + # +-cyg: euc-jp ++cyg: euc-jp utf-8 ++ ++############################################################################## ++# for MinGW ++# ++mingw: cp932 utf-8 + + ############################################################################## + # for GNU/gcc(Linux他) + # +-gcc: euc-jp ++gcc: euc-jp utf-8 + + ############################################################################## + # for MacOS X + # +-osx: euc-jp ++osx: euc-jp utf-8 + + ############################################################################## + # Cleaning diff --git a/textproc/cmigemo/patches/patch-src_wordbuf.c b/textproc/cmigemo/patches/patch-src_wordbuf.c new file mode 100644 index 00000000000..77d42f87679 --- /dev/null +++ b/textproc/cmigemo/patches/patch-src_wordbuf.c @@ -0,0 +1,24 @@ +$NetBSD: patch-src_wordbuf.c,v 1.1.1.1 2012/01/21 13:38:41 obache Exp $ + +* include limits.h for INT_MAX const value + http://code.google.com/p/cmigemo/source/detail?spec=svn4e16f44f91df858b41c39af25798214b1c995a7a&r=49ebb9138cad43520a54e78b93961e6a07fcf422 + +--- src/wordbuf.c.orig 2011-02-27 10:45:40.000000000 +0000 ++++ src/wordbuf.c +@@ -2,13 +2,14 @@ + /* + * wordbuf.h - + * +- * Written By: MURAOKA Taro <koron@tka.att.ne.jp> +- * Last Change: 20-Sep-2009. ++ * Written By: MURAOKA Taro <koron.kaoriya@gmail.com> ++ * Last Change: 25-Oct-2011. + */ + + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <limits.h> + #include "wordbuf.h" + + #define WORDLEN_DEF 64 |