test_file_sharedir: new perl module recipe

This commit is contained in:
Joachim Mairböck
2024-10-27 21:35:11 +01:00
parent cc52c1d81f
commit ee42d48744

View File

@@ -0,0 +1,66 @@
SUMMARY="Create a Fake ShareDir for your modules for testing"
DESCRIPTION="Test::File::ShareDir is some low level plumbing to enable a distribution to perform \
tests while consuming its own share directories in a manner similar to how they will be once \
installed.
This allows File::ShareDir to see the latest version of content instead of simply whatever is \
installed on whichever target system you happen to be testing on."
HOMEPAGE="https://metacpan.org/pod/Test::File::ShareDir"
COPYRIGHT="2017 by Kent Fredric"
LICENSE="Artistic"
REVISION="1"
SOURCE_URI="https://cpan.metacpan.org/authors/id/K/KE/KENTNL/Test-File-ShareDir-$portVersion.tar.gz"
CHECKSUM_SHA256="b33647cbb4b2f2fcfbde4f8bb4383d0ac95c2f89c4c5770eb691f1643a337aad"
SOURCE_DIR="Test-File-ShareDir-$portVersion"
ARCHITECTURES="any"
PROVIDES="
test_file_sharedir = $portVersion
"
REQUIRES="
haiku
class_tiny
file_copy_recursive
file_sharedir
path_tiny
scope_guard
vendor_perl
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:make
cmd:perl
"
TEST_REQUIRES="
class_tiny
file_copy_recursive
file_sharedir
path_tiny
scope_guard
test_fatal
"
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
}