number_compare: new perl module recipe

This commit is contained in:
Joachim Mairböck
2024-11-30 19:01:02 +01:00
parent 5e7499e32f
commit 1230805d2b

View File

@@ -0,0 +1,53 @@
SUMMARY="Perl module for numeric comparisons"
DESCRIPTION="Number::Compare compiles a simple comparison to an anonymous subroutine, which you \
can call with a value to be tested again.
Now this would be very pointless, if Number::Compare didn't understand magnitudes.
The target value may use magnitudes of kilobytes (k, ki), megabytes (m, mi), or gigabytes (g, \
gi). Those suffixed with an i use the appropriate 2**n version in accordance with the IEC \
standard: http://physics.nist.gov/cuu/Units/binary.html"
HOMEPAGE="https://metacpan.org/pod/Number::Compare"
COPYRIGHT="2002,2011 Richard Clamp"
LICENSE="Artistic"
REVISION="1"
SOURCE_URI="https://cpan.metacpan.org/authors/id/R/RC/RCLAMP/Number-Compare-$portVersion.tar.gz"
CHECKSUM_SHA256="83293737e803b43112830443fb5208ec5208a2e6ea512ed54ef8e4dd2b880827"
SOURCE_DIR="Number-Compare-$portVersion"
ARCHITECTURES="any"
PROVIDES="
number_compare = $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
}