Files
haikuports/dev-perl/scope_guard/scope_guard-0.21.recipe
2025-12-25 17:11:48 +01:00

53 lines
1.3 KiB
Bash

SUMMARY="Lexically-scoped resource management"
DESCRIPTION="This module provides a convenient way to perform cleanup or other forms of resource \
management at the end of a scope. It is particularly useful when dealing with exceptions: the \
Scope::Guard constructor takes a reference to a subroutine that is guaranteed to be called even \
if the thread of execution is aborted prematurely. This effectively allows lexically-scoped \
\"promises\" to be made that are automatically honoured by perl's garbage collector."
HOMEPAGE="https://metacpan.org/pod/Scope::Guard"
COPYRIGHT="2005-2015, chocolateboy"
LICENSE="Artistic"
REVISION="2"
SOURCE_URI="https://cpan.metacpan.org/authors/id/C/CH/CHOCOLATE/Scope-Guard-$portVersion.tar.gz"
CHECKSUM_SHA256="8c9b1bea5c56448e2c3fadc65d05be9e4690a3823a80f39d2f10fdd8f777d278"
SOURCE_DIR="Scope-Guard-$portVersion"
ARCHITECTURES="any"
PROVIDES="
scope_guard = $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
}