Files
haikuports/dev-perl/ref_util/ref_util-0.204.recipe
Joachim Mairböck 2a8e5a5d38 ref_util[_xs]: new perl module recipes
Ref::Util::XS is the faster native implementation of Ref::Util. It is
technically optional, but recommended (and treated as a hard requirement when a
compiler is available at build time), so we add it as a dependency.
2025-03-14 20:13:54 +01:00

63 lines
1.4 KiB
Bash

SUMMARY="Utility functions for checking references"
DESCRIPTION="Ref::Util introduces several functions to help identify references in a smarter (and \
usually faster) way."
HOMEPAGE="https://metacpan.org/pod/Ref::Util"
COPYRIGHT="2017 by Sawyer X"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://cpan.metacpan.org/authors/id/A/AR/ARC/Ref-Util-$portVersion.tar.gz"
CHECKSUM_SHA256="415fa73dbacf44f3d5d79c14888cc994562720ab468e6f71f91cd1f769f105e1"
SOURCE_DIR="Ref-Util-$portVersion"
ARCHITECTURES="any"
PROVIDES="
ref_util = $portVersion
"
REQUIRES="
haiku
ref_util_xs
vendor_perl
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:make
cmd:perl
"
TEST_REQUIRES="
ref_util_xs
"
BUILD()
{
# Makefile.PL checks whether gcc works to add a dependency on Ref::Util::XS.
# We just add that unconditionally so that users can use the faster implementation,
# the compiler check isn't needed.
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()
{
# The tests are using the XS implementation when available (see TEST_REQUIRES),
# but Ref::Util::XS isn't displayed in requirements because Makefile.PL was
# run without gcc available.
make test
}