package_stash[_xs]: new perl module recipes

This commit is contained in:
Joachim Mairböck
2024-10-27 15:00:03 +01:00
parent aad32bd32a
commit dce625a3c6
2 changed files with 120 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
SUMMARY="Routines for manipulating stashes"
DESCRIPTION="Manipulating stashes (Perl's symbol tables) is occasionally necessary, but \
incredibly messy, and easy to get wrong. This module hides all of that behind a simple API."
HOMEPAGE="https://metacpan.org/pod/Package::Stash"
COPYRIGHT="2022 by Jesse Luehrs"
LICENSE="Artistic"
REVISION="1"
SOURCE_URI="https://cpan.metacpan.org/authors/id/E/ET/ETHER/Package-Stash-$portVersion.tar.gz"
CHECKSUM_SHA256="5a9722c6d9cb29ee133e5f7b08a5362762a0b5633ff5170642a5b0686e95e066"
SOURCE_DIR="Package-Stash-$portVersion"
ARCHITECTURES="any"
PROVIDES="
package_stash = $portVersion
cmd:package_stash_conflicts
"
REQUIRES="
haiku
dist_checkconflicts
module_implementation
package_stash_xs
vendor_perl
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:make
cmd:perl
"
TEST_REQUIRES="
cpan_meta_check
dist_checkconflicts
module_implementation
package_stash_xs
test_fatal
test_needs
variable_magic
"
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
}

View File

@@ -0,0 +1,58 @@
SUMMARY="Faster and more correct implementation of the Package::Stash API"
DESCRIPTION="This is a backend for Package::Stash, which provides the functionality in a way \
that's less buggy and much faster. It will be used by default if it's installed, and should be \
preferred in all environments with a compiler."
HOMEPAGE="https://metacpan.org/pod/Package::Stash::XS"
COPYRIGHT="2022 by Jesse Luehrs"
LICENSE="Artistic"
REVISION="1"
SOURCE_URI="https://cpan.metacpan.org/authors/id/E/ET/ETHER/Package-Stash-XS-$portVersion.tar.gz"
CHECKSUM_SHA256="26bad65c1959c57379b3e139dc776fbec5f702906617ef27cdc293ddf1239231"
SOURCE_DIR="Package-Stash-XS-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
package_stash_xs$secondaryArchSuffix = $portVersion
"
if [ -n "$secondaryArchSuffix" ]; then
PROVIDES+="
package_stash_xs = $portVersion
"
fi
REQUIRES="
haiku$secondaryArchSuffix
vendor_perl
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:perl
"
TEST_REQUIRES="
module_runtime
test_fatal
test_needs
variable_magic
"
BUILD()
{
perl Makefile.PL PREFIX=$prefix
make
}
INSTALL()
{
make pure_install
}
TEST()
{
make test
}