File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,15 @@ def fix_rpaths
132132 rel_path = Pathname . new ( $tea_prefix) . relative_path_from ( Pathname . new ( @file . filename ) . parent )
133133 rpath = "@loader_path/#{ rel_path } "
134134
135+ # rewrite any rpaths the tool itself set to be relative
136+ @file . rpaths . each do |rpath |
137+ if rpath . start_with? $tea_prefix
138+ diff = Pathname . new ( rpath ) . relative_path_from ( Pathname . new ( @file . filename ) . parent )
139+ @file . change_rpath rpath , "@loader_path/#{ diff } "
140+ dirty = true
141+ end
142+ end
143+
135144 if not @file . rpaths . include? rpath and links_to_other_tea_libs?
136145 @file . add_rpath rpath
137146 dirty = true
@@ -174,12 +183,12 @@ def fix_install_names
174183 def fix_tea_prefix s
175184 s = Pathname . new ( s ) . relative_path_from ( Pathname . new ( $tea_prefix) )
176185 s = s . sub ( %r{/v(\d +)\. (\d +\. )+\d +[a-z]?/} , '/v\1/' )
186+ s = s . sub ( %r{[-.]\d +(\. \d +)*\. dylib$} , '.dylib' )
177187
178- #FIXME we need to figure this out by resolving links and shit
179- ss = s . sub ( %r{[-.]\d +(\. \d +)*\. dylib$} , '.dylib' )
180- s = ss if File . exist? ss
188+ abort "#{ s } doesn’t exist!" unless File . exist? ( File . join ( $tea_prefix, s ) )
181189
182190 s = "@rpath/#{ s } "
191+
183192 return s
184193 end
185194
You can’t perform that action at this time.
0 commit comments