git: f8b64e6dbb7b - main - dns/powerdns: fix build on 14.0-CURRENT (+ OpenSSL 3.0.9)

From: Fernando Apesteguía <fernape_at_FreeBSD.org>
Date: Thu, 29 Jun 2023 11:42:36 UTC
The branch main has been updated by fernape:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f8b64e6dbb7b56c298a9e38ecc84aa7b1761fe1b

commit f8b64e6dbb7b56c298a9e38ecc84aa7b1761fe1b
Author:     Ralf van der Enden <tremere@cainites.net>
AuthorDate: 2023-06-28 10:06:14 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-06-29 11:42:24 +0000

    dns/powerdns: fix build on 14.0-CURRENT (+ OpenSSL 3.0.9)
    
    This fixes the way OpenSSL is detected (it now uses a non-deprecated function),
    which is not available anymore on 14.0-CURRENT. Doesn't change anything for
    previous versions of FreeBSD.
    
    PR:             272231
    Reported by:    tremere@cainites.net (maintainer)
---
 dns/powerdns/files/patch-m4_pdns__check__libcrypto.m4 | 11 ++++++++++-
 dns/powerdns/files/patch-pdns_auth-main.cc            |  4 ++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/dns/powerdns/files/patch-m4_pdns__check__libcrypto.m4 b/dns/powerdns/files/patch-m4_pdns__check__libcrypto.m4
index 7d4a832a79e6..17d4b4fe78a0 100644
--- a/dns/powerdns/files/patch-m4_pdns__check__libcrypto.m4
+++ b/dns/powerdns/files/patch-m4_pdns__check__libcrypto.m4
@@ -1,4 +1,4 @@
---- m4/pdns_check_libcrypto.m4.orig	2020-11-16 16:30:04 UTC
+--- m4/pdns_check_libcrypto.m4.orig	2023-06-01 06:54:16 UTC
 +++ m4/pdns_check_libcrypto.m4
 @@ -75,8 +75,10 @@ AC_DEFUN([PDNS_CHECK_LIBCRYPTO], [
          for ssldir in $ssldirs; do
@@ -13,3 +13,12 @@
                  LIBCRYPTO_LIBS="-lcrypto"
                  found=true
                  AC_MSG_RESULT([yes])
+@@ -108,7 +110,7 @@ AC_DEFUN([PDNS_CHECK_LIBCRYPTO], [
+     LIBS="$LIBCRYPTO_LIBS $LIBS"
+     CPPFLAGS="$LIBCRYPTO_INCLUDES $CPPFLAGS"
+     AC_LINK_IFELSE(
+-        [AC_LANG_PROGRAM([#include <openssl/crypto.h>], [ERR_load_CRYPTO_strings()])],
++        [AC_LANG_PROGRAM([#include <openssl/bn.h>], [BN_new()])],
+         [
+             AC_MSG_RESULT([yes])
+             AC_CHECK_FUNCS([RAND_bytes RAND_pseudo_bytes CRYPTO_memcmp OPENSSL_init_crypto EVP_MD_CTX_new EVP_MD_CTX_free RSA_get0_key])
diff --git a/dns/powerdns/files/patch-pdns_auth-main.cc b/dns/powerdns/files/patch-pdns_auth-main.cc
index 19c84bfad6ce..38c715a46e17 100644
--- a/dns/powerdns/files/patch-pdns_auth-main.cc
+++ b/dns/powerdns/files/patch-pdns_auth-main.cc
@@ -1,6 +1,6 @@
---- pdns/auth-main.cc.orig	2022-10-19 09:22:23 UTC
+--- pdns/auth-main.cc.orig	2023-06-01 06:54:16 UTC
 +++ pdns/auth-main.cc
-@@ -277,8 +277,8 @@ static void declareArguments()
+@@ -278,8 +278,8 @@ static void declareArguments()
  
    ::arg().setSwitch("no-shuffle", "Set this to prevent random shuffling of answers - for regression testing") = "off";