[101344] trunk/dports/python/py-matplotlib/Portfile
Ryan Schmidt
ryandesign at macports.org
Thu Jan 10 18:53:35 PST 2013
On Jan 10, 2013, at 20:40, Adam Mercer wrote:
> On Thu, Jan 10, 2013 at 8:22 PM, Ryan Schmidt wrote:
>
>>> +# build fails with gcc-4.0 on Leopard, use gcc-4.2 (#37069)
>>> +if {${configure.compiler} == "gcc-4.0"} {
>>> + configure.compiler gcc-4.2
>>> +}
>>
>> Couldn't this just be written as:
>>
>> compiler.blacklist gcc-4.0
>>
>> Of course this (or what you've already committed) will cause the port to fail on Tiger which has no gcc-4.2 (unless you work on making it use the apple-gcc42 port in that case; some other ports do this if you want to copy the code block).
>
> I hadn't thought about Tiger. Which ports do this, I've had a look but
> can't seem to find any examples?
I'm looking through them but not really finding the example I was hoping for. A lot of Jeremy Huddleston's ports do this:
configure.compiler gcc-4.2
if {![file exists ${configure.cc}]} {
depends_build-append port:apple-gcc42
depends_skip_archcheck-append apple-gcc42
configure.compiler apple-gcc-4.2
}
But my goal was to avoid explicitly setting the compiler and instead letting MacPorts choose a suitable one. I can check my Tiger machine in a few hours to see what would happen if you blacklisted gcc-4.0. I bet you'll have to blacklist gcc-3.3 too; that's the other gcc version Tiger has. But I have a feeling it won't automatically realize that using apple-gcc42 instead would be a good idea.
More information about the macports-dev
mailing list