forked from keitheis/homebrew-dupes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
units.rb
24 lines (19 loc) · 784 Bytes
/
units.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
require 'formula'
class Units < Formula
homepage 'http://www.gnu.org/software/units/'
url 'http://ftpmirror.gnu.org/units/units-2.01.tar.gz'
mirror 'http://ftp.gnu.org/gnu/units/units-2.01.tar.gz'
sha1 '80e7f1a2e70769bfac93702924871843b85f12d4'
keg_only :provided_by_osx,
"OS X provides BSD units, which behaves differently from GNU units."
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make check"
ENV.deparallelize # units install otherwise races to make some directories
system "make install"
end
test do
system %{[ $("#{bin}/units" '(((square(kiloinch)+2.84m2) /0.5) meters^2)^(1|4)' m | sed -n -e 's/[[:space:]]\\\* //p') = 6 ]}
end
end