From 6eb7588d45b7b793b11f67788a2c27eeb0d7796e Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Mon, 13 Mar 2017 16:23:58 +0100 Subject: [PATCH] OpenBSD does not have 3 digit soname and library symlinks. Set library name for openbsd to libbotan-2.so.0.0 and do not install symlinks. --- src/build-data/os/openbsd.txt | 4 +++- src/scripts/install.py | 16 ++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/build-data/os/openbsd.txt b/src/build-data/os/openbsd.txt index 0e60abd2e7a..89d291ddccf 100644 --- a/src/build-data/os/openbsd.txt +++ b/src/build-data/os/openbsd.txt @@ -1,6 +1,8 @@ os_type unix -soname_suffix "so" +soname_pattern_base "libbotan-{version_major}.so" +soname_pattern_abi "libbotan-{version_major}.so.{abi_rev}" +soname_pattern_patch "libbotan-{version_major}.so.{abi_rev}.{version_minor}" clock_gettime diff --git a/src/scripts/install.py b/src/scripts/install.py index 3384534d6e2..0a9683ca0c3 100755 --- a/src/scripts/install.py +++ b/src/scripts/install.py @@ -176,14 +176,14 @@ class PercentSignTemplate(string.Template): copy_executable(os.path.join(out_dir, soname_patch), os.path.join(lib_dir, soname_patch)) - prev_cwd = os.getcwd() - - try: - os.chdir(lib_dir) - force_symlink(soname_patch, soname_abi) - force_symlink(soname_patch, soname_base) - finally: - os.chdir(prev_cwd) + if target_os != "openbsd": + prev_cwd = os.getcwd() + try: + os.chdir(lib_dir) + force_symlink(soname_patch, soname_abi) + force_symlink(soname_patch, soname_base) + finally: + os.chdir(prev_cwd) copy_executable(os.path.join(out_dir, app_exe), os.path.join(bin_dir, app_exe))