binwalk 2.1.1

Closes Homebrew/homebrew#47702.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
Dan 2016-01-05 08:28:22 +01:00 committed by Dominyk Tiller
parent ae73c584e7
commit 2ea95547f5

View file

@ -1,41 +1,18 @@
class Binwalk < Formula
desc "Searches a binary image for embedded files and executable code"
homepage "http://binwalk.org/"
revision 1
stable do
url "https://github.com/devttys0/binwalk/archive/v2.0.1.tar.gz"
sha256 "90ee8426d71e91b62dfe4a1446c457bc7835b475b28717859e275a0494403959"
# Fixes OS-X-specific issues no longer relevant in HEAD:
#
# * Fixes OS X bug in 'setup.py':
# * See <https://github.com/devttys0/binwalk/commit/8278229cae4c2c354ffc5bfc3bcef0fd1d9bf2b3>
# and <https://github.com/devttys0/binwalk/commit/76ff729a19552e6e58505ca64b1d4ce2325e7ac0>.
# * Fixes library lookup for non-standard Homebrew installations:
# * See upstream issue <https://github.com/devttys0/binwalk/issues/130>
# for the details.
# * The fix is Homebrew-specific as it uses HOMEBREW_PREFIX, that is
# implicitly replace with the actual Homebrew prefix, in the patch.
patch :DATA
end
url "https://github.com/devttys0/binwalk/archive/v2.1.1.tar.gz"
sha256 "1b70a5b03489d29f60fef18008a2164974234874faab48a4f47ec53d461d284a"
head do
url "https://github.com/devttys0/binwalk.git"
option "with-capstone", "Enable disasm options via capstone"
resource "capstone" do
url "https://pypi.python.org/packages/source/c/capstone/capstone-3.0.2.tar.gz"
sha256 "b32022fe956e940f8e67c17841dd3f6f1c50a60e451f9b5ce1f4dd2e5c5b3339"
end
end
option "with-matplotlib", "Check for presence of matplotlib, which is required for entropy graphing support"
option "with-capstone", "Enable disasm options via capstone"
depends_on "swig" => :build
depends_on :fortran
depends_on "libmagic" => "with-python"
depends_on "matplotlib" => :python if build.with? "matplotlib"
depends_on "pyside"
depends_on :python if MacOS.version <= :snow_leopard
@ -49,13 +26,18 @@ class Binwalk < Formula
end
resource "numpy" do
url "https://pypi.python.org/packages/source/n/numpy/numpy-1.10.1.tar.gz"
sha256 "8b9f453f29ce96a14e625100d3dcf8926301d36c5f622623bf8820e748510858"
url "https://pypi.python.org/packages/source/n/numpy/numpy-1.10.2.tar.gz"
sha256 "23a3befdf955db4d616f8bb77b324680a80a323e0c42a7e8d7388ef578d8ffa9"
end
resource "scipy" do
url "https://downloads.sourceforge.net/project/scipy/scipy/0.15.1/scipy-0.15.1.tar.gz"
sha256 "a212cbc3b79e9a563aa45fc5c517b3499198bd7eb7e7be1e047568a5f48c259a"
url "https://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz"
sha256 "ecd1efbb1c038accb0516151d1e6679809c6010288765eb5da6051550bf52260"
end
resource "capstone" do
url "https://pypi.python.org/packages/source/c/capstone/capstone-3.0.4.tar.gz"
sha256 "945d3b8c3646a1c3914824c416439e2cf2df8969dd722c8979cdcc23b40ad225"
end
def install
@ -68,15 +50,10 @@ class Binwalk < Formula
end
end
if build.head?
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
system "python", *Language::Python.setup_install_args(libexec)
bin.install Dir["#{libexec}/bin/*"]
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
else
system "./configure", "--prefix=#{prefix}", "--disable-bundles"
system "make", "install"
end
end
test do
@ -84,34 +61,3 @@ class Binwalk < Formula
system "#{bin}/binwalk", "binwalk.test"
end
end
__END__
diff --git a/setup.py b/setup.py
index b5fbf54..660091d 100755
--- a/setup.py
+++ b/setup.py
@@ -134,7 +134,7 @@ if "install" in sys.argv or "build" in sys.argv:
# The data files to install along with the module
data_dirs = ["magic", "config", "plugins", "modules", "core"]
-install_data_files = [os.path.join("libs", "*.so")]
+install_data_files = [os.path.join("libs", "*.so"), os.path.join("libs", "*.dylib")]
for data_dir in data_dirs:
install_data_files.append("%s%s*" % (data_dir, os.path.sep))
diff --git a/src/binwalk/core/C.py b/src/binwalk/core/C.py
index e492a22..f8b3bd3 100644
--- a/src/binwalk/core/C.py
+++ b/src/binwalk/core/C.py
@@ -125,10 +125,7 @@ class Library(object):
'linux' : [os.path.join(prefix, 'lib%s.so' % library), '/usr/local/lib/lib%s.so' % library],
'cygwin' : [os.path.join(prefix, 'lib%s.so' % library), '/usr/local/lib/lib%s.so' % library],
'win32' : [os.path.join(prefix, 'lib%s.dll' % library), '%s.dll' % library],
- 'darwin' : [os.path.join(prefix, 'lib%s.dylib' % library),
- '/opt/local/lib/lib%s.dylib' % library,
- '/usr/local/lib/lib%s.dylib' % library,
- ] + glob.glob('/usr/local/Cellar/*%s*/*/lib/lib%s.dylib' % (library, library)),
+ 'darwin' : [os.path.join(prefix, 'lib%s.dylib' % library), 'HOMEBREW_PREFIX/lib/lib%s.dylib' % library],
}
for i in range(2, 4):