port requires c++1y -> use cxx11 portgroup?

Lawrence Velázquez larryv at macports.org
Sat Dec 3 21:58:42 CET 2016


> On Dec 3, 2016, at 3:42 PM, Ken Cunningham <ken.cunningham.webuse at gmail.com> wrote:
> 
>> C++1y and C++14 are the same.
> 
> Apparently not exactly the same — somewhere in Pingus or its included
> bits there was a specific note about changing back to c++1y as some
> compilers accepted that but not c++14.

"C++1y" was the working name for C++14; there is no standard called
C++1y. Some initial implementations (like Clang 3.4) were completed
before the name was finalized and thus only recognize -std=c++1y.

>> The cxx11 portgroup does not express the correct restrictions for
>> C++14, but it could be extended to do so. C++11 is already most of
>> the way there.
> 
> thanks! should I add it now to Pingus, or leave it as it is do you
> think?

The portgroup currently doesn't express the correct constraints for
C++14. For instance, Apple LLVM Compiler 500 supports C++11 but not
C++14. The portgroup needs to be updated.

You might be able to achieve the behavior you need by using this
directly in your portfile, but I don't know that this is the right
version of Apple LLVM Compiler to specify. Once the portgroup is
updated, you can switch to that.

PortGroup compiler_blacklist_versions 1.0
compiler.blacklist-append *gcc* {clang < 503} cc
pre-configure {
    if {${configure.cxx_stdlib} eq "libstdc++"} {
        ui_error "${subport} does not support your selected MacPorts C++ runtime. libc++ must be selected and C++-based ports built against it."

        if {${os.major} < 13} {
            ui_error "Please follow the instructions on https://trac.macports.org/wiki/LibcxxOnOlderSystems."
            ui_error "After adding the required options to macports.conf, reinstall all ports like you would when switching macOS versions."
            ui_error "Follow step 3 on https://trac.macports.org/wiki/Migration in order to do this."
        }

        return -code error "libstdc++ unsupported."
    }
}

vq


More information about the macports-dev mailing list