diff --git a/srcpkgs/cmake-bootstrap/patches/ignore-crape-compiler-test.patch b/srcpkgs/cmake-bootstrap/patches/ignore-crape-compiler-test.patch new file mode 100644 index 00000000000..cf098a8f887 --- /dev/null +++ b/srcpkgs/cmake-bootstrap/patches/ignore-crape-compiler-test.patch @@ -0,0 +1,11 @@ +--- 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 new file mode 100644 index 00000000000..41161fa81e0 --- /dev/null +++ b/srcpkgs/cmake-bootstrap/patches/musl-test.patch @@ -0,0 +1,25 @@ +--- 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-run-cmake-bootstrap.patch b/srcpkgs/cmake-bootstrap/patches/no-run-cmake-bootstrap.patch new file mode 100644 index 00000000000..0e550bce7b9 --- /dev/null +++ b/srcpkgs/cmake-bootstrap/patches/no-run-cmake-bootstrap.patch @@ -0,0 +1,11 @@ +We will run cmake ourselves with our flags +--- a/bootstrap ++++ b/bootstrap +@@ -2076,6 +2076,7 @@ export CFLAGS + export CXXFLAGS + export LDFLAGS + ++exit 0 + # Run bootstrap CMake to configure real CMake + cmake_options="-DCMAKE_BOOTSTRAP=1" + if test -n "${cmake_verbose}"; then diff --git a/srcpkgs/cmake-bootstrap/patches/not-needed.patch b/srcpkgs/cmake-bootstrap/patches/not-needed.patch new file mode 100644 index 00000000000..4c73eb9766d --- /dev/null +++ b/srcpkgs/cmake-bootstrap/patches/not-needed.patch @@ -0,0 +1,107 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -522,12 +522,9 @@ if(BUILD_TESTING) + endif() + + if(NOT CMake_TEST_EXTERNAL_CMAKE) +- # Install license file as it requires. +- install(FILES Copyright.txt DESTINATION ${CMAKE_DOC_DIR}) +- + # Install script directories. + install( +- DIRECTORY Help Modules Templates ++ DIRECTORY Modules Templates + DESTINATION ${CMAKE_DATA_DIR} + FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + DIRECTORY_PERMISSIONS OWNER_READ OWNER_EXECUTE OWNER_WRITE +@@ -543,9 +540,6 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE) + REGEX "Help/(dev|guide)($|/)" EXCLUDE + ) + +- # Install auxiliary files integrating with other tools. +- add_subdirectory(Auxiliary) +- + # Optionally sign installed binaries. + if(CMake_INSTALL_SIGNTOOL) + configure_file(Source/CMakeInstallSignTool.cmake.in Source/CMakeInstallSignTool.cmake @ONLY) +--- a/Source/kwsys/CMakeLists.txt ++++ b/Source/kwsys/CMakeLists.txt +@@ -615,11 +615,6 @@ if(KWSYS_INSTALL_DOC_DIR) + COMPONENT ${KWSYS_INSTALL_COMPONENT_NAME_RUNTIME} + ) + endif() +- +- # Install the license under the documentation directory. +- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt +- DESTINATION ${KWSYS_INSTALL_DOC_DIR}/${KWSYS_NAMESPACE} +- ${KWSYS_INSTALL_LICENSE_OPTIONS}) + endif() + + #----------------------------------------------------------------------------- +--- a/Utilities/cmcurl/CMakeLists.txt ++++ b/Utilities/cmcurl/CMakeLists.txt +@@ -1579,8 +1579,6 @@ target_link_libraries(curltest cmcurl) + if(BUILD_TESTING AND CMAKE_CURL_TEST_URL) + add_test(curl curltest ${CMAKE_CURL_TEST_URL}) + endif() +- +-install(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmcurl) + #----------------------------------------------------------------------------- + + if(0) # This code not needed for building within CMake. +--- a/Utilities/cmlibarchive/CMakeLists.txt ++++ b/Utilities/cmlibarchive/CMakeLists.txt +@@ -2077,5 +2077,3 @@ add_subdirectory(cat) + add_subdirectory(tar) + add_subdirectory(cpio) + ENDIF() +- +-install(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmlibarchive) +--- a/Utilities/cmliblzma/CMakeLists.txt ++++ b/Utilities/cmliblzma/CMakeLists.txt +@@ -185,5 +185,3 @@ ELSEIF((CMAKE_C_COMPILER_ID STREQUAL "GN + # Disable the old GNU compiler optimizer. + SET_PROPERTY(TARGET cmliblzma PROPERTY COMPILE_FLAGS "-O0") + ENDIF() +- +-INSTALL(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmliblzma) +--- a/Utilities/cmlibrhash/CMakeLists.txt ++++ b/Utilities/cmlibrhash/CMakeLists.txt +@@ -36,5 +36,3 @@ include_directories( + ) + + add_library(cmlibrhash ${librhash_sources}) +- +-install(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmlibrhash) +--- a/Utilities/cmlibuv/CMakeLists.txt ++++ b/Utilities/cmlibuv/CMakeLists.txt +@@ -364,5 +364,3 @@ include_directories( + add_library(cmlibuv STATIC ${uv_sources}) + target_link_libraries(cmlibuv ${uv_libraries}) + set_property(TARGET cmlibuv PROPERTY COMPILE_DEFINITIONS ${uv_defines}) +- +-install(FILES LICENSE DESTINATION ${CMAKE_DOC_DIR}/cmlibuv) +--- a/Utilities/cmnghttp2/CMakeLists.txt ++++ b/Utilities/cmnghttp2/CMakeLists.txt +@@ -49,5 +49,3 @@ target_include_directories(cmnghttp2 PRI + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/lib/includes + ) +- +-install(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmnghttp2) +--- a/Utilities/cmzlib/CMakeLists.txt ++++ b/Utilities/cmzlib/CMakeLists.txt +@@ -24,5 +24,3 @@ add_library(cmzlib + uncompr.c + zutil.c + ) +- +-install(FILES Copyright.txt DESTINATION ${CMAKE_DOC_DIR}/cmzlib) +--- a/Utilities/cmzstd/CMakeLists.txt ++++ b/Utilities/cmzstd/CMakeLists.txt +@@ -46,5 +46,3 @@ add_library(cmzstd STATIC + + # BMI2 instructions are not supported in older environments. + set_property(TARGET cmzstd PROPERTY COMPILE_DEFINITIONS DYNAMIC_BMI2=0) +- +-install(FILES LICENSE DESTINATION ${CMAKE_DOC_DIR}/cmzstd) diff --git a/srcpkgs/cmake-bootstrap/template b/srcpkgs/cmake-bootstrap/template new file mode 100644 index 00000000000..c46583a70f7 --- /dev/null +++ b/srcpkgs/cmake-bootstrap/template @@ -0,0 +1,70 @@ +# Template file for 'cmake-bootstrap' +pkgname=cmake-bootstrap +version=3.27.2 +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 + -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 +repository="bootstrap" + +if [ "$XBPS_TARGET_LIBC" = musl ]; then + configure_args+=" -DCMake_NO_SELF_BACKTRACE=1" +fi + +pre_configure() { + local f + rm -rf build + mkdir build + cd build + CC=$CC_FOR_BUILD CFLAGS="$CFLAGS_FOR_BUILD" \ + CXX=$CXX_FOR_BUILD CXXFLAGS="$CXXFLAGS_FOR_BUILD" \ + LD=$LD_FOR_BUILD LDFLAGS="$LDFLAGS_FOR_BUILD" \ + ../bootstrap --system-libs --generator=Ninja \ + ${XBPS_MAKEJOBS:+--parallel=$XBPS_MAKEJOBS} + # Make sure build directory is clean + for f in *; do + if [ "$f" != Bootstrap.cmk ]; then + return 1 + fi + done + cd ${wrksrc} + PATH="${wrksrc}/build/Bootstrap.cmk:$PATH" +} + +do_check() { + mkdir -p /tmp/fake-bin + ln -sf /usr/bin/bsdtar /tmp/fake-bin/tar + PATH=$PATH:/tmp/fake-bin + cd build + ./bin/ctest -E "ExternalProject|UpdateGIT|CMP0150" +} + +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 + { + cat Copyright.txt + printf '%s\n' '' =============================== "FreeBSD ELF library" + sed -e '/\$FreeBSD\$/q' Utilities/cmelf/elf_common.h + for _lib in bzip2 curl expat jsoncpp libarchive libuv nghttp2 zstd + do + printf '%s\n' '' =============================== "$_lib" + for _file in COPYING LICENSE NOTICE; do + if [ -f "Utilities/cm${_lib}/${_file}" ]; then + cat "Utilities/cm${_lib}/${_file}" + fi + done + done + }>license + vlicense license +} diff --git a/srcpkgs/cmake-bootstrap/update b/srcpkgs/cmake-bootstrap/update new file mode 100644 index 00000000000..fa692de2a9c --- /dev/null +++ b/srcpkgs/cmake-bootstrap/update @@ -0,0 +1,2 @@ +site='https://cmake.org/files/LatestRelease/cmake-latest-files-v1.json' +pkgname=cmake