From 503a61a33120116637a370d79e36585c5adf9059 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, 18 Aug 2023 19:51:57 +0700 Subject: [PATCH] cmake-bootstrap: update to 3.27.3, disable network, provides cmake --- .../patches/ignore-crape-compiler-test.patch | 11 -- .../cmake-bootstrap/patches/musl-test.patch | 25 --- .../cmake-bootstrap/patches/no-cpack.patch | 130 +++++++++++++ .../cmake-bootstrap/patches/no-network.patch | 176 ++++++++++++++++++ srcpkgs/cmake-bootstrap/template | 16 +- 5 files changed, 318 insertions(+), 40 deletions(-) delete mode 100644 srcpkgs/cmake-bootstrap/patches/ignore-crape-compiler-test.patch delete mode 100644 srcpkgs/cmake-bootstrap/patches/musl-test.patch create mode 100644 srcpkgs/cmake-bootstrap/patches/no-cpack.patch create mode 100644 srcpkgs/cmake-bootstrap/patches/no-network.patch diff --git a/srcpkgs/cmake-bootstrap/patches/ignore-crape-compiler-test.patch b/srcpkgs/cmake-bootstrap/patches/ignore-crape-compiler-test.patch deleted file mode 100644 index cf098a8f88748c..00000000000000 --- a/srcpkgs/cmake-bootstrap/patches/ignore-crape-compiler-test.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake -+++ b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake -@@ -8,7 +8,7 @@ - set(targets - aix-C-XL-13.1.3 aix-CXX-XL-13.1.3 - aix-C-XLClang-16.1.0.1 aix-CXX-XLClang-16.1.0.1 -- craype-C-Cray-8.7 craype-CXX-Cray-8.7 craype-Fortran-Cray-8.7 -+ craype-Fortran-Cray-8.7 - craype-C-Cray-9.0-hlist-ad craype-CXX-Cray-9.0-hlist-ad craype-Fortran-Cray-9.0-hlist-ad - craype-C-GNU-7.3.0 craype-CXX-GNU-7.3.0 craype-Fortran-GNU-7.3.0 - craype-C-Intel-18.0.2.20180210 craype-CXX-Intel-18.0.2.20180210 diff --git a/srcpkgs/cmake-bootstrap/patches/musl-test.patch b/srcpkgs/cmake-bootstrap/patches/musl-test.patch deleted file mode 100644 index 41161fa81e0821..00000000000000 --- a/srcpkgs/cmake-bootstrap/patches/musl-test.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-all-check.cmake -+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-all-check.cmake -@@ -15,9 +15,9 @@ set(_check - [[librunpath_parent_unresolved\.so]] - [[librunpath_unresolved\.so]] - ) --check_contents(deps/udeps1.txt "^${_check}$") --check_contents(deps/udeps2.txt "^${_check}$") --check_contents(deps/udeps3.txt "^${_check}$") -+check_contents(deps/udeps1.txt "^(libc.so;)?${_check}$") -+check_contents(deps/udeps2.txt "^(libc.so;)?${_check}$") -+check_contents(deps/udeps3.txt "^(libc.so;)?${_check}$") - set(_check - "^libconflict\\.so:[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-build/root-all/lib/conflict/libconflict\\.so;[^;]*/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/linux-build/root-all/lib/conflict2/libconflict\\.so\n$" - ) ---- a/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake -+++ b/Tests/RunCMake/file-GET_RUNTIME_DEPENDENCIES/RunCMakeTest.cmake -@@ -65,7 +65,6 @@ elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL " - - if(NOT CMake_COMPILER_FORCES_NEW_DTAGS) - run_install_test(linux) -- run_install_test(linux-parent-rpath-propagation) - run_install_test(file-filter) - endif() - run_install_test(linux-unresolved) diff --git a/srcpkgs/cmake-bootstrap/patches/no-cpack.patch b/srcpkgs/cmake-bootstrap/patches/no-cpack.patch new file mode 100644 index 00000000000000..48c9a46f500604 --- /dev/null +++ b/srcpkgs/cmake-bootstrap/patches/no-cpack.patch @@ -0,0 +1,130 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -245,15 +245,13 @@ macro(CMAKE_SETUP_TESTING) + if(CMake_TEST_EXTERNAL_CMAKE) + set(CMAKE_CTEST_COMMAND "${CMake_TEST_EXTERNAL_CMAKE}/ctest") + set(CMAKE_CMAKE_COMMAND "${CMake_TEST_EXTERNAL_CMAKE}/cmake") +- set(CMAKE_CPACK_COMMAND "${CMake_TEST_EXTERNAL_CMAKE}/cpack") +- foreach(exe IN ITEMS cmake ctest cpack) ++ foreach(exe IN ITEMS cmake ctest) + add_executable(${exe} IMPORTED) + set_property(TARGET ${exe} PROPERTY IMPORTED_LOCATION ${CMake_TEST_EXTERNAL_CMAKE}/${exe}) + endforeach() + else() + set(CMAKE_CTEST_COMMAND "${CMake_BIN_DIR}/ctest") + set(CMAKE_CMAKE_COMMAND "${CMake_BIN_DIR}/cmake") +- set(CMAKE_CPACK_COMMAND "${CMake_BIN_DIR}/cpack") + endif() + endif() + +@@ -462,7 +460,6 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE) + add_custom_target(uninstall + "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") + +- include(CMakeCPack.cmake) + + endif() + +--- a/Source/CMakeLists.txt ++++ b/Source/CMakeLists.txt +@@ -1039,6 +1039,7 @@ target_link_libraries(CTestLib PUBLIC CM + # + # Build CPackLib + # ++if(FALSE) + add_library( + CPackLib + CPack/cmCPackArchiveGenerator.cxx +@@ -1071,9 +1072,10 @@ target_include_directories( + "${CMAKE_CURRENT_BINARY_DIR}/CPack" + ) + target_link_libraries(CPackLib PUBLIC CMakeLib) ++endif() + + option(CPACK_ENABLE_FREEBSD_PKG "Add FreeBSD pkg(8) generator to CPack." OFF) +-if(UNIX) ++if(FALSE) + target_sources( + CPackLib + PRIVATE +@@ -1191,11 +1193,6 @@ add_executable(ctest ctest.cxx) + target_link_libraries(ctest PRIVATE CTestLib ManifestLib) + list(APPEND _tools ctest) + +-# Build CPack executable +-add_executable(cpack CPack/cpack.cxx) +-target_link_libraries(cpack PRIVATE CPackLib ManifestLib) +-list(APPEND _tools cpack) +- + # Curses GUI + if(BUILD_CursesDialog) + add_subdirectory(CursesDialog) +--- a/Tests/CMakeLists.txt ++++ b/Tests/CMakeLists.txt +@@ -143,7 +143,6 @@ if(BUILD_TESTING) + endif() + + # Look for git to use for tests. +- find_program(GIT_EXECUTABLE NAMES git) + + # Look for rpmbuild to use for tests. + # The tool does not work with spaces in the path. +--- a/Tests/RunCMake/CMakeLists.txt ++++ b/Tests/RunCMake/CMakeLists.txt +@@ -816,9 +816,6 @@ add_RunCMake_test(file-GET_RUNTIME_DEPEN + -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID} + ) + +-add_RunCMake_test(CPackCommandLine) +-add_RunCMake_test(CPackConfig) +-add_RunCMake_test(CPackInstallProperties) + if(XCODE_VERSION) + set(ExternalProject_ARGS -DXCODE_VERSION=${XCODE_VERSION}) + endif() +@@ -837,9 +834,6 @@ add_RunCMake_test(CTestCommandLine -DTES + add_RunCMake_test(CacheNewline) + # Only run this test on unix platforms that support + # symbolic links +-if(UNIX) +- add_RunCMake_test(CPackSymlinks) +-endif() + + set(IfacePaths_INCDIRS_ARGS -DTEST_PROP=INCLUDE_DIRECTORIES) + add_RunCMake_test(IfacePaths_INCDIRS TEST_DIR IfacePaths) +@@ -970,8 +964,6 @@ set(cpack_tests + if(APPLE) + list(APPEND cpack_tests DragNDrop) + endif() +-add_RunCMake_test_group(CPack "${cpack_tests}") +-# add a test to make sure symbols are exported from a shared library + # for MSVC compilers CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS property is used + add_RunCMake_test(AutoExportDll + -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} +@@ -1015,27 +1007,6 @@ add_RunCMake_test(PrecompileHeaders -DCM + -DCMAKE_C_COMPILER_VERSION=${CMAKE_C_COMPILER_VERSION}) + + add_RunCMake_test("UnityBuild") +-add_RunCMake_test(CMakePresets +- -DPython_EXECUTABLE=${Python_EXECUTABLE} +- -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} +- ) +-add_RunCMake_test(CMakePresetsBuild +- -DPython_EXECUTABLE=${Python_EXECUTABLE} +- -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} +- -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} +- ) +-add_RunCMake_test(CMakePresetsTest +- -DPython_EXECUTABLE=${Python_EXECUTABLE} +- -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} +- ) +-add_RunCMake_test(CMakePresetsPackage +- -DPython_EXECUTABLE=${Python_EXECUTABLE} +- -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} +- ) +-add_RunCMake_test(CMakePresetsWorkflow +- -DPython_EXECUTABLE=${Python_EXECUTABLE} +- -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA} +- ) + + add_RunCMake_test(VerifyHeaderSets) + diff --git a/srcpkgs/cmake-bootstrap/patches/no-network.patch b/srcpkgs/cmake-bootstrap/patches/no-network.patch new file mode 100644 index 00000000000000..76cdfa97e96d74 --- /dev/null +++ b/srcpkgs/cmake-bootstrap/patches/no-network.patch @@ -0,0 +1,176 @@ +--- a/Source/cmFileCommand.cxx ++++ b/Source/cmFileCommand.cxx +@@ -1990,9 +1990,6 @@ bool HandleDownloadCommand(std::vector 0) { +- res = ::curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout); +- check_curl_result(res, "DOWNLOAD cannot set timeout: "); +- } +- +- if (inactivity_timeout > 0) { +- // Give up if there is no progress for a long time. +- ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1); +- ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, inactivity_timeout); +- } +- + // Need the progress helper's scope to last through the duration of + // the curl_easy_perform call... so this object is declared at function + // scope intentionally, rather than inside the "if(showProgress)" +@@ -2331,15 +2305,6 @@ bool HandleUploadCommand(std::vector 0) { +- res = ::curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout); +- check_curl_result(res, "UPLOAD cannot set timeout: "); +- } +- +- if (inactivity_timeout > 0) { +- // Give up if there is no progress for a long time. +- ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1); +- ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, inactivity_timeout); +- } +- + // Need the progress helper's scope to last through the duration of + // the curl_easy_perform call... so this object is declared at function + // scope intentionally, rather than inside the "if(showProgress)" +--- a/Tests/RunCMake/CMakeLists.txt ++++ b/Tests/RunCMake/CMakeLists.txt +@@ -483,7 +483,6 @@ if(COVERAGE_COMMAND) + add_RunCMake_test(ctest_coverage -DCOVERAGE_COMMAND=${COVERAGE_COMMAND}) + endif() + add_RunCMake_test(ctest_start) +-add_RunCMake_test(ctest_submit) + add_RunCMake_test(ctest_test + -DIMAGE_DIR=${CMAKE_SOURCE_DIR}/Utilities/Sphinx/static + ) +@@ -504,7 +503,6 @@ foreach(var + list(APPEND file-DOWNLOAD_ARGS -D${var}=${${var}}) + endif() + endforeach() +-add_RunCMake_test(file-DOWNLOAD) + add_RunCMake_test(file-RPATH -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}) + add_RunCMake_test(find_file) + add_RunCMake_test(find_library -DCYGWIN=${CYGWIN} -DMSYS=${MSYS}) +--- a/Utilities/cmcurl/CMakeLists.txt ++++ b/Utilities/cmcurl/CMakeLists.txt +@@ -22,12 +22,12 @@ set(CURL_DISABLE_CRYPTO_AUTH OFF CACHE I + set(CURL_DISABLE_DICT ON CACHE INTERNAL "Disable curl dict protocol?") + set(CURL_DISABLE_DOH OFF) + set(CURL_DISABLE_FILE OFF CACHE INTERNAL "Disable curl file protocol?") +-set(CURL_DISABLE_FTP OFF CACHE INTERNAL "Disable curl ftp protocol?") ++set(CURL_DISABLE_FTP ON CACHE INTERNAL "Disable curl ftp protocol?") + set(CURL_DISABLE_GETOPTIONS OFF) + set(CURL_DISABLE_GOPHER ON CACHE INTERNAL "Disable curl gopher protocol?") + set(CURL_DISABLE_HSTS ON) +-set(CURL_DISABLE_HTTP_AUTH OFF) +-set(CURL_DISABLE_HTTP OFF CACHE INTERNAL "Disable curl http protocol?") ++set(CURL_DISABLE_HTTP_AUTH ON) ++set(CURL_DISABLE_HTTP ON CACHE INTERNAL "Disable curl http protocol?") + set(CURL_DISABLE_IMAP ON CACHE INTERNAL "Disable curl imap protocol?") + set(CURL_DISABLE_LDAP ON CACHE INTERNAL "Disable curl ldap protocol?") + set(CURL_DISABLE_LDAPS ON CACHE INTERNAL "Disable curl ldaps protocol?") +@@ -40,12 +40,12 @@ set(CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFI + set(CURL_DISABLE_PARSEDATE OFF) + set(CURL_DISABLE_POP3 ON CACHE INTERNAL "Disable curl pop3 protocol?") + set(CURL_DISABLE_PROGRESS_METER OFF) +-set(CURL_DISABLE_PROXY OFF CACHE INTERNAL "Do not disable curl proxy") ++set(CURL_DISABLE_PROXY ON CACHE INTERNAL "Do not disable curl proxy") + set(CURL_DISABLE_RTSP ON CACHE INTERNAL "Disable curl rtsp protocol?") + set(CURL_DISABLE_SHUFFLE_DNS OFF) + set(CURL_DISABLE_SMB OFF) + set(CURL_DISABLE_SMTP ON CACHE INTERNAL "Disable curl smtp protocol?") +-set(CURL_DISABLE_SOCKETPAIR OFF) ++set(CURL_DISABLE_SOCKETPAIR ON) + set(CURL_DISABLE_TELNET ON CACHE INTERNAL "Disable curl telnet protocol?") + set(CURL_DISABLE_TFTP ON CACHE INTERNAL "Disable curl tftp protocol?") + set(CURL_DISABLE_VERBOSE_STRINGS OFF CACHE INTERNAL "Do not disable curl verbosity") +@@ -61,7 +61,7 @@ set(ENABLE_ALT_SVC OFF) + set(ENABLE_CURLDEBUG OFF CACHE INTERNAL "No curl TrackMemory features") + set(ENABLE_DEBUG OFF CACHE INTERNAL "No curl debug features") + set(ENABLE_INET_PTON OFF CACHE INTERNAL "Set to OFF to prevent usage of inet_pton when building against modern SDKs while still requiring compatibility with older Windows versions, such as Windows XP, Windows Server 2003 etc.") +-set(ENABLE_IPV6 ON CACHE INTERNAL "Enable curl IPv6 support detection") ++set(ENABLE_IPV6 OFF CACHE INTERNAL "Enable curl IPv6 support detection") + set(ENABLE_MANUAL OFF CACHE INTERNAL "No curl built-in manual") + set(ENABLE_THREADED_RESOLVER OFF CACHE INTERNAL "No curl POSIX threaded DNS lookup") + set(ENABLE_UNICODE OFF) +@@ -77,8 +77,8 @@ set(HAVE_STRCASECMP 0) # we do not vendo + set(HAVE_WIN32_WINNT 0) # we do not need this info + set(HTTP_ONLY OFF CACHE INTERNAL "Curl is not http-only") + set(PICKY_COMPILER OFF CACHE INTERNAL "Enable picky compiler options") +-set(USE_LIBIDN2 ON) +-set(USE_NGHTTP2 ON) ++set(USE_LIBIDN2 OFF) ++set(USE_NGHTTP2 OFF) + set(USE_NGTCP2 OFF) + set(USE_QUICHE OFF) + set(USE_WIN32_IDN OFF) +@@ -323,7 +323,7 @@ option(CURL_DISABLE_DOH "disables DNS-ov + mark_as_advanced(CURL_DISABLE_DOH) + option(CURL_DISABLE_FILE "disables FILE" OFF) + mark_as_advanced(CURL_DISABLE_FILE) +-option(CURL_DISABLE_FTP "disables FTP" OFF) ++option(CURL_DISABLE_FTP "disables FTP" ON) + mark_as_advanced(CURL_DISABLE_FTP) + option(CURL_DISABLE_GETOPTIONS "disables curl_easy_options API for existing options to curl_easy_setopt" OFF) + mark_as_advanced(CURL_DISABLE_GETOPTIONS) diff --git a/srcpkgs/cmake-bootstrap/template b/srcpkgs/cmake-bootstrap/template index c46583a70f7420..0deab23a9cffc9 100644 --- a/srcpkgs/cmake-bootstrap/template +++ b/srcpkgs/cmake-bootstrap/template @@ -1,20 +1,22 @@ # Template file for 'cmake-bootstrap' pkgname=cmake-bootstrap -version=3.27.2 +version=3.27.3 revision=1 build_style=cmake configure_args="-DCMake_INSTALL_INFIX=libexec/xbps-src/ -DCMAKE_SKIP_BOOTSTRAP_TEST=1 -DCMAKE_SKIP_RPATH=OFF -DCMAKE_USE_OPENSSL=OFF -DBUILD_CursesDialog=OFF -DBUILD_QtDialog=OFF -DCMAKE_USE_SYSTEM_LIBRARIES=OFF + -DCTEST_TEST_CPACK=OFF -DCMake_TEST_NO_NETWORK=ON -DKWSYS_LFS_WORKS=1" 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=798e50085d423816fe96c9ef8bee5e50002c9eca09fed13e300de8a91d35c211 +checksum=66afdc0f181461b70b6fedcde9ecc4226c5cd184e7203617c83b7d8e47f49521 repository="bootstrap" +provides="cmake-${version}_1" if [ "$XBPS_TARGET_LIBC" = musl ]; then configure_args+=" -DCMake_NO_SELF_BACKTRACE=1" @@ -41,15 +43,21 @@ pre_configure() { } do_check() { + local _ignore mkdir -p /tmp/fake-bin ln -sf /usr/bin/bsdtar /tmp/fake-bin/tar PATH=$PATH:/tmp/fake-bin + # Requires git-submodule + _ignore="ExternalProject|UpdateGIT|CMP0150" + # Cra(y)pe Compiler + _ignore="${_ignore}|ParseImplicitLinkInfo" + # Broken on musl, depends on ldconfig + _ignore="${_ignore}|file-GET_RUNTIME_DEPENDENCIES" cd build - ./bin/ctest -E "ExternalProject|UpdateGIT|CMP0150" + ./bin/ctest -E "${_ignore}" } post_install() { - rm -f ${DESTDIR}/usr/libexec/xbps-src/bin/cpack # We installs license manually because cmake forgets some of them. test ! -d ${DESTDIR}/usr/libexec/xbps-src/share/doc {