different versions of port for different versions of OS X

Ryan Schmidt ryandesign at macports.org
Tue Apr 22 15:56:20 PDT 2014

On Apr 22, 2014, at 08:42, Mark Moll wrote:

> I maintain a port, py-graph-tool, for which the latest versions only work on 10.9. I want to specify that older versions of OS X should use an older version of this port. This is what I have:
> version             2.2.31
> epoch               20140421
> distname            ${realname}-${version}
> checksums           md5     5c2f66d90f77824b924b2b81f5043822 \
>                    sha1    5e0b1c215ecd76191a82c745df0fac17e33bfb09 \
>                    rmd160  23f52640ab4dfaea1d5b6432a1b5c8293deedbc5
> if {${os.major} <= 12 && ${os.platform} eq "darwin"} {
>    version         2.2.26
>    distname        ${realname}-${version}
>    checksums       md5     317b29de0d3ef715fdc9281e078cfb17 \
>                    sha1    108be4cf6212eb6886f172ea03813187f73e4c3c \
>                    rmd160  cd2e8506522821750d70a97b951254f0a133d218
> }

Do we want to allow this now? We used to consider changing the port version based on OS version an antipattern, and recommended instead that a separate port should be created. But ld64 and cctools already do it.

It does cause cosmetic problems when a single PortIndex is shared across OS versions, such as a port showing up as outdated in “port outdated” when it’s really not. I run into this on my test machines which have multiple OS X boot partitions but share a single MacPorts ports directory (and distfiles directory) on a data partition. Granted this is not something most users will do.

More information about the macports-dev mailing list