Variants vs. new ports for different version

Markus Weissmann mww at macports.org
Wed May 28 08:30:47 PDT 2008


Hi Frank,

On 28 May 2008, at 17:22, Frank Schima wrote:

> What's the best practice for handling ports with different versions?
>
> For example, take tcl/tk <http://www.tcl.tk/software/tcltk/>.  
> Currently it is up to version 8.5.2 and the port files for tcl and  
> tk are both using that. However, the 8.4 tree is also still updated.  
> MacPorts does not support the 8.4.x versions. But blt, for one,  
> conflicts with tcl/tk 8.5.2 and needs 8.4.x to be used.
>
> I was planning to add support for tcl and tk 8.4.19. Is it alright  
> to just add a variant on the ports for the 8.4.x version? Obviously  
> the other way is to create new tcl84 and tk84 Portfiles.
>
> The advantage to using a variant is that there are more than one  
> other ports that depend on tcl/tk and so they, in theory, would not  
> need to be changed. However, in the case of blt, it would need to  
> depend on the 8.4.x variant of tcl and tk. It's not clear to me from  
> reading the wiki if it's possible to depend on a specific variant.  
> Can someone kindly explain if that's possible?
>
> Furthermore, it appears that it is not possible to install both  
> 8.5.x and 8.4.x versions of tcl and tk at the same time. So only one  
> should be allowed.
>
> Are there other ports like this and what has been done?

There are some ports that do just that: gcc, postgresql, mysql,  
python, bdb come to my mind;
The different versions of e.g. gcc put their header files, libraries,  
etc. in version-suffixed directories; binaries are directly suffixed  
and for convenience there is gcc_select (which exists for python, too)  
to select which version gets called when you execute 'gcc'.
This way, they all can be installed simultaneously. I'd favor this  
approach for Tcl, too -- if possible.
This method does grant a good amount of flexibility (ports can depend  
on their prefered version, multiple versions can be installed  
simultaneously) and good compatibility/testing (The port will get the  
version of the dependency it was initially tested with).


Regards,

-Markus

--
Dipl. Inf. (FH) Markus W. Weissmann
http://www.macports.org/
http://www.mweissmann.de/



More information about the macports-dev mailing list