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}
19 ${distname}.zip sha1 ff55a63c0fe854b6447df0b0990c363640d0a26a
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 --enable-gui=macvim \
34 --with-features=huge \
38 configure.cppflags -I${prefix}/include
39 configure.ldflags -L${prefix}/lib
41 if {[variant_isset universal]} {
42 configure.compiler gcc-4.0
43 set macosx_deployment_target 10.5
44 configure.args-append --with-mac-arch=both
45 set xcodeconfig Universal
47 set xcodeconfig Release
50 use_parallel_build yes
52 variant perl description {Enable Perl scripting} {
53 configure.args-append --enable-perlinterp
54 depends_lib-append bin:perl:perl5.10
56 variant python description {Enable Python scripting} {
57 configure.args-append --enable-pythoninterp
58 depends_lib-append bin:python:python26
60 variant ruby description {Enable Ruby scripting} {
61 configure.args-append --enable-rubyinterp
62 configure.env-append ARCHFLAGS="-L${prefix}/lib"
63 depends_lib-append bin:ruby:ruby
65 variant tcl description {Enable Tcl scripting} {
66 configure.args-append --enable-tclinterp
67 depends_lib-append bin:tclsh:tcl
69 variant cscope description {Enable source code browsing with cscope} {
70 configure.args-append --enable-cscope
75 "s|^# VIM_APP_DIR=/Applications$|VIM_APP_DIR=${applications_dir}|" \
76 ${worksrcpath}/MacVim/mvim
80 system "cd ${worksrcpath}/po; make ja_JP.UTF-8.mo"
81 system "cd ${worksrcpath}/MacVim; xcodebuild -configuration ${xcodeconfig}"
84 set appPath "${destroot}${applications_dir}/MacVim.app/Contents"
85 set runtimePath "${appPath}/Resources/vim/runtime"
88 file copy ${worksrcpath}/MacVim/build/${xcodeconfig}/MacVim.app ${destroot}${applications_dir}
89 xinstall -m 755 ${worksrcpath}/MacVim/mvim ${destroot}${prefix}/bin
90 xinstall -d 755 ${runtimePath}/lang/ja_JP.UTF-8/LC_MESSAGES
91 xinstall -m 644 ${worksrcpath}/po/ja_JP.UTF-8.mo \
92 ${runtimePath}/lang/ja_JP.UTF-8/LC_MESSAGES/vim.mo
93 file copy ${prefix}/share/migemo/tools/migemo.vim \
94 ${runtimePath}/plugin/migemo.vim
99 variant standalone description {Enable standalonize} {
100 depends_lib-append port:vimproc port:clewn
101 configure.env-append PATH="/usr/bin:${env(PATH)}"
102 configure.cppflags-append -DDYNAMIC_PERL -DDYNAMIC_PYTHON -DDYNAMIC_RUBY
104 reinplace "s|^PERL_LIBS|#PERL_LIBS|" ${worksrcpath}/auto/config.mk
105 reinplace "s|^PYTHON_LIBS|#PYTHON_LIBS|" ${worksrcpath}/auto/config.mk
106 reinplace "s|^RUBY_LIBS|#RUBY_LIBS|" ${worksrcpath}/auto/config.mk
110 file copy ${prefix}/bin/ctags ${appPath}/MacOS
113 set vimprocPath ${prefix}/share/vimproc/autoload
114 file copy ${vimprocPath}/proc.so ${runtimePath}/autoload
115 file copy ${vimprocPath}/proc.vim ${runtimePath}/autoload
118 file copy ${prefix}/bin/clewn ${appPath}/MacOS
119 set clewnPath ${prefix}/share/clewn
120 file copy ${clewnPath}/.clewn_keys ${runtimePath}
121 file copy ${clewnPath}/clewn.vim ${runtimePath}
122 file copy ${clewnPath}/doc/clewn.txt ${runtimePath}/doc
123 file copy ${clewnPath}/macros/clewn_mappings.vim ${runtimePath}/macros
124 file copy ${clewnPath}/syntax/gdbvar.vim ${runtimePath}/syntax
127 foreach dylib {intl.8 iconv.2 migemo.1 ncurses.5 readline.6} {
128 set libname [lindex [split ${dylib} .] 0]
129 set instname "@executable_path/../Frameworks/lib${libname}.dylib"
130 set origname "${prefix}/lib/lib${dylib}.dylib"
131 foreach exec {MacOS/Vim MacOS/clewn} {
132 system "install_name_tool \
133 -change ${origname} ${instname} ${appPath}/${exec}"
135 if {[file type ${origname}] == "link"} {
136 set realpath "${prefix}/lib/"
137 append realpath [file readlink ${origname}]
139 set realpath ${origname}
141 xinstall -m 755 ${realpath} \
142 ${appPath}/Frameworks/lib${libname}.dylib
144 system "install_name_tool \
145 -change ${prefix}/lib/libiconv.2.dylib \
146 @executable_path/../Frameworks/libiconv.dylib \
147 ${appPath}/Frameworks/libintl.dylib"
148 system "install_name_tool \
149 -change ${prefix}/lib/libncurses.5.dylib \
150 @executable_path/../Frameworks/libncurses.dylib \
151 ${appPath}/Frameworks/libreadline.dylib"
154 xinstall -d 755 ${runtimePath}/dict
155 foreach mdict {han2zen.dat hira2kata.dat \
156 migemo-dict roma2hira.dat zen2han.dat} {
157 xinstall -m 644 ${prefix}/share/migemo/utf-8/${mdict} \
162 system "${appPath}/MacOS/Vim \
163 --cmd \":helptag ${runtimePath}/doc\" --cmd :quit"