#!/bin/bash # ============================================================================ # DarkForge Linux — Phase 3, Chapter 8.44: Perl (Final) # ============================================================================ # Purpose: Build final Perl interpreter (full install, not temporary). # Provides Perl scripting language used by many tools and packages. # Inputs: /sources/perl-5.40.2.tar.xz # Outputs: perl interpreter, modules, and documentation in /usr/ # Assumes: Running inside chroot # Ref: LFS 13.0 §8.44 # ============================================================================ set -euo pipefail source /sources/toolchain-scripts/100-chroot-env.sh PACKAGE="perl" VERSION="5.40.2" echo "=== Building ${PACKAGE}-${VERSION} (Final) ===" pkg_extract "${PACKAGE}-${VERSION}.tar.xz" cd "${PACKAGE}-${VERSION}" export BUILD_ZLIB=False export BUILD_BZIP2=0 # Run perl's configuration script ./Configure \ -des \ -Dprefix=/usr \ -Dvendorprefix=/usr \ -Duseshrplib \ -Dvendorlib=/usr/lib/perl5/5.40/vendor_perl \ -Dsitelib=/usr/lib/perl5/5.40/site_perl make make test || true make install # Create a symlink to simplify path references ln -sfv /usr/lib/perl5/5.40/Config_heavy.pl /usr/lib/perl5/5.40/Config_heavy.pl.bak || true pkg_cleanup "${PACKAGE}-${VERSION}" echo "=== ${PACKAGE}-${VERSION} complete ==="