From 6204edb74a37ed608b973c4d2cbcd968cfce670d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= Date: Sun, 27 Oct 2024 20:23:28 +0100 Subject: [PATCH] class_tiny: new perl module recipe --- dev-perl/class_tiny/class_tiny-1.008.recipe | 62 +++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 dev-perl/class_tiny/class_tiny-1.008.recipe diff --git a/dev-perl/class_tiny/class_tiny-1.008.recipe b/dev-perl/class_tiny/class_tiny-1.008.recipe new file mode 100644 index 000000000..eb0131dfe --- /dev/null +++ b/dev-perl/class_tiny/class_tiny-1.008.recipe @@ -0,0 +1,62 @@ +SUMMARY="Minimalist class construction" +DESCRIPTION="This module offers a minimalist class construction kit in around 120 lines of code. \ +Here is a list of features: +- defines attributes via import arguments +- generates read-write accessors +- supports lazy attribute defaults +- supports custom accessors +- superclass provides a standard new constructor +- new takes a hash reference or list of key/value pairs +- new supports providing BUILDARGS to customize constructor options +- new calls BUILD for each class from parent to child +- superclass provides a DESTROY method +- DESTROY calls DEMOLISH for each class from child to parent +Multiple-inheritance is possible, with superclass order determined via mro::get_linear_isa. +It uses no non-core modules for any recent Perl. On Perls older than v5.10 it requires \ +MRO::Compat. On Perls older than v5.14, it requires Devel::GlobalDestruction." +HOMEPAGE="https://metacpan.org/pod/Class::Tiny" +COPYRIGHT="2013 by David Golden" +LICENSE="Apache v2" +REVISION="1" +SOURCE_URI="https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Class-Tiny-$portVersion.tar.gz" +CHECKSUM_SHA256="ee058a63912fa1fcb9a72498f56ca421a2056dc7f9f4b67837446d6421815615" +SOURCE_DIR="Class-Tiny-$portVersion" + +ARCHITECTURES="any" + +PROVIDES=" + class_tiny = $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 +}