5

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:

  1. Is there a way to fix the MacPorts version I have? or
  2. Do I back out of it and run with the github package?
  3. It looks as if Homebrew version is fairly flexible as well.

Anyway, I'm kinda lost in Mac-world. Any guidance would be appreciated.

psubsee2003
  • 8,563
  • 8
  • 61
  • 79
todd_dsm
  • 918
  • 1
  • 14
  • 21

2 Answers2

16

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
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Vortexfive
  • 1,889
  • 13
  • 19
  • That did it - Thank You! After I read your solution I went back to Google it - there's a little info out there but this must be a grape vine thing. Anyway, thanks again. – todd_dsm Oct 27 '12 at 16:37
-1

My solution is to:

Use the MacVim Binary installer, it's free of headaches. Then go and remove MacPorts from your system. Now install Homebrew and enjoy a properly working package manager ;-)

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Patrick Oscity
  • 53,604
  • 17
  • 144
  • 168
  • Homebrew looks hot; I'll hit it after I reach my tipping point with MP. Thanks for the tip :) – todd_dsm Oct 27 '12 at 16:33
  • this is not practical advise if you have to bound a lot of cool packages of macports. brew is only for binary packages and *can't* cover the all packages as macports does. – Kunthar Dec 10 '15 at 12:34
  • "brew is only for binary packages" – sorry, but that is incorrect. You can compile from source with Homebrew. Homebrew however has some pre-built binaries which will speed up installation for many popular packages. – Patrick Oscity Dec 10 '15 at 13:00
  • AFAIK not practical to manage as you you would do in macports. – Kunthar Dec 10 '15 at 19:46
  • I am not quite convinced since your comments lack proper explanations as to why macports should be preferred over homebrew. I don't really see where the problem is with homebrew, but please do use whatever works best for you. My answer merely reflects my personal experience that homebrew is easier to use, and has made macports obsolete in my toolchain. – Patrick Oscity Dec 10 '15 at 20:16