Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding variants in Mac Ports

Tags:

macos

macports

I was wondering how you can append a variant to a port if you have already installed the port. For example I installed the 'vim' port and would like to go back and add the python25 variant. Do I need to delete vim and reinstall it? This is just an example, I would really like to know the process to do this for any port.

Thanks for any help, Greg

like image 629
wonbyte Avatar asked Oct 21 '10 23:10

wonbyte


1 Answers

Only one variant of a MacPorts port can be active at any one time. However, in MacPorts terminology, multiple variants and/or versions of a port can be installed simultaneously. Of those, at most one is active, any others are inactive. If you need to occasionally alternate between variants, you can activate a specific variant as needed. That will also automatically deactivate any conflicting active port. For example, here's a hypothetical vim example (not fully tested!):

$ sudo port install vim +python26
$ sudo port clean vim
$ sudo port install vim +python31
$ sudo port echo installed |grep vim
vim                            @7.3.21_0+python26
vim                            @7.3.21_0+python31
$ sudo port activate vim @7.3.21_0+python26
# ... edit with Python 2
# ...
$ sudo port activate vim @7.3.21_0+python31
# ... edit with Python 3
# ...
like image 119
Ned Deily Avatar answered Sep 28 '22 22:09

Ned Deily