Skip to content
Browse files

fix build with XCode 4.3

- avoid use of FlatCarbon headers

- remove sysroot/syslibroot

- fix gemspec files attribute
  • Loading branch information...
1 parent edf041d commit 965051cdcfc6e6e6f149534634b04a3d78895226 @dougm dougm committed Mar 23, 2012
Showing with 8 additions and 36 deletions.
  1. +2 −2 Rakefile
  2. +2 −16 bindings/SigarBuild.pm
  3. +0 −2 bindings/java/hyperic_jni/jni-build.xml
  4. +3 −12 bindings/ruby/extconf.rb
  5. +0 −1 configure.ac
  6. +0 −1 src/CMakeLists.txt
  7. +1 −2 src/os/darwin/darwin_sigar.c
View
4 Rakefile
@@ -22,7 +22,7 @@ spec = Gem::Specification.new do |s|
s.name = GEM
# s.version = props['version.major'] + '.' + props['version.minor'] + '.' + props['version.maint']
# '0.7.x' until the sigar-1.7.0 release
- s.version = '0' + '.' + props['version.minor'] + '.' + '0'
+ s.version = '0' + '.' + props['version.minor'] + '.' + '1'
s.summary = props['project.summary']
s.description = s.summary
s.author = props['project.author']
@@ -32,7 +32,7 @@ spec = Gem::Specification.new do |s|
s.has_rdoc = false
s.extensions = 'bindings/ruby/extconf.rb'
s.files =
- %w(COPYING EXCEPTIONS README Rakefile version.properties) +
+ %w(LICENSE NOTICE README Rakefile version.properties) +
%w(bindings/SigarWrapper.pm bindings/SigarBuild.pm) +
Dir.glob("bindings/ruby/**/*") +
Dir.glob("include/*.h") +
View
18 bindings/SigarBuild.pm
@@ -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';
}
View
2 bindings/java/hyperic_jni/jni-build.xml
@@ -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"/>
View
15 bindings/ruby/extconf.rb
@@ -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 @@
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")
View
1 configure.ac
@@ -35,7 +35,6 @@ case $host_os in
SRC_OS="darwin"
AC_DEFINE(DARWIN,[],[running on MacOS X])
AC_DEFINE(SIGAR_TEST_OS_DARWIN, [1], [for the tests])
- SIGAR_INCLUDES="-I /Developer/Headers/FlatCarbon/"
SIGAR_LIBS="-framework IOKit -framework CoreServices"
;;
*netbsd*)
View
1 src/CMakeLists.txt
@@ -40,7 +40,6 @@ IF(CMAKE_SYSTEM_NAME MATCHES "(Darwin|FreeBSD)")
INCLUDE_DIRECTORIES(os/darwin/)
IF(CMAKE_SYSTEM_NAME MATCHES "(Darwin)")
- INCLUDE_DIRECTORIES(/Developer/Headers/FlatCarbon/)
ADD_DEFINITIONS(-DDARWIN)
SET(SIGAR_LINK_FLAGS "-framework CoreServices -framework IOKit")
ELSE(CMAKE_SYSTEM_NAME MATCHES "(Darwin)")
View
3 src/os/darwin/darwin_sigar.c
@@ -50,8 +50,7 @@
#endif
#include <mach-o/dyld.h>
#define __OPENTRANSPORTPROVIDERS__
-#include <Gestalt.h>
-#include <CFString.h>
+#include <CoreServices/CoreServices.h>
#include <CoreFoundation/CoreFoundation.h>
#include <IOKit/IOBSD.h>
#include <IOKit/IOKitLib.h>

0 comments on commit 965051c

Please sign in to comment.
Something went wrong with that request. Please try again.