Big script

This commit is contained in:
2026-03-20 15:09:30 +01:00
parent dc2ac2f768
commit a2ca02a856
92 changed files with 5842 additions and 0 deletions

39
toolchain/scripts/121-mpc.sh Executable file
View File

@@ -0,0 +1,39 @@
#!/bin/bash
# ============================================================================
# DarkForge Linux — Phase 3, Chapter 8.24: MPC (Multiple Precision Complex)
# ============================================================================
# Purpose: Build MPC, a library for arbitrary-precision complex number
# arithmetic. Required by GCC for floating-point math operations.
# Inputs: /sources/mpc-1.3.1.tar.gz
# GMP and MPFR already installed
# Outputs: MPC library in /usr/lib, headers in /usr/include
# Ref: LFS 13.0 §8.24
# ============================================================================
set -euo pipefail
source /sources/toolchain-scripts/100-chroot-env.sh
PACKAGE="mpc"
VERSION="1.3.1"
echo "=== Building ${PACKAGE}-${VERSION} (Phase 3) ==="
pkg_extract "${PACKAGE}-${VERSION}.tar.gz"
cd "${PACKAGE}-${VERSION}"
# Configure MPC with GMP and MPFR support already in place
./configure \
--prefix=/usr \
--disable-static
make
make html
make install
make install-html
# Verify installation
echo "MPC version: $(grep -o '#define MPC_VERSION "[^"]*' src/mpc.h | awk -F'"' '{print $NF}')"
cd "${SRCDIR}"
pkg_cleanup "${PACKAGE}-${VERSION}"
echo "=== ${PACKAGE}-${VERSION} complete ==="