Files
haikuports/dev-perl/io_string/io_string-1.08.recipe
2025-12-25 20:20:20 +01:00

59 lines
1.8 KiB
Bash

SUMMARY="Emulate file interface for in-core strings"
DESCRIPTION="The IO::String module provides the IO::File interface for in-core strings. An \
IO::String object can be attached to a string, and makes it possible to use the normal file \
operations for reading or writing data, as well as for seeking to various locations of the \
string. This is useful when you want to use a library module that only provides an interface to \
file handles on data that you have in a string variable.
Note that perl-5.8 and better has built-in support for \"in memory\" files, which are set up by \
passing a reference instead of a filename to the open() call. The reason for using this module is \
that it makes the code backwards compatible with older versions of Perl.
The IO::String module provides an interface compatible with IO::File as distributed with IO-1.20, \
but the following methods are not available: new_from_fd, fdopen, format_write, \
format_page_number, format_lines_per_page, format_lines_left, format_name, format_top_name."
HOMEPAGE="https://metacpan.org/pod/IO::String"
COPYRIGHT="1998-2005 Gisle Aas"
LICENSE="Artistic"
REVISION="2"
SOURCE_URI="https://cpan.metacpan.org/authors/id/G/GA/GAAS/IO-String-$portVersion.tar.gz"
CHECKSUM_SHA256="2a3f4ad8442d9070780e58ef43722d19d1ee21a803bf7c8206877a10482de5a0"
SOURCE_DIR="IO-String-$portVersion"
ARCHITECTURES="any"
PROVIDES="
io_string = $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
}