OSDN Git Service

cmigemo 1.3c_7
authorKazuki Sakamoto <sakamoto@splhack.org>
Wed, 25 Mar 2009 11:14:32 +0000 (20:14 +0900)
committerKazuki Sakamoto <sakamoto@splhack.org>
Wed, 25 Mar 2009 11:14:32 +0000 (20:14 +0900)
PortIndex
Readme.txt
textproc/cmigemo/Portfile [new file with mode: 0644]
textproc/cmigemo/files/patch-Make_osx.mk.diff [new file with mode: 0644]
textproc/cmigemo/files/patch-config.mk.in.diff [new file with mode: 0644]
textproc/cmigemo/files/patch-config_default.mk.diff [new file with mode: 0644]
textproc/cmigemo/files/patch-dict.mk.diff [new file with mode: 0644]
textproc/cmigemo/files/patch-mnode.c [new file with mode: 0644]
textproc/cmigemo/files/patch-romaji.c [new file with mode: 0644]
textproc/cmigemo/files/patch-universal [new file with mode: 0644]

index c1a5f7f..bb1f4c1 100644 (file)
--- a/PortIndex
+++ b/PortIndex
@@ -1,5 +1,5 @@
 iTerm 553
-portdir aqua/iTerm description {Enhanced terminal emulator program for Mac OS X} platforms macosx name iTerm version 0.9.6 categories {aqua shells} homepage http://iterm.sourceforge.net revision 20090324 epoch 0 maintainers waqar@macports.org long_description {iTerm is a full featured terminal emulation program written for OS X using Cocoa. We are aiming at providing users with best command line experience under OS X. The letter i represents a native Apple look and feel of the program interface, and an emphasis on complete international support.}
+portdir aqua/iTerm description {Enhanced terminal emulator program for Mac OS X} platforms macosx name iTerm version 0.9.6 categories {aqua shells} homepage http://iterm.sourceforge.net revision 20090325 epoch 0 maintainers waqar@macports.org long_description {iTerm is a full featured terminal emulation program written for OS X using Cocoa. We are aiming at providing users with best command line experience under OS X. The letter i represents a native Apple look and feel of the program interface, and an emphasis on complete international support.}
 ctags 888
 variants universal variant_desc {universal {Build for multiple architectures}} portdir devel/ctags description {Reimplementation of ctags(1)} homepage http://hp.vector.co.jp/authors/VA025040/ctags/ epoch 0 platforms {darwin freebsd} name ctags maintainers nomaintainer long_description {Exuberant Ctags generates an index (or tag) file of source language objects in source files that allows these items to be quickly and easily located by a text editor or other utility. Alternatively, it can generate a cross reference file which lists, in human-readable form, information about the various objects found in a set of source code files. Supported languages include: Assembler, AWK, ASP, BETA, Bourne/Korn/Zsh Shell, C, C++, COBOL, Eiffel, Fortran, Java, Lisp, Lua, Make, Pascal, Perl, PHP, Python, REXX, Ruby, S-Lang, Scheme, Tcl, Vim and Yacc.} version 5.7j1 categories devel revision 0
 fmdiff 751
