forked from lotia/homebrew-versions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprotobuf241.rb
52 lines (43 loc) · 1.44 KB
/
protobuf241.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
require 'formula'
class Protobuf241 < Formula
homepage 'http://code.google.com/p/protobuf/'
url 'http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2'
sha1 'df5867e37a4b51fb69f53a8baf5b994938691d6d'
keg_only 'Conflicts with protobuf in main repository.'
option :universal
fails_with :llvm do
build 2334
end
# make it build with clang and libc++
def patches; DATA; 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}/protobuf
EOS
end
end
__END__
diff --git a/src/google/protobuf/message.cc b/src/google/protobuf/message.cc
index 91e6878..0409a94 100644
--- a/src/google/protobuf/message.cc
+++ b/src/google/protobuf/message.cc
@@ -32,6 +32,7 @@
// Based on original Protocol Buffers design by
// Sanjay Ghemawat, Jeff Dean, and others.
+#include <istream>
#include <stack>
#include <google/protobuf/stubs/hash.h>