Permalink
Browse files

Make it compile on FreeBSD.

  • Loading branch information...
1 parent a4538b6 commit eca1376ca88d9a1c5c1039bc40c728cf7b188ecd @mat813 mat813 committed Jul 25, 2011
Showing with 9 additions and 2 deletions.
  1. +9 −2 lib/capybara_webkit_builder.rb
@@ -3,23 +3,30 @@
module CapybaraWebkitBuilder
extend self
+ def make_bin
+ make_binaries = ['gmake', 'make']
+ make_binaries.detect { |make| system("which #{make}") }
+ end
+
def makefile
qmake_binaries = ['qmake', 'qmake-qt4']
qmake = qmake_binaries.detect { |qmake| system("which #{qmake}") }
case RUBY_PLATFORM
when /linux/
system("#{qmake} -spec linux-g++")
+ when /freebsd/
+ system("#{qmake} -spec freebsd-g++")
else
system("#{qmake} -spec macx-g++")
end
end
def qmake
- system("make qmake")
+ system("#{make_bin} qmake")
end
def build
- system("make") or return false
+ system(make_bin) or return false
FileUtils.mkdir("bin") unless File.directory?("bin")
FileUtils.cp("src/webkit_server", "bin", :preserve => true)

0 comments on commit eca1376

Please sign in to comment.