Skip to content

Commit

Permalink
plplot: fix @rpath in dylib IDs
Browse files Browse the repository at this point in the history
Closes Homebrew#35036.

Signed-off-by: Chongyu Zhu <i@lembacon.com>
  • Loading branch information
tschoonj authored and lembacon committed Dec 12, 2018
1 parent 0741277 commit 3c3ad61
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Formula/plplot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class Plplot < Formula
homepage "https://plplot.sourceforge.io"
url "https://downloads.sourceforge.net/project/plplot/plplot/5.14.0%20Source/plplot-5.14.0.tar.gz"
sha256 "331009037c9cad9fcefacd7dbe9c7cfae25e766f5590f9efd739a294c649df97"
revision 1

bottle do
sha256 "36438c5bc345b831ea582a17e3fc3ded683015f3df45a9f77ca110fa36065359" => :mojave
Expand Down Expand Up @@ -42,6 +43,16 @@ def install
system "make"
system "make", "install"
end

# fix rpaths
cd (lib.to_s) do
Dir["*.dylib"].select { |f| File.ftype(f) == "file" }.each do |f|
MachO::Tools.dylibs(f).select { |d| d.start_with?("@rpath") }.each do |d|
d_new = d.sub("@rpath", opt_lib.to_s)
MachO::Tools.change_install_name(f, d, d_new)
end
end
end
end

test do
Expand Down

0 comments on commit 3c3ad61

Please sign in to comment.