From 8f500460ad6a7235e3a5a2ad55a34cae400a96c6 Mon Sep 17 00:00:00 2001 From: Alastair Poole Date: Tue, 3 Dec 2019 18:50:38 +0000 Subject: [PATCH] FreeBSD: Link against OpenSSL in base. Summary: When pulling in OpenSSL and building against the port there are some linker complications. For example, doing a TLS HTTP transaction will crash in libcurl which was built against OpenSSL in base. If we link against FreeBSD's OpenSSL these issues are resolved. Test Plan: On FreeBSD use the openssl port and build EFL against it. 1) Upload a screenshot in E (segv). 2) Click on a link to image in terminology over HTTPS (segv). Reviewers: bu5hm4n, raster Reviewed By: raster Subscribers: cedric, Peter2121, #reviewers, q66, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10789 --- meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 702e38390b..8cffb359d8 100644 --- a/meson.build +++ b/meson.build @@ -211,7 +211,12 @@ else error('System '+host_machine.system()+' not known') endif -if (get_option('crypto') == 'gnutls') +if host_os == 'freebsd' or host_os == 'dragonfly' +# This is necessary. We MUST use OpenSSL in base as bringing in +# from ports can cause major issues (2 copies of the same library). + crypto = declare_dependency(link_args : [ '-lssl', '-lcrypto']) + config_h.set('HAVE_OPENSSL', '1') +elif (get_option('crypto') == 'gnutls') # gcrypt does not want to provide a pkg config file so we try the lib crypto = [dependency('gnutls'), cc.find_library('gcrypt')] config_h.set('HAVE_GNUTLS', '1')