From 89f7c701b67e56def87d697d71289a424a282be0 Mon Sep 17 00:00:00 2001 From: YellowJacketLinux Date: Wed, 16 Oct 2024 14:26:34 -0700 Subject: [PATCH] CMake --- 18-cmake.sh | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 14 +++++++++++-- 2 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 18-cmake.sh diff --git a/18-cmake.sh b/18-cmake.sh new file mode 100644 index 0000000..ccfce4a --- /dev/null +++ b/18-cmake.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +if [ "`whoami`" == "root" ]; then + echo "Danger, Will Robinson!" + echo "Do not execute me as r00t" + exit 1 +fi + +TARBALL="cmake-3.30.5.tar.gz" +DNL="https://cmake.org/files/v3.30/cmake-3.30.5.tar.gz" +SHA256="9f55e1a40508f2f29b7e065fa08c29f82c402fa0402da839fffe64a25755a86d" + +[ -d cmake-3.30.5 ] && rm -rf cmake-3.30.5 + +if [ ! -f ${TARBALL} ]; then + wget ${DNL} + if [ $? -ne 0 ]; then + echo "Could not retrieve ${DNL}" + echo "Sorry." + exit 1 + fi +fi + +CHECK="`sha256sum ${TARBALL} |awk ' { print $1 } ' `" +if [ "${CHECK}" != "${SHA256}" ]; then + echo "${TARBALL} does not match expected SHA256. Sorry." + exit 1 +fi + +tar -zxf ${TARBALL} && cd cmake-3.30.5 + +sed -i '/"lib64"/s/64//' Modules/GNUInstallDirs.cmake + +./bootstrap --prefix=/usr \ + --system-libs \ + --mandir=/share/man \ + --no-system-jsoncpp \ + --no-system-cppdap \ + --no-system-librhash +if [ $? -ne 0 ]; then + echo "Bootstrap script failed for CMake. Sorry." + exit 1 +fi + +make +if [ $? -ne 0 ]; then + echo "Failed building CMake. Sorry." + exit 1 +fi + +echo "running test suite" +LC_ALL=en_US.UTF-8 bin/ctest -j4 -O cmake-3.30.5-test.log + +echo +echo "Inspect cmake-3.30.5/cmake-3.30.5-test.log and if okay, as root:" +echo +echo " cd cmake-3.30.5" +echo " make install" +echo diff --git a/README.md b/README.md index 038558c..4b23c63 100644 --- a/README.md +++ b/README.md @@ -112,8 +112,8 @@ Justification: Needed for libarchive. No build dependencies outside of LFS. Dependency Eleven: libarchive ----------------------------- -Justification: Needed to build RPM. Depends upon libxml2, LZO, Nettle, and -pcre2. +Justification: Needed to build RPM and CMake. Depends upon libxml2, LZO, Nettle, +and pcre2. * Script: [`11-libarchive.sh`](11-libarchive.sh) * Status: Script Works @@ -165,3 +165,13 @@ Justification: Needed to build CMake. Depends upon libxml2 to build. * Script: [`17-nghttp2.sh`](17-nghttp2.sh) * Status: Script Untested + +Dependency Eighteen: CMake +-------------------------- + +Justification: Needed by brotli and current RPM versions. Depends upon curl, +libarchive, libuv, and nghttp2. + +* Script: [`18-cmake.sh`](18-cmake.sh) +* Status: Script Untested +* Note: Rebuild once GCC Fortran available