#47339: p5-alien-wxwidgets, p5-wx: update to latest versions ---------------------------------------+--------------------- Reporter: devans@… | Owner: mojca@… Type: update | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: p5-alien-wxwidgets p5-wx | ---------------------------------------+--------------------- Comment (by devans@…): Replying to [comment:3 mojca@…]:
It seems to me that the problem with 10.10 has been fixed, but the following chunk of code seems problematic and I need some help with it: {{{ my $tools43 = '/Applications/Xcode.app/Contents/Developer/Tools'; my $restoolpath = ( -d $tools43 ) ? $tools43 : '/Developer/Tools';
This is just setting $restoolpath to whichever of these two paths exist as a directory. These are the expected installation paths for Xcode in a standard default install. /Developer/Tools was used in older version, new versions (4.3 on I'm guessing based on the variable name) use /Applications/Xcode.app/Contents/Developer/Tools. This won't work if you have placed Xcode in a non-standard location. However, using /usr/bin will only work if xcode-select has been properly set to link to your install location. I think it would be better to figure a way to find the absolute path to the proper directory. Normally MacPorts does this for you.
sub get_flags { my $this = shift; my %config = $this->SUPER::get_flags;
I think the code enclosed in the if statement following can just be removed. It's trying to fixup $config{CC} and $config{LD} for each of the listed versions assuming your using a vanilla install of perl. Our perl versions set these config values correctly so nothing to do here -- just return %config. Try the following to see values of these flags (The example was run on Mavericks) {{{ $ perl5.16 -V:cc -V:ld cc='/usr/bin/clang'; ld='env MACOSX_DEPLOYMENT_TARGET=10.9 /usr/bin/clang'; }}} Remove this:
if ($config{CC} =~ /clang\+\+/ || $config{LD} =~ /clang\+\+/) { my $sdkrepl = ''; for my $sdkversion ( qw( 10.9 10.8 10.7 10.6 ) ) { my $macossdk = qq(/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${sdkversion}.sdk); if( -d $macossdk ) { $sdkrepl = 'clang++ -isysroot ' . $macossdk . ' -stdlib=libc++'; last; } } if ( $sdkrepl ) { $config{CC} =~ s/clang\+\+/$sdkrepl/g; $config{LD} =~ s/clang\+\+/$sdkrepl/g; } }
Keep this
return %config; } }}}
First of all there is absolutely no guarantee that users installed Xcode under `/Applications/Xcode.app/Contents/Developer/Tools` (I didn't). My workaround so far was to set {{{ my $restoolpath = '/usr/bin'; }}}
But I don't understand the rest of the code either. Is it trying to force `libc++` on 10.6, where setting `-isysroot /path/to/sdk` will make sure that it won't work??? And why does it only list 10.6 - 10.9?
See above. -- Ticket URL: <https://trac.macports.org/ticket/47339#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X