From 3e17acf8f9fe5d56ac4e32845d552d11c2c435f9 Mon Sep 17 00:00:00 2001 From: David Holm Date: Sun, 16 Feb 2014 15:32:12 +0100 Subject: [PATCH] binwalk 1.3.0 Closes Homebrew/homebrew#26768. Signed-off-by: Mike McQuaid --- Formula/binwalk.rb | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/Formula/binwalk.rb b/Formula/binwalk.rb index ae9e44f557..22559e58ba 100644 --- a/Formula/binwalk.rb +++ b/Formula/binwalk.rb @@ -2,18 +2,49 @@ require 'formula' class Binwalk < Formula homepage 'http://code.google.com/p/binwalk/' - url 'https://binwalk.googlecode.com/files/binwalk-1.2.2-1.tar.gz' - sha1 '3422427a326f58a5b04616111ee66a8c2fddec1d' + url 'https://github.com/devttys0/binwalk/archive/v1.3.0.tar.gz' + sha1 '6cab158b69e508081302305b354da12f45658272' - depends_on 'libmagic' => 'with-python' + head 'https://github.com/devttys0/binwalk.git' option 'with-matplotlib', 'Check for presence of matplotlib, which is required for entropy graphing support' + + 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 + resource 'pyqtgraph' do + url 'http://www.pyqtgraph.org/downloads/pyqtgraph-0.9.8.tar.gz' + sha1 '4ea6891f562c09ff13555ccb33fe05c315a70cf1' + end + + resource 'numpy' do + url 'http://downloads.sourceforge.net/project/numpy/NumPy/1.8.0/numpy-1.8.0.tar.gz' + sha1 'a2c02c5fb2ab8cf630982cddc6821e74f5769974' + end + + resource 'scipy' do + url 'http://downloads.sourceforge.net/project/scipy/scipy/0.13.3/scipy-0.13.3.tar.gz' + sha1 '2c7d53fc1d7bfe0a3ab5818ef6d84cb5d8cfcca4' + end + def install + ENV.prepend_create_path 'PYTHONPATH', libexec+'lib/python2.7/site-packages' + numpy_args = [ "build", "--fcompiler=gnu95", + "install", "--prefix=#{libexec}" ] + resource('numpy').stage { system "python", "setup.py", *numpy_args } + scipy_args = [ "build", "--fcompiler=gnu95", + "install", "--prefix=#{libexec}" ] + resource('scipy').stage { system "python", "setup.py", *scipy_args } + pyqtgraph_args = [ "setup.py", "install", "--prefix=#{libexec}" ] + resource('pyqtgraph').stage { system "python", *pyqtgraph_args } + cd "src" do - system "python", "setup.py", "install", "--no-prereq-checks", "--prefix=#{prefix}" + binwalk_args = [ "install", "--prefix=#{prefix}" ] + system "python", "setup.py", *binwalk_args bin.env_script_all_files(libexec+'bin', :PYTHONPATH => ENV['PYTHONPATH']) end end