diff options
Diffstat (limited to 'src/scripts/install.py')
-rwxr-xr-x | src/scripts/install.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/scripts/install.py b/src/scripts/install.py index d1d62b6c5..1d4d27b76 100755 --- a/src/scripts/install.py +++ b/src/scripts/install.py @@ -15,6 +15,7 @@ import os import shutil import string import sys +import subprocess def parse_command_line(args): @@ -174,6 +175,20 @@ def main(args = None): copy_executable(os.path.join(out_dir, app_exe), os.path.join(bin_dir, app_exe)) + # On Darwin, if we are using shared libraries and we install, we should fix + # up the library name, otherwise the botan command won't work; ironically + # we only need to do this because we previously changed it from a setting + # that would be correct for installation to one that lets us run it from + # the build directory + if str(cfg['os']) == 'darwin' and bool(cfg['build_shared_lib']): + soname_abi = process_template('%{soname_abi}') + + subprocess.check_call(['install_name_tool', + '-change', + os.path.join('@executable_path', soname_abi), + os.path.join(lib_dir, soname_abi), + os.path.join(bin_dir, app_exe)]) + if 'botan_pkgconfig' in cfg: pkgconfig_dir = os.path.join(options.destdir, options.libdir, options.pkgconfigdir) makedirs(pkgconfig_dir) |