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 0f4b3ae9a9bd26ecb31609f5f3b3170ad6494dd7
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 \
37 configure.cppflags -I${prefix}/include
38 configure.ldflags -L${prefix}/lib
40 if {[variant_isset universal]} {
41 configure.universal_target 10.4
42 configure.args-append --with-mac-arch=both
43 set xcodeconfig Universal
45 set xcodeconfig Release
48 use_parallel_build yes
50 variant perl description {Enable Perl scripting} {
51 configure.args-append --enable-perlinterp
52 depends_lib-append bin:perl:perl5.8
54 variant python description {Enable Python scripting} {
55 configure.args-append --enable-pythoninterp
56 depends_lib-append bin:python:python25
58 variant ruby description {Enable Ruby scripting} {
59 configure.args-append --enable-rubyinterp
60 configure.env-append ARCHFLAGS="-L${prefix}/lib"
61 depends_lib-append bin:ruby:ruby
63 variant tcl description {Enable Tcl scripting} {
64 configure.args-append --enable-tclinterp
65 depends_lib-append bin:tclsh:tcl
67 variant cscope description {Enable source code browsing with cscope} {
68 configure.args-append --enable-cscope
73 "s|^# VIM_APP_DIR=/Applications$|VIM_APP_DIR=${applications_dir}|" \
74 ${worksrcpath}/MacVim/mvim
78 system "cd ${worksrcpath}/po; make ja_JP.UTF-8.mo"
79 system "cd ${worksrcpath}/MacVim; xcodebuild -configuration ${xcodeconfig}"
82 # Can be removed once MacPorts 1.7.1 is released
84 xinstall -d ${destroot}${applications_dir}
87 set appPath "${destroot}${applications_dir}/MacVim.app/Contents"
88 set runtimePath "${appPath}/Resources/vim/runtime"
91 file copy ${worksrcpath}/MacVim/build/${xcodeconfig}/MacVim.app ${destroot}${applications_dir}
92 xinstall -m 755 ${worksrcpath}/MacVim/mvim ${destroot}${prefix}/bin
93 xinstall -d 755 ${runtimePath}/lang/ja_JP.UTF-8/LC_MESSAGES
94 xinstall -m 644 ${worksrcpath}/po/ja_JP.UTF-8.mo \
95 ${runtimePath}/lang/ja_JP.UTF-8/LC_MESSAGES/vim.mo
96 file copy ${prefix}/share/migemo/tools/migemo.vim \
97 ${runtimePath}/plugin/migemo.vim
102 variant standalone description {Enable standalonize} {
103 configure.env-append PATH="/usr/bin:${env(PATH)}"
104 configure.cppflags -DDYNAMIC_PERL -DDYNAMIC_PYTHON -DDYNAMIC_RUBY
106 reinplace "s|^PERL_LIBS|#PERL_LIBS|" ${worksrcpath}/auto/config.mk
107 reinplace "s|^PYTHON_LIBS|#PYTHON_LIBS|" ${worksrcpath}/auto/config.mk
108 reinplace "s|^RUBY_LIBS|#RUBY_LIBS|" ${worksrcpath}/auto/config.mk
111 foreach dylib {intl.8 iconv.2 migemo.1 ncurses.5} {
112 set libname [lindex [split ${dylib} .] 0]
113 set instname "@executable_path/../Frameworks/lib${libname}.dylib"
114 set origname "${prefix}/lib/lib${dylib}.dylib"
115 system "install_name_tool \
116 -change ${origname} ${instname} ${appPath}/MacOS/Vim"
117 if {[file type ${origname}] == "link"} {
118 set realpath "${prefix}/lib/"
119 append realpath [file readlink ${origname}]
121 set realpath ${origname}
123 xinstall -m 755 ${realpath} \
124 ${appPath}/Frameworks/lib${libname}.dylib
126 system "install_name_tool \
127 -change ${prefix}/lib/libiconv.2.dylib \
128 @executable_path/../Frameworks/libiconv.dylib \
129 ${appPath}/Frameworks/libintl.dylib"
131 xinstall -d 755 ${runtimePath}/dict
132 foreach mdict {han2zen.dat hira2kata.dat \
133 migemo-dict roma2hira.dat zen2han.dat} {
134 xinstall -m 644 ${prefix}/share/migemo/utf-8/${mdict} \