- Patch has been created in the json-c source but not yet provided with a 
release
- Patch can be removed when nets version of json-c is released

Signed-off-by: Adolf Belka <adolf.be...@ipfire.org>
---
 lfs/json-c                                               | 7 ++++---
 .../json-c-0.18_allow_build_with_cmake_4.0.0.patch       | 9 +++++++++
 2 files changed, 13 insertions(+), 3 deletions(-)
 create mode 100644 src/patches/json-c-0.18_allow_build_with_cmake_4.0.0.patch

diff --git a/lfs/json-c b/lfs/json-c
index edca5d3b2..2669e3825 100644
--- a/lfs/json-c
+++ b/lfs/json-c
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2024  IPFire Team  <i...@ipfire.org>                     #
+# Copyright (C) 2007-2025  IPFire Team  <i...@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -73,10 +73,11 @@ $(subst %,%_BLAKE2,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && patch -Np1 -i 
$(DIR_SRC)/src/patches/json-c-0.18_allow_build_with_cmake_4.0.0.patch
        cd $(DIR_APP) && mkdir -pv build
        cd $(DIR_APP)/build && cmake .. \
-         -DCMAKE_INSTALL_PREFIX=/usr \
-         -DBUILD_STATIC_LIBS=OFF
+                               -DCMAKE_INSTALL_PREFIX=/usr \
+                               -DBUILD_STATIC_LIBS=OFF
        cd $(DIR_APP)/build && make $(MAKETUNING)
        cd $(DIR_APP)/build && make install
        @rm -rf $(DIR_APP)
diff --git a/src/patches/json-c-0.18_allow_build_with_cmake_4.0.0.patch 
b/src/patches/json-c-0.18_allow_build_with_cmake_4.0.0.patch
new file mode 100644
index 000000000..faff25de5
--- /dev/null
+++ b/src/patches/json-c-0.18_allow_build_with_cmake_4.0.0.patch
@@ -0,0 +1,9 @@
+--- json-c-0.18/apps/CMakeLists.txt.orig       2024-09-15 18:15:01.000000000 
+0200
++++ json-c-0.18/apps/CMakeLists.txt    2025-05-06 19:08:35.807635404 +0200
+@@ -1,5 +1,5 @@
+ 
+-cmake_minimum_required(VERSION 2.8)  # see ../CMakeLists.txt for why 2.8
++cmake_minimum_required(VERSION 3.9...3.12)
+ 
+ if(POLICY CMP0075)
+     cmake_policy(SET CMP0075 NEW)
-- 
2.49.0


Reply via email to