fix build with XCode 4.3

- avoid use of FlatCarbon headers

- remove sysroot/syslibroot

- fix gemspec files attribute
This commit is contained in:
Doug MacEachern committed 2012-03-26 15:23:42 -07:00
1 parent edf041dc7a
commit 965051cdcf
7 files changed
+8 -36

No files matched your search

+2 -16
View File
@@ -108,22 +108,8 @@ sub flags {
}
elsif ($os =~ /(darwin)/) {
$os = $1;
my(@sdks) = reverse sort </Developer/SDKs/MacOSX10.*.sdk>;
my $sdk;
if (@sdks == 0) {
die
"Xcode Developer Tools not installed\n".
"Download from http://developer.apple.com/technology/xcode.html";
}
else {
#print "Available SDKs...\n(*) " . join("\n ", @sdks) . "\n";
$sdk = $sdks[0];
}
@cppflags = ('-DDARWIN',
"-I/Developer/Headers/FlatCarbon -isysroot $sdk");
@ldflags = ("-Wl,-syslibroot,$sdk",
'-framework CoreServices',
'-framework IOKit');
@cppflags = ('-DDARWIN');
@ldflags = ('-framework CoreServices', '-framework IOKit');
if (-e "/usr/local/libproc.h") {
push @cppflags, '-DDARWIN_HAS_LIBPROC_H';
}
-2
View File
@@ -356,8 +356,6 @@
<compilerarg value="${uni.arch}"/>
<compilerarg value="-mmacosx-version-min=${osx.min}"/>
<sysincludepath location="/Developer/Headers/FlatCarbon"/>
<defineset>
<define name="DARWIN"/>
<define name="DARWIN_HAS_LIBPROC_H" if="libproc.h"/>
+3 -12
View File
@@ -1,7 +1,7 @@
#
# Copyright (c) 2007, 2009 Hyperic, Inc.
# Copyright (c) 2009 SpringSource, Inc.
# Copyright (c) 2010 VMware, Inc.
# Copyright (c) 2010-2012 VMware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -26,20 +26,11 @@ print 'Ruby platform=' + RUBY_PLATFORM + "\n"
case RUBY_PLATFORM
when /darwin/
os = 'darwin'
sdks = Dir.glob('/Developer/SDKs/MacOSX10.*.sdk').sort.reverse
if sdks.length == 0
print "Xcode Developer Tools not installed\n"
print "Download from http://developer.apple.com/technology/xcode.html\n"
exit 1
else
print "Available SDKs...\n(*) " + sdks.join("\n ") + "\n"
sdk = sdks[0]
end
if File.file?("/usr/include/libproc.h")
$CPPFLAGS += ' -DDARWIN_HAS_LIBPROC_H'
end
$CPPFLAGS += ' -DDARWIN -I/Developer/Headers/FlatCarbon -isysroot ' + sdk
$LDFLAGS += ' -Wl,-syslibroot,' + sdk + ' -framework CoreServices -framework IOKit'
$CPPFLAGS += ' -DDARWIN'
$LDFLAGS += ' -framework CoreServices -framework IOKit'
when /bsd/
os = 'darwin'
have_library("kvm")