Temporarily blacklisting OCaml for 10.6 and before...

Rainer Müller raimue at macports.org
Wed Dec 13 14:53:41 UTC 2017


On 2017-12-13 15:41, Perry E. Metzger wrote:
> On Wed, 13 Dec 2017 14:34:03 +0000 Zero King <l2dy at macports.org>
> wrote:
>> On Wed, Dec 13, 2017 at 09:22:14AM -0500, Perry E. Metzger wrote:
>>> For the moment, OCaml doesn't work on 10.6 and earlier. There's
>>> some work that can fix that, but it isn't done yet.
>>>
>>> How does one specify that a port is only for more recent operating
>>> system versions to prevent it from building on older platforms? (I
>>> know how to blacklist ppc for the moment using supported_archs.)  
>>
>> Here's a snippet excerpted from port mas:
>>
>> pre-fetch {
>>     if {${os.major} < 15} {
>>         ui_error "${name} @${version} requires OS X 10.11 or later."
>>         return -code error "incompatible OS X version"
>>     }
>> }
> 
> Cool. What is os.major for 10.7? (Or how could I answer that on my
> own?)

${os.major} is the "Darwin version", which is actually the kernel
version as displayed in 'uname -r'. As of now, the offset to the macOS
minor version number has always been 4, so OS X 10.7 corresponds to
Darwin 11.

However, for clarity I would recommend to compare the ${macosx_version}
with vercmp instead, which is also available in Portfiles:

pre-fetch {
    if {${os.subplatform} eq "macosx" &&
            [vercmp ${macosx_version} 10.7] < 0} {
        ...
    }
}

Rainer


More information about the macports-dev mailing list