On Dec 13, 2013, at 11:25, ebori...@macports.org wrote:

> Revision
> 114668
> Author
> ebori...@macports.org
> Date
> 2013-12-13 09:25:04 -0800 (Fri, 13 Dec 2013)
> Log Message
> 
> KeePassX: Build w/clang and c++11 on Mavericks
> Modified Paths
> 
>       • trunk/dports/security/KeePassX/Portfile


> -# Build fails with clang: unsupported -stack-protector-buffer-size=4
> -# (even though clang -help lists option)
> -compiler.blacklist      clang
> -
> 
>  configure.cmd           cmake
> 
>  configure.pre_args      -DCMAKE_INSTALL_PREFIX=${applications_dir} \
> 
>                          -DZLIB_ROOT=${prefix}
> 
>  configure.args          ${qt_cmake_defines} ../${distname}
> 
>  
> 
> +platform darwin {
> +    if {${os.major} < 13} {
> +        # Build fails with clang: unsupported -stack-protector-buffer-size=4
> +        # (even though clang -help lists option)
> +        compiler.blacklist          clang

This is probably wrong; you should probably base the blacklisting of clang on 
its version, not on the OS version. Use the compiler_blacklist_versions 
portgroup. Also list any affected MacPorts clang ports.

> +    } else {
> +        revision                    3
> +        configure.pre_args-append   -DWITH_CXX11=On
> +    }
> +}

This could be wrong too. The ability to compile with C++11 with clang is tied 
to using the libc++ library. That’s the default as of Mavericks, but users 
running trunk on earlier OS versions could have indicated they want to use it 
too, by editing cxx_stdlib in macports.conf and rebuilding all ports. 
Conceivably, users on Mavericks might have even changed the setting to use 
libstdc++ instead, and would thus not support C++11. So you should base this 
not on the OS version but on the value of configure.cxx_stdlib, if it’s defined.


_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to