Skip to content

Commit

Permalink
protobuf-swift 1.6.2 (new formula)
Browse files Browse the repository at this point in the history
Closes Homebrew/legacy-homebrew#39101.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
  • Loading branch information
alexeyxo authored and MikeMcQuaid committed Jun 18, 2015
1 parent 8dfdc64 commit 29d39f7
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Formula/protobuf-swift.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
class ProtobufSwift < Formula
desc "An implementation of Protocol Buffers in Swift."
homepage "https://github.com/alexeyxo/protobuf-swift"
url "https://github.com/alexeyxo/protobuf-swift/archive/1.6.2.tar.gz"
sha256 "403ceaf16458765a7c0e8357468fd9da1b3b8113e2db530da5b65973dbf645c7"

depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "protobuf"

def install
system "./autogen.sh"
system "./configure", "--prefix=#{prefix}"
system "make"
system "make", "install"
end

test do
testdata = <<-EOS.undent
enum Flavor{
CHOCOLATE = 1;
VANILLA = 2;
}
message IceCreamCone {
optional int32 scoops = 1;
optional Flavor flavor = 2;
}
EOS
(testpath/"test.proto").write(testdata)
system "protoc", "test.proto", "--swift_out=."
end
end

0 comments on commit 29d39f7

Please sign in to comment.