mro_compat: new perl module recipe

This commit is contained in:
Joachim Mairböck
2024-09-22 21:19:15 +02:00
parent 2d43ef845d
commit f8508e94a1

View File

@@ -0,0 +1,55 @@
SUMMARY="Provides mro::* interface compatibility for Perls < 5.9.5"
DESCRIPTION="The \"mro\" namespace provides several utilities for dealing with method resolution \
order and method caching in general in Perl 5.9.5 and higher.
This module provides those interfaces for earlier versions of Perl (back to 5.6.0 anyways).
It is a harmless no-op to use this module on 5.9.5+. That is to say, code which properly uses \
MRO::Compat will work unmodified on both older Perls and 5.9.5+.
If you're writing a piece of software that would like to use the parts of 5.9.5+'s mro:: \
interfaces that are supported here, and you want compatibility with older Perls, this is the \
module for you."
HOMEPAGE="https://metacpan.org/pod/MRO::Compat"
COPYRIGHT="2007-2008 Brandon L. Black"
LICENSE="Artistic"
REVISION="1"
SOURCE_URI="https://cpan.metacpan.org/authors/id/H/HA/HAARG/MRO-Compat-$portVersion.tar.gz"
CHECKSUM_SHA256="0d4535f88e43babd84ab604866215fc4d04398bd4db7b21852d4a31b1c15ef61"
SOURCE_DIR="MRO-Compat-$portVersion"
ARCHITECTURES="any"
PROVIDES="
mro_compat = $portVersion
"
REQUIRES="
haiku
vendor_perl
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:make
cmd:perl
"
BUILD()
{
perl Makefile.PL PREFIX=$prefix
make
}
INSTALL()
{
make pure_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()
{
make test
}