File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -79,23 +79,25 @@ def repackage_dependency(dep)
79
79
note "Packaging #{ dep . name } …"
80
80
81
81
FileUtils . mkdir ( TARGET_FRAMEWORKS_PATH ) unless Dir . exist? ( TARGET_FRAMEWORKS_PATH )
82
+ packaged_path = File . join ( TARGET_FRAMEWORKS_PATH , dep . name )
82
83
83
84
case dep . type
84
85
when ".dylib"
85
- if File . exist? ( File . join ( TARGET_FRAMEWORKS_PATH , dep . name ) )
86
+ if File . exist? packaged_path
86
87
warn "#{ dep . path } already in Frameworks directory, removing"
87
- FileUtils . rm File . join ( TARGET_FRAMEWORKS_PATH , dep . name )
88
+ FileUtils . rm packaged_path
88
89
end
89
90
90
91
note "Copying #{ dep [ :path ] } to TARGET_FRAMEWORKS_PATH"
91
92
FileUtils . cp dep [ :path ] , TARGET_FRAMEWORKS_PATH
93
+ FileUtils . chmod "u=rw" , packaged_path
92
94
93
95
out = `install_name_tool -change #{ dep . path } "@rpath/#{ dep . name } " #{ dep . executable } `
94
96
if $? != 0
95
97
err "install_name_tool failed with error #{ $?} :\n #{ out } "
96
98
end
97
99
98
- dep . path = File . join ( TARGET_FRAMEWORKS_PATH , dep . name )
100
+ dep . path = packaged_path
99
101
dep . install_name = "@rpath/#{ dep . name } "
100
102
dep . is_packaged = true
101
103
else
You can’t perform that action at this time.
0 commit comments