2011-05-20 17:47:37 +00:00
|
|
|
class Asn1c < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Compile ASN.1 specifications into C source code"
|
2016-01-06 16:02:22 +00:00
|
|
|
homepage "http://lionet.info/asn1c/blog/"
|
2015-08-06 22:32:45 +00:00
|
|
|
url "https://github.com/vlm/asn1c/releases/download/v0.9.27/asn1c-0.9.27.tar.gz"
|
|
|
|
mirror "http://lionet.info/soft/asn1c-0.9.27.tar.gz"
|
|
|
|
sha256 "025f64e1c27211b36e181350b52fde34ad23f4330fff96b2563ed3fda7b0db9e"
|
2011-05-20 17:47:37 +00:00
|
|
|
|
2014-11-08 06:55:59 +00:00
|
|
|
bottle do
|
2016-02-23 13:07:27 +00:00
|
|
|
sha256 "c5fe1a7eafbd35d91566118f3e0f29ac27e5f8dd769f038bc34fa2eb4873723a" => :el_capitan
|
2015-09-15 10:35:13 +00:00
|
|
|
sha256 "d3ea138d06691c9aa0589efb8d55bb908d79b65d3b6775e02f21cbabddee284c" => :yosemite
|
|
|
|
sha256 "8be35afe4531688fb5bfbe4212e989151c75523882404cb0f4362c0c558ba033" => :mavericks
|
|
|
|
sha256 "ea5675912a725aeef51f51c6a0754f174a1254aeaa581ffa491cc2c50df71310" => :mountain_lion
|
2014-11-08 06:55:59 +00:00
|
|
|
end
|
|
|
|
|
2015-08-06 22:32:45 +00:00
|
|
|
head do
|
|
|
|
url "https://github.com/vlm/asn1c.git"
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "libtool" => :build
|
|
|
|
end
|
|
|
|
|
2011-05-20 17:47:37 +00:00
|
|
|
def install
|
2015-08-06 22:32:45 +00:00
|
|
|
system "autoreconf", "-iv" if build.head?
|
2014-11-08 06:47:33 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
2011-05-20 17:47:37 +00:00
|
|
|
"--prefix=#{prefix}",
|
2013-01-27 01:44:45 +00:00
|
|
|
"--mandir=#{man}"
|
2014-11-08 06:47:33 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.asn1").write <<-EOS.undent
|
|
|
|
MyModule DEFINITIONS ::=
|
|
|
|
BEGIN
|
|
|
|
|
|
|
|
MyTypes ::= SEQUENCE {
|
|
|
|
myObjectId OBJECT IDENTIFIER,
|
|
|
|
mySeqOf SEQUENCE OF MyInt,
|
|
|
|
myBitString BIT STRING {
|
|
|
|
muxToken(0),
|
|
|
|
modemToken(1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
MyInt ::= INTEGER (0..65535)
|
|
|
|
|
|
|
|
END
|
|
|
|
EOS
|
|
|
|
|
|
|
|
system "#{bin}/asn1c", "test.asn1"
|
2011-05-20 17:47:37 +00:00
|
|
|
end
|
|
|
|
end
|