Calculate relative path from absolute paths

Seems to work without any kind of workarounds.
This commit is contained in:
TheAssassin
2018-06-08 11:36:18 +02:00
parent 720dd68d56
commit fa2b463363

View File

@@ -243,8 +243,9 @@ namespace linuxdeploy {
} else {
rpathDestination = destination.parent_path().string();
}
// FIXME: adding / to "fake" root to calculate proper relative path
rpath = "$ORIGIN/" + bf::relative("/usr/lib", "/" + rpathDestination).string() + ":$ORIGIN";
auto relPath = bf::relative(bf::absolute(appDirPath) / "usr/lib", bf::absolute(rpathDestination));
rpath = "$ORIGIN/" + relPath.string() + ":$ORIGIN";
}
setElfRPathOperations[destinationPath / path.filename()] = rpath;