diff options
author | Thomas Waldmann <tw@waldmann-edv.de> | 2022-04-14 12:14:15 +0200 |
---|---|---|
committer | Thomas Waldmann <tw@waldmann-edv.de> | 2022-04-14 19:31:55 +0200 |
commit | c592b202623f534930172670f67b793646b81b14 (patch) | |
tree | ac099efb7cb53072012dbc90631022e1854f6556 /setup.py | |
parent | 3ef355a98f882f525a4ac7fa58dd561003e0e70a (diff) |
use openssl on openbsd, fixes #6474
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -23,6 +23,7 @@ sys.path += [os.path.dirname(__file__)] import setup_docs is_win32 = sys.platform.startswith('win32') +is_openbsd = sys.platform.startswith('openbsd') # Number of threads to use for cythonize, not used on windows cpu_threads = multiprocessing.cpu_count() if multiprocessing and multiprocessing.get_start_method() != 'spawn' else None @@ -156,9 +157,15 @@ if not on_rtd: f"or ensure {lib_pkg_name}.pc is in PKG_CONFIG_PATH." ) + crypto_ldflags = [] if is_win32: crypto_ext_lib = lib_ext_kwargs( pc, 'BORG_OPENSSL_PREFIX', 'libcrypto', 'libcrypto', '>=1.1.1', lib_subdir='') + elif is_openbsd: + # use openssl (not libressl) because we need AES-OCB and CHACHA20-POLY1305 via EVP api + crypto_ext_lib = lib_ext_kwargs( + pc, 'BORG_OPENSSL_PREFIX', 'crypto', 'libecrypto11', '>=1.1.1') + crypto_ldflags += ['-Wl,-rpath=/usr/local/lib/eopenssl11'] else: crypto_ext_lib = lib_ext_kwargs( pc, 'BORG_OPENSSL_PREFIX', 'crypto', 'libcrypto', '>=1.1.1') @@ -167,6 +174,7 @@ if not on_rtd: dict(sources=[crypto_ll_source, crypto_helpers]), crypto_ext_lib, dict(extra_compile_args=cflags), + dict(extra_link_args=crypto_ldflags), ) compress_ext_kwargs = members_appended( |