forked from rene-dev/homebrew-sigrok
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sigrok-cli.rb
32 lines (28 loc) · 1.03 KB
/
sigrok-cli.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
require 'formula'
class SigrokCli < Formula
url 'http://sigrok.org/download/source/sigrok-cli/sigrok-cli-0.5.0.tar.gz'
homepage 'http://sigrok.org/'
head 'git://sigrok.org/sigrok-cli',:using => Class.new(GitDownloadStrategy) { def support_depth?; false; end }
sha256 '73a30501525b13c09624ae00d37041cdaa50238d89c6febf169fc784affe723c'
depends_on 'mwm/sigrok/libsigrok'
depends_on 'mwm/sigrok/libsigrokdecode'
depends_on 'libserialport' => :optional
depends_on 'glib'
depends_on 'libtool' => :build
depends_on 'pkg-config' => :build
depends_on "autoconf" => :build
depends_on "automake" => :build
def install
ENV.delete "PYTHONPATH"
if build.head?
system "./autogen.sh"
end
py_ver = Formula["python3"].pkg_version.to_s[0..2] # e.g "3.4"
ENV.append_path "PKG_CONFIG_PATH", "#{HOMEBREW_PREFIX}/Frameworks/Python.framework/Versions/#{py_ver}/lib/pkgconfig/"
system "./configure", "--prefix=#{prefix}"
system "make", "install"
end
test do
system "#{bin}/sigrok-cli", "--version"
end
end