45 lines
1.3 KiB
Ruby
45 lines
1.3 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 1
|
|
|
|
bottle do
|
|
sha256 "438fa81c0155d1d1d6b5cb8060ef5128d181f16753835045030ee94d7ce534f9" => :high_sierra
|
|
sha256 "6b866dcaa9291369addb608c321fee804e78d7764d01266ac4f3b7029e0899f5" => :sierra
|
|
sha256 "d7f7e24b98fe23310e2c4ec85c32350fb545930a8259a76e312857c4ab3a5403" => :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}"
|
|
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
|