From ed7bfa107e9e63ddaf9ac4f17482ebff302b8ce3 Mon Sep 17 00:00:00 2001 From: Joel Bion Date: Wed, 20 Jul 2022 16:01:25 -0700 Subject: [PATCH 1/2] Category: Strengthen LibIDN2 version determination during cmake run --- ChangeLog | 3 +++ cmake/modules/FindLibidn2.cmake | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7bcb12e4..04c2b942 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +* 2022-07-20 + * Strengthen version determination for Libidn2 during cmake processing. + * 2021-06-04: Version 1.7.0 * Make TLS Handshake timeout max 4/5th of timeout for the query, just like connection setup timeout was, so fallback transport diff --git a/cmake/modules/FindLibidn2.cmake b/cmake/modules/FindLibidn2.cmake index 4ea374f5..c56d5b61 100644 --- a/cmake/modules/FindLibidn2.cmake +++ b/cmake/modules/FindLibidn2.cmake @@ -53,8 +53,8 @@ if (LIBIDN2_INCLUDE_DIR AND LIBIDN2_LIBRARY) endif () if (NOT LIBIDN2_VERSION AND LIBIDN2_INCLUDE_DIR AND EXISTS "${LIBIDN2_INCLUDE_DIR}/unbound.h") - file(STRINGS "${LIBIDN2_INCLUDE_DIR}/idn2.h" LIBIDN2_H REGEX "^#define IDN2_VERSION ") - string(REGEX REPLACE "^.*IDN2_VERSION \"([0-9.]+)\".*$" "\\1" LIBIDN2_VERSION "${LIBIDN2_H}") + file(STRINGS "${LIBIDN2_INCLUDE_DIR}/idn2.h" LIBIDN2_H REGEX "^[ \t]*#[ \t]*define[ \t]+IDN2_VERSION[ \t]") + string(REGEX REPLACE "^.*IDN2_VERSION[ \t]+\"([0-9.]+)\".*$" "\\1" LIBIDN2_VERSION "${LIBIDN2_H}") endif () endif() From 9d8eea97a523d828b7d1a04352bbd2202b914519 Mon Sep 17 00:00:00 2001 From: Sara Dickinson Date: Thu, 21 Jul 2022 14:17:53 +0100 Subject: [PATCH 2/2] Fix typo in cmake module for libidn2 --- ChangeLog | 3 ++- cmake/modules/FindLibidn2.cmake | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04c2b942..da146af9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ * 2022-07-20 - * Strengthen version determination for Libidn2 during cmake processing. + * Strengthen version determination for Libidn2 during cmake processing (thanks + jpbion). * 2021-06-04: Version 1.7.0 * Make TLS Handshake timeout max 4/5th of timeout for the query, diff --git a/cmake/modules/FindLibidn2.cmake b/cmake/modules/FindLibidn2.cmake index c56d5b61..0ddcbc28 100644 --- a/cmake/modules/FindLibidn2.cmake +++ b/cmake/modules/FindLibidn2.cmake @@ -52,7 +52,7 @@ if (LIBIDN2_INCLUDE_DIR AND LIBIDN2_LIBRARY) ) endif () - if (NOT LIBIDN2_VERSION AND LIBIDN2_INCLUDE_DIR AND EXISTS "${LIBIDN2_INCLUDE_DIR}/unbound.h") + if (NOT LIBIDN2_VERSION AND LIBIDN2_INCLUDE_DIR AND EXISTS "${LIBIDN2_INCLUDE_DIR}/idn2.h") file(STRINGS "${LIBIDN2_INCLUDE_DIR}/idn2.h" LIBIDN2_H REGEX "^[ \t]*#[ \t]*define[ \t]+IDN2_VERSION[ \t]") string(REGEX REPLACE "^.*IDN2_VERSION[ \t]+\"([0-9.]+)\".*$" "\\1" LIBIDN2_VERSION "${LIBIDN2_H}") endif ()