@@ -8,3 +8,5 @@ vim 1280
 variants {athena gtk1 gtk2 motif tiny small big huge xim perl python ruby tcl cscope nls puredarwin gdb my universal} depends_build {bin:gnutar:gnutar bin:grep:grep} variant_desc {athena {Build GUI version using Athena widgets} gtk1 {Build GUI version using GTK 1.x widgets} gtk2 {Build GUI version using GTK 2.x widgets} motif {Build GUI version with Motif widgets} tiny {Build tiny feature set} small {Build small feature set} big {Build big feature set} huge {Build huge feature set} xim {Build with support for X Input Method} perl {Enable Perl scripting} python {Enable Python scripting} ruby {Enable Ruby scripting} tcl {Enable Tcl scripting} cscope {Enable source code browsing with cscope} nls {National Language Support} puredarwin {Platform variant, do not select manually} gdb {Enable GDB integration} universal {Build for multiple architectures}} portdir editors/vim description {Vi {"workalike"} with many additional features} homepage http://www.vim.org/ epoch 0 platforms {darwin freebsd} name vim depends_lib {port:ncurses port:libiconv port:ctags} maintainers raimue long_description {Vim is an advanced text editor that seeks to provide the power of the de-facto Unix editor 'Vi', with a more complete feature set.} categories editors version 7.2.132 revision 0
 zsh-devel 1112
 variants {darwin_8 mp_completion pcre doc examples cjk universal} variant_desc {darwin_8 {Platform variant, do not select manually} mp_completion {Install port(1) completion file} pcre {Add regular expressions support in builtin functions through PCRE} doc {Install extra documentation} examples {Install configuration examples} cjk {Add East Asian Ambiguous characters support} universal {Build for multiple architectures}} portdir shells/zsh-devel description {Zsh is a UNIX command interpreter (shell)} homepage http://www.zsh.org/ epoch 0 platforms darwin name zsh-devel depends_lib {port:libiconv port:ncursesw} maintainers {nox openmaintainer} long_description {Zsh is a UNIX command interpreter (shell) which of the standard shells most resembles the Korn shell (ksh), although it is not completely compatible. It includes enhancements of many types, notably in the command-line editor, options for customising its behaviour, filename globbing, features to make C-shell (csh) users feel more at home and extra features drawn from tcsh (another `custom' shell).} version 4.3.9 categories shells revision 1
+cmigemo 503
+variants {utf8 universal} variant_desc {universal {Build for multiple architectures}} portdir textproc/cmigemo description {C/Migemo is a Japanese incremental search tool.} homepage http://www.kaoriya.net/ epoch 0 name cmigemo depends_lib {bin:iconv:libiconv bin:nkf:nkf} maintainers nomaintainer long_description {C/Migemo is a set of a library and an application to search Japanese words incrementally, or a C version of Migemo originally written in Ruby.} version 1.3c categories textproc revision 7
index c9f8ec3..b0d3c99 100644 (file)
@@ -1,5 +1,6 @@
+  cmigemo @1.3c_7+utf8 (active)
   ctags @5.7j1_0 (active)
   fmdiff @7819_0 (active)
-  iTerm @0.9.6_20090324 (active)
+  iTerm @0.9.6_20090325 (active)
   vim @7.2.132_0+cscope+gdb+huge+my+ruby (active)
   zsh-devel @4.3.9_1+cjk+mp_completion+pcre (active)
