Files
darkforge/toolchain/scripts/137-gperf.sh
2026-03-20 15:09:30 +01:00

33 lines
937 B
Bash
Executable File

#!/bin/bash
# ============================================================================
# DarkForge Linux — Phase 3, Chapter 8.40: Gperf
# ============================================================================
# Purpose: Build gperf, a perfect hash function generator.
# Optimizes keyword lookup tables used by compilers and tools.
# Inputs: /sources/gperf-3.1.tar.gz
# Outputs: gperf binary in /usr/bin/
# Assumes: Running inside chroot
# Ref: LFS 13.0 §8.40
# ============================================================================
set -euo pipefail
source /sources/toolchain-scripts/100-chroot-env.sh
PACKAGE="gperf"
VERSION="3.1"
echo "=== Building ${PACKAGE}-${VERSION} (Phase 3) ==="
pkg_extract "${PACKAGE}-${VERSION}.tar.gz"
cd "${PACKAGE}-${VERSION}"
./configure \
--prefix=/usr
make
make install
pkg_cleanup "${PACKAGE}-${VERSION}"
echo "=== ${PACKAGE}-${VERSION} complete ==="