Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Sep 2024 17:57:11 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 9295e1f45704 - main - devel/jsoncpp: Fix regression in 'find_package(jsoncpp)'
Message-ID:  <202409131757.48DHvBbi042830@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

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

commit 9295e1f45704eac6d89bb2e18ab3eb12565ce56c
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-09-13 17:54:39 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-09-13 17:57:09 +0000

    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>
---
 devel/jsoncpp/Makefile                             |  1 +
 .../files/patch-jsoncppConfig.cmake.meson.in       | 23 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)

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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409131757.48DHvBbi042830>