cmake-bootstrap: update to 3.19.0

Close: #26544
This commit is contained in:
Đoàn Trần Công Danh 2020-11-28 08:10:24 +07:00
parent 8f95b16a7a
commit c824bdaeb3
3 changed files with 29 additions and 125 deletions

View file

@ -0,0 +1,18 @@
Gives CMAKE_DOC_DIR undefined, this is half-baked cmake
so don't truly need
---
diff --git Source/cmSystemTools.cxx Source/cmSystemTools.cxx
index 747cedc..7c516d8 100644
--- Source/cmSystemTools.cxx
+++ Source/cmSystemTools.cxx
@@ -2171,10 +2171,6 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
std::string const prefix =
exe_dir.substr(0, exe_dir.size() - cmStrLen(CMAKE_BIN_DIR));
cmSystemToolsCMakeRoot = cmStrCat(prefix, CMAKE_DATA_DIR);
- if (cmSystemTools::FileExists(
- cmStrCat(prefix, CMAKE_DOC_DIR "/html/index.html"))) {
- cmSystemToolsHTMLDoc = cmStrCat(prefix, CMAKE_DOC_DIR "/html");
- }
}
if (cmSystemToolsCMakeRoot.empty() ||
!cmSystemTools::FileExists(

View file

@ -1,122 +0,0 @@
diff --git Source/cmSystemTools.cxx Source/cmSystemTools.cxx
index 1e78d36..a678122 100644
--- Source/cmSystemTools.cxx
+++ Source/cmSystemTools.cxx
@@ -1988,7 +1988,7 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
#ifdef CMAKE_BOOTSTRAP
// The bootstrap cmake does not provide the other tools,
// so use the directory where they are about to be built.
- exe_dir = CMAKE_BOOTSTRAP_BINARY_DIR "/bin";
+ // this cmake will be installed to system directory
#endif
cmSystemToolsCTestCommand =
cmStrCat(exe_dir, "/ctest", cmSystemTools::GetExecutableExtension());
@@ -2010,7 +2010,6 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
cmSystemToolsCMClDepsCommand.clear();
}
-#ifndef CMAKE_BOOTSTRAP
// Install tree has
// - "<prefix><CMAKE_BIN_DIR>/cmake"
// - "<prefix><CMAKE_DATA_DIR>"
@@ -2041,10 +2040,6 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
}
}
}
-#else
- // Bootstrap build knows its source.
- cmSystemToolsCMakeRoot = CMAKE_BOOTSTRAP_SOURCE_DIR;
-#endif
}
std::string const& cmSystemTools::GetCMakeCommand()
diff --git bootstrap bootstrap
index 04067dc..832a7ab 100755
--- bootstrap
+++ bootstrap
@@ -812,14 +812,6 @@ cmake_try_run ()
echo "Test failed to produce executable"
return 2
fi
- ./${TMPFILE}
- RES=$?
- rm -f "${TMPFILE}"
- if test "${RES}" -ne "0"; then
- echo "Test produced non-zero return code"
- return 3
- fi
- echo "Test succeeded"
return 0
}
@@ -839,13 +831,6 @@ cmake_try_make ()
echo "${COMPILER} does not produce output"
return 2
fi
- ./test
- RES=$?
- rm -f "test"
- if test "${RES}" -ne "0"; then
- echo "${MAKE_PROC} produces strange executable"
- return 3
- fi
echo "${MAKE_PROC} works"
return 0
}
@@ -1444,8 +1429,8 @@ cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION \"${cmake_version}\
cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP_SOURCE_DIR \"${CMAKE_BOOTSTRAP_SOURCE_DIR}\""
cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP_BINARY_DIR \"${CMAKE_BOOTSTRAP_BINARY_DIR}\""
cmake_report cmConfigure.h${_tmp} "#define CMake_DEFAULT_RECURSION_LIMIT 400"
-cmake_report cmConfigure.h${_tmp} "#define CMAKE_BIN_DIR \"/bootstrap-not-insalled\""
-cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"/bootstrap-not-insalled\""
+cmake_report cmConfigure.h${_tmp} "#define CMAKE_BIN_DIR \"$cmake_bin_dir\""
+cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"$cmake_data_dir\""
cmake_report cmConfigure.h${_tmp} "#define CM_FALLTHROUGH"
if ${cmake_system_mingw}; then
@@ -1691,45 +1676,3 @@ if test -f "${cmake_init_file}"; then
cat "${cmake_init_file}" >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
fi
)
-
-echo "---------------------------------------------"
-
-# Run make to build bootstrap cmake
-if test "x${cmake_parallel_make}" != "x"; then
- ${cmake_make_processor} ${cmake_make_flags}
-else
- ${cmake_make_processor}
-fi
-RES=$?
-if test "${RES}" -ne "0"; then
- cmake_error 9 "Problem while running ${cmake_make_processor}"
-fi
-cd "${cmake_binary_dir}"
-
-# Set C, CXX, and MAKE environment variables, so that real real cmake will be
-# build with same compiler and make
-CC="${cmake_c_compiler}"
-CXX="${cmake_cxx_compiler}"
-MAKE="${cmake_make_processor}"
-export CC
-export CXX
-export MAKE
-export CFLAGS
-export CXXFLAGS
-export LDFLAGS
-
-# Run bootstrap CMake to configure real CMake
-cmake_options="-DCMAKE_BOOTSTRAP=1"
-if test -n "${cmake_verbose}"; then
- cmake_options="${cmake_options} -DCMAKE_VERBOSE_MAKEFILE=1"
-fi
-"${cmake_bootstrap_dir}/cmake" "${cmake_source_dir}" "-C${cmake_bootstrap_dir}/InitialCacheFlags.cmake" "-G${cmake_bootstrap_generator}" ${cmake_options} ${cmake_bootstrap_system_libs} "$@"
-RES=$?
-if test "${RES}" -ne "0"; then
- cmake_error 11 "Problem while running initial CMake"
-fi
-
-echo "---------------------------------------------"
-
-# And we are done. Now just run make
-echo "CMake has bootstrapped. Now run ${cmake_make_processor}."

