Skip to content

Commit 2893a6a

Browse files
committed
rust: Fix rustlib dylib IDs in post_install.
This is the less invasive version of Homebrew/brew#2764.
1 parent b97df7a commit 2893a6a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Formula/rust.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class Rust < Formula
1919
end
2020

2121
bottle do
22+
rebuild 1
2223
sha256 "330dd281718d164d7415d83a6a8376cb2cc161ecee82e3fb6ba869a885b7fe8b" => :sierra
2324
sha256 "c90ae66966ab11382c50fc49c8ddb6320aa34390f3e76081a592e39a7e48a9fa" => :el_capitan
2425
sha256 "b0cfdaeb92b85192846d864f20fb6ca3a162163fb549918a223b4eef4eae3d91" => :yosemite
@@ -101,6 +102,13 @@ def install
101102
rm_rf prefix/"lib/rustlib/install.log"
102103
end
103104

105+
def post_install
106+
Dir[prefix/"lib/rustlib/**/*.dylib"].each do |dylib|
107+
chmod 0755, dylib
108+
MachO::Tools.change_dylib_id(dylib, "@rpath/#{File.basename(dylib)}")
109+
end
110+
end
111+
104112
test do
105113
system "#{bin}/rustdoc", "-h"
106114
(testpath/"hello.rs").write <<-EOS.undent

0 commit comments

Comments
 (0)