summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoritz Haase <Moritz.Haase@bmw.de>2025-07-03 15:27:17 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-07-07 22:12:50 +0100
commitc20a75dd5b41ab2b853c0b61617580db559fb23c (patch)
treef77e8094dbb46995abe07478a3ff22c921313f78
parent94dc7be66d23b59a44b1c0fb525f270e249a540d (diff)
downloadpoky-c20a75dd5b41ab2b853c0b61617580db559fb23c.tar.gz
libubootenv: Backport patch to support builds with CMake 4+
Commit [0] has been merged upstream, but there hasn't been a release containing it yet. [0]: https://github.com/sbabic/libubootenv/commit/cd12d9dd2bea8e4580f458df77229477fc55ba70 (From OE-Core rev: 133b793830b1a30a79465fe4511029010f9a2c68) Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-bsp/u-boot/libubootenv/0001-Update-cmake_minimum_required-to-3.5.patch50
-rw-r--r--meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb4
2 files changed, 53 insertions, 1 deletions
diff --git a/meta/recipes-bsp/u-boot/libubootenv/0001-Update-cmake_minimum_required-to-3.5.patch b/meta/recipes-bsp/u-boot/libubootenv/0001-Update-cmake_minimum_required-to-3.5.patch
new file mode 100644
index 0000000000..ee174ca59e
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/libubootenv/0001-Update-cmake_minimum_required-to-3.5.patch
@@ -0,0 +1,50 @@
1From cd12d9dd2bea8e4580f458df77229477fc55ba70 Mon Sep 17 00:00:00 2001
2From: James Hilliard <james.hilliard1@gmail.com>
3Date: Wed, 14 May 2025 14:17:40 -0600
4Subject: [PATCH] Update cmake_minimum_required to 3.5
5
6This supports compilation with cmake-4.0.0.
7
8Fixes:
9CMake Error at CMakeLists.txt:5 (cmake_minimum_required):
10 Compatibility with CMake < 3.5 has been removed from CMake.
11
12 Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
13 to tell CMake that the project requires at least <min> but has been updated
14 to work with policies introduced by <max> or earlier.
15
16 Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
17
18Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
19Upstream-Status: Backport [cd12d9dd2bea8e4580f458df77229477fc55ba70]
20---
21 CMakeLists.txt | 2 +-
22 src/CMakeLists.txt | 2 +-
23 2 files changed, 2 insertions(+), 2 deletions(-)
24
25diff --git a/CMakeLists.txt b/CMakeLists.txt
26index 796d7bc..0a11730 100644
27--- a/CMakeLists.txt
28+++ b/CMakeLists.txt
29@@ -2,7 +2,7 @@
30 #
31 # SPDX-License-Identifier: LGPL-2.1-or-later
32
33-cmake_minimum_required (VERSION 2.6)
34+cmake_minimum_required (VERSION 3.5)
35 project (libubootenv C)
36
37 # The version number.
38diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
39index c56d0c7..3370232 100644
40--- a/src/CMakeLists.txt
41+++ b/src/CMakeLists.txt
42@@ -1,7 +1,7 @@
43 # SPDX-FileCopyrightText: 2019-2021 Stefano Babic <stefano.babic@swupdate.org>
44 #
45 # SPDX-License-Identifier: LGPL-2.1-or-later
46-cmake_minimum_required (VERSION 2.6)
47+cmake_minimum_required (VERSION 3.5)
48 # Sources and private headers
49 SET(libubootenv_SOURCES
50 uboot_env.c
diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb b/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb
index 35678e2361..b63b8ff87d 100644
--- a/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb
+++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.6.bb
@@ -10,7 +10,9 @@ LICENSE = "LGPL-2.1-or-later"
10LIC_FILES_CHKSUM = "file://LICENSES/LGPL-2.1-or-later.txt;md5=4fbd65380cdd255951079008b364516c" 10LIC_FILES_CHKSUM = "file://LICENSES/LGPL-2.1-or-later.txt;md5=4fbd65380cdd255951079008b364516c"
11SECTION = "libs" 11SECTION = "libs"
12 12
13SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https;branch=master" 13SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https;branch=master \
14 file://0001-Update-cmake_minimum_required-to-3.5.patch \
15 "
14SRCREV = "5507339628b5caf244e1ff9d58cb3fa534b16beb" 16SRCREV = "5507339628b5caf244e1ff9d58cb3fa534b16beb"
15 17
16inherit cmake lib_package 18inherit cmake lib_package