The two below patches (and using --compiler clang) ended up doing the trick. This was from information Sevan Janiyan sent to the list back in April. I'm unsure if these patches belong in the tree, or whether they're highly specific to OpenBSD and might mess up other platforms. Anyhow, it bootstrapped fine and it looks like things are building properly. Cheers!
Index: pkgtools/pkg_install/files/lib/pkcs7.c
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkg_install/files/lib/pkcs7.c,v
retrieving revision 1.6
diff -u -p -u -r1.6 pkcs7.c
--- pkgtools/pkg_install/files/lib/pkcs7.c 24 Oct 2017 15:54:31 -0000 1.6
+++ pkgtools/pkg_install/files/lib/pkcs7.c 5 Apr 2018 20:50:09 -0000
@@ -55,7 +55,8 @@ __RCSID("$NetBSD: pkcs7.c,v 1.6 2017/10/
#define NS_ANY_CA (NS_SSL_CA|NS_SMIME_CA|NS_OBJSIGN_CA)
#endif
-#if !defined(OPENSSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x10100000L)
+#if !defined(OPENSSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x10100000L) || \
+ defined(LIBRESSL_VERSION_NUMBER)
#define X509_get_extended_key_usage(x) x->ex_xkusage
#define X509_get_extension_flags(x) x->ex_flags
#endif
Index: archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h
===================================================================
RCS file:
/cvsroot/pkgsrc/archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h,v
retrieving revision 1.1.1.2
diff -u -p -u -r1.1.1.2 archive_openssl_hmac_private.h
--- archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h
1 Aug 2017 22:21:17 -0000 1.1.1.2
+++ archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h
5 Apr 2018 20:50:09 -0000
@@ -28,7 +28,8 @@
#include <openssl/hmac.h>
#include <openssl/opensslv.h>
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
#include <stdlib.h> /* malloc, free */
#include <string.h> /* memset */
static inline HMAC_CTX *HMAC_CTX_new(void)