Sha256: 29a8b367600d934e02b2c66d73eef4415cfa6c85c328aa688fdd9632fb0d1e11

Contents?: true

Size: 750 Bytes

Versions: 9

Compression:

Stored size: 750 Bytes

Contents

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

if `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 "Darwin #{darwin_verion} is not supported" unless sdk_verion
  
  # Compile the actual fsevent_watch binary
  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
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
guard-0.1.1 ext/extconf.rb
guard-0.1.0 ext/extconf.rb
guard-0.1.0.beta.2 ext/extconf.rb
guard-0.1.0.beta.1 ext/extconf.rb
rspactor-0.7.0.beta.7 ext/extconf.rb
rspactor-0.7.0.beta.6 ext/extconf.rb
rspactor-0.7.0.beta.5 ext/extconf.rb
rspactor-0.7.0.beta.4 ext/extconf.rb
rspactor-0.7.0.beta.3 ext/extconf.rb