Ticket #39182: fix-MacVim-runtimepath.diff
File fix-MacVim-runtimepath.diff, 2.3 KB (added by larryv (Lawrence Velázquez), 11 years ago) |
---|
-
Portfile
7 7 set snapshot 66 8 8 set gitcommit snapshot-${snapshot} 9 9 version ${vim_version}.snapshot${snapshot} 10 revision 310 revision 4 11 11 categories editors 12 12 platforms darwin 13 13 license Vim GPL-2+ … … 42 42 } 43 43 44 44 patchfiles patch-src-MacVim-icons-python.diff \ 45 patch-src-MacVim-vimrc.diff \ 45 46 patch-reverse-7.3.245.diff \ 46 47 patch-MacVim-GCC-VERSION.diff 47 48 … … 69 70 post-patch { 70 71 reinplace "s|^# VIM_APP_DIR=/Applications$|VIM_APP_DIR=${applications_dir}|" \ 71 72 ${worksrcpath}/src/MacVim/mvim 73 74 set vimf ${prefix}/share/vim/vimfiles 75 set macvimf ${applications_dir}/MacVim.app/Contents/Resources/vim/vimfiles 76 reinplace "s|__VIM_VIMFILES__|$vimf|" ${worksrcpath}/src/MacVim/vimrc 77 reinplace "s|__MACVIM_VIMFILES__|$macvimf|" ${worksrcpath}/src/MacVim/vimrc 72 78 } 73 79 74 80 autoconf.dir ${worksrcpath}/src -
files/patch-src-MacVim-vimrc.diff
1 --- src/MacVim/vimrc.orig 2012-12-12 06:26:32.000000000 -0500 2 +++ src/MacVim/vimrc 2013-05-21 20:22:25.000000000 -0400 3 @@ -13,3 +13,22 @@ 4 " the entire MacVim menu is set up in a nib file which currently only is 5 " translated to English). 6 set langmenu=none 7 + 8 +" Add the vim port's vimfiles directory to runtimepath so that MacVim 9 +" can pick up vim files installed by other ports. Also remove the 10 +" default vimfiles entries, since those directories don't exist, and 11 +" nothing should be using them. 12 +if 1 13 + let rtp = split(&runtimepath, ',') 14 + 15 + " Insert vim's vimfiles around MacVim's $VIMRUNTIME. 16 + let idx_vimruntime = index(rtp, $VIMRUNTIME) 17 + call insert(rtp, "__VIM_VIMFILES__/after", idx_vimruntime + 1) 18 + call insert(rtp, "__VIM_VIMFILES__", idx_vimruntime) 19 + 20 + " Remove MacVim's nonexistent vimfiles entries. 21 + call filter(rtp, 'v:val !~ ''__MACVIM_VIMFILES__\%(/after\)\?''') 22 + 23 + let &runtimepath = join(rtp, ',') 24 + unlet idx_vimruntime rtp 25 +endif