]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
json-c: Update to CMakeLists.txt min cmake version
authorAdolf Belka <adolf.belka@ipfire.org>
Sun, 11 May 2025 10:13:00 +0000 (12:13 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 12 May 2025 14:41:27 +0000 (14:41 +0000)
- 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.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/json-c
src/patches/json-c-0.18_allow_build_with_cmake_4.0.0.patch [new file with mode: 0644]

index edca5d3b2d02fc0682960ba77f38d1db51d10cea..2669e3825d0525f328e8229c78505356b8a8d50c 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2024  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2025  IPFire Team  <info@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 (file)
index 0000000..faff25d
--- /dev/null
@@ -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)