mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
So that recipes using Module::Build don't need to specify that in their recipes. Ironically, Module::Build itself doesn't profit from that, because its build script overrides the default, so we have to set it on the command line still (or alternatively patch the build file). Also, unset the variable for tests, otherwise a test would have to be patched too.
60 lines
1.6 KiB
Bash
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="4"
|
|
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
|
|
}
|