diff options
| author | Dominyk Tiller | 2014-12-02 14:50:23 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-02 15:31:06 +0000 |
| commit | d9ecaa73d1e99ba200a2d8d086f0bd4d2b8bbd88 (patch) | |
| tree | c3359bdf03a3756261f35f7748180566ede398da /Library | |
| parent | b19d3afccef0ddc31820f1cb7d1a5316017e29df (diff) | |
| download | homebrew-d9ecaa73d1e99ba200a2d8d086f0bd4d2b8bbd88.tar.bz2 | |
capstone: directory install fix
Deals with the issues seen in #34316. Forces a recompile as well, since
anyone who has this package installed from bottle has only text files
in the Cellar, and anyone who has the package installed from source has
/usr/local full of stuff that shouldn’t be directly there.
Closes #34609.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/capstone.rb | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/Library/Formula/capstone.rb b/Library/Formula/capstone.rb index a416b974e..b7e33bc36 100644 --- a/Library/Formula/capstone.rb +++ b/Library/Formula/capstone.rb @@ -1,9 +1,10 @@ -require 'formula' +require "formula" class Capstone < Formula - homepage 'http://capstone-engine.org' - url 'http://capstone-engine.org/download/3.0/capstone-3.0.tgz' - sha1 '26e591b8323ed3f6e92637d7ee953cb505687efa' + homepage "http://capstone-engine.org" + url "http://capstone-engine.org/download/3.0/capstone-3.0.tgz" + sha1 "26e591b8323ed3f6e92637d7ee953cb505687efa" + revision 1 bottle do cellar :any @@ -13,9 +14,18 @@ class Capstone < Formula end def install - ENV["PREFIX"] = prefix + # 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}" + ENV["HOMEBREW_CAPSTONE"] = "1" system "./make.sh" system "./make.sh", "install" end + + test do + # Given the build issues around prefix, check is actually in the Cellar. + assert File.exist? "#{lib}/libcapstone.a" + end end |
