Skip to content

Commit 13f599e

Browse files
committed
update in-tree CMake to match Scarthgap (3.28.3)
Swift 6.x requires CMake 3.24 or higher.
1 parent 278347f commit 13f599e

9 files changed

+57
-202
lines changed

recipes-devtools/cmake/cmake-native_3.22.3.bb renamed to recipes-devtools/cmake/cmake-native_3.28.3.bb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
require cmake.inc
22
inherit native
33

4-
DEPENDS += "bzip2-replacement-native xz-native zlib-native curl-native ncurses-native zstd-native"
4+
DEPENDS += "bzip2-replacement-native xz-native zlib-native ncurses-native zstd-native openssl-native"
55

66
SRC_URI += "file://OEToolchainConfig.cmake \
77
file://environment.d-cmake.sh \
8-
file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \
98
file://0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch \
9+
file://0001-CMakeLists.txt-disable-USE_NGHTTP2.patch \
1010
"
1111

12-
LICENSE:append = " & BSD-1-Clause & MIT & BSD-2-Clause"
12+
LICENSE:append = " & BSD-1-Clause & MIT & BSD-2-Clause & curl"
1313
LIC_FILES_CHKSUM:append = " \
14-
file://Utilities/cmjsoncpp/LICENSE;md5=fa2a23dd1dc6c139f35105379d76df2b \
14+
file://Utilities/cmjsoncpp/LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926 \
1515
file://Utilities/cmlibarchive/COPYING;md5=d499814247adaee08d88080841cb5665 \
1616
file://Utilities/cmexpat/COPYING;md5=9e2ce3b3c4c0f2670883a23bbd7c37a9 \
1717
file://Utilities/cmlibrhash/COPYING;md5=a8c2a557a5c53b1c12cddbee98c099af \
18-
file://Utilities/cmlibuv/LICENSE;md5=a68902a430e32200263d182d44924d47 \
18+
file://Utilities/cmlibuv/LICENSE;md5=ad93ca1fffe931537fcf64f6fcce084d \
19+
file://Utilities/cmcurl/COPYING;md5=db8448a1e43eb2125f7740fc397db1f6 \
1920
"
2021

2122
B = "${WORKDIR}/build"
@@ -26,17 +27,18 @@ CMAKE_EXTRACONF = "\
2627
-DBUILD_CursesDialog=1 \
2728
-DCMAKE_USE_SYSTEM_LIBRARIES=1 \
2829
-DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
30+
-DCMAKE_USE_SYSTEM_LIBRARY_CPPDAP=0 \
2931
-DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \
3032
-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
3133
-DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \
3234
-DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=0 \
35+
-DCMAKE_USE_SYSTEM_LIBRARY_CURL=0 \
3336
-DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
3437
-DHAVE_SYS_ACL_H=0 \
35-
-DCURL_LIBRARIES=-lcurl \
3638
"
3739

