[105342] trunk/dports/math/atlas/Portfile

Ryan Schmidt ryandesign at macports.org
Fri Apr 19 02:35:14 PDT 2013

On Apr 19, 2013, at 04:11, Vincent Habchi wrote:

> 1. Blacklisting clang seems not to work. Can you try configuring atlas with the +clang option and tell me what happens?

Blacklisting only affects the compiler MacPorts chooses by default. If your port specifically sets configure.compiler, as atlas does in the +clang variant, then MacPorts will use that compiler and will not consult the blacklist. If you don't want users to be able to use a clang compiler, don't set configure.compiler to a clang compiler. You could remove or comment out your various clang variants. Also remove or comment out any place where you check if [variant_isset clang] or similar, or add to it a check for [variant_exists clang] etc. (If a user requests a variant, MacPorts will consider it selected, even if it is not defined by the port.) Or you could leave everything in place and just put error messages into the various clang variants, e.g.:

variant clang               conflicts   gcc46 gcc47 gcc48 \
                                        mpclang32 mpclang33 \
                            description {use XCode clang and gfortran} {

    if {[vercmp $xcodeversion 4.3] < 0} {
        pre-fetch {
            return -code error "Your version of clang is too old!"

    configure.compiler      clang

    pre-configure {
        ui_error "The +clang variant has been temporarily disabled. Use the +gcc47 variant instead."
        return -code error "disabled variant"

> 2. 3.1/3.0/2.9 are not selectable nor selected by default. Is it still mandatory to blacklist them?

There is an option users can set in macports.conf to make a different compiler the default; a user might have made a MacPorts clang compiler the default, though that's probably not something a user should do. The option is undocumented but has been mentioned on the lists before. If your port will not compile with a particular compiler, you should blacklist it so that, in that case, MacPorts will try a different compiler instead. Also, we might in the future modify MacPorts so that it will print a warning if a user tries to force a port to compile with a compiler that the port blacklists. (Currently, MacPorts will just build the port with the compiler the user requested, without informing them in advance that it probably won't work.)

More information about the macports-dev mailing list