forked from lotia/homebrew-versions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
protobuf240a.rb
37 lines (30 loc) · 1017 Bytes
/
protobuf240a.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require 'formula'
class Protobuf240a < Formula
homepage 'http://code.google.com/p/protobuf/'
url 'http://protobuf.googlecode.com/files/protobuf-2.4.0a.tar.bz2'
sha1 '5816b0dd686115c3d90c3beccf17fd89432d3f07'
keg_only 'Conflicts with protobuf in main repository.'
option :universal
fails_with :llvm do
build 2334
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 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}
EOS
end
end