Recompile MacPort's version of MacVim with Python, Ruby & Perl

macports, macvim, osx-mountain-lion, python, ruby

Solution

If you run `port info macvim` you see that it has some variants:

MacVim @7.3.snapshot65, Revision 1 (editors)
Variants:             big, cscope, huge, perl, python, python25, python26,
                      python27, python31, python32, ruby, tcl, universal, xim

Description:          MacVim is a port of the text editor Vim to Mac OS X that
                      is meant to look better and integrate more seamlessly with
                      the Mac than vim-app.
Homepage:             http://code.google.com/p/macvim
...

You can install MacVim with Python, Ruby and Perl support by selecting those variants using:

sudo port install macvim +python +perl +ruby

Problem

Linux guy making the switch to Mac (10.8). Because I'm lazy... I used MacPorts to install MacVim. It seemed to install without error. I just need python, ruby and perl support in mvim. ``` $ /opt/local/bin/mvim --version | egrep 'patches|python|ruby|perl' Included patches: 1-244, 246-646 +multi_lang -mzscheme +netbeans_intg +odbeditor +path_extra -perl +persistent_undo +postscript +printer -profile -python -python3 +quickfix +reltime -rightleft -ruby +scrollbind +signs +smartindent -sniff +startuptime ``` I looked for the src directory as it's explained in github but found nothing: ``` $ find /opt/local/ -name src -type d | grep -i vim ``` I did find and extract this file to /tmp/macvim ``` /opt/local/var/macports/software/MacVim/MacVim-7.3.snapshot65_1.darwin_12.x86_64.tbz2 ``` Then grep'd +PORTFILE for the string 'prefix': ``` $ grep prefix +PORTFILE PYTHON=${prefix}/bin/python2.7 copy ${worksrcpath}/src/MacVim/mvim ${destroot}${prefix}/bin ln -s mvim ${destroot}${prefix}/bin/mvimdiff ln -s mvim ${destroot}${prefix}/bin/mview ln -s mvim ${destroot}${prefix}/bin/mvimex configure.args-append --enable-pythoninterp --with-python=${prefix}/bin/python2.5 configure.args-append --enable-pythoninterp --with-python=${prefix}/bin/python2.6 configure.args-append --enable-pythoninterp --with-python=${prefix}/bin/python2.7 configure.args-append --enable-python3interp --with-python3=${prefix}/bin/python3.1 configure.args-append --enable-python3interp --with-python3=${prefix}/bin/python3.2 ``` At this point it seems like all the interpreters I care about should have been enabled. So, now I'm confused. The question now is: - Is there a way to fix the MacPorts version I have? or - Do I back out of it and run with the github package? - It looks as if Homebrew version is fairly flexible as well. Anyway, I'm kinda lost in Mac-world. Any guidance would be appreciated.

Original source