diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2024-09-13 17:54:39 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2024-09-13 17:57:09 +0000 |
commit | 9295e1f45704eac6d89bb2e18ab3eb12565ce56c (patch) | |
tree | a1d155f9ed858f8e99085ee5bade074bb17619f2 | |
parent | 35ef80124a4501373ea01adb3854bf173e21c4fb (diff) | |
download | ports-9295e1f45704eac6d89bb2e18ab3eb12565ce56c.tar.gz ports-9295e1f45704eac6d89bb2e18ab3eb12565ce56c.zip |
devel/jsoncpp: Fix regression in 'find_package(jsoncpp)'
1.9.6 introduced a regression that find_package is failing:
Unknown CMake command "check_required_components"
Reported by: Vladimir Druzenko <vvd@freebsd.org>
-rw-r--r-- | devel/jsoncpp/Makefile | 1 | ||||
-rw-r--r-- | devel/jsoncpp/files/patch-jsoncppConfig.cmake.meson.in | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/devel/jsoncpp/Makefile b/devel/jsoncpp/Makefile index a05c1bc14a4e..c694b53a7bb1 100644 --- a/devel/jsoncpp/Makefile +++ b/devel/jsoncpp/Makefile @@ -1,5 +1,6 @@ PORTNAME= jsoncpp DISTVERSION= 1.9.6 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= yuri@FreeBSD.org diff --git a/devel/jsoncpp/files/patch-jsoncppConfig.cmake.meson.in b/devel/jsoncpp/files/patch-jsoncppConfig.cmake.meson.in new file mode 100644 index 000000000000..ea15d52a7708 --- /dev/null +++ b/devel/jsoncpp/files/patch-jsoncppConfig.cmake.meson.in @@ -0,0 +1,23 @@ +- workaround for https://github.com/open-source-parsers/jsoncpp/issues/1568 +- [1.9.6 regression] 'find_package(jsoncpp REQUIRED)' fails: Unknown CMake command "check_required_components" + +--- jsoncppConfig.cmake.meson.in.orig 2024-09-13 17:50:33 UTC ++++ jsoncppConfig.cmake.meson.in +@@ -3,6 +3,17 @@ + @MESON_SHARED_TARGET@ + @MESON_STATIC_TARGET@ + ++macro(check_required_components _NAME) ++ foreach(comp ${${_NAME}_FIND_COMPONENTS}) ++ if(NOT ${_NAME}_${comp}_FOUND) ++ if(${_NAME}_FIND_REQUIRED_${comp}) ++ set(${_NAME}_FOUND FALSE) ++ endif() ++ endif() ++ endforeach() ++endmacro() ++ ++ + include ( "${CMAKE_CURRENT_LIST_DIR}/jsoncpp-namespaced-targets.cmake" ) + + check_required_components(JsonCpp) |