[lfs] 05/05: loongarch spec2026: add cmake

"Git Owner" ([email protected] via lfs-book Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.book
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch xry111/loongarch-12.0-spec2026
in repository lfs.

commit 850c58d1560888866fa68de6e9158034e004f749
Author: Xi Ruoyao <[email protected]>
AuthorDate: Wed May 6 11:29:11 2026 +0800

    loongarch spec2026: add cmake
---
 chapter03/packages.xml  |   9 +++
 chapter08/chapter08.xml |   1 +
 chapter08/cmake.xml     | 163 ++++++++++++++++++++++++++++++++++++++++++++++++
 packages.ent            |   8 +++
 4 files changed, 181 insertions(+)

diff --git a/chapter03/packages.xml b/chapter03/packages.xml
index dba151cac..a015a404c 100644
--- a/chapter03/packages.xml
+++ b/chapter03/packages.xml
@@ -119,6 +119,15 @@
       </listitem>
     </varlistentry>
 
+    <varlistentry>
+      <term>CMake (&cmake-version;) - <token>&cmake-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&cmake-home;"/></para>
+        <para>Download: <ulink url="&cmake-url;"/></para>
+        <para>MD5 sum: <literal>&cmake-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
     <varlistentry>
       <term>Coreutils (&coreutils-version;) - <token>&coreutils-size;</token>:</term>
       <listitem>
diff --git a/chapter08/chapter08.xml b/chapter08/chapter08.xml
index 3f356d39e..957387932 100644
--- a/chapter08/chapter08.xml
+++ b/chapter08/chapter08.xml
@@ -100,6 +100,7 @@
 
   <!-- Both sysv and systemd builds -->
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="e2fsprogs.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="cmake.xml"/>
 
   <!-- sysv only -->
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/>
diff --git a/chapter08/cmake.xml b/chapter08/cmake.xml
new file mode 100644
index 000000000..8c7fdd7b7
--- /dev/null
+++ b/chapter08/cmake.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-cmake" role="wrap">
+  <?dbhtml filename="cmake.html"?>
+
+  <sect1info condition="script">
+    <productname>cmake</productname>
+    <productnumber>&cmake-version;</productnumber>
+    <address>&cmake-url;</address>
+  </sect1info>
+
+  <title>CMake-&cmake-version;</title>
+
+  <indexterm zone="ch-system-cmake">
+    <primary sortas="a-CMake">CMake</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The CMake package contains a modern toolset used for generating
+      Makefiles. It is a successor of the auto-generated configure script
+      and aims to be platform- and compiler-independent. A significant user
+      of CMake is KDE since version 4.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&cmake-fin-sbu;</seg>
+        <seg>&cmake-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of CMake</title>
+
+    <para>
+      At first, prevent applications using CMake from attempting to install
+      libraries into <filename class='directory'>/usr/lib64</filename> that
+      LFS does not support:
+    </para>
+
+<screen><userinput remap='pre'>sed -i '/"lib64"/s/64//' Modules/GNUInstallDirs.cmake</userinput></screen>
+
+    <para>Prepare CMake for compilation:</para>
+
+<screen><userinput remap="configure">./bootstrap --prefix=/usr        \
+            --system-libs        \
+            --mandir=/share/man  \
+            --no-system-jsoncpp  \
+            --no-system-cppdap   \
+            --no-system-librhash \
+            --no-system-curl     \
+            --no-system-nghttp2  \
+            --no-system-libuv    \
+            --no-system-libarchive \
+            --docdir=/share/doc/cmake-&cmake-version;
+</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure options:</title>
+
+      <varlistentry>
+        <term><parameter>--system-libs</parameter></term>
+        <listitem>
+          <para>This switch forces the build system to link against the
+          system installed version for all needed libraries but those
+          explicitly specified via a <option>--no-system-*</option>
+          option.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>To test the results, issue
+    (replace <replaceable>$(nproc)</replaceable> with an integer between 1
+    and the number of system logical cores if you don't want to use
+    all):</para>
+
+<screen><userinput remap="test">bin/ctest -j<replaceable>$(nproc)</replaceable></userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+
+  <sect2 id="contents-cmake" role="content">
+    <title>Contents of CMake</title>
+
+    <segmentedlist>
+      <segtitle>Installed program</segtitle>
+
+      <seglistitem>
+        <seg>make</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="ccmake">
+        <term><command>ccmake</command></term>
+        <listitem>
+          <para>is a curses based interactive frontend to
+          <command>cmake</command></para>
+          <indexterm zone="ch-system-cmake ccmake">
+            <primary sortas="b-ccmake">ccmake</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="cmake">
+        <term><command>cmake</command></term>
+        <listitem>
+          <para>is the makefile generator</para>
+          <indexterm zone="ch-system-cmake cmake">
+            <primary sortas="b-cmake">cmake</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="cpack">
+        <term><command>cpack</command></term>
+        <listitem>
+          <para>is the <application>CMake</application> packaging
+          program</para>
+          <indexterm zone="ch-system-cmake cpack">
+            <primary sortas="b-cpack">cpack</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="ctest">
+        <term><command>ctest</command></term>
+        <listitem>
+          <para>is a testing utility for cmake-generated build trees</para>
+          <indexterm zone="ch-system-cmake ctest">
+            <primary sortas="b-ctest">ctest</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </sect2>
+
+</sect1>
diff --git a/packages.ent b/packages.ent
index b3e0cd96b..a92f8aaeb 100644
--- a/packages.ent
+++ b/packages.ent
@@ -104,6 +104,14 @@
 <!ENTITY check-fin-du "12 MB">
 <!ENTITY check-fin-sbu "0.1 SBU (about 1.6 SBU with tests)">
 
+<!ENTITY cmake-version "4.3.2">
+<!ENTITY cmake-size "12,665 KB">
+<!ENTITY cmake-url "https://cmake.org/files/v4.3/cmake-&cmake-version;.tar.gz">
+<!ENTITY cmake-md5 "fdacfba9fc146a016e96cabefc3f1942">
+<!ENTITY cmake-home "https://cmake.org/">
+<!ENTITY cmake-fin-du "2.2 GB (with tests)">
+<!ENTITY cmake-fin-sbu "2.2 SBU (about 6.5 SBU with tests)">
+
 <!ENTITY coreutils-version "9.3">
 <!ENTITY coreutils-size "5,673 KB">
 <!ENTITY coreutils-url "&gnu;coreutils/coreutils-&coreutils-version;.tar.xz">

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.