Created attachment 173657 [details] fix build of qt5-network with libressl Add patch to fix build with LibreSSL
Also see https://github.com/libressl-portable/openbsd/issues/33 and http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/x11/qt5/patches/patch-qtbase_src_network_ssl_qsslcontext_openssl_cpp?rev=1.1&content-type=text/x-cvsweb-markup
Can confirm that this works with LibreSSL 2.4 (in base) https://builds.ixsystems.com/devastator/data/master-trueosports/2016-08-11_18h03m08s/logs/py27-qt5-network-5.5.1.log
I've submitted this upstream for a double-check: https://codereview.qt-project.org/#/c/168666/ and will land this patch in the upcoming week (hopefully I'll get a comment in Gerrit soon).
Please see https://codereview.qt-project.org/#/c/161039/ At the time I tried adding support to LibreSSL on OpenBSD so we had that discussion here also already. I guess as long as there is no real commitment to support LibreSSL in Qt, it won't happen anytime soon.
As Loise predicted, my patch was rejected upstream: it had already been submitted once before, and upstream does not want to complicate the OpenSSL code even further. People are welcome to submit and maintain a separate LibreSSL backend upstream though. More information here: https://codereview.qt-project.org/#/c/154800/ For now, I'm merging the patch so it also gets into 2016Q3 and people use it with Qt 5.5 while we don't update the ports tree to 5.6.
A commit references this bug: Author: rakuco Date: Tue Aug 23 14:23:05 UTC 2016 New revision: 420681 URL: https://svnweb.freebsd.org/changeset/ports/420681 Log: Fix the build with LibreSSL. LibreSSL does not define SSL_CTRL_SET_CURVES, so check for the macro's existence before using it. I'm committing this mostly to get it into the 2016Q3 branch so it lives a bit longer: starting with Qt 5.6, upstream explicitly does not support LibreSSL and fails at configuration time if it is detected (the rationale being that they do not want to make the OpenSSL backend code even more confusing with additional checks and code paths for LibreSSL; patches adding a separate LibreSSL backend are more than welcome, but someone needs to write the code and maintain it). PORTREVISION is not being bumped because the LibreSSL build was simply broken before, and the patch does not change anything for OpenSSL users. PR: 211832 Submitted by: matthew@reztek.cz MFH: 2016Q3 Changes: head/net/qt5-network/files/patch-src_network_ssl_qsslcontext__openssl.cpp
A commit references this bug: Author: rakuco Date: Tue Aug 23 15:38:11 UTC 2016 New revision: 420703 URL: https://svnweb.freebsd.org/changeset/ports/420703 Log: MFH: r420681 Fix the build with LibreSSL. LibreSSL does not define SSL_CTRL_SET_CURVES, so check for the macro's existence before using it. I'm committing this mostly to get it into the 2016Q3 branch so it lives a bit longer: starting with Qt 5.6, upstream explicitly does not support LibreSSL and fails at configuration time if it is detected (the rationale being that they do not want to make the OpenSSL backend code even more confusing with additional checks and code paths for LibreSSL; patches adding a separate LibreSSL backend are more than welcome, but someone needs to write the code and maintain it). PORTREVISION is not being bumped because the LibreSSL build was simply broken before, and the patch does not change anything for OpenSSL users. PR: 211832 Submitted by: matthew@reztek.cz Approved by: ports-secteam (feld) Changes: _U branches/2016Q3/ branches/2016Q3/net/qt5-network/files/patch-src_network_ssl_qsslcontext__openssl.cpp