From 1a8adeb2e8e12f75981acd96862d8d3a23df6c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 8 Aug 2025 22:00:52 +0700 Subject: [PATCH] cmake-bootstrap: update to 4.0.3. --- .../cmake-bootstrap/patches/no-cpack.patch | 25 +++---- .../cmake-bootstrap/patches/no-network.patch | 65 +++++++------------ .../patches/no-run-cmake-bootstrap.patch | 2 +- .../cmake-bootstrap/patches/not-needed.patch | 21 +++--- srcpkgs/cmake-bootstrap/patches/usleep.patch | 9 +++ srcpkgs/cmake-bootstrap/template | 13 ++-- 6 files changed, 66 insertions(+), 69 deletions(-) create mode 100644 srcpkgs/cmake-bootstrap/patches/usleep.patch diff --git a/srcpkgs/cmake-bootstrap/patches/no-cpack.patch b/srcpkgs/cmake-bootstrap/patches/no-cpack.patch index b79c735eb2c..24b96ccaee5 100644 --- a/srcpkgs/cmake-bootstrap/patches/no-cpack.patch +++ b/srcpkgs/cmake-bootstrap/patches/no-cpack.patch @@ -17,7 +17,7 @@ endif() endif() -@@ -474,7 +472,6 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE) +@@ -473,7 +471,6 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE) add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") @@ -27,7 +27,7 @@ --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt -@@ -1136,6 +1136,7 @@ endif() +@@ -1160,6 +1160,7 @@ endif() # # Build CPackLib # @@ -35,7 +35,7 @@ add_library( CPackLib CPack/cmCPackArchiveGenerator.cxx -@@ -1168,9 +1169,10 @@ target_include_directories( +@@ -1192,9 +1193,10 @@ target_include_directories( "${CMAKE_CURRENT_BINARY_DIR}/CPack" ) target_link_libraries(CPackLib PUBLIC CMakeLib) @@ -47,7 +47,7 @@ target_sources( CPackLib PRIVATE -@@ -1288,11 +1290,6 @@ add_executable(ctest ctest.cxx) +@@ -1312,11 +1314,6 @@ add_executable(ctest ctest.cxx) target_link_libraries(ctest PRIVATE CTestLib ManifestLib) list(APPEND _tools ctest) @@ -61,7 +61,7 @@ add_subdirectory(CursesDialog) --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt -@@ -150,7 +150,6 @@ if(BUILD_TESTING) +@@ -146,7 +146,6 @@ if(BUILD_TESTING) endif() # Look for git to use for tests. @@ -71,7 +71,7 @@ # The tool does not work with spaces in the path. --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt -@@ -929,9 +929,6 @@ add_RunCMake_test(file-GET_RUNTIME_DEPEN +@@ -981,9 +981,6 @@ add_RunCMake_test(file-GET_RUNTIME_DEPEN -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID} ) @@ -81,7 +81,7 @@ if(XCODE_VERSION) set(ExternalProject_ARGS -DXCODE_VERSION=${XCODE_VERSION}) endif() -@@ -953,9 +950,6 @@ add_RunCMake_test(CTestCommandLine -DTES +@@ -1005,9 +1002,6 @@ add_RunCMake_test(CTestCommandLine -DTES add_RunCMake_test(CacheNewline) # Only run this test on unix platforms that support # symbolic links @@ -91,7 +91,7 @@ set(IfacePaths_INCDIRS_ARGS -DTEST_PROP=INCLUDE_DIRECTORIES) add_RunCMake_test(IfacePaths_INCDIRS TEST_DIR IfacePaths) -@@ -1132,7 +1126,6 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "e2k" +@@ -1186,7 +1180,6 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "e2k" endif() endif() @@ -99,10 +99,10 @@ if(CMake_TEST_CPACK_WIX3 OR CMake_TEST_CPACK_WIX4) add_RunCMake_test(CPack_WIX -@@ -1189,29 +1182,6 @@ add_RunCMake_test(PrecompileHeaders -DCM - -DCMAKE_C_COMPILER_VERSION=${CMAKE_C_COMPILER_VERSION}) +@@ -1247,30 +1240,6 @@ add_RunCMake_test(UnityBuild -DCMake_TES + set_property(TEST RunCMake.UnityBuild APPEND + PROPERTY LABELS "CUDA") - add_RunCMake_test(UnityBuild -DCMake_TEST_OBJC=${CMake_TEST_OBJC}) -add_RunCMake_test(CMakePresets - -DPython_EXECUTABLE=${Python_EXECUTABLE} - -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} @@ -126,6 +126,7 @@ - -DPython_EXECUTABLE=${Python_EXECUTABLE} - -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} - ) - +- add_RunCMake_test(VerifyHeaderSets) add_RunCMake_test(set_tests_properties) + diff --git a/srcpkgs/cmake-bootstrap/patches/no-network.patch b/srcpkgs/cmake-bootstrap/patches/no-network.patch index aee507fda2b..14a80ba11e6 100644 --- a/srcpkgs/cmake-bootstrap/patches/no-network.patch +++ b/srcpkgs/cmake-bootstrap/patches/no-network.patch @@ -1,21 +1,22 @@ --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx -@@ -2130,9 +2130,6 @@ bool HandleDownloadCommand(std::vectorversion : LIBCURL_VERSION).c_str()); - check_curl_result(res, "DOWNLOAD cannot set user agent option: "); -- + res = ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cmWriteToFileCallback); check_curl_result(res, "DOWNLOAD cannot set write function: "); - -@@ -2153,15 +2150,6 @@ bool HandleDownloadCommand(std::vector ++#endif + #if defined(_WIN32) + # include + #elif _XOPEN_SOURCE >= 500 || defined(_ALL_SOURCE) diff --git a/srcpkgs/cmake-bootstrap/template b/srcpkgs/cmake-bootstrap/template index 642f44f873b..9e09d99febe 100644 --- a/srcpkgs/cmake-bootstrap/template +++ b/srcpkgs/cmake-bootstrap/template @@ -1,6 +1,6 @@ # Template file for 'cmake-bootstrap' pkgname=cmake-bootstrap -version=3.30.1 +version=4.0.3 revision=1 build_style=cmake configure_args="-DCMake_INSTALL_INFIX=libexec/xbps-src/ @@ -9,16 +9,16 @@ configure_args="-DCMake_INSTALL_INFIX=libexec/xbps-src/ -DCMake_ENABLE_DEBUGGER=OFF -DCMAKE_USE_SYSTEM_LIBRARIES=OFF -DCTEST_TEST_CPACK=OFF -DCMake_TEST_NO_NETWORK=ON -DCMake_NO_SELF_BACKTRACE=1 -DKWSYS_LFS_WORKS=1" +make_cmd=samu hostmakedepends="samurai" short_desc="CMake for xbps-src" maintainer="Đoàn Trần Công Danh " license="BSD-3-Clause, ICU" homepage="https://www.cmake.org" distfiles="https://www.cmake.org/files/v${version%.*}/cmake-${version}.tar.gz" -checksum=df9b3c53e3ce84c3c1b7c253e5ceff7d8d1f084ff0673d048f260e04ccb346e1 +checksum=8d3537b7b7732660ea247398f166be892fe6131d63cc291944b45b91279f3ffb repository="bootstrap" provides="cmake-${version}_1" -make_cmd=samu pre_configure() { local f @@ -51,6 +51,11 @@ do_check() { _ignore="${_ignore}|ParseImplicitLinkInfo" # Broken on musl, depends on ldconfig _ignore="${_ignore}|file-GET_RUNTIME_DEPENDENCIES" + # tests were designed for Ninja, we run samu + _ignore="${_ignore}|RunCMake.CMP0116|RunCMake.Ninja|RunCMake.InstallParallel" + _ignore="${_ignore}|RunCMake.BuildDepends|RunCMake.GoogleTest" + _ignore="${_ignore}|RunCMake.CommandLine|RunCMake.AutoExportDll" + _ignore="${_ignore}|RunCMake.LinkLibrariesStrategy" cd build ./bin/ctest -E "${_ignore}" } @@ -59,7 +64,7 @@ post_install() { # We installs license manually because cmake forgets some of them. test ! -d ${DESTDIR}/usr/libexec/xbps-src/share/doc { - cat Copyright.txt + cat LICENSE.rst printf '%s\n' '' =============================== "FreeBSD ELF library" sed -e '/\$FreeBSD\$/q' Utilities/cmelf/elf_common.h # nghttp2: disabled in curl