Files
darkforge/toolchain/scripts/010-diffutils.sh
2026-03-20 11:41:05 +01:00

35 lines
988 B
Bash
Executable File

#!/bin/bash
# ============================================================================
# DarkForge Linux — Phase 0, Chapter 6: Diffutils
# ============================================================================
# Purpose: Cross-compile GNU diffutils (diff, cmp, sdiff, diff3).
# Inputs: ${LFS}/sources/diffutils-3.12.tar.xz
# Outputs: diff utilities in ${LFS}/usr/bin/
# Ref: LFS 13.0 §6.6
# ============================================================================
set -euo pipefail
source "${LFS}/sources/darkforge-env.sh"
PACKAGE="diffutils"
VERSION="3.12"
SRCDIR="${LFS}/sources"
echo "=== Building ${PACKAGE}-${VERSION} (Temporary Tool) ==="
cd "${SRCDIR}"
tar -xf "${PACKAGE}-${VERSION}.tar.xz"
cd "${PACKAGE}-${VERSION}"
./configure \
--prefix=/usr \
--host="${LFS_TGT}" \
--build="$(./build-aux/config.guess)"
make
make DESTDIR="${LFS}" install
cd "${SRCDIR}"
rm -rf "${PACKAGE}-${VERSION}"
echo "=== ${PACKAGE}-${VERSION} complete ==="