blob: 4f289b4795c135c354122a26957bdc8cfa08faf5 [file] [log] [blame]
class Libtasn1Flutter < Formula
desc "ASN.1 structure parser library"
homepage "https://www.gnu.org/software/libtasn1/"
revision 1
head do
url "https://flutter-mirrors.googlesource.com/libtasn1.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pkg-config" => :build
depends_on "gtk-doc"
end
def install
system "make", "bootstrap"
system "./configure", "--prefix=#{prefix}",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--disable-doc"
system "make", "install"
end
test do
(testpath/"pkix.asn").write <<~EOS
PKIX1 { }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
Dss-Sig-Value ::= SEQUENCE {
r INTEGER,
s INTEGER
}
END
EOS
(testpath/"assign.asn1").write <<~EOS
dp PKIX1.Dss-Sig-Value
r 42
s 47
EOS
system "#{bin}/asn1Coding", "pkix.asn", "assign.asn1"
assert_match /Decoding: SUCCESS/, shell_output("#{bin}/asn1Decoding pkix.asn assign.out PKIX1.Dss-Sig-Value 2>&1")
end
end