1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Big Hack around Echoe and Rubygems to get http11 extension pre-built just for win32... start hating the platform...

git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@632 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
luislavena 2007-09-25 23:09:51 +00:00
parent f834811c94
commit 97daa84b8a

View file

@ -12,8 +12,15 @@ Echoe.new("mongrel") do |p|
p.need_tar_gz = false p.need_tar_gz = false
p.need_tgz = true p.need_tgz = true
p.certificate_chain = ['/Users/eweaver/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem', p.eval = proc do
'/Users/eweaver/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem'] unless RUBY_PLATFORM =~ /mswin/
self.certificate_chain = ['/Users/eweaver/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
'/Users/eweaver/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']
else
self.certificate_chain = ['~/gem_certificates/mongrel-public_cert.pem',
'~/gem_certificates/luislavena-mongrel-public_cert.pem']
end
end
p.require_signed = true p.require_signed = true
p.eval = proc do p.eval = proc do
@ -28,21 +35,22 @@ Echoe.new("mongrel") do |p|
end end
end end
task :compile do # NOTE: a big HACK around RubyGems and Echoe for pre-compiled extensions.
# Append a sanity check to the compile task # as usual, just for win32... to make it happy.
files = Dir["lib/http11/http11.*"] # starting to feel the pain...
unless files.any? file "lib/http11.so" do
STDERR.puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" extension = "ext/http11/extconf.rb"
STDERR.puts "Gem actually failed to build. Your system is" directory = File.dirname(extension)
STDERR.puts "NOT configured properly to build Mongrel." Dir.chdir(directory) do
STDERR.puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ruby File.basename(extension)
exit(1) system(PLATFORM =~ /win32/ ? 'nmake' : 'make')
else
files.each do |file|
mv file, "lib/"
end
end end
end Dir["#{directory}/*.#{Config::CONFIG['DLEXT']}"].each do |file|
cp file, "lib/"
end
end if RUBY_PLATFORM =~ /mswin/
task :compile => ["lib/http11.so"] if RUBY_PLATFORM =~ /mswin/
#### Project-wide install and uninstall tasks #### Project-wide install and uninstall tasks