From 2893a6aabb6802523135e54668898ca86ed8b2a6 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Sun, 11 Jun 2017 12:59:59 -0400 Subject: [PATCH 1/4] rust: Fix rustlib dylib IDs in post_install. This is the less invasive version of https://github.com/Homebrew/brew/pull/2764. --- Formula/rust.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Formula/rust.rb b/Formula/rust.rb index 8e9a6a076af1b..733cbda763293 100644 --- a/Formula/rust.rb +++ b/Formula/rust.rb @@ -19,6 +19,7 @@ class Rust < Formula end bottle do + rebuild 1 sha256 "330dd281718d164d7415d83a6a8376cb2cc161ecee82e3fb6ba869a885b7fe8b" => :sierra sha256 "c90ae66966ab11382c50fc49c8ddb6320aa34390f3e76081a592e39a7e48a9fa" => :el_capitan sha256 "b0cfdaeb92b85192846d864f20fb6ca3a162163fb549918a223b4eef4eae3d91" => :yosemite @@ -101,6 +102,13 @@ def install rm_rf prefix/"lib/rustlib/install.log" end + def post_install + Dir[prefix/"lib/rustlib/**/*.dylib"].each do |dylib| + chmod 0755, dylib + MachO::Tools.change_dylib_id(dylib, "@rpath/#{File.basename(dylib)}") + end + end + test do system "#{bin}/rustdoc", "-h" (testpath/"hello.rs").write <<-EOS.undent From 080da638abeeb289d4f04ec27047e084975b3e54 Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Sun, 11 Jun 2017 18:46:10 -0700 Subject: [PATCH 2/4] Create rust.rb --- Formula/rust.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/rust.rb b/Formula/rust.rb index 733cbda763293..d6b9fe7c85052 100644 --- a/Formula/rust.rb +++ b/Formula/rust.rb @@ -1,6 +1,7 @@ class Rust < Formula desc "Safe, concurrent, practical language" homepage "https://www.rust-lang.org/" + revision 1 stable do url "https://static.rust-lang.org/dist/rustc-1.18.0-src.tar.gz" @@ -19,7 +20,6 @@ class Rust < Formula end bottle do - rebuild 1 sha256 "330dd281718d164d7415d83a6a8376cb2cc161ecee82e3fb6ba869a885b7fe8b" => :sierra sha256 "c90ae66966ab11382c50fc49c8ddb6320aa34390f3e76081a592e39a7e48a9fa" => :el_capitan sha256 "b0cfdaeb92b85192846d864f20fb6ca3a162163fb549918a223b4eef4eae3d91" => :yosemite From 78854c85fa90ad2747443655946b1c0ae5ec9b3e Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Sun, 11 Jun 2017 18:50:38 -0700 Subject: [PATCH 3/4] Create rust.rb --- Formula/rust.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/rust.rb b/Formula/rust.rb index d6b9fe7c85052..d3dda928fd891 100644 --- a/Formula/rust.rb +++ b/Formula/rust.rb @@ -103,7 +103,7 @@ def install end def post_install - Dir[prefix/"lib/rustlib/**/*.dylib"].each do |dylib| + Dir["#{lib}/rustlib/**/*.dylib"].each do |dylib| chmod 0755, dylib MachO::Tools.change_dylib_id(dylib, "@rpath/#{File.basename(dylib)}") end From 253ddede3432cedbeaffa91d2929430d8796a1fa Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Sun, 11 Jun 2017 20:51:02 -0700 Subject: [PATCH 4/4] Create rust.rb --- Formula/rust.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Formula/rust.rb b/Formula/rust.rb index d3dda928fd891..13b3fa9817a1f 100644 --- a/Formula/rust.rb +++ b/Formula/rust.rb @@ -104,8 +104,9 @@ def install def post_install Dir["#{lib}/rustlib/**/*.dylib"].each do |dylib| - chmod 0755, dylib + chmod 0664, dylib MachO::Tools.change_dylib_id(dylib, "@rpath/#{File.basename(dylib)}") + chmod 0444, dylib end end