2017-03-19 18:13:36 +00:00
|
|
|
class Bc < Formula
|
2017-06-04 11:43:17 +00:00
|
|
|
desc "Arbitrary precision numeric processing language"
|
2017-03-19 18:13:36 +00:00
|
|
|
homepage "https://www.gnu.org/software/bc/"
|
2017-04-23 05:13:14 +00:00
|
|
|
url "https://ftp.gnu.org/gnu/bc/bc-1.07.1.tar.gz"
|
|
|
|
mirror "https://ftpmirror.gnu.org/bc/bc-1.07.1.tar.gz"
|
2017-04-10 06:12:37 +00:00
|
|
|
sha256 "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a"
|
2017-03-19 18:13:36 +00:00
|
|
|
|
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2017-09-29 15:01:20 +00:00
|
|
|
rebuild 1
|
|
|
|
sha256 "0baf2e31191d80258636186bf9adcdf6b3f554f213d36cb3054213f736e52bf1" => :high_sierra
|
|
|
|
sha256 "1d8f0459c0b67aae275c43e01e5312146be72163acadd3d6c8f2bc440181508c" => :sierra
|
|
|
|
sha256 "e5c4b3fa712d705c3cc9bfae12242c9b4dc429e329c61d12aa01b65c1623a11f" => :el_capitan
|
2017-03-19 18:13:36 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
keg_only :provided_by_osx
|
|
|
|
|
|
|
|
def install
|
2017-09-28 23:40:42 +00:00
|
|
|
# prevent user BC_ENV_ARGS from interfering with or influencing the
|
|
|
|
# bootstrap phase of the build, particularly
|
|
|
|
# BC_ENV_ARGS="--mathlib=./my_custom_stuff.b"
|
|
|
|
ENV.delete("BC_ENV_ARGS")
|
2017-03-19 18:13:36 +00:00
|
|
|
system "./configure",
|
|
|
|
"--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--disable-silent-rules",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--infodir=#{info}",
|
2017-09-28 23:40:42 +00:00
|
|
|
"--mandir=#{man}",
|
|
|
|
"--with-libedit"
|
2017-03-19 18:13:36 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/bc", "--version"
|
|
|
|
assert_match "2", pipe_output("#{bin}/bc", "1+1\n")
|
|
|
|
end
|
|
|
|
end
|