Sha256: d363c58703b815dcedaa8112b0f56d168e76663e983e3656ae2b800696e07693

Contents?: true

Size: 853 Bytes

Versions: 7

Compression:

Stored size: 853 Bytes

Contents

# Workaround to make Rubygems believe it builds a native gem
require 'mkmf'
create_makefile('none')

raise "Only Darwin (Mac OS X) systems are supported" unless `uname -s`.chomp == 'Darwin'

gem_root      = File.expand_path(File.join('..'))
darwin_verion = `uname -r`.to_i
sdk_verion    = { 9 => '10.5', 10 => '10.6', 11 => '10.7' }[darwin_verion]

raise "Only Darwin systems greather than 8 (Mac OS X 10.5+) are supported" unless sdk_verion

# Compile the actual fsevent_watch binary
system "mkdir -p #{File.join(gem_root, 'bin')}"
system "CFLAGS='-isysroot /Developer/SDKs/MacOSX#{sdk_verion}.sdk -mmacosx-version-min=#{sdk_verion}' /usr/bin/gcc -framework CoreServices -o '#{gem_root}/bin/fsevent_watch' fsevent/fsevent_watch.c"

unless File.executable?("#{gem_root}/bin/fsevent_watch")
  raise "Compilation of fsevent_watch failed (see README)"
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rb-fsevent-0.3.6 ext/extconf.rb
rb-fsevent-0.3.5 ext/extconf.rb
rb-fsevent-0.3.4 ext/extconf.rb
rb-fsevent-0.3.3 ext/extconf.rb
rb-fsevent-0.3.2 ext/extconf.rb
rb-fsevent-0.3.1 ext/extconf.rb
rb-fsevent-0.3.0 ext/extconf.rb