2013-06-19 06:17:34 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Re2 < Formula
|
|
|
|
homepage 'https://code.google.com/p/re2/'
|
2014-03-07 09:09:10 +00:00
|
|
|
url 'https://re2.googlecode.com/files/re2-20140304.tgz'
|
|
|
|
sha1 'f30dda8e530921b623c32aa58a5dabbe9157f6ca'
|
2014-01-16 05:41:28 +00:00
|
|
|
|
2013-06-19 06:17:34 +00:00
|
|
|
head 'https://re2.googlecode.com/hg'
|
|
|
|
|
2014-03-07 09:11:31 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "77343fcc302fa0f85e1ed1483d64a449585386a0" => :mavericks
|
|
|
|
sha1 "b45275dc3b6a80d3e6eae881c5c238f28334167e" => :mountain_lion
|
|
|
|
sha1 "08805163f83f7e7c42316e4c2dd733548b8d7bb3" => :lion
|
|
|
|
end
|
|
|
|
|
2013-06-19 06:17:34 +00:00
|
|
|
def install
|
2014-01-16 05:41:28 +00:00
|
|
|
# https://code.google.com/p/re2/issues/detail?id=99
|
2014-02-10 21:14:30 +00:00
|
|
|
if ENV.compiler != :clang || MacOS.version < :mavericks
|
2014-01-16 05:41:28 +00:00
|
|
|
inreplace 'libre2.symbols.darwin',
|
2014-02-10 21:14:58 +00:00
|
|
|
# operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, re2::StringPiece const&)
|
2014-01-16 05:41:28 +00:00
|
|
|
'__ZlsRNSt3__113basic_ostreamIcNS_11char_traitsIcEEEERKN3re211StringPieceE',
|
2014-02-10 21:14:58 +00:00
|
|
|
# operator<<(std::ostream&, re2::StringPiece const&)
|
2014-01-16 05:41:28 +00:00
|
|
|
'__ZlsRSoRKN3re211StringPieceE'
|
|
|
|
end
|
2013-06-19 06:17:34 +00:00
|
|
|
system "make", "install", "prefix=#{prefix}"
|
2014-01-16 05:41:28 +00:00
|
|
|
mv lib/"libre2.so.0.0.0", lib/"libre2.0.0.0.dylib"
|
|
|
|
ln_s "libre2.0.0.0.dylib", lib/"libre2.0.dylib"
|
|
|
|
ln_s "libre2.0.0.0.dylib", lib/"libre2.dylib"
|
2013-06-19 06:17:34 +00:00
|
|
|
end
|
|
|
|
end
|