2014-11-08 06:47:33 +00:00
|
|
|
require "formula"
|
2011-05-20 17:47:37 +00:00
|
|
|
|
|
|
|
class Asn1c < Formula
|
2014-11-08 06:47:33 +00:00
|
|
|
homepage "http://lionet.info/asn1c/blog/"
|
|
|
|
url "http://lionet.info/soft/asn1c-0.9.26.tar.gz"
|
|
|
|
sha1 "9b1d86b91d37884419f9f062ecd787e293c48637"
|
2011-05-20 17:47:37 +00:00
|
|
|
|
2014-11-08 06:55:59 +00:00
|
|
|
bottle do
|
2014-11-08 17:01:06 +00:00
|
|
|
revision 2
|
|
|
|
sha1 "13d1abf02f41bda023a710543c39cb4c49c1f8c8" => :yosemite
|
|
|
|
sha1 "b0cacad03fb2176aa56521f634785af7062020cb" => :mavericks
|
|
|
|
sha1 "705befca80634eaa5a1aa4cebe18a75a0d618b99" => :mountain_lion
|
2014-11-08 06:55:59 +00:00
|
|
|
end
|
|
|
|
|
2011-05-20 17:47:37 +00:00
|
|
|
def install
|
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
|