Sha256: 0a4a917b941e5fcde038639dfd4f734733c9790845272792a9e0dee4c73a432d

Contents?: true

Size: 800 Bytes

Versions: 28

Compression:

Stored size: 800 Bytes

Contents

require 'mkmf'

# check out code if it hasn't been already
if Dir[File.expand_path('../vendor/http-parser/*', __FILE__)].empty?
  Dir.chdir(File.expand_path('../../../', __FILE__)) do
    xsystem 'git submodule init'
    xsystem 'git submodule update'
  end
end

# mongrel and http-parser both define http_parser_(init|execute), so we
# rename functions in http-parser before using them.
vendor_dir = File.expand_path('../vendor/http-parser/', __FILE__)
src_dir = File.expand_path('../', __FILE__)
%w[ http_parser.c http_parser.h ].each do |file|
  File.open(File.join(src_dir, "ryah_#{file}"), 'w'){ |f|
    f.write File.read(File.join(vendor_dir, file)).gsub('http_parser', 'ryah_http_parser')
  }
end

$CFLAGS << " -I#{src_dir}"

dir_config("ruby_http_parser")
create_makefile("ruby_http_parser")

Version data entries

28 entries across 28 versions & 4 rubygems

Version Path
midori_http_parser-0.6.2 ext/ruby_http_parser/extconf.rb
fluent-plugin-detect-memb-exceptions-0.0.2 vendor/bundle/ruby/2.0.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/extconf.rb
fluent-plugin-detect-memb-exceptions-0.0.1 vendor/bundle/ruby/2.0.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/extconf.rb
midori_http_parser-0.6.1.3 ext/ruby_http_parser/extconf.rb
midori_http_parser-0.6.1.3-java ext/ruby_http_parser/extconf.rb
midori_http_parser-0.6.1.2-java ext/ruby_http_parser/extconf.rb
midori_http_parser-0.6.1.2 ext/ruby_http_parser/extconf.rb
midori_http_parser-0.6.1.1-java ext/ruby_http_parser/extconf.rb
midori_http_parser-0.6.1.1 ext/ruby_http_parser/extconf.rb
midori_http_parser-0.6.1 ext/ruby_http_parser/extconf.rb
http_parser.rb-0.6.0-java ext/ruby_http_parser/extconf.rb
http_parser.rb-0.6.0 ext/ruby_http_parser/extconf.rb
http_parser.rb-0.6.0.beta.2-java ext/ruby_http_parser/extconf.rb
http_parser.rb-0.6.0.beta.2 ext/ruby_http_parser/extconf.rb
http_parser.rb-0.6.0.beta.1 ext/ruby_http_parser/extconf.rb
jls-http_parser.rb-0.5.3.1 ext/ruby_http_parser/extconf.rb
http_parser.rb-0.5.3 ext/ruby_http_parser/extconf.rb
http_parser.rb-0.5.3-x86-mswin32-60 ext/ruby_http_parser/extconf.rb
http_parser.rb-0.5.3-x86-mingw32 ext/ruby_http_parser/extconf.rb
http_parser.rb-0.5.3-java ext/ruby_http_parser/extconf.rb