Files
haikuports/dev-perl/module_build/module_build-0.4234.recipe
2025-12-24 18:47:12 +01:00

60 lines
1.6 KiB
Bash

SUMMARY="Build and install Perl modules"
DESCRIPTION="Module::Build is a system for building, testing, and installing \
Perl modules. It is meant to be an alternative to ExtUtils::MakeMaker. \
Developers may alter the behavior of the module through subclassing in a much \
more straightforward way than with MakeMaker. It also does not require a make \
on your system - most of the Module::Build code is pure-perl and written in a \
very cross-platform way."
HOMEPAGE="https://metacpan.org/pod/distribution/Module-Build/lib/Module/Build.pm"
COPYRIGHT="2001-2006 Ken Williams"
LICENSE="Artistic"
REVISION="5"
SOURCE_URI="https://cpan.metacpan.org/authors/id/L/LE/LEONT/Module-Build-$portVersion.tar.gz"
CHECKSUM_SHA256="66aeac6127418be5e471ead3744648c766bd01482825c5b66652675f2bc86a8f"
SOURCE_DIR="Module-Build-$portVersion"
PATCHES="module_build-$portVersion.patchset"
ARCHITECTURES="any"
PROVIDES="
module_build = $portVersion
cmd:config_data
"
REQUIRES="
haiku
vendor_perl
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:perl
"
BUILD()
{
# We do patch Module::Build to install into vendor directories by default in HaikuPorter, but
# this Build.PL script overrides it for historical reasons, so specify it manually still.
perl Build.PL --installdirs vendor --prefix $prefix
./Build
}
INSTALL()
{
./Build install
# remove architecture-specific files
cd $prefix
rm -r $(perl -V:vendorarch | cut -d\' -f2 | cut -d/ -f5-)
# cut extracts the quoted string and strips the prefix (which is perl's and not ours)
}
TEST()
{
unset HAIKU_USE_VENDOR_DIRECTORIES
# tests assume installation in site directories by default
./Build test
}