Files
haikuports/dev-perl/class_accessor/class_accessor-0.51.recipe
2025-12-25 12:50:46 +01:00

58 lines
1.4 KiB
Bash

SUMMARY="Automated accessor generation"
DESCRIPTION="This module automagically generates accessors/mutators for your class.
Most of the time, writing accessors is an exercise in cutting and pasting. You usually wind up \
with a series of almost identical methods, one for each piece of data in your object. While some \
will be unique, doing value checks and special storage tricks, most will simply be exercises in \
repetition.
If you make your module a subclass of Class::Accessor and declare your accessor fields with \
mk_accessors() then you'll find yourself with a set of automatically generated accessors, which \
can even be customized!"
HOMEPAGE="https://metacpan.org/pod/Class::Accessor"
COPYRIGHT="2017 Marty Pauley"
LICENSE="Artistic"
REVISION="2"
SOURCE_URI="https://cpan.metacpan.org/authors/id/K/KA/KASEI/Class-Accessor-$portVersion.tar.gz"
CHECKSUM_SHA256="bf12a3e5de5a2c6e8a447b364f4f5a050bf74624c56e315022ae7992ff2f411c"
SOURCE_DIR="Class-Accessor-$portVersion"
ARCHITECTURES="any"
PROVIDES="
class_accessor = $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
}