2f2b7dc518
The source distribution includes editor extensions for emacs and vi, as well as an examples directory. In the debian package protobuf-compiler, the directories are installed in share/doc/protobuf-compiler, so this commit installs them into share/doc/protobuf. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
35 lines
1,004 B
Ruby
35 lines
1,004 B
Ruby
require 'formula'
|
|
|
|
class Protobuf < Formula
|
|
homepage 'http://code.google.com/p/protobuf/'
|
|
url 'http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2'
|
|
sha1 'df5867e37a4b51fb69f53a8baf5b994938691d6d'
|
|
|
|
fails_with_llvm :build => 2334
|
|
|
|
def options
|
|
[['--universal', 'Do a universal build']]
|
|
end
|
|
|
|
def install
|
|
# Don't build in debug mode. See:
|
|
# https://github.com/mxcl/homebrew/issues/9279
|
|
# http://code.google.com/p/protobuf/source/browse/trunk/configure.ac#61
|
|
ENV.prepend 'CXXFLAGS', '-DNDEBUG'
|
|
ENV.universal_binary if ARGV.build_universal?
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
"--prefix=#{prefix}",
|
|
"--with-zlib"
|
|
system "make"
|
|
system "make install"
|
|
|
|
# Install editor support and examples
|
|
doc.install %w( editors examples )
|
|
end
|
|
|
|
def caveats; <<-EOS.undent
|
|
Editor support and examples have been installed to:
|
|
#{doc}/protobuf
|
|
EOS
|
|
end
|
|
end
|