xml_libxml: new perl module recipe

This commit is contained in:
Joachim Mairböck
2024-12-31 14:33:58 +01:00
parent 924c69c62a
commit bda656c9f5
3 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
#!perl
use XML::SAX;
XML::SAX->add_parser(q(XML::LibXML::SAX::Parser));
XML::SAX->add_parser(q(XML::LibXML::SAX));
XML::SAX->save_parsers();

View File

@@ -0,0 +1,7 @@
#!perl
use XML::SAX;
XML::SAX->remove_parser(q(XML::LibXML::SAX::Parser));
XML::SAX->remove_parser(q(XML::LibXML::SAX));
XML::SAX->save_parsers();

View File

@@ -0,0 +1,80 @@
SUMMARY="Perl Binding for libxml2"
DESCRIPTION="This module is an interface to libxml2, providing XML and HTML parsers with DOM, SAX \
and XMLReader interfaces, a large subset of DOM Layer 3 interface and a XML::XPath-like interface \
to XPath API of libxml2. The module is split into several packages which are not described in \
this section; unless stated otherwise, you only need to use XML::LibXML; in your programs.
Check out XML::LibXML by Example (http://grantm.github.io/perl-libxml-by-example/) for a tutorial."
HOMEPAGE="https://metacpan.org/pod/XML::LibXML"
COPYRIGHT="2001-2007, AxKit.com Ltd.
2002-2006, Christian Glahn
2006-2009, Petr Pajas"
LICENSE="Artistic"
REVISION="1"
SOURCE_URI="https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-$portVersion.tar.gz"
CHECKSUM_SHA256="a29bf3f00ab9c9ee04218154e0afc8f799bf23674eb99c1a9ed4de1f4059a48d"
SOURCE_DIR="XML-LibXML-$portVersion"
ADDITIONAL_FILES="
install_xml_sax_libxml.pl
uninstall_xml_sax_libxml.pl
"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
POST_INSTALL_SCRIPTS="$relativePostInstallDir/install_xml_sax_libxml.pl"
PRE_UNINSTALL_SCRIPTS="$relativePreUninstallDir/uninstall_xml_sax_libxml.pl"
PROVIDES="
xml_libxml$secondaryArchSuffix = $portVersion
"
if [ -n "$secondaryArchSuffix" ]; then
PROVIDES+="
xml_libxml = $portVersion
"
fi
REQUIRES="
haiku$secondaryArchSuffix
vendor_perl
xml_namespacesupport
xml_sax
xml_sax_base
lib:libxml2$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
alien_build$secondaryArchSuffix
alien_libxml2$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:perl
"
TEST_REQUIRES="
xml_namespacesupport
xml_sax
xml_sax_base
"
BUILD()
{
perl Makefile.PL PREFIX=$prefix
make
}
INSTALL()
{
make pure_install
mkdir -p $postInstallDir $preUninstallDir
cp $portDir/additional-files/install_xml_sax_libxml.pl $postInstallDir
cp $portDir/additional-files/uninstall_xml_sax_libxml.pl $preUninstallDir
}
TEST()
{
make test
}