File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1919 - c-ares.org
2020 - vim.org
2121 - tea.xyz/gx/cc
22+ - boost.org
2223 # FIXME? requires a darwin platform to run, and needs
2324 # macOS 12 to test. That'll require a more complex matrix
2425 # using get-platform.
Original file line number Diff line number Diff line change @@ -164,11 +164,8 @@ def bad_install_names
164164 end
165165 elsif lib . start_with? '@rpath'
166166 path = Pathname . new ( lib . sub ( %r{^@rpath} , $tea_prefix) )
167- if path . exist?
168- lib
169- else
170- puts "warn:#{ @file . filename } :#{ lib } "
171- end
167+ puts "warn:#{ @file . filename } :#{ lib } " unless path . exist?
168+ lib
172169 elsif lib . start_with? '@'
173170 puts "warn:#{ @file . filename } :#{ lib } "
174171 # noop
@@ -201,7 +198,13 @@ def fix_tea_prefix s
201198 s = s . relative_path_from ( Pathname . new ( $tea_prefix) )
202199 s = s . sub ( %r{/v(\d +)\. (\d +\. )+\d +[a-z]?/} , '/v\1/' )
203200
204- abort "#{ s } doesn’t exist!" unless File . exist? ( File . join ( $tea_prefix, s ) )
201+ # Some libs, like boost, have @rpath/filename.dylib. They lose the subpath.
202+ # We can fix this.
203+ if !File . exist? ( File . join ( $tea_prefix, s ) )
204+ lib = Pathname . new ( @file . filename ) . parent . join ( Pathname . new ( s ) . basename )
205+ abort "#{ s } doesn’t exist!" unless lib . exist?
206+ s = lib . relative_path_from ( Pathname . new ( $tea_prefix) )
207+ end
205208
206209 s = "@rpath/#{ s } "
207210
You can’t perform that action at this time.
0 commit comments