View file

@ -1,6 +1,6 @@
# Template file for 'cmake-bootstrap'
pkgname=cmake-bootstrap
version=3.18.2
version=3.19.0
revision=1
wrksrc=cmake-$version
bootstrap=yes
@ -9,20 +9,28 @@ configure_args="--prefix=/usr --datadir=share/$pkgname --bindir=bin
--system-libs --no-system-curl --no-system-jsoncpp --no-system-nghttp2
--no-system-librhash --no-system-libuv --no-system-expat --no-qt-gui
${XBPS_MAKEJOBS:+--parallel=$XBPS_MAKEJOBS}"
make_build_args="-C Bootstrap.cmk"
make_build_args="-C Bootstrap.cmk DOCDIR=/usr/share/doc"
makedepends="libarchive-devel"
short_desc="CMake (for bootstrapping only, not for normal usage)"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="LGPL-2.1-or-later, BSD-3-Clause"
homepage="https://www.cmake.org"
distfiles="https://www.cmake.org/files/v${version%.*}/cmake-${version}.tar.gz"
checksum=5d4e40fc775d3d828c72e5c45906b4d9b59003c9433ff1b36a1cb552bbd51d7e
checksum=fdda688155aa7e72b7c63ef6f559fca4b6c07382ea6dca0beb5f45aececaf493
conflicts="cmake>=0"
CFLAGS="-DCMAKE_USE_SYSTEM_ZLIB -DCMAKE_USE_SYSTEM_LIBARCHIVE"
CXXFLAGS="$CFLAGS"
post_patch() {
vsed -i -e '/exe_dir = CMAKE_BOOTSTRAP_BINARY_DIR/d' \
-e '/ifndef CMAKE_BOOTSTRAP/{N;/Install tree/s/BOOTSTRAP/&_NO/}' \
Source/cmSystemTools.cxx
vsed -i -e 's/[ ]RES=/ return /' \
-e '/define CMAKE_BIN_DIR/s,/[a-z-]*,bin,' \
-e "/define CMAKE_DATA_DIR/s,/[a-z-]*,share/$pkgname," \
-e '/Run make to build bootstrap cmake/,$d' \
bootstrap
rm -rf Utilities/cmbzip2
rm -rf Utilities/cmcurl
rm -rf Utilities/cmexpat