From f0151a22fff46a9d75622d36c98011625e4a29ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= Date: Sun, 27 Oct 2024 22:08:28 +0100 Subject: [PATCH] class_singleton: new perl module recipe --- .../class_singleton-1.6.recipe | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 dev-perl/class_singleton/class_singleton-1.6.recipe diff --git a/dev-perl/class_singleton/class_singleton-1.6.recipe b/dev-perl/class_singleton/class_singleton-1.6.recipe new file mode 100644 index 000000000..5106f5350 --- /dev/null +++ b/dev-perl/class_singleton/class_singleton-1.6.recipe @@ -0,0 +1,56 @@ +SUMMARY="Implementation of a \"Singleton\" class" +DESCRIPTION="This is the Class::Singleton module. A Singleton describes an object class that can \ +have only one instance in any system. An example of a Singleton might be a print spooler or \ +system registry. This module implements a Singleton class from which other classes can be \ +derived. By itself, the Class::Singleton module does very little other than manage the \ +instantiation of a single object. In deriving a class from Class::Singleton, your module will \ +inherit the Singleton instantiation method and can implement whatever specific functionality is \ +required." +HOMEPAGE="https://metacpan.org/pod/Class::Singleton" +COPYRIGHT="1998 Canon Research Centre Europe Ltd. +1998-2008 Andy Wardley +2014, 2020 Steve Hay" +LICENSE="Artistic" +REVISION="1" +SOURCE_URI="https://cpan.metacpan.org/authors/id/S/SH/SHAY/Class-Singleton-$portVersion.tar.gz" +CHECKSUM_SHA256="27ba13f0d9512929166bbd8c9ef95d90d630fc80f0c9a1b7458891055e9282a4" +SOURCE_DIR="Class-Singleton-$portVersion" + +ARCHITECTURES="any" + +PROVIDES=" + class_singleton = $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 +}