mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
This includes a patch to install the ParserDetails.ini configuration file into site_perl (i.e. the non-packaged hierarchy) instead of vendor_perl because it should be editable by other perl module packages that provide an XML SAX parser (whether installed as HPKG or manually). The config file is created and modified using post-install and pre-uninstall scripts.
74 lines
1.9 KiB
Bash
74 lines
1.9 KiB
Bash
SUMMARY="Simple API for XML"
|
|
DESCRIPTION="XML::SAX is a SAX parser access API for Perl. It includes classes and APIs required \
|
|
for implementing SAX drivers, along with a factory class for returning any SAX parser installed \
|
|
on the user's system."
|
|
HOMEPAGE="https://metacpan.org/pod/XML::SAX::Base"
|
|
COPYRIGHT="Grant McLean"
|
|
LICENSE="Artistic"
|
|
REVISION="1"
|
|
SOURCE_URI="https://cpan.metacpan.org/authors/id/G/GR/GRANTM/XML-SAX-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="4506c387043aa6a77b455f00f57409f3720aa7e553495ab2535263b4ed1ea12a"
|
|
SOURCE_DIR="XML-SAX-$portVersion"
|
|
PATCHES="xml_sax-$portVersion.patchset"
|
|
ADDITIONAL_FILES="
|
|
install_xml_sax_pureperl.pl
|
|
uninstall_xml_sax_pureperl.pl
|
|
"
|
|
|
|
ARCHITECTURES="any"
|
|
|
|
POST_INSTALL_SCRIPTS="$relativePostInstallDir/install_xml_sax_pureperl.pl"
|
|
PRE_UNINSTALL_SCRIPTS="$relativePreUninstallDir/uninstall_xml_sax_pureperl.pl"
|
|
|
|
PROVIDES="
|
|
xml_sax = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku
|
|
vendor_perl
|
|
xml_namespacesupport
|
|
xml_sax_base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku_devel
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:make
|
|
cmd:perl
|
|
"
|
|
|
|
TEST_REQUIRES="
|
|
xml_namespacesupport
|
|
xml_sax_base
|
|
"
|
|
|
|
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)
|
|
|
|
mkdir -p $postInstallDir $preUninstallDir
|
|
cp $portDir/additional-files/install_xml_sax_pureperl.pl $postInstallDir
|
|
cp $portDir/additional-files/uninstall_xml_sax_pureperl.pl $preUninstallDir
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
# The patch to install the configuration into site_perl in non-packaged causes two tests to
|
|
# fail because it can't create the configuration directory and save a configuration there.
|
|
# The path uses perl Config and therefore perl's prefix which is read-only and non-packaged
|
|
# doesn't exist inside the haikuporter chroot.
|
|
make test
|
|
}
|