Created attachment 191742 [details] patch LibreSSL 2.7 changes API, which breaks build. This patch fixes it. Verified against LibreSSL 2.6, 2.7 and base OpenSSL.
The attached patch-libarchive-archive_openssl_evp_private.h (the first patch) does not apply, because it looks like you ran make makepatch after applying the old version of this patch: --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) +-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \ ++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) This results in patch trying to find the macro looking for either the OpenSSL version less than 1.1 or any LibreSSL version, which does not appear in the original unpatched source.
Created attachment 191797 [details] patch Sorry, this one should apply.
A commit references this bug: Author: glewis Date: Tue Mar 27 07:07:17 UTC 2018 New revision: 465666 URL: https://svnweb.freebsd.org/changeset/ports/465666 Log: . Fix the build with libressl-devel PR: 226853 Submitted by: Piotr Kubaj <pkubaj@anongoth.pl> Changes: head/archivers/libarchive/files/patch-libarchive-archive_openssl_evp_private.h head/archivers/libarchive/files/patch-libarchive_openssl_hmac_private.h
Patch committed. Thanks!
For reference, add upstream pull-request https://github.com/libarchive/libarchive/pull/1005