Sha256: 13749aaaeb2941e45a585b690137161dffc6b52ac8ccb1e55b4201ebdadfeb0a

Contents?: true

Size: 784 Bytes

Versions: 4

Compression:

Stored size: 784 Bytes

Contents

require 'mkmf'
require 'fileutils'

unless pkg_config('libsnappy') || have_library('snappy')
  # build vendor/snappy
  pwd = File.dirname File.expand_path __FILE__
  dir = File.join pwd, '..', 'vendor', 'snappy'

  Dir.chdir dir do
    raise '`autogen.sh` failed' unless system './autogen.sh'
    raise '`configure` failed'  unless system './configure --disable-option-checking --disable-dependency-tracking --disable-gtest --without-gflags'
  end

  src = %w(
   config.h
   snappy-c.cc
   snappy-c.h
   snappy-internal.h
   snappy-sinksource.cc
   snappy-sinksource.h
   snappy-stubs-internal.cc
   snappy-stubs-internal.h
   snappy-stubs-public.h
   snappy.cc
   snappy.h
  ).map { |e| File.join dir, e }
  FileUtils.cp src, pwd, :verbose => true
end

create_makefile 'snappy_ext'

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
snappy-0.0.17-java ext/extconf.rb
snappy-0.0.17 ext/extconf.rb
snappy-0.0.16-java ext/extconf.rb
snappy-0.0.16 ext/extconf.rb