diff --git a/textproc/cmigemo/Portfile b/textproc/cmigemo/Portfile
new file mode 100644 (file)
index 0000000..d229a82
--- /dev/null
@@ -0,0 +1,108 @@
+# $Id:  $
+
+PortSystem 1.0
+name                   cmigemo
+version                        1.3c
+revision               7
+categories             textproc
+depends_lib            bin:iconv:libiconv bin:nkf:nkf
+maintainers            nomaintainer
+description            C/Migemo is a Japanese incremental search tool.
+long_description       \
+       C/Migemo is a set of a library and an application to search \
+       Japanese words incrementally, or a C version of Migemo originally \
+       written in Ruby.
+patchfiles             patch-config.mk.in.diff \
+                               patch-config_default.mk.diff patch-dict.mk.diff \
+                               patch-Make_osx.mk.diff \
+                               patch-romaji.c patch-mnode.c
+extract.suffix tar.bz2
+use_bzip2              yes
+set dicver             20041227
+distfiles              ${distname}${extract.suffix}:src \
+                               SKK-JISYO-${dicver}.L.gz:dic
+homepage               http://www.kaoriya.net/
+master_sites    http://www.kaoriya.net/dist/var:src \
+                               http://www.lapangan.net/pc/tarball:dic
+checksums              ${distname}${extract.suffix} md5 \
+                                       0b9d2feff4cfdc673cc1947fe54191ed \
+                               SKK-JISYO-${dicver}.L.gz md5 \
+                                       0016d039378e85e1489c7e8f9a5969c7
+extract.only   ${distname}${extract.suffix}
+post-extract   {file copy ${distpath}/SKK-JISYO-${dicver}.L.gz \
+                                         ${worksrcpath}/dict/SKK-JISYO.L.gz}
+build.env                      CC=cc
+build.target           osx osx-dict
+
+set dics                       {han2zen.dat hira2kata.dat migemo-dict roma2hira.dat zen2han.dat}
+set tools                      {skk2migemo.pl optimize-dict.pl}
+
+post-patch                     {
+       reinplace "s|/usr/local|${prefix}|" \
+               ${worksrcpath}/compile/config.mk.in  \
+               ${worksrcpath}/compile/config_default.mk \
+               ${worksrcpath}/tools/migemo.vim
+       foreach TOOL ${tools} {
+               reinplace "s|/usr/bin/|/usr/bin/env |" ${worksrcpath}/tools/${TOOL}
+       }
+}
+
+destroot                       {
+       # bin
+       xinstall -d -m 755 ${destroot}${prefix}/bin
+       xinstall -m 755 ${worksrcpath}/build/cmigemo \
+                       ${destroot}${prefix}/bin
+       # include
+       xinstall -d -m 755 ${destroot}${prefix}/include
+       xinstall -m 644 ${worksrcpath}/src/migemo.h \
+                       ${destroot}${prefix}/include
+       # doc
+       xinstall -d -m 755 ${destroot}${prefix}/share/doc/migemo
+       xinstall -m 644 ${worksrcpath}/doc/README_j.txt \
+                       ${destroot}${prefix}/share/doc/migemo
+       # dict
+       xinstall -d -m 755 ${destroot}${prefix}/share/migemo/euc-jp
+       xinstall -d -m 755 ${destroot}${prefix}/share/migemo/cp932
+       foreach DIC ${dics} {
+               xinstall -m 644 ${worksrcpath}/dict/${DIC} \
+                       ${destroot}${prefix}/share/migemo/cp932
+               xinstall -m 644 ${worksrcpath}/dict/euc-jp.d/${DIC} \
+                       ${destroot}${prefix}/share/migemo/euc-jp
+       }
+       # tools
+       xinstall -d -m 755 ${destroot}${prefix}/share/migemo/tools
+       xinstall -m 644 ${worksrcpath}/tools/migemo.vim \
+               ${destroot}${prefix}/share/migemo/tools
+       foreach TOOL ${tools} {
+               xinstall -m 644 ${worksrcpath}/tools/${TOOL} \
+                       ${destroot}${prefix}/share/migemo/tools
+       }
+       # lib
+       xinstall -d -m 755 ${destroot}${prefix}/lib
+       xinstall -m 755 ${worksrcpath}/libmigemo.1.1.0.dylib \
+               ${destroot}${prefix}/lib
+       foreach dylib {libmigemo.1 libmigemo} { 
+               system "ln -s ./libmigemo.1.1.0.dylib ${destroot}${prefix}/lib/${dylib}.dylib"
+       }
+}
+
+variant utf8 {
+       post-build {
+               system "mkdir dict/utf-8.d"
+               foreach DIC ${dics} {
+                       system "nkf -w < dict/${DIC} > dict/utf-8.d/${DIC}"
+               }
+       }
+
+       post-destroot {
+               xinstall -d -m 755 ${destroot}${prefix}/share/migemo/utf-8
+               foreach DIC ${dics} {
+                       xinstall -m 644 ${worksrcpath}/dict/utf-8.d/${DIC} \
+                       ${destroot}${prefix}/share/migemo/utf-8
+               }
+       }
+}
+
+variant universal {
+       patchfiles-append       patch-universal
+}
diff --git a/textproc/cmigemo/files/patch-Make_osx.mk.diff b/textproc/cmigemo/files/patch-Make_osx.mk.diff
new file mode 100644 (file)
index 0000000..602dde2
--- /dev/null
@@ -0,0 +1,19 @@
+*** compile/Make_osx.mak.orig  Mon Jan 24 01:36:15 2005
+--- compile/Make_osx.mak       Mon Jan 24 01:43:22 2005
+***************
+*** 26,32 ****
+  #
+  $(libmigemo_LIB): $(libmigemo_DSO)
+  $(libmigemo_DSO): $(libmigemo_OBJ)
+!      $(CC) -dynamiclib -install_name $@ -o $(libmigemo_LIB) $(libmigemo_OBJ)
+       $(RM) $@ $(libmigemo)
+       ln -s $(libmigemo_LIB) $@
+       ln -s $(libmigemo_LIB) $(libmigemo)
+--- 26,32 ----
+  #
+  $(libmigemo_LIB): $(libmigemo_DSO)
+  $(libmigemo_DSO): $(libmigemo_OBJ)
+!      $(CC) -dynamiclib -install_name $(prefix)/lib/$@ -o $(libmigemo_LIB) $(libmigemo_OBJ)
+       $(RM) $@ $(libmigemo)
+       ln -s $(libmigemo_LIB) $@
+       ln -s $(libmigemo_LIB) $(libmigemo)
diff --git a/textproc/cmigemo/files/patch-config.mk.in.diff b/textproc/cmigemo/files/patch-config.mk.in.diff
new file mode 100644 (file)
index 0000000..66112f1
--- /dev/null
@@ -0,0 +1,23 @@
+*** compile/config.mk.in.orig  Mon Jan 24 01:36:55 2005
+--- compile/config.mk.in       Mon Jan 24 01:41:02 2005
+***************
+*** 33,41 ****
+  PERL         = perl
+  BUNZIP2              = bzip2 -d
+  GUNZIP               = gzip -d
+! FILTER_CP932 = ${PROGRAM_ENCODEFILTER} -s
+! FILTER_EUCJP = ${PROGRAM_ENCODEFILTER} -e
+! FILTER_UTF8  = iconv -t utf-8 -f cp932
+  INSTALL              = ${PROGRAM_INSTALL} -c
+  INSTALL_PROGRAM      = $(INSTALL) -m 755
+  INSTALL_DATA = $(INSTALL) -m 644
+--- 33,41 ----
+  PERL         = perl
+  BUNZIP2              = bzip2 -d
+  GUNZIP               = gzip -d
+! FILTER_CP932 = nkf -s
+! FILTER_EUCJP = nkf -e
+! FILTER_UTF8          = nkf -w
+  INSTALL              = ${PROGRAM_INSTALL} -c
+  INSTALL_PROGRAM      = $(INSTALL) -m 755
+  INSTALL_DATA = $(INSTALL) -m 644
diff --git a/textproc/cmigemo/files/patch-config_default.mk.diff b/textproc/cmigemo/files/patch-config_default.mk.diff
new file mode 100644 (file)
index 0000000..cf44f80
--- /dev/null
@@ -0,0 +1,25 @@
+*** compile/config_default.mk.orig     Mon Jan 24 01:41:56 2005
+--- compile/config_default.mk  Mon Jan 24 01:42:44 2005
+***************
+*** 35,45 ****
+  PERL         = perl
+  BUNZIP2              = bzip2 -d
+  GUNZIP               = gzip -d
+! FILTER_CP932 = qkc -q -u -s
+! FILTER_EUCJP = qkc -q -u -e
+! FILTER_UTF8  = iconv -t utf-8 -f cp932
+! #FILTER_CP932        = nkf -s
+! #FILTER_EUCJP        = nkf -e
+  INSTALL              = /usr/bin/install -c
+  #INSTALL     = /usr/ucb/install -c
+  INSTALL_PROGRAM      = $(INSTALL) -m 755
+--- 35,43 ----
+  PERL         = perl
+  BUNZIP2              = bzip2 -d
+  GUNZIP               = gzip -d
+! FILTER_CP932 = nkf -s
+! FILTER_EUCJP = nkf -e
+! FILTER_UTF8          = nkf -w
+  INSTALL              = /usr/bin/install -c
+  #INSTALL     = /usr/ucb/install -c
+  INSTALL_PROGRAM      = $(INSTALL) -m 755
diff --git a/textproc/cmigemo/files/patch-dict.mk.diff b/textproc/cmigemo/files/patch-dict.mk.diff
new file mode 100644 (file)
index 0000000..1f8521c
--- /dev/null
@@ -0,0 +1,19 @@
+*** dict/dict.mak.orig Sat Jun 19 01:28:52 2004
+--- dict/dict.mak      Tue Dec 28 00:45:59 2004
+***************
+*** 22,28 ****
+       $(PERL) ../tools/optimize-dict.pl < dict.tmp > $@
+       -$(RM) dict.tmp
+  $(SKKDIC_FILE):
+!      $(HTTP) $(SKKDIC_BASEURL)/$@.gz
+       $(GUNZIP) $@.gz
+  
+  ##############################################################################
+--- 22,28 ----
+       $(PERL) ../tools/optimize-dict.pl < dict.tmp > $@
+       -$(RM) dict.tmp
+  $(SKKDIC_FILE):
+! #    $(HTTP) $(SKKDIC_BASEURL)/$@.gz
+       $(GUNZIP) $@.gz
+  
+  ##############################################################################
diff --git a/textproc/cmigemo/files/patch-mnode.c b/textproc/cmigemo/files/patch-mnode.c
new file mode 100644 (file)
index 0000000..c092f94
--- /dev/null
@@ -0,0 +1,16 @@
+--- src/mnode.c.orig
++++ src/mnode.c
+@@ -33,6 +33,13 @@
+ # define INLINE 
+ #endif
++#if defined(__APPLE__)
++static int _isspace(int c) {
++      return c >= 0x80 ? 0 : isspace(c);
++}
++# define isspace(c) _isspace(c)
++#endif  // __APPLE__
++
+ int n_mnode_new = 0;
+ int n_mnode_delete = 0;
diff --git a/textproc/cmigemo/files/patch-romaji.c b/textproc/cmigemo/files/patch-romaji.c
new file mode 100644 (file)
index 0000000..02863b3
--- /dev/null
@@ -0,0 +1,16 @@
+--- src/romaji.c.orig
++++ src/romaji.c
+@@ -31,6 +31,13 @@
+ #define ROMAJI_FIXKEY_XTU "xtu"
+ #define ROMAJI_FIXKEY_NONXTU "aiueon"
++#if defined(__APPLE__)
++static int _isspace(int c) {
++      return c >= 0x80 ? 0 : isspace(c);
++}
++# define isspace(c) _isspace(c)
++#endif  // __APPLE__
++
+ /*
+  * romanode interfaces
+  */
diff --git a/textproc/cmigemo/files/patch-universal b/textproc/cmigemo/files/patch-universal
new file mode 100644 (file)
index 0000000..d3f423f
--- /dev/null
@@ -0,0 +1,22 @@
+--- compile/Make_osx.mak.orig
++++ compile/Make_osx.mak
+@@ -12,8 +12,8 @@
+ libmigemo_DSO = libmigemo.1.dylib
+ libmigemo     = libmigemo.dylib
+ EXEEXT                =
+-CFLAGS_MIGEMO = -fPIC
+-LDFLAGS_MIGEMO        =
++CFLAGS_MIGEMO = -fPIC -arch i386 -arch ppc
++LDFLAGS_MIGEMO        = -arch i386 -arch ppc
+ include config.mk
+ include compile/unix.mak
+@@ -26,7 +26,7 @@
+ #
+ $(libmigemo_LIB): $(libmigemo_DSO)
+ $(libmigemo_DSO): $(libmigemo_OBJ)
+-      $(CC) -dynamiclib -install_name $(prefix)/lib/$@ -o $(libmigemo_LIB) $(libmigemo_OBJ)
++      $(CC) -arch i386 -arch ppc -dynamiclib -install_name $(prefix)/lib/$@ -o $(libmigemo_LIB) $(libmigemo_OBJ)
+       $(RM) $@ $(libmigemo)
+       ln -s $(libmigemo_LIB) $@
+       ln -s $(libmigemo_LIB) $(libmigemo)