data_uniqid: new perl module recipe

This commit is contained in:
Joachim Mairböck
2025-01-02 21:39:55 +01:00
parent adead2652f
commit be66955036

View File

@@ -0,0 +1,50 @@
SUMMARY="Perl extension for simple genrating of unique id's"
DESCRIPTION="Data::Uniqid provides three simple routines for generating unique ids. These ids \
are coded with a Base62 systen to make them short and handy (e.g. to use it as part of a URL)."
HOMEPAGE="https://metacpan.org/pod/Data::Uniqid"
COPYRIGHT="2003 Mike Wesemann"
LICENSE="Artistic"
REVISION="1"
SOURCE_URI="https://cpan.metacpan.org/authors/id/M/MW/MWX/Data-Uniqid-$portVersion.tar.gz"
CHECKSUM_SHA256="b6919ba49b9fe98bfdf3e8accae7b9b7f78dc9e71ebbd0b7fef7a45d99324ccb"
SOURCE_DIR="Data-Uniqid-$portVersion"
ARCHITECTURES="any"
PROVIDES="
data_uniqid = $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()
{
# test 4 (luniqid) fails because gethostbyname(hostname()) seems to be empty
make test
}