3840
do_configure () {
39-
${S}/configure --verbose --prefix=${prefix} \
41+
${S}/bootstrap --verbose --prefix=${prefix} \
4042
${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \
4143
${@bb.utils.contains('CCACHE', 'ccache ', '--enable-ccache', '', d)} \
4244
-- ${CMAKE_EXTRACONF}

recipes-devtools/cmake/cmake.inc

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,18 @@ HOMEPAGE = "http://www.cmake.org/"
1010
BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php"
1111
SECTION = "console/utils"
1212
LICENSE = "BSD-3-Clause"
13-
LIC_FILES_CHKSUM = "file://Copyright.txt;md5=31023e1d3f51ca90a58f55bcee8e2339 \
13+
LIC_FILES_CHKSUM = "file://Copyright.txt;md5=9d3d12c5f3b4c1f83650adcc65b59c06 \
1414
file://Source/cmake.h;beginline=1;endline=2;md5=a5f70e1fef8614734eae0d62b4f5891b \
1515
"
1616

1717
CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
1818

1919
SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
2020
file://0001-CMakeDetermineCompilerABI-Strip-pipe-from-compile-fl.patch \
21-
file://0003-cmake-support-OpenEmbedded-Qt4-tool-binary-names.patch \
22-
file://0004-Fail-silently-if-system-Qt-installation-is-broken.patch \
23-
"
21+
"
2422

25-
SRC_URI[sha256sum] = "9f8469166f94553b6978a16ee29227ec49a2eb5ceb608275dec40d8ae0d1b5a0"
23+
SRC_URI[sha256sum] = "72b7570e5c8593de6ac4ab433b73eab18c5fb328880460c86ce32608141ad5c1"
2624

2725
UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
2826

29-
# This is specific to the npm package that installs cmake, so isn't
30-
# relevant to OpenEmbedded
31-
CVE_CHECK_IGNORE += "CVE-2016-10642"
27+
CVE_STATUS[CVE-2016-10642] = "cpe-incorrect: This is specific to the npm package that installs cmake, so isn't relevant to OpenEmbedded"

recipes-devtools/cmake/cmake/0001-CMakeDetermineCompilerABI-Strip-pipe-from-compile-fl.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From dab7ba34f87be0172f6586325656ee962de0029e Mon Sep 17 00:00:00 2001
1+
From bd94bbdc35a9da4c73d538e0cc55bc95944f620d Mon Sep 17 00:00:00 2001
22
From: Philip Lorenz <[email protected]>
33
Date: Mon, 3 Jun 2024 13:19:24 +0200
44
Subject: [PATCH] CMakeDetermineCompilerABI: Strip -pipe from compile flags
@@ -35,13 +35,13 @@ Signed-off-by: Philip Lorenz <[email protected]>
3535
1 file changed, 5 insertions(+)
3636

3737
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
38-
index 8191d819bf..ae4c9ee44e 100644
38+
index efc18f93c2..f2e40479b1 100644
3939
--- a/Modules/CMakeDetermineCompilerABI.cmake
4040
+++ b/Modules/CMakeDetermineCompilerABI.cmake
41-
@@ -35,6 +35,11 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
41+
@@ -43,6 +43,11 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
4242

4343
# Avoid failing ABI detection on warnings.
44-
string(REGEX REPLACE "(^| )-Werror([= ][^ ]*)?( |$)" " " CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS}")
44+
string(REGEX REPLACE "(^| )-Werror([= ][^-][^ ]*)?( |$)" " " CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS}")
4545
+ # Avoid passing of "-pipe" when determining the compiler internals. With
4646
+ # "-pipe" GCC will use pipes to pass data between the involved
4747
+ # executables. This may lead to issues when their stderr output (which

recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch

Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From d33d8a5e9f3b25a80d47b72b1a8a6624a85563c1 Mon Sep 17 00:00:00 2001
2+
From: Changqing Li <[email protected]>
3+
Date: Wed, 28 Dec 2022 17:51:27 +0800
4+
Subject: [PATCH] CMakeLists.txt: disable USE_NGHTTP2
5+
6+
nghttp2 depends on cmake-native to build, to break circular
7+
dependency, disable nghttp2.
8+
9+
Upstream-Status: Inappropriate [oe specific]
10+
11+
Signed-off-by: Changqing Li <[email protected]>
12+
13+
Adjust the patch to apply on top of v3.28.3.
14+
15+
Signed-off-by: Trevor Gamblin <[email protected]>
16+
---
17+
Utilities/cmcurl/CMakeLists.txt | 2 +-
18+
1 file changed, 1 insertion(+), 1 deletion(-)
19+
20+
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
21+
index 9387247366..d3de01f4e8 100644
22+
--- a/Utilities/cmcurl/CMakeLists.txt
23+
+++ b/Utilities/cmcurl/CMakeLists.txt
24+
@@ -88,7 +88,7 @@ set(HTTP_ONLY OFF CACHE INTERNAL "Curl is not http-only")
25+
set(PICKY_COMPILER OFF CACHE INTERNAL "Enable picky compiler options")
26+
set(SHARE_LIB_OBJECT OFF)
27+
set(USE_LIBIDN2 ON)
28+
-set(USE_NGHTTP2 ON)
29+
+set(USE_NGHTTP2 OFF)
30+
set(USE_NGTCP2 OFF)
31+
set(USE_QUICHE OFF)
32+
set(USE_WIN32_IDN OFF)
33+
--
34+
2.43.0
35+

recipes-devtools/cmake/cmake/0003-cmake-support-OpenEmbedded-Qt4-tool-binary-names.patch

Lines changed: 0 additions & 56 deletions
This file was deleted.

recipes-devtools/cmake/cmake/0004-Fail-silently-if-system-Qt-installation-is-broken.patch

Lines changed: 0 additions & 79 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export OE_CMAKE_TOOLCHAIN_FILE="$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
1+
export CMAKE_TOOLCHAIN_FILE="$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
22
export OE_CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX="`echo $OECORE_BASELIB | sed -e s/lib//`"

recipes-devtools/cmake/cmake_3.22.3.bb renamed to recipes-devtools/cmake/cmake_3.28.3.bb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ SRC_URI:append:class-nativesdk = " \
99
file://SDKToolchainConfig.cmake.template \
1010
file://cmake-setup.py \
1111
file://environment.d-cmake.sh \
12-
file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \
1312
"
1413

1514
LICENSE:append = " & BSD-1-Clause & MIT"
1615
LIC_FILES_CHKSUM:append = " \
17-
file://Utilities/cmjsoncpp/LICENSE;md5=fa2a23dd1dc6c139f35105379d76df2b \
16+
file://Utilities/cmjsoncpp/LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926 \
1817
file://Utilities/cmlibrhash/COPYING;md5=a8c2a557a5c53b1c12cddbee98c099af \
19-
file://Utilities/cmlibuv/LICENSE;md5=a68902a430e32200263d182d44924d47 \
18+
file://Utilities/cmlibuv/LICENSE;md5=ad93ca1fffe931537fcf64f6fcce084d \
2019
"
2120

2221
# Strip ${prefix} from ${docdir}, set result into docdir_stripped
@@ -38,11 +37,13 @@ EXTRA_OECMAKE=" \
3837
-DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \
3938
-DCMAKE_USE_SYSTEM_LIBRARIES=1 \
4039
-DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
40+
-DCMAKE_USE_SYSTEM_LIBRARY_CPPDAP=0 \
4141
-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
4242
-DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \
4343
-DKWSYS_CHAR_IS_SIGNED=1 \
4444
-DBUILD_CursesDialog=0 \
4545
-DKWSYS_LFS_WORKS=1 \
46+
-DCMake_ENABLE_DEBUGGER=0 \
4647
"
4748

4849
do_install:append:class-nativesdk() {

0 commit comments

Comments
 (0)