# HG changeset patch # User wenzelm # Date 1518182904 -3600 # Node ID bf5c69acf2beef3abe7f9a5b22516d24c29a526e # Parent 30f412d1d7c30a5297774b16eca7600b5edd56b9 built-in library path for (optional) libgmp on macos; diff -r 30f412d1d7c3 -r bf5c69acf2be src/Pure/Admin/build_polyml.scala --- a/src/Pure/Admin/build_polyml.scala Fri Feb 09 11:47:18 2018 +0100 +++ b/src/Pure/Admin/build_polyml.scala Fri Feb 09 14:28:24 2018 +0100 @@ -169,9 +169,18 @@ File.copy(Path.explode(file).expand_env(settings), target) - /* rpath */ + /* built-in library path */ - if (Platform.is_linux) bash(target, "chrpath -r '$ORIGIN' poly", echo = true).check + if (Platform.is_linux) { + bash(target, "chrpath -r '$ORIGIN' poly", echo = true).check + } + else if (Platform.is_macos) { + for (file <- ldd_files) { + bash(target, + """install_name_tool -change """ + Bash.string(file) + " " + + Bash.string("@executable_path/" + Path.explode(file).base_name) + " poly").check + } + } }