vim7.1 のインストール

Leopard に元から入っている vim のバージョンは 7.0.234 で、
オプションに Ruby がついていないので、愛用している LustyExplorer が
使用できないので、MacPorts で、Vim7.1 をインストールする。

どうせ MacPorts からインストールするので、PrivatePortfile の vim7.1 を
インストールする。

cmigemo のインストール

http://lapangan.net/darwinports/index.php?cmd=read&page=PrivatePortfile%2FCMigemo
からダウンロードして展開。
/opt/local/var/localports/textproc/cmigemoに移動&インストール。

cd /opt/local/var/localport
sudo portindex
sudo port install cmigemo +utf8

vim7.1 のインストール

http://lapangan.net/darwinports/index.php?cmd=read&page=PrivatePortfile%2FVim
からダウンロードして展開。

/opt/local/localport/editor に移動&インストール。

$ cd /opt/local/var/localport
$ sudo portindex
$ sudo port install vim +huge +multibyte +ruby \
 +perl +python +cscope +kaoriya +aqua

Error: Target org.macports.build returned: shell command 
" cd "/opt/local/var/macports/build/_opt_local_var_localports_
editors_vim/work/vim71"" && ./configure --prefix=/opt/local
 --enable-gui=no --without-x --disable-gpm --disable-nls
 --mandir=/opt/local/share/man --with-tlib=ncurses --enable-multibyte
 --with-features=huge --enable-perlinterp --enable-pythoninterp
 --enable-rubyinterp " returned error 1
Command output: checking for sys/sysctl.h... yes
checking sys/sysinfo.h usability... no
checking sys/sysinfo.h presence... no
checking for sys/sysinfo.h... no
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking for pthread_np.h... no
checking for strings.h... (cached) yes
checking whether gcc needs -traditional... no
checking for an ANSI C-conforming const... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for ino_t... yes
checking for dev_t... yes
checking for rlim_t... yes
checking for stack_t... yes
checking whether stack_t has an ss_base field... no
checking --with-tlib argument... ncurses
checking for linking with ncurses library... OK
checking for tgetent()... configure: error: NOT FOUND!
      You need to install a terminal library; for example ncurses.
      Or specify the name of the library with --with-tlib.

Error: Status 1 encountered during processing.

エラーが出た・・ orz
ncurses はちゃんとインストールされている。

色々検索してみたけど、原因が分からなかった。
で、オプションに問題があるのかと思って、
オプションを全部外して、インストールしてみたら、
インストールできた。

で、1 つずつオプションをつけてインストールしたら、
+ruby でエラーが発生する事が判明。
元から入っている Ruby が悪さをしているのかと思い、
RubyMacPorts でインストールし、vim をインストール。

$ sudo port install vim +huge +multibyte +ruby \
 +perl +python +cscope +kaoriya +aqua

Error: Target org.macports.build returned: shell command
 " cd "/opt/local/var/macports/build/_opt_local_var_localports_
editors_vim/work/vim71" && make all " returned error 2
Command output: /System/Library/Perl/5.8.8/darwin-thread-
multi-2level/CORE/intrpvar.h:415: warning: data definition 
has no type or storage class
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/
intrpvar.h:500: error: syntax error before '*' token
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/
intrpvar.h:500: warning: type defaults to 'int' in declaration of 
'Perl_Isavebegin_ptr'
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/
intrpvar.h:500: warning: data definition has no type or storage class
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/
intrpvar.h:515: error: syntax error before '*' token
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/
intrpvar.h:515: warning: type defaults to 'int' in declaration of 
'Perl_Itaint_warn_ptr'/System/Library/Perl/5.8.8/
darwin-thread-multi-2level/CORE/intrpvar.h:515: 
warning: data definition has no type or storage class
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/
intrpvar.h:523: error: syntax error before '*' token
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/
intrpvar.h:523: warning: type defaults to 'int' in declaration of 
'Perl_Iutf8locale_ptr'/System/Library/Perl/5.8.8/
darwin-thread-multi-2level/CORE/intrpvar.h:523: 
warning: data definition has no type or storage class
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/
intrpvar.h:561: error: syntax error before '*' token
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/
intrpvar.h:561: warning: type defaults to 'int' in declaration of 
'Perl_Ihash_seed_set_ptr'
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/
intrpvar.h:561: warning: data definition has no type or storage class
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/
intrpvar.h:565: error: syntax error before '*' token
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/
intrpvar.h:565: warning: type defaults to 'int' in declaration of 
'Perl_Irehash_seed_set_ptr'/System/Library/Perl/5.8.8/
darwin-thread-multi-2level/CORE/intrpvar.h:565: 
warning: data definition has no type or storage class
In file included from /System/Library/Perl/5.8.8/
darwin-thread-multi-2level/CORE/perlapi.h:39,
                 from /System/Library/Perl/5.8.8/
darwin-thread-multi-2level/CORE/XSUB.h:349,
                 from ./vim.h:2027,
                 from if_perl.xs:16:
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/
perlvars.h:41: error: syntax error before '*' token
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/
perlvars.h:41: warning: type defaults to 'int' in declaration of 
'Perl_Gdo_undump_ptr'
/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE/
perlvars.h:41: warning: data definition has no type or storage class
if_perl.c: In function 'boot_VIM':
if_perl.c:1542: warning: unused variable 'items'
if_perl.c: In function 'boot_VIM':
if_perl.c:1542: warning: unused variable 'items'
lipo: can't open input file: /var/tmp//cckuiZxV.out (No such file or 
directory)
make[1]: *** [objects/if_perl.o] Error 1
make: *** [all] Error 2

Error: Status 1 encountered during processing.

Perl がらみのエラー発生。。
MacPorts で perl5.8.8 をインストールする。

再び、vim7.1 のインストール。

$ sudo port install vim +huge +multibyte +ruby \
 +perl +python +cscope +kaoriya +aqua

 --->  Fetching vim 
 --->  Verifying checksum(s) for vim
 --->  Extracting vim
 --->  Applying patches to vim
 --->  Configuring vim
 --->  Building vim with target all
 --->  Staging vim into destroot
 --->  Installing vim 7.1.154_0+aqua+cscope+huge+kaoriya+multibyte
 +perl+python+ruby
 --->  Activating vim 7.1.154_0+aqua+cscope+huge+kaoriya+multibyte
 +perl+python+ruby
 --->  Cleaning vim

おおお!インストールできた!!

エイリアスを/opt/local/bin/vim に設定して、
vim を実行したら、無事に LustyExplorer が起動できた。