homebrew-core/Formula/singular.rb
2018-04-12 22:48:24 -04:00

46 lines
1.4 KiB
Ruby

class Singular < Formula
desc "Computer algebra system for polynomial computations"
homepage "https://www.singular.uni-kl.de/"
url "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/4-1-1/singular-4.1.1.tar.gz"
sha256 "3792c5707b60c1748298bf47e2277de20303d60563b797372cc0e1eff4bbc583"
revision 2
bottle do
sha256 "cbad21630b787e410d0adb653aa6c56c2ac865cfeb695bb8ac2d23f2c82142ad" => :high_sierra
sha256 "d54eb14a6ab61dabecc598e0c3a280c2914dc042167a926336ce562d3a322bfd" => :sierra
sha256 "add5cde2dbaaf9497d16c0c4fb47e299aec3dd46390225d053f1ae31641bc528" => :el_capitan
end
head do
url "https://github.com/Singular/Sources.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
depends_on "gmp"
depends_on "mpfr"
depends_on "ntl"
def install
system "./autogen.sh" if build.head?
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"CXXFLAGS=-std=c++11"
system "make", "install"
end
test do
testinput = <<~EOS
ring r = 0,(x,y,z),dp;
poly p = x;
poly q = y;
poly qq = z;
p*q*qq;
EOS
assert_match "xyz", pipe_output("#{bin}/Singular", testinput, 0)
end
end