FreeBSD: Link against OpenSSL in base. submit/tizen/20191203.210336
authorAlastair Poole <netstar@gmail.com>
Tue, 3 Dec 2019 18:50:38 +0000 (18:50 +0000)
committerJongmin Lee <jm105.lee@samsung.com>
Tue, 3 Dec 2019 20:55:42 +0000 (05:55 +0900)
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

index 8765c38..2c1e5a1 100644 (file)
@@ -210,7 +210,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')