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
This commit is contained in:
Alastair Poole 2019-12-03 18:50:38 +00:00
parent da0a72bb70
commit 8f500460ad
1 changed files with 6 additions and 1 deletions

View File

@ -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')