[MacPorts] #30041: Provide API for compiler blacklisting/whitelisting
MacPorts
noreply at macports.org
Tue Jul 5 12:10:44 PDT 2011
#30041: Provide API for compiler blacklisting/whitelisting
-----------------------------------+----------------------------------------
Reporter: jeremyhu@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: base | Version: 1.9.2
Keywords: | Port:
-----------------------------------+----------------------------------------
It would be nice if there were an API for easily blacklisting or
whitelisting compilers in individual ports.
If a port lists a whitelist, the first available compiler in the whitelist
would be used. If none is available, the first listed one available from
MacPorts should be built and used.
If a port lists a blacklist, the current compiler is used as long as it's
not in the blacklist. If it is in the blacklist, the first listed one in
the fallback list is used. if none is available, the first listed one
available from Macports should be built and used.
PseudoCode:
{{{
if whitelist
if default compiler is in whitelist
return default compiler
if whitelist contains an available compiler
return first available compiler in whitelist
if whitelist contains a MacPorts compiler
add first MacPorts compiler to depends_build
return first MacPorts compiler
return NULL
if blacklist
if default compiler is NOT in blacklist
return default compiler
if fallback contains an available compiler
return first available compiler in fallback
if fallback contains a MacPorts compiler
add first MacPorts compiler to depends_build
return first MacPorts compiler
return NULL
return default compiler
}}}
We could do something like this:
{{{
compiler.blacklist {llvm-gcc-4.2 clang macports-clang}
compiler.blacklist_fallback {gcc-4.2 apple-gcc-4.2 macports-gcc-4.6
macports-gcc-4.5 macports-gcc-4.4 macports-gcc-4.3}
}}}
This would result in using gcc-4.2 if available and *building* gcc-4.2 if
not.
--
Ticket URL: <https://trac.macports.org/ticket/30041>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list