2017-10-15 14:54:40 +00:00
|
|
|
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/src/4-1-0/singular-4.1.0p3.tar.gz"
|
|
|
|
version "4.1.0p3"
|
|
|
|
sha256 "440164c850d5a1575fcbfe95ab884088d03c0449570d40f465611932ffd0bf80"
|
2017-11-10 10:28:15 +00:00
|
|
|
revision 1
|
2017-10-15 14:54:40 +00:00
|
|
|
|
2017-10-28 13:48:48 +00:00
|
|
|
bottle do
|
2017-11-10 10:49:02 +00:00
|
|
|
sha256 "5be41d91381850e9d490e439d86cdf2f93bd308c3e19218164b15f9423c64ef5" => :high_sierra
|
|
|
|
sha256 "dd66f9654f6e64479b266885c2b9466474a06bad3e85166010658820980746e3" => :sierra
|
|
|
|
sha256 "883ba99583262372b1b5e172319920ec64c0c4f7364ef830386490a9bc4a4914" => :el_capitan
|
2017-10-28 13:48:48 +00:00
|
|
|
end
|
|
|
|
|
2017-10-15 14:54:40 +00:00
|
|
|
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 "ntl"
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "./autogen.sh" if build.head?
|
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--disable-silent-rules",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
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
|