- The file %%SITE_PERL%%/XML/SAX/ParserDetails.ini is updated by ports that depending textproc/p5-XML-SAX. - For example, textproc/p5-XML-SAX-Expat, textproc/p5-XML-Simple and textproc/p5-XML-LibXML append something to the .ini file. - This causes checksum mismatch when executing `pkg check -s textproc/p5-XML-SAX` The fix provides a pkg-install program to handle the file in post-install. PR: 197011 Submitted by: Tatsuki Makino <tatsuki_makino@hotmail.com> Reviewed by: John Hein, mat, Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>
19 lines
500 B
Bash
19 lines
500 B
Bash
#!/bin/sh
|
|
|
|
PERL="%%PERL%%"
|
|
|
|
case $2 in
|
|
POST-INSTALL)
|
|
$PERL -MXML::SAX -e 'XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers();'
|
|
;;
|
|
DEINSTALL)
|
|
$PERL -MFile::Basename=dirname -MFile::Spec -MXML::SAX << 'PERLSCRIPT'
|
|
XML::SAX->remove_parser(q(XML::SAX::PurePerl))->save_parsers();
|
|
unless (@{XML::SAX->parsers()} > 0) {
|
|
$dir = $INC{q(XML/SAX.pm)}; $dir = dirname($dir);
|
|
$file = File::Spec->catfile($dir, q(SAX), XML::SAX::PARSER_DETAILS);
|
|
unlink($file);
|
|
}
|
|
PERLSCRIPT
|
|
;;
|
|
esac
|