[macports-ports] 06/10: octave: use cxx_stdlib instead of configure.cxx_stdlib

Ryan Schmidt ryandesign at macports.org
Thu Nov 30 19:57:18 UTC 2017


If ${cxx_stdlib} refers to the default value, then I don't think you should be checking that in the Portfile. You want to know what the current value is, not what the default value was.


On Nov 30, 2017, at 12:58, Marcus Calhoun-Lopez wrote:

> cxx_stdlib is a variable that can be set in
> ${prefix}/etc/macports/macports.conf.
> See LibcxxOnOlderSystems [1] for an example of its usage.
> It is the default value of configure.cxx_stdlib [2].
> The cxx11 PG replaces libstdc++ with macports-libstdc++ in
> configure.cxx_stdlib [3].
> So the code
>    if {${configure.cxx_stdlib} ne "libstdc++"} {
> was incorrect.
> 
> As you point out, however, cxx_stdlib is not used in any other
> Portfile and so should probably be avoided.
> I will rewrite the code to only use configure.cxx_stdlib as soon as I
> get the chance.
> 
> Thanks,
> Marcus
> 
> [1] https://trac.macports.org/wiki/LibcxxOnOlderSystems#LionandMountainLion
> [2] https://github.com/macports/macports-base/blob/c4107fcd483646853321027af2e123aa0e70a1ce/src/port1.0/portconfigure.tcl#L59
> [3] https://github.com/macports/macports-ports/blob/5af4230f0816622cf7cfa2cba2ab2b877b31b649/_resources/port1.0/group/cxx11-1.1.tcl#L45
> 
> On Thu, Nov 30, 2017 at 9:24 AM, Ryan Schmidt <ryandesign at macports.org> wrote:
>>> --- a/math/octave/Portfile
>>> +++ b/math/octave/Portfile
>>> @@ -544,7 +544,7 @@ default_variants-append +docs
>>> 
>>> #    "Magick::Image::ping(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)"
>>> set magickConflict {}
>>> set magickDefault yes
>>> -if {${configure.cxx_stdlib} ne "libstdc++"} {
>>> +if {${cxx_stdlib} ne "libstdc++"} {
>> 
>> I don't understand this change. What's the relationship between configure.cxx_stdlib (the only variable any other port uses for this) and cxx_stdlib (which I've never heard of before)?
>> 



More information about the macports-dev mailing list