Skip to content
This repository was archived by the owner on Nov 27, 2017. It is now read-only.

Commit c9b6cc5

Browse files
author
Bob W. Hogg
committed
re2: Fix for Linuxbrew
Closes #1028. Signed-off-by: Bob W. Hogg <rwhogg@linux.com>
1 parent d7a525b commit c9b6cc5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Library/Formula/re2.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@ class Re2 < Formula
1616
sha256 "941571b08e34921134c2fc15b5e855f7c2da5a882fd262766fa01dac988990f3" => :mavericks
1717
end
1818

19+
needs :cxx11 unless OS.mac?
20+
1921
def install
22+
ENV.cxx11 unless OS.mac?
2023
system "make", "install", "prefix=#{prefix}"
21-
system "install_name_tool", "-id", "#{lib}/libre2.0.dylib", "#{lib}/libre2.0.0.0.dylib"
22-
lib.install_symlink "libre2.0.0.0.dylib" => "libre2.0.dylib"
23-
lib.install_symlink "libre2.0.0.0.dylib" => "libre2.dylib"
24+
system "install_name_tool", "-id", "#{lib}/libre2.0.dylib", "#{lib}/libre2.0.0.0.dylib" if OS.mac?
25+
ext = OS.mac? ? "dylib" : "so"
26+
lib.install_symlink "libre2.0.0.0.#{ext}" => "libre2.0.#{ext}"
27+
lib.install_symlink "libre2.0.0.0.#{ext}" => "libre2.#{ext}"
2428
end
2529

2630
test do

0 commit comments

Comments
 (0)