Created attachment 155143 [details] patch to compile with libressl devel/qca fails to compile with libressl: [100%] Building CXX object plugins/qca-gnupg/CMakeFiles/qca-gnupg.dir/moc_gpgaction.cxx.o cd /wrkdirs/usr/ports/devel/qca/work/.build/plugins/qca-gnupg && /usr/bin/c++ -DQCA_SYSTEMSTORE_PATH=\"/usr/local/share/certs/ca-root-nss.crt\" -DQT_CORE_LIB -DQT_NO_DEBUG -Dqca_gnupg_EXPORTS -O2 -pipe -fstack-protector -fno-strict-aliasing -O2 -pipe -fstack-protector -fno-strict-aliasing -fPIC -I/wrkdirs/usr/ports/devel/qca/work/.build/plugins/qca-gnupg -I/wrkdirs/usr/ports/devel/qca/work/qca-2.1.0/plugins/qca-gnupg -I/wrkdirs/usr/ports/devel/qca/work/qca-2.1.0/include/QtCrypto -I/wrkdirs/usr/ports/devel/qca/work/.build -I/wrkdirs/usr/ports/devel/qca/work/qca-2.1.0/plugins/qca-gnupg/gpgproc -isystem /usr/local/include/qt4 -isystem /usr/local/include/qt4/QtCore -isystem /usr/local/share/qt4/mkspecs/default -o CMakeFiles/qca-gnupg.dir/moc_gpgaction.cxx.o -c /wrkdirs/usr/ports/devel/qca/work/.build/plugins/qca-gnupg/moc_gpgaction.cxx --- plugins/qca-ossl/CMakeFiles/qca-ossl.dir/all --- /wrkdirs/usr/ports/devel/qca/work/qca-2.1.0/plugins/qca-ossl/qca-ossl.cpp:5804:47: error: no member named 'compress_meth' in 'ssl_session_st' sessInfo.isCompressed = (0 != ssl->session->compress_meth); ~~~~~~~~~~~~ ^ 1 error generated. *** [plugins/qca-ossl/CMakeFiles/qca-ossl.dir/qca-ossl.cpp.o] Error code 1 audio/clementine depends on devel/qca. I am attaching a patch and poudriere build log.
Created attachment 155144 [details] poudriere log with patch applied
Probably best to find somewhere where it imports ssl and then a try-fail block? as in https://github.com/Sp1l/ports/blob/master/lang/python27/files/patch-Lib_ssl.py Alternatively this I found in tests https://github.com/Sp1l/ports/blob/master/lang/python27/files/patch-Lib_test_test__ssl.py Busy weekend, could perhaps give it a go Sunday or Monday... Thanks for the heads-up, was in my GitHub ports tree yet not in https://wiki.freebsd.org/LibreSSL
Try this... ssl.h -> opensslconf.h -> opensslfeatures.h defines OPENSSL_NO_COMP --- plugins/qca-ossl/qca-ossl.cpp.orig 2014-11-06 09:15:45.000000000 +0100 +++ plugins/qca-ossl/qca-ossl.cpp 2015-04-03 18:39:25.001532367 +0200 @@ -5801,7 +5801,11 @@ { SessionInfo sessInfo; +#ifndef OPENSSL_NO_COMP sessInfo.isCompressed = (0 != ssl->session->compress_meth); +#else + sessInfo.isCompressed = 0; +#fi if (ssl->version == TLS1_VERSION) sessInfo.version = TLS::TLS_v1;
Created attachment 155163 [details] conditional patch to compile with libressl Thanks Bernard! I tweaked the #fi and made a new patch. I will also attach the successful build log.
Created attachment 155164 [details] poudriere build log of updated patch
It looks like this was fixed upstream with a slightly different patch: http://quickgit.kde.org/?p=qca.git&a=commit&h=593de6855a4f4dc26cface3e96de8889f90cb4bb alonso@ is going to land this version soon.
A commit references this bug: Author: alonso Date: Tue Jul 14 19:17:40 UTC 2015 New revision: 392050 URL: https://svnweb.freebsd.org/changeset/ports/392050 Log: Fix build with libressl Add an upstream patch to address OpenSSL compression handling. PR: 199134 Approved by: rakuco (mentor) Obtained from: qca upstream Changes: head/devel/qca/Makefile head/devel/qca/files/patch-git_593de685
Created attachment 158803 [details] Poudriere build log on 9.3-REL It unfortunately does not build on 9.3-REL - see attached poudriere log.
A commit references this bug: Author: alonso Date: Thu Jul 16 05:29:23 UTC 2015 New revision: 392272 URL: https://svnweb.freebsd.org/changeset/ports/392272 Log: Revert 392050 While 392050 fixed the libressl build, it broke compilation against FreeBSD-8 and FreeBSD-9's base openssl. PR: 199134 PR: 201584 Changes: head/devel/qca/Makefile head/devel/qca/files/patch-git_593de685
Can't tell if that patch from upstream works but seems that SSL_SESSION_get_compress_id is not defined in older OpenSSL versions (< 1.0.1?) The original patch using OPENSSL_NO_COMP should work just fine for LibreSSL with the original sessInfo.isCompressed = (0 != ssl->session->compress_meth); construct
A commit references this bug: Author: makc Date: Sat Nov 7 10:26:09 UTC 2015 New revision: 400975 URL: https://svnweb.freebsd.org/changeset/ports/400975 Log: devel/qca: - Fix build with LibreSSL and with old OpenSSL (FreeBSD 9.x) PR: 199134 PR: 204305 Changes: head/devel/qca/files/ head/devel/qca/files/patch-libressl
Committed, thanks!