Multiple versions

Joshua Root jmr at macports.org
Sun Apr 19 08:22:38 PDT 2009


Duncan Hutty wrote:
> If a port is set up such that multiple versions can be installed, the
> binaries are named with a suffix such as <binary>-<version> (perl-5.10)
> or <binary><version> (psql83).
> 
> If I want to indicate a default version I can make a link:
> ln -s /opt/local/bin/perl-5.10 /opt/local/bin/perl
> 
> That way if my path has /opt/local/bin at the beginning, I can run perl
> scripts with system perl using ./script.pl and with macports's perl-5.10
> by using perl script.pl.
> 
> However, many ports, including perl, come with many binaries so making
> appropriate links by hand would be tedious. How do macports users
> normally get around this? Do people write scripts to make links
> automatically for every binary that has a suffix? Does macports have
> some feature that I am unaware of that makes this problem go away,
> perhaps by setting an option at installation time to specify no suffix?

Python and gcc use the python_select and gcc_select ports respectively.
A perl_select would not be at all unreasonable. A generic select
mechanism is being developed for MacPorts 1.8.

- Josh


More information about the macports-users mailing list