Commits
204 204 | modCmd = ['casa-source/casatools/scripts/mod-closure', 'casatelemetry'] |
205 205 | print(' '.join(modCmd)) |
206 206 | proc = Popen( modCmd, stdout=PIPE, stderr=PIPE,cwd=cwd ) |
207 207 | out,err = pipe_decode(proc.communicate( )) |
208 208 | print(out,err) |
209 209 | |
210 210 | # Fix paths on Big Sur |
211 211 | if sys.platform == 'darwin' and int(platform.release().split(".")[0])>19 : |
212 212 | |
213 213 | casalib = os.readlink("./build/darwin/lib/libcasa_casa.dylib") |
214 + | ncurseslib = os.readlink("/opt/casa/03/lib/libncurses.dylib") |
215 + | readlinelib = os.readlink("/opt/casa/03/lib/libreadline.8.dylib") |
214 216 | print ("casalib:" + casalib) |
215 217 | print("Fixing paths on Bigsur") |
216 218 | modCmd = ['install_name_tool', '-change', cwd +"/build/codebuild/breakpad/breakpad-distro/src/client/mac/build/Release/Breakpad.framework/Resources/breakpadUtilities.dylib", "@rpath/breakpadUtilities.dylib", cwd+"/casatelemetry/lib/Breakpad"] |
217 219 | print(' '.join(modCmd)) |
218 220 | proc = Popen( modCmd, stdout=PIPE, stderr=PIPE,cwd=cwd ) |
219 221 | out,err = pipe_decode(proc.communicate( )) |
220 222 | print(out,err) |
221 223 | |
222 224 | modCmd = ['install_name_tool', '-change', cwd +"/build/codebuild/breakpad/breakpad-distro/src/client/mac/build/Release/Breakpad.framework/Versions/A/Breakpad", "@rpath/Breakpad", cwd+"/casatelemetry/lib/_CrashReporter.so"] |
223 225 | print(' '.join(modCmd)) |
224 226 | proc = Popen( modCmd, stdout=PIPE, stderr=PIPE,cwd=cwd ) |
225 227 | out,err = pipe_decode(proc.communicate( )) |
226 228 | print(out,err) |
227 229 | |
228 230 | modCmd = ['install_name_tool', '-change', cwd +"/build/darwin/lib/" + casalib, "@rpath/" + casalib, cwd+"/casatelemetry/lib/_CrashReporter.so"] |
229 231 | print(' '.join(modCmd)) |
230 232 | proc = Popen( modCmd, stdout=PIPE, stderr=PIPE,cwd=cwd ) |
231 233 | out,err = pipe_decode(proc.communicate( )) |
232 234 | print(out,err) |
233 235 | |
234 - | modCmd = ['install_name_tool', '-change', cwd +"/build/darwin/lib/" + casalib, "@rpath" + casalib, cwd+"/casatelemetry/lib/_CrashReporter.so"] |
236 + | modCmd = ['install_name_tool', '-change', "/opt/casa/03/lib" + ncurseslib, "@rpath/" + ncurseslib, cwd+"/casatelemetry/lib/"+casalib] |
235 237 | print(' '.join(modCmd)) |
236 238 | proc = Popen( modCmd, stdout=PIPE, stderr=PIPE,cwd=cwd ) |
237 239 | out,err = pipe_decode(proc.communicate( )) |
238 240 | print(out,err) |
239 241 | |
240 - | modCmd = ['install_name_tool', '-change', cwd +"/build/darwin/lib/" + casalib, "@rpath" + casalib, cwd+"/casatelemetry/lib/_CrashReporter.so"] |
241 - | print(' '.join(modCmd)) |
242 - | proc = Popen( modCmd, stdout=PIPE, stderr=PIPE,cwd=cwd ) |
243 - | out,err = pipe_decode(proc.communicate( )) |
244 - | print(out,err) |
245 - | |
246 - | # Re-run mod-closure to fix remaining rpaths |
247 - | print("Running mod-closure") |
248 - | modCmd = ['casa-source/casatools/scripts/mod-closure', 'casatelemetry'] |
242 + | modCmd = ['install_name_tool', '-change', "/opt/casa/03/lib" + readlinelib, "@rpath/" + readlinelib, cwd+"/casatelemetry/lib/"+casalib] |
249 243 | print(' '.join(modCmd)) |
250 244 | proc = Popen( modCmd, stdout=PIPE, stderr=PIPE,cwd=cwd ) |
251 245 | out,err = pipe_decode(proc.communicate( )) |
252 246 | print(out,err) |
253 247 | |
254 248 | # Remove libobj on Mac |
255 249 | if sys.platform == 'darwin': |
256 250 | print ("Removing " + libdir + "/libobjc.A.dylib") |
257 251 | if os.path.exists(libdir + "/libobjc.A.dylib"): |
258 252 | os.remove(libdir + "/libobjc.A.dylib") |