9 maintainers nomaintainer
10 description MacVim is a port of the text editor Vim to Mac OS X.
11 long_description MacVim supports multiple windows with tabbed editing and a host of other features. \
12 MacVim brings you the full power of Vim to Mac OS X.
13 homepage http://code.google.com/p/macvim-kaoriya/
16 distname KaoriYa-${gittag}
18 checksums ${distname}.zip sha1 \
19 2f46b740f70b178f858b8b275f883c9916541a4d
21 "http://repo.or.cz/w/MacVim/KaoriYa.git?a=snapshot;h=${gittag};sf=zip&"
22 worksrcdir KaoriYa/src
23 extract.only ${distname}.zip
25 depends_lib port:cmigemo \
30 configure.pre_args --prefix=${applications_dir}
31 configure.args --with-features=huge \
35 configure.cppflags -I${prefix}/include
36 configure.ldflags -L${prefix}/lib
38 if {[variant_isset universal]} {
39 set macosx_deployment_target 10.5
40 configure.args-append --with-macarchs="${universal_archs}" \
41 --with-macsdk="${macosx_deployment_target}"
44 use_parallel_build yes
46 variant perl description {Enable Perl scripting} {
47 configure.args-append --enable-perlinterp
48 depends_lib-append bin:perl:perl5.10
50 variant python description {Enable Python scripting} {
51 configure.args-append --enable-pythoninterp
52 depends_lib-append bin:python:python26
54 variant ruby description {Enable Ruby scripting} {
55 configure.args-append --enable-rubyinterp
56 depends_lib-append bin:ruby:ruby
58 variant tcl description {Enable Tcl scripting} {
59 configure.args-append --enable-tclinterp
60 depends_lib-append bin:tclsh:tcl
62 variant cscope description {Enable source code browsing with cscope} {
63 configure.args-append --enable-cscope
68 "s|^# VIM_APP_DIR=/Applications$|VIM_APP_DIR=${applications_dir}|" \
69 ${worksrcpath}/MacVim/mvim
72 set appPath "${destroot}${applications_dir}/MacVim.app/Contents"
73 set runtimePath "${appPath}/Resources/vim/runtime"
76 file copy ${worksrcpath}/MacVim/build/Release/MacVim.app ${destroot}${applications_dir}
77 xinstall -m 755 ${worksrcpath}/MacVim/mvim ${destroot}${prefix}/bin
78 xinstall -d 755 ${runtimePath}/lang/ja_JP.UTF-8/LC_MESSAGES
79 xinstall -m 644 ${worksrcpath}/po/ja_JP.UTF-8.mo \
80 ${runtimePath}/lang/ja_JP.UTF-8/LC_MESSAGES/vim.mo
81 file copy ${prefix}/share/migemo/tools/migemo.vim \
82 ${runtimePath}/plugin/migemo.vim
87 variant standalone description {Enable standalonize} {
88 depends_lib-append port:vimproc port:clewn
89 configure.env-append PATH="/usr/bin:${env(PATH)}"
90 configure.cppflags-append -DDYNAMIC_PERL -DDYNAMIC_PYTHON -DDYNAMIC_RUBY
92 reinplace "s|^PERL_LIBS|#PERL_LIBS|" ${worksrcpath}/auto/config.mk
93 reinplace "s|^PYTHON_LIBS|#PYTHON_LIBS|" ${worksrcpath}/auto/config.mk
94 reinplace "s|^RUBY_LIBS|#RUBY_LIBS|" ${worksrcpath}/auto/config.mk
98 file copy ${prefix}/bin/ctags ${appPath}/MacOS
101 set vimprocPath ${prefix}/share/vimproc/autoload
102 file copy ${vimprocPath}/proc.so ${runtimePath}/autoload
103 file copy ${vimprocPath}/vimproc.vim ${runtimePath}/autoload
106 file copy ${prefix}/bin/clewn ${appPath}/MacOS
107 set clewnPath ${prefix}/share/clewn
108 file copy ${clewnPath}/.clewn_keys ${runtimePath}
109 file copy ${clewnPath}/clewn.vim ${runtimePath}
110 file copy ${clewnPath}/doc/clewn.txt ${runtimePath}/doc
111 file copy ${clewnPath}/macros/clewn_mappings.vim ${runtimePath}/macros
112 file copy ${clewnPath}/syntax/gdbvar.vim ${runtimePath}/syntax
115 foreach dylib {intl.8 iconv.2 migemo.1 ncurses.5 readline.6} {
116 set libname [lindex [split ${dylib} .] 0]
117 set instname "@executable_path/../Frameworks/lib${libname}.dylib"
118 set origname "${prefix}/lib/lib${dylib}.dylib"
119 foreach exec {MacOS/Vim MacOS/clewn} {
120 system "install_name_tool \
121 -change ${origname} ${instname} ${appPath}/${exec}"
123 if {[file type ${origname}] == "link"} {
124 set realpath "${prefix}/lib/"
125 append realpath [file readlink ${origname}]
127 set realpath ${origname}
129 xinstall -m 755 ${realpath} \
130 ${appPath}/Frameworks/lib${libname}.dylib
132 system "install_name_tool \
133 -change ${prefix}/lib/libiconv.2.dylib \
134 @executable_path/../Frameworks/libiconv.dylib \
135 ${appPath}/Frameworks/libintl.dylib"
136 system "install_name_tool \
137 -change ${prefix}/lib/libncurses.5.dylib \
138 @executable_path/../Frameworks/libncurses.dylib \
139 ${appPath}/Frameworks/libreadline.dylib"
142 xinstall -d 755 ${runtimePath}/dict
143 foreach mdict {han2zen.dat hira2kata.dat \
144 migemo-dict roma2hira.dat zen2han.dat} {
145 xinstall -m 644 ${prefix}/share/migemo/utf-8/${mdict} \
150 system "${appPath}/MacOS/Vim \
151 --cmd \":helptag ${runtimePath}/doc\" --cmd :quit"