Files
haikuports/dev-perl/ffi_checklib/ffi_checklib-0.31.recipe
2025-12-24 17:40:55 +01:00

60 lines
1.5 KiB
Bash

SUMMARY="Check that a library is available for FFI"
DESCRIPTION="This module checks whether a particular dynamic library is available for FFI to use. \
It is modeled heavily on Devel::CheckLib, but will find dynamic libraries even when development \
packages are not installed. It also provides a find_lib function that will return the full path \
to the found dynamic library, which can be feed directly into FFI::Platypus or another FFI system.
Although intended mainly for FFI modules via FFI::Platypus and similar, this module does not \
actually use any FFI to do its detection and probing. This module does not have any non-core \
runtime dependencies. The test suite does depend on Test2::Suite."
HOMEPAGE="https://metacpan.org/pod/FFI::CheckLib"
COPYRIGHT="2014-2022 by Graham Ollis"
LICENSE="Artistic"
REVISION="2"
SOURCE_URI="https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/FFI-CheckLib-$portVersion.tar.gz"
CHECKSUM_SHA256="04d885fc377d44896e5ea1c4ec310f979bb04f2f18658a7e7a4d509f7e80bb80"
SOURCE_DIR="FFI-CheckLib-$portVersion"
ARCHITECTURES="any"
PROVIDES="
ffi_checklib = $portVersion
"
REQUIRES="
haiku
file_which
vendor_perl
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:make
cmd:perl
"
TEST_REQUIRES="
file_which
"
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
}