3.40. perl-5.36.0

#!/bin/sh
# Copyright © 1999-2022 Gerard Beekmans
# Copyright © 2017-2022 Random Crew
# Distributed under the terms of MIT License.

Configuration

perl version for usage in paths is extracted from variable PV, containing full package version.

src_config()
{
    export BUILD_ZLIB=False
    export BUILD_BZIP2=0
    perl_version=${PV%.*}

    sh Configure \
        -des \
        -Dprefix=${PREFIX} \
        -Dvendorprefix=${PREFIX} \
        -Dprivlib=${PREFIX}/lib/perl5/${perl_version}/core_perl     \
        -Darchlib=${PREFIX}/lib/perl5/${perl_version}/core_perl     \
        -Dsitelib=${PREFIX}/lib/perl5/${perl_version}/site_perl     \
        -Dsitearch=${PREFIX}/lib/perl5/${perl_version}/site_perl    \
        -Dvendorlib=${PREFIX}/lib/perl5/${perl_version}/vendor_perl \
        -Dvendorarch=${PREFIX}/lib/perl5/${perl_version}/vendor_perl \
        -Dman1dir=${PREFIX}/share/man/man1 \
        -Dman3dir=${PREFIX}/share/man/man3 \
        -Dpager="${PREFIX}/bin/less -isR"  \
        -Duseshrplib                       \
        -Dusethreads
}

Compilation

src_compile()
{
    make ${MAKEOPTS}
}

Installation

We are not doing unset of variables:

unset BUILD_ZLIB BUILD_BZIP2

As they are unset automatically after the build of current package ends.

src_install()
{
    make install ${MAKEOPTS} DESTDIR=${D}
}

Unit testing

src_check()
{
    make -k test
}

Build code

passinside.sh
perl.build

Other files

meta.txt
text

Links

url.lfs: https://linuxfromscratch.org/lfs/view/11.2/chapter08/perl.html
url.lfs.stage1: https://linuxfromscratch.org/lfs/view/11.2/chapter07/perl.html