Skip to content

Commit

Permalink
re2: fix soname overwriting
Browse files Browse the repository at this point in the history
The re2 formula has been overwriting the soname of the libre2 shared
library to 0 even though it has changed to 1 [0], 6 [1] and, most
recently, 7 [2]. This means that any software linking to the library
isn't aware of breaking ABI changes [3].

Fix this by no longer changing the soname to 0 and remove the extra
symlinks as re2 itself will generate symlinks from libre2.dylib and
libre2.7.dylib to the relevant version.

  [0]: google/re2@f734980#diff-b67911656ef5d18c4ae36cb6741b7965
  [1]: google/re2@d067ca5#diff-b67911656ef5d18c4ae36cb6741b7965
  [2]: google/re2@ac65d45#diff-b67911656ef5d18c4ae36cb6741b7965
  [3]: mudge/re2#43

Closes #54136.

Signed-off-by: Bo Anderson <[email protected]>
  • Loading branch information
mudge authored and Bo98 committed May 2, 2020
1 parent 3f7e0b5 commit a0c61ee
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Formula/re2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Re2 < Formula
url "https://github.com/google/re2/archive/2020-05-01.tar.gz"
version "20200501"
sha256 "88864d7f5126bb17daa1aa8f41b05599aa6e3222e7b28a90e372db53c1c49aeb"
revision 1
head "https://github.com/google/re2.git"

bottle do
Expand All @@ -17,9 +18,6 @@ def install
ENV.cxx11

system "make", "install", "prefix=#{prefix}"
MachO::Tools.change_dylib_id("#{lib}/libre2.7.0.0.dylib", "#{lib}/libre2.0.dylib")
lib.install_symlink "libre2.7.0.0.dylib" => "libre2.0.dylib"
lib.install_symlink "libre2.7.0.0.dylib" => "libre2.dylib"
end

test do
Expand Down

0 comments on commit a0c61ee

Please sign in to comment.