2014-02-04 09:03:34 +00:00
|
|
|
class Capstone < Formula
|
2014-12-02 14:50:23 +00:00
|
|
|
homepage "http://capstone-engine.org"
|
2015-02-04 00:09:38 +00:00
|
|
|
url "http://capstone-engine.org/download/3.0.1/capstone-3.0.1.tgz"
|
|
|
|
sha1 "7f206c853c6b8d05de22e919c2455ab661654093"
|
2014-02-04 09:03:34 +00:00
|
|
|
|
2014-04-01 15:57:55 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-02-16 20:35:45 +00:00
|
|
|
revision 1
|
|
|
|
sha1 "78c4d8f9d3a9719edd74142985ccdbe8ac69876c" => :yosemite
|
|
|
|
sha1 "0084bc1ee7bc57097950eef229e052df6886f069" => :mavericks
|
|
|
|
sha1 "ed8318f71c886983d870ab47fc994ca95ad38dea" => :mountain_lion
|
2014-04-01 15:57:55 +00:00
|
|
|
end
|
|
|
|
|
2014-02-04 09:03:34 +00:00
|
|
|
def install
|
2014-12-02 14:50:23 +00:00
|
|
|
# Capstone's Make script ignores the prefix env and was installing
|
|
|
|
# in /usr/local directly. So just inreplace the prefix for less pain.
|
|
|
|
# https://github.com/aquynh/capstone/issues/228
|
|
|
|
inreplace "make.sh", "export PREFIX=/usr/local", "export PREFIX=#{prefix}"
|
|
|
|
|
2014-04-01 08:25:58 +00:00
|
|
|
ENV["HOMEBREW_CAPSTONE"] = "1"
|
|
|
|
system "./make.sh"
|
2014-02-04 09:03:34 +00:00
|
|
|
system "./make.sh", "install"
|
2015-02-16 20:20:41 +00:00
|
|
|
|
|
|
|
# As per the above inreplace, the pkgconfig file needs fixing as well.
|
|
|
|
inreplace lib/"pkgconfig/capstone.pc" do |s|
|
|
|
|
s.gsub! "/usr/lib", lib
|
|
|
|
s.gsub! "/usr/include/capstone", include
|
|
|
|
end
|
2014-02-04 09:03:34 +00:00
|
|
|
end
|
2014-12-02 14:50:23 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
# Given the build issues around prefix, check is actually in the Cellar.
|
|
|
|
assert File.exist? "#{lib}/libcapstone.a"
|
|
|
|
end
|
2014-02-04 09:03:34 +00:00
|
|
|
end
|