io_html: new perl module recipe

This commit is contained in:
Joachim Mairböck
2025-01-25 15:38:32 +01:00
parent 3c048e470d
commit 7743d664e9

View File

@@ -0,0 +1,50 @@
SUMMARY="Open an HTML file with automatic charset detection"
DESCRIPTION="IO::HTML provides an easy way to open a file containing HTML while automatically \
determining its encoding. It uses the HTML5 encoding sniffing algorithm specified in section \
8.2.2.2 of the draft standard."
HOMEPAGE="https://metacpan.org/pod/IO::HTML"
COPYRIGHT="2020 by Christopher J. Madsen"
LICENSE="Artistic"
REVISION="1"
SOURCE_URI="https://cpan.metacpan.org/authors/id/C/CJ/CJM/IO-HTML-$portVersion.tar.gz"
CHECKSUM_SHA256="c87b2df59463bbf2c39596773dfb5c03bde0f7e1051af339f963f58c1cbd8bf5"
SOURCE_DIR="IO-HTML-$portVersion"
ARCHITECTURES="any"
PROVIDES="
io_html = $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
}