Files
haikuports/dev-perl/class_singleton/class_singleton-1.6.recipe
2025-12-25 13:52:08 +01:00

57 lines
1.5 KiB
Bash

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="2"